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