1 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
4 * directives.c (do_include_common): Error out if an empty filename
5 is given for #include (or #include_next or #import).
7 2004-11-27 Roger Sayle <roger@eyesopen.com>
8 Zack Weinberg <zack@codesourcery.com>
10 * internal.h: Replace all uses of uchar with unsigned char.
11 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
12 with !IN_GCC, so uchar is only defined whilst building libcpp.
14 2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
16 * aclocal.m4: Regenerate.
18 2004-11-24 Roger Sayle <roger@eyesopen.com>
21 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
22 directly, instead of the non-existant "system.h" and "ansidecl.h".
23 * configure: Regenerate.
25 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
26 Joseph Myers <joseph@codesourcery.com>
28 * internal.h (struct lexer_state): Add in_deferred_pragma.
29 * directives.c (struct pragma_entry): Add allow_expansion.
30 (insert_pragma_entry): Take allow_expansion flag.
31 (register_pragma): Likewise.
32 (cpp_register_pragma): Likewise.
33 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
34 (do_pragma): Honor allow_expansion.
35 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
36 * include/cpplib.h (cpp_register_pragma): Update prototype.
38 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
39 Mark Mitchell <mark@codesourcery.com>
41 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
43 * configure: Regenerate.
45 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
47 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
49 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
50 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
51 Remove local srcdir path from generated file.
53 2004-11-04 Zack Weinberg <zack@codesourcery.com>
54 Gerald Pfeifer <gerald@pfeifer.com>
56 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
59 2004-10-27 Zack Weinberg <zack@codesourcery.com>
62 * directives.c (do_pragma): Do not defer pragmas which are unknown.
63 (cpp_handle_deferred_pragma): Add cast to silence warning.
65 2004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
67 * errors.c (_cpp_begin_message): Print "error: " for errors.
69 2004-10-10 Andreas Jaeger <aj@suse.de>
71 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
72 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
74 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
76 * pch.c (cpp_write_pch_state): Remove variable z as it is not
78 (cpp_read_state): Remove unused variables, m, d and mac_count.
80 2004-09-29 Per Bothner <per@bothner.com>
82 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
83 cb.line_change. Otherwise do_pragma will call the line_change
84 call-back with a meaningless line number.
86 2004-09-24 Zack Weinberg <zack@codesourcery.com>
88 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
89 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
90 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
91 * aclocal.m4, configure: Regenerate.
92 * init.c: Include localedir.h.
93 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
95 (.c.o): Use $(ALL_CFLAGS).
96 (localedir.h, localedir.hs): New rules.
97 (clean): Use rm -rf to remove directories.
98 (distclean): Also delete localedir.h and localedir.hs.
99 (init.o): Update dependencies.
101 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
103 * Makefile.in (aclocal.m4): Update dependencies.
104 * configure.ac (AC_CONFIG_MACRO_DIR): New.
105 * aclocal.m4, configure: Regenerate.
107 2004-09-17 Zack Weinberg <zack@codesourcery.com>
109 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
110 (_cpp_convert_input, _cpp_default_encoding): Add comments.
111 Some other comments in this file also tweaked.
113 * directives.c (do_pragma): Save current buffer position
114 before lexing the pragma keywords; don't call
115 _cpp_backup_tokens in the defer_pragmas case.
117 2004-09-15 Per Bothner <per@bothner.com>
119 * include/line-map.h (line_map_start): Add parameter names so
120 preceding comment makes sense.
121 (linemap_add): Remove from comment mention of non-existing parameter.
123 2004-09-09 Matt Austern <austern@apple.com>
124 Zack Weinberg <zack@codesourcery.com>
126 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
127 prefixes throughout. Add entry for PRAGMA. Remove
128 unnecessary "= 0" from EQ.
129 (enum cpp_ttype): Adjust OP and TK definitions to restore
130 prefixes, via token-paste.
131 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
132 Change from #defines to additional cpp_ttype enumerators.
133 (struct cpp_options): Add defer_pragmas.
134 (cpp_handle_deferred_pragma): Prototype new interface.
136 * internal.h (struct cpp_reader): Add directive_result.
137 * directives.c (struct pragma_entry): Add is_internal field;
138 give boolean fields type bool.
139 (start_directive): Initialize pfile->directive_result.type.
140 (_cpp_do__Pragma): Likewise.
141 (run_directive): Do not crash if pfile->buffer->prev is NULL.
142 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
144 (register_pragma): New static function, bulk of former
145 cpp_register_pragma here; add 'internal' argument, pass along
146 to insert_pragma_entry.
147 (cpp_register_pragma): Now a wrapper around register_pragma which
148 always passes false for 'internal' argument.
149 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
151 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
152 an internal pragma, save text till the end of the line as a CPP_PRAGMA
153 token instead of executing the pragma.
154 (cpp_handle_deferred_pragma): New interface.
155 * lex.c (token_spellings): Adjust OP and TK definitions to
156 match changes to cpplib.h.
157 (_cpp_lex_token): Check for a directive-result token and
158 return it if present.
159 (cpp_token_val_index): Handle CPP_PRAGMA.
160 * macro.c (cpp_builtin_macro_text): Correct comment.
161 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
163 2004-09-06 Serge Belyshev <belyshev@lubercy.com>
165 PR preprocessor/14699
166 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
167 from size_t to double.
169 2004-08-28 Andreas Schwab <schwab@suse.de>
170 Andreas Jaeger <aj@suse.de>
172 * configure.ac: Set PACKAGE correctly.
173 * configure: Regenerated.
175 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
177 * Makefile.in: Add back top_builddir.
179 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
181 * configure.ac: Replace Automake macro invocations
182 with manual Autoconf checks and substitutions.
183 * configure: Regenerate.
184 * aclocal.m4: Regenerate.
185 * config.in: Regenerate.
186 * Makefile.am: Removed.
187 * Makefile.in: Heavy simplification and reorganization.
189 2004-08-09 Mark Mitchell <mark@codesourcery.com>
191 * configure.ac (arm*-*-eabi*): New target.
192 (arm*-*-symbianelf*): Likewise.
193 * configure: Regenerated.
195 2004-07-24 Bernardo Innocenti <bernie@develer.com>
197 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
198 * directives.c: Use XNEW-family macros from libiberty.
201 * cpplib.h (cpp_deps_style): Export enum with name.
203 2004-07-23 Matthias Klose <doko@debian.org>
205 * init.c (init_library): Use PACKAGE for the text domain.
207 2004-07-16 Andris Pavenis <pavenis@latnet.lv>
209 PR preprocessor/16366
210 * internal.h (struct cpp_reader): New field dir_hash.
211 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
212 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
214 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
216 PR preprocessor/16192
217 PR preprocessor/15913
218 PR preprocessor/15572
219 * expr.c (_cpp_parse_expr): Handle remaining cases where an
220 expression is missing.
221 * init.c (post_options): Traditional cpp doesn't do // comments.
223 2004-06-30 Per Bothner <per@bothner.com>
225 * include/line-map.h (fileline): Remove old typedef.
226 * internal.h (struct cpp_reader): Use source_location typedef instead.
228 2004-06-26 Zack Weinberg <zack@codesourcery.com>
230 Partially revert patch of 2004-06-05.
231 * files.c (search_cache): Remove pfile argument. Don't check
232 for file that would be found by "" or <> search here...
233 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
234 Do not apply directory-of-current-file correction to files
235 found by this check. Rearrange code slightly.
237 2004-06-21 Geoffrey Keating <geoffk@apple.com>
239 * files.c (should_stack_file): Correct swapped parameters to call
241 * pch.c (cpp_valid_state): Handle -fpreprocessed.
243 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
245 * Makefile.in: Regenerate with automake 1.8.5.
246 * aclocal.m4: Likewise.
247 * configure: Regenerate.
249 2004-06-11 Zack Weinberg <zack@codesourcery.com>
251 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
252 * configure, config.in: Regenerate.
253 * system.h: Unconditionally define bool as unsigned char,
254 BOOL_BITFIELD as unsigned int.
255 * .cvsignore: New file.
257 2004-06-09 Geoffrey Keating <geoffk@apple.com>
259 * traditional.c (push_replacement_text): Set macro->traditional.
260 (save_replacement_text): Likewise.
261 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
262 (struct save_macro_item): Delete.
263 (struct save_macro_data): Use a character array not the previous
265 (save_macros): Save macro as text not as internal structures.
266 (cpp_prepare_state): Update for changes to save_macro_data.
267 (cpp_read_state): Don't read macros defined in PCH. Restore
269 * macro.c (create_iso_definition): Honour alloc_subobject.
270 Clear traditional flag.
271 (_cpp_create_definition): Honour alloc_subobject.
272 * lex.c (cpp_token_val_index): New.
273 * internal.h: Include cpp-id-data.h.
274 (uchar): Move definition to cpp-id-data.h.
276 (cpp_macro): Likewise.
277 * directives.c (struct answer): Move to cpp-id-data.h.
278 (do_assert): Honour alloc_subobject.
280 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
281 * include/cpplib.h (struct cpp_string): Add GTY marker.
282 (enum cpp_token_fld_kind): New.
283 (struct cpp_token): Add GTY markers.
284 (cpp_token_val_index): Prototype.
285 (CPP_HASHNODE_VALUE_IDX): New.
286 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
287 * include/cpp-id-data.h: New file.
289 2004-06-09 Paolo Bonzini <bonzini@gnu.org>
291 * Makefile.am (all-local): New.
292 * Makefile.in: Regenerate.
294 2004-06-06 Roger Sayle <roger@eyesopen.com>
296 * Makefile.am (LIBICONV): Declare.
297 (makedepend_LDADD): Use LIBICONV.
298 * Makefile.in: Regenerate.
300 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
302 * Makefile.am (LIBINTL): Declare
303 (makedepend_LDADD): Use LIBINTL.
304 * Makefile.in: Regenerate.
306 2004-06-05 Zack Weinberg <zack@codesourcery.com>
308 * Makefile.am: Add makedepend.
309 * Makefile.in, aclocal.m4: Regenerate.
310 * charset.c: Insert a space to avoid a warning.
311 * directives.c: Include mkdeps.h.
312 (_cpp_handle_directive): Reenable macro expander if appropriate.
313 (undefine_macros): Inline body of _cpp_free_definition for speed.
314 Do not call undef callback or _cpp_warn_if_unused_macro.
315 (cpp_get_deps): New interface.
316 * files.c (search_cache): Add pfile argument. Check for file
317 that would be found by "" or <> search here...
318 (_cpp_find_file): ...not here. Correct recorded start_dir of
319 files found by directory-of-current-file search that would be
320 found by "" or <> search.
321 * init.c (cpp_add_dependency_target): Delete.
322 * internal.h (struct lexer_state): Add discarding_output flag.
323 * lex.c (lex_identifier): Compute hash function while scanning.
324 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
326 * makedepend.c: New file.
327 * mkdeps.c (struct deps): Add vpath vector.
328 (apply_vpath, deps_add_vpath): New function.
329 (deps_free): Free vpath vector.
330 (deps_add_dep, deps_add_target): Use apply_vpath.
331 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
332 (ht_lookup_with_hash): New function.
333 * cpplib.h, mkdeps.h: Update prototypes.
334 * symtab.h: Update prototypes.
335 (HT_HASHSTEP, HT_FINISH): New macros.
337 2004-05-29 Geoffrey Keating <geoffk@apple.com>
339 * symtab.c (ht_create): Set entries_owned.
340 (ht_destroy): Honour entries_owned.
341 (ht_expand): Likewise.
343 * include/symtab.h (struct ht): New field 'entries_owned'
344 (ht_load): New prototype.
346 2004-05-26 Paolo Bonzini <bonzini@gnu.org>
349 * configure.ac: Fix m4 quoting when picking
350 the size of HOST_WIDE_INT.
351 * configure: Regenerate.
353 2004-05-25 Paolo Bonzini <bonzini@gnu.org>
355 * Makefile.am: the correct directory for
356 gettext include files is given by @INCINTL@.
357 * Makefile.in: Regenerate.
359 2004-05-24 Paolo Bonzini <bonzini@gnu.org>
361 * system.h [!ENABLE_NLS]: dgettext takes two
364 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
366 Moved libcpp from the gcc subdirectory to the toplevel.
367 * Makefile.am: New file.
368 * Makefile.in: Regenerate.
369 * configure.ac: New file.
370 * configure: Regenerate.
371 * config.in: Regenerate.
372 * charset.c: Moved from gcc/cppcharset.c. Add note about
373 brokenness of input charset detection. Adjust for change
374 in name of cppucnid.h.
375 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
376 * expr.c: Moved from gcc/cppexp.c.
377 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
378 Remove #define of O_BINARY, it is in system.h.
379 * identifiers.c: Moved from gcc/cpphash.c.
380 * internal.h: Moved from gcc/cpphash.h. Change header
381 guard name. All other files adjusted to match name change.
382 * init.c: Moved from gcc/cppinit.c.
383 (init_library) [ENABLE_NLS]: Call bindtextdomain.
384 * lex.c: Moved from gcc/cpplex.c.
385 * directives.c: Moved from gcc/cpplib.c.
386 * macro.c: Moved from gcc/cppmacro.c.
387 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
388 * traditional.c: Moved from gcc/cpptrad.c.
389 * ucnid.h: Moved from gcc/cppucnid.h. Change header
391 * ucnid.pl: Moved from gcc/cppucnid.pl.
392 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
394 * symtab.c: Moved from gcc/hashtable.c.
395 * line-map.c: Moved from gcc. Do not include intl.h.
396 * mkdeps.c: Moved from gcc.
397 * system.h: New file.
398 * include/cpplib.h: Moved from gcc. Change header guard name.
399 * include/line-map.h: Moved from gcc. Change header guard name.
400 * include/mkdeps.h: Moved from gcc. Change header guard name.
401 * include/symtab.h: Moved from gcc/hashtable.h. Change header