1 2006-03-09 Release Manager
5 2006-01-04 Jakub Jelinek <jakub@redhat.com>
8 * directives.c (do_pragma): If pragma line ends with multi-line
9 block comment, end the saved deferred pragma string before that
10 comment. Handle embedded '\0' chars on the pragma line.
12 2005-11-18 Joseph S. Myers <joseph@codesourcery.com>
14 * errors.c (cpp_error): Use cpplib's notion of pedantic_errors
15 when passing diagnostics to front end.
17 2005-11-15 Kean Johnston <jkj@sco.com>
19 * include/cpplib.h (struct cpp_callbacks): Make the (*error)
20 function pointer use ATTRIBUTE_FPTR_PRINTF so that versions
21 of gcc prior to 3.1 can bootstrap again.
23 2005-11-09 Per Bothner <per@bothner.com>
24 Uros Bizjak <uros@kss-loka.si>
27 * init.c (read_original_filename): Temporarily set
28 state.in_directive before calling _cpp_lex_direct for
31 2005-11-03 James E Wilson <wilson@specifix.com>
34 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
36 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
39 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
40 (struct cpp_callbacks): Add error.
41 * errors.c (cpp_error): If client_diagnostic, use error callback.
42 * charset.c (convert_escape): Don't use %03o in diagnostic.
44 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
47 * macro.c (_cpp_builtin_macro_text): Lower the needed max
49 (cpp_quote_string): Don't octalify non printable
52 2005-10-21 James E Wilson <wilson@specifix.com>
55 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
56 callers. Pass to open_file_failed.
57 (open_file_failed): New parameter angle_brackets. Fix all callers.
58 Use in print_dep assignment.
59 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
60 * internal.h (_cpp_find_file): Add new parm to declaration.
62 2005-09-20 Release Manager
66 2005-08-30 Jakub Jelinek <jakub@redhat.com>
70 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
73 2005-07-07 Release Manager
77 2005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
80 * configure: Regenerate.
82 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
84 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
85 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
86 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
87 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
89 (fwrite_unlocked): Fix prototype.
91 * configure, config.in: Regenerate.
93 * system.h (fopen, fdopen, freopen): Define these to the unlocked
96 2005-04-19 Per Bothner <per@bothner.com>
99 * line-map.c (linemap_line_start): Fix bug when we need to increse
100 column_bits but can re-use the current line_map.
102 2005-04-20 Release Manager
104 * GCC 4.0.0 released.
106 2005-04-05 Jakub Jelinek <jakub@redhat.com>
108 PR preprocessor/19475
109 * macro.c (create_iso_definition): For < ISO C99, don't
110 pedwarn if there is no whitespace between macro name and its
111 replacement, but the replacement starts with a basic character
114 2005-03-19 Joseph S. Myers <joseph@codesourcery.com>
116 * configure.ac: Consistently use solaris2.1[0-9]* instead of
118 * configure: Regenerate.
120 2005-03-04 Jakub Jelinek <jakub@redhat.com>
124 * macro.c (replace_args, cpp_get_token): Copy whole
125 cpp_token_u instead of just cpp_string field from it.
127 2005-02-28 Devang Patel <dpatel@apple.com>
129 * directives.c (do_line): Save sysp early before line table is
132 2005-02-20 Zack Weinberg <zack@codesourcery.com>
135 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
136 (cpp_host_to_exec_charset): New function.
137 * include/cpplib.h: Declare cpp_host_to_exec_charset.
139 2005-02-19 Devang Patel <dpatel@apple.com>
141 * charset.c (_cpp_convert_input): Check '\r' before inserting
144 2005-02-15 Eric Christopher <echristo@redhat.com>
146 PR preprocessor/19077
147 * macro.c (cpp_macro_definition): Move handling of whitespace
148 to PREV_WHITE conditional. Remove overloading of len
151 2005-02-14 Kazu Hirata <kazu@cs.umass.edu>
153 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
154 traditional.c: Update copyright.
156 2005-02-14 Paolo Bonzini <bonzini@gnu.org>
159 * configure.ac: Check for declaration of basename and getopt.
160 * config.in: Regenerate.
161 * configure: Regenerate.
162 * internal.h (ustrcspn): New.
163 * macro.c (create_iso_definition): Fix allocation of memory.
164 (padding_token): Add cast to remove const-ness.
165 * pch.c (cpp_read_state): Use ustrcspn.
167 2005-02-08 Mike Stump <mrs@apple.com>
169 * files.c (pchf_adder): Remove.
170 (struct pchf_adder_info): Likewise.
171 (_cpp_save_file_entries): Write out all files so that #import works.
173 2005-01-23 Joseph S. Myers <joseph@codesourcery.com>
175 * configure: Regenerate.
177 2005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
179 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
181 * include/cpplib.h: Also update copyright years.
183 2005-01-03 Geoffrey Keating <geoffk@apple.com>
185 * files.c (_cpp_find_file): Add files found by search_path_exhausted
186 to the list of all files.
188 2005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
190 * internal.h: Update references to Cpp lib filenames.
191 * directives.c: Likewise.
194 * traditional.c: Likewise.
196 2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
198 PR preprocessor/15167
199 * files.c (destroy_cpp_file): New function.
200 (should_stack_file): Make a new file if the
201 compared file is still stacked.
203 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
205 PR preprocessor/17610
206 * directives.c (do_include_common): Error out if an empty filename
207 is given for #include (or #include_next or #import).
209 2004-11-27 Roger Sayle <roger@eyesopen.com>
210 Zack Weinberg <zack@codesourcery.com>
212 * internal.h: Replace all uses of uchar with unsigned char.
213 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
214 with !IN_GCC, so uchar is only defined whilst building libcpp.
216 2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
218 * aclocal.m4: Regenerate.
220 2004-11-24 Roger Sayle <roger@eyesopen.com>
222 PR preprocessor/15824
223 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
224 directly, instead of the non-existant "system.h" and "ansidecl.h".
225 * configure: Regenerate.
227 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
228 Joseph Myers <joseph@codesourcery.com>
230 * internal.h (struct lexer_state): Add in_deferred_pragma.
231 * directives.c (struct pragma_entry): Add allow_expansion.
232 (insert_pragma_entry): Take allow_expansion flag.
233 (register_pragma): Likewise.
234 (cpp_register_pragma): Likewise.
235 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
236 (do_pragma): Honor allow_expansion.
237 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
238 * include/cpplib.h (cpp_register_pragma): Update prototype.
240 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
241 Mark Mitchell <mark@codesourcery.com>
243 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
244 need_64bit_hwint=yes.
245 * configure: Regenerate.
247 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
249 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
251 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
252 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
253 Remove local srcdir path from generated file.
255 2004-11-04 Zack Weinberg <zack@codesourcery.com>
256 Gerald Pfeifer <gerald@pfeifer.com>
258 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
261 2004-10-27 Zack Weinberg <zack@codesourcery.com>
264 * directives.c (do_pragma): Do not defer pragmas which are unknown.
265 (cpp_handle_deferred_pragma): Add cast to silence warning.
267 2004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
269 * errors.c (_cpp_begin_message): Print "error: " for errors.
271 2004-10-10 Andreas Jaeger <aj@suse.de>
273 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
274 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
276 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
278 * pch.c (cpp_write_pch_state): Remove variable z as it is not
280 (cpp_read_state): Remove unused variables, m, d and mac_count.
282 2004-09-29 Per Bothner <per@bothner.com>
284 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
285 cb.line_change. Otherwise do_pragma will call the line_change
286 call-back with a meaningless line number.
288 2004-09-24 Zack Weinberg <zack@codesourcery.com>
290 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
291 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
292 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
293 * aclocal.m4, configure: Regenerate.
294 * init.c: Include localedir.h.
295 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
297 (.c.o): Use $(ALL_CFLAGS).
298 (localedir.h, localedir.hs): New rules.
299 (clean): Use rm -rf to remove directories.
300 (distclean): Also delete localedir.h and localedir.hs.
301 (init.o): Update dependencies.
303 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
305 * Makefile.in (aclocal.m4): Update dependencies.
306 * configure.ac (AC_CONFIG_MACRO_DIR): New.
307 * aclocal.m4, configure: Regenerate.
309 2004-09-17 Zack Weinberg <zack@codesourcery.com>
311 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
312 (_cpp_convert_input, _cpp_default_encoding): Add comments.
313 Some other comments in this file also tweaked.
315 * directives.c (do_pragma): Save current buffer position
316 before lexing the pragma keywords; don't call
317 _cpp_backup_tokens in the defer_pragmas case.
319 2004-09-15 Per Bothner <per@bothner.com>
321 * include/line-map.h (line_map_start): Add parameter names so
322 preceding comment makes sense.
323 (linemap_add): Remove from comment mention of non-existing parameter.
325 2004-09-09 Matt Austern <austern@apple.com>
326 Zack Weinberg <zack@codesourcery.com>
328 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
329 prefixes throughout. Add entry for PRAGMA. Remove
330 unnecessary "= 0" from EQ.
331 (enum cpp_ttype): Adjust OP and TK definitions to restore
332 prefixes, via token-paste.
333 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
334 Change from #defines to additional cpp_ttype enumerators.
335 (struct cpp_options): Add defer_pragmas.
336 (cpp_handle_deferred_pragma): Prototype new interface.
338 * internal.h (struct cpp_reader): Add directive_result.
339 * directives.c (struct pragma_entry): Add is_internal field;
340 give boolean fields type bool.
341 (start_directive): Initialize pfile->directive_result.type.
342 (_cpp_do__Pragma): Likewise.
343 (run_directive): Do not crash if pfile->buffer->prev is NULL.
344 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
346 (register_pragma): New static function, bulk of former
347 cpp_register_pragma here; add 'internal' argument, pass along
348 to insert_pragma_entry.
349 (cpp_register_pragma): Now a wrapper around register_pragma which
350 always passes false for 'internal' argument.
351 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
353 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
354 an internal pragma, save text till the end of the line as a CPP_PRAGMA
355 token instead of executing the pragma.
356 (cpp_handle_deferred_pragma): New interface.
357 * lex.c (token_spellings): Adjust OP and TK definitions to
358 match changes to cpplib.h.
359 (_cpp_lex_token): Check for a directive-result token and
360 return it if present.
361 (cpp_token_val_index): Handle CPP_PRAGMA.
362 * macro.c (cpp_builtin_macro_text): Correct comment.
363 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
365 2004-09-06 Serge Belyshev <belyshev@lubercy.com>
367 PR preprocessor/14699
368 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
369 from size_t to double.
371 2004-08-28 Andreas Schwab <schwab@suse.de>
372 Andreas Jaeger <aj@suse.de>
374 * configure.ac: Set PACKAGE correctly.
375 * configure: Regenerated.
377 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
379 * Makefile.in: Add back top_builddir.
381 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
383 * configure.ac: Replace Automake macro invocations
384 with manual Autoconf checks and substitutions.
385 * configure: Regenerate.
386 * aclocal.m4: Regenerate.
387 * config.in: Regenerate.
388 * Makefile.am: Removed.
389 * Makefile.in: Heavy simplification and reorganization.
391 2004-08-09 Mark Mitchell <mark@codesourcery.com>
393 * configure.ac (arm*-*-eabi*): New target.
394 (arm*-*-symbianelf*): Likewise.
395 * configure: Regenerated.
397 2004-07-24 Bernardo Innocenti <bernie@develer.com>
399 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
400 * directives.c: Use XNEW-family macros from libiberty.
403 * cpplib.h (cpp_deps_style): Export enum with name.
405 2004-07-23 Matthias Klose <doko@debian.org>
407 * init.c (init_library): Use PACKAGE for the text domain.
409 2004-07-16 Andris Pavenis <pavenis@latnet.lv>
411 PR preprocessor/16366
412 * internal.h (struct cpp_reader): New field dir_hash.
413 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
414 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
416 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
418 PR preprocessor/16192
419 PR preprocessor/15913
420 PR preprocessor/15572
421 * expr.c (_cpp_parse_expr): Handle remaining cases where an
422 expression is missing.
423 * init.c (post_options): Traditional cpp doesn't do // comments.
425 2004-06-30 Per Bothner <per@bothner.com>
427 * include/line-map.h (fileline): Remove old typedef.
428 * internal.h (struct cpp_reader): Use source_location typedef instead.
430 2004-06-26 Zack Weinberg <zack@codesourcery.com>
432 Partially revert patch of 2004-06-05.
433 * files.c (search_cache): Remove pfile argument. Don't check
434 for file that would be found by "" or <> search here...
435 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
436 Do not apply directory-of-current-file correction to files
437 found by this check. Rearrange code slightly.
439 2004-06-21 Geoffrey Keating <geoffk@apple.com>
441 * files.c (should_stack_file): Correct swapped parameters to call
443 * pch.c (cpp_valid_state): Handle -fpreprocessed.
445 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
447 * Makefile.in: Regenerate with automake 1.8.5.
448 * aclocal.m4: Likewise.
449 * configure: Regenerate.
451 2004-06-11 Zack Weinberg <zack@codesourcery.com>
453 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
454 * configure, config.in: Regenerate.
455 * system.h: Unconditionally define bool as unsigned char,
456 BOOL_BITFIELD as unsigned int.
457 * .cvsignore: New file.
459 2004-06-09 Geoffrey Keating <geoffk@apple.com>
461 * traditional.c (push_replacement_text): Set macro->traditional.
462 (save_replacement_text): Likewise.
463 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
464 (struct save_macro_item): Delete.
465 (struct save_macro_data): Use a character array not the previous
467 (save_macros): Save macro as text not as internal structures.
468 (cpp_prepare_state): Update for changes to save_macro_data.
469 (cpp_read_state): Don't read macros defined in PCH. Restore
471 * macro.c (create_iso_definition): Honour alloc_subobject.
472 Clear traditional flag.
473 (_cpp_create_definition): Honour alloc_subobject.
474 * lex.c (cpp_token_val_index): New.
475 * internal.h: Include cpp-id-data.h.
476 (uchar): Move definition to cpp-id-data.h.
478 (cpp_macro): Likewise.
479 * directives.c (struct answer): Move to cpp-id-data.h.
480 (do_assert): Honour alloc_subobject.
482 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
483 * include/cpplib.h (struct cpp_string): Add GTY marker.
484 (enum cpp_token_fld_kind): New.
485 (struct cpp_token): Add GTY markers.
486 (cpp_token_val_index): Prototype.
487 (CPP_HASHNODE_VALUE_IDX): New.
488 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
489 * include/cpp-id-data.h: New file.
491 2004-06-09 Paolo Bonzini <bonzini@gnu.org>
493 * Makefile.am (all-local): New.
494 * Makefile.in: Regenerate.
496 2004-06-06 Roger Sayle <roger@eyesopen.com>
498 * Makefile.am (LIBICONV): Declare.
499 (makedepend_LDADD): Use LIBICONV.
500 * Makefile.in: Regenerate.
502 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
504 * Makefile.am (LIBINTL): Declare
505 (makedepend_LDADD): Use LIBINTL.
506 * Makefile.in: Regenerate.
508 2004-06-05 Zack Weinberg <zack@codesourcery.com>
510 * Makefile.am: Add makedepend.
511 * Makefile.in, aclocal.m4: Regenerate.
512 * charset.c: Insert a space to avoid a warning.
513 * directives.c: Include mkdeps.h.
514 (_cpp_handle_directive): Reenable macro expander if appropriate.
515 (undefine_macros): Inline body of _cpp_free_definition for speed.
516 Do not call undef callback or _cpp_warn_if_unused_macro.
517 (cpp_get_deps): New interface.
518 * files.c (search_cache): Add pfile argument. Check for file
519 that would be found by "" or <> search here...
520 (_cpp_find_file): ...not here. Correct recorded start_dir of
521 files found by directory-of-current-file search that would be
522 found by "" or <> search.
523 * init.c (cpp_add_dependency_target): Delete.
524 * internal.h (struct lexer_state): Add discarding_output flag.
525 * lex.c (lex_identifier): Compute hash function while scanning.
526 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
528 * makedepend.c: New file.
529 * mkdeps.c (struct deps): Add vpath vector.
530 (apply_vpath, deps_add_vpath): New function.
531 (deps_free): Free vpath vector.
532 (deps_add_dep, deps_add_target): Use apply_vpath.
533 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
534 (ht_lookup_with_hash): New function.
535 * cpplib.h, mkdeps.h: Update prototypes.
536 * symtab.h: Update prototypes.
537 (HT_HASHSTEP, HT_FINISH): New macros.
539 2004-05-29 Geoffrey Keating <geoffk@apple.com>
541 * symtab.c (ht_create): Set entries_owned.
542 (ht_destroy): Honour entries_owned.
543 (ht_expand): Likewise.
545 * include/symtab.h (struct ht): New field 'entries_owned'
546 (ht_load): New prototype.
548 2004-05-26 Paolo Bonzini <bonzini@gnu.org>
551 * configure.ac: Fix m4 quoting when picking
552 the size of HOST_WIDE_INT.
553 * configure: Regenerate.
555 2004-05-25 Paolo Bonzini <bonzini@gnu.org>
557 * Makefile.am: the correct directory for
558 gettext include files is given by @INCINTL@.
559 * Makefile.in: Regenerate.
561 2004-05-24 Paolo Bonzini <bonzini@gnu.org>
563 * system.h [!ENABLE_NLS]: dgettext takes two
566 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
568 Moved libcpp from the gcc subdirectory to the toplevel.
569 * Makefile.am: New file.
570 * Makefile.in: Regenerate.
571 * configure.ac: New file.
572 * configure: Regenerate.
573 * config.in: Regenerate.
574 * charset.c: Moved from gcc/cppcharset.c. Add note about
575 brokenness of input charset detection. Adjust for change
576 in name of cppucnid.h.
577 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
578 * expr.c: Moved from gcc/cppexp.c.
579 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
580 Remove #define of O_BINARY, it is in system.h.
581 * identifiers.c: Moved from gcc/cpphash.c.
582 * internal.h: Moved from gcc/cpphash.h. Change header
583 guard name. All other files adjusted to match name change.
584 * init.c: Moved from gcc/cppinit.c.
585 (init_library) [ENABLE_NLS]: Call bindtextdomain.
586 * lex.c: Moved from gcc/cpplex.c.
587 * directives.c: Moved from gcc/cpplib.c.
588 * macro.c: Moved from gcc/cppmacro.c.
589 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
590 * traditional.c: Moved from gcc/cpptrad.c.
591 * ucnid.h: Moved from gcc/cppucnid.h. Change header
593 * ucnid.pl: Moved from gcc/cppucnid.pl.
594 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
596 * symtab.c: Moved from gcc/hashtable.c.
597 * line-map.c: Moved from gcc. Do not include intl.h.
598 * mkdeps.c: Moved from gcc.
599 * system.h: New file.
600 * include/cpplib.h: Moved from gcc. Change header guard name.
601 * include/line-map.h: Moved from gcc. Change header guard name.
602 * include/mkdeps.h: Moved from gcc. Change header guard name.
603 * include/symtab.h: Moved from gcc/hashtable.h. Change header