1 2005-03-15 Geoffrey Keating <geoffk@apple.com>
3 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
4 UCN rather than printing an error.
6 2005-03-14 Geoffrey Keating <geoffk@apple.com>
8 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
10 2005-03-14 Geoffrey Keating <geoffk@apple.com>
12 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
13 * charset.c: Update for new format of ucnid.h.
14 (ucn_valid_in_identifier): Update for new format of ucnid.h.
15 Add NST parameter, and update it; update callers.
16 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
18 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
19 * internal.h (struct normalize_state): New.
20 (INITIAL_NORMALIZE_STATE): New.
21 (NORMALIZE_STATE_RESULT): New.
22 (NORMALIZE_STATE_UPDATE_IDNUM): New.
23 (_cpp_valid_ucn): New.
24 * lex.c (warn_about_normalization): New.
25 (forms_identifier_p): Add normalize_state parameter, update callers.
26 (lex_identifier): Add normalize_state parameter, update callers. Keep
28 (lex_number): Likewise.
29 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
30 it with warn_about_normalization.
34 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
35 comments about obsolete version of C++.
36 * include/cpplib.h (enum cpp_normalize_level): New.
37 (struct cpp_options): Add warn_normalize field.
39 2005-03-11 Geoffrey Keating <geoffk@apple.com>
41 * directives.c (glue_header_name): Update call to cpp_spell_token.
42 * internal.h (_cpp_interpret_identifier): New.
43 * charset.c (_cpp_interpret_identifier): New.
44 (_cpp_valid_ucn): Allow UCN version of '$'.
45 * lex.c (lex_identifier): Add extra parameter to indicate if initial
46 character was '$' or '\'. Support identifiers with UCNs.
47 (forms_identifier_p): Allow UCNs.
48 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
50 (cpp_spell_token): Add FORSTRING parameter. Use it.
51 (cpp_token_as_text): Update call to cpp_spell_token.
52 (cpp_output_token): Write UCNs back out.
53 (stringify_arg): Update call to cpp_spell_token.
54 (paste_tokens): Likewise.
55 (cpp_macro_definition): Likewise.
56 * macro.c (stringify_arg): Likewise.
57 (paste_tokens): Likewise.
58 (cpp_macro_definition): Likewise.
59 * include/cpplib.h: Add parameter to cpp_spell_token.
61 2005-03-04 Jakub Jelinek <jakub@redhat.com>
65 * macro.c (replace_args, cpp_get_token): Copy whole
66 cpp_token_u instead of just cpp_string field from it.
68 2005-02-28 Devang Patel <dpatel@apple.com>
70 * directives.c (do_line): Save sysp early before line table is
73 2005-02-20 Zack Weinberg <zack@codesourcery.com>
76 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
77 (cpp_host_to_exec_charset): New function.
78 * include/cpplib.h: Declare cpp_host_to_exec_charset.
80 2005-02-19 Devang Patel <dpatel@apple.com>
82 * charset.c (_cpp_convert_input): Check '\r' before inserting
85 2005-02-15 Eric Christopher <echristo@redhat.com>
88 * macro.c (cpp_macro_definition): Move handling of whitespace
89 to PREV_WHITE conditional. Remove overloading of len
92 2005-02-14 Kazu Hirata <kazu@cs.umass.edu>
94 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
95 traditional.c: Update copyright.
97 2005-02-14 Paolo Bonzini <bonzini@gnu.org>
100 * configure.ac: Check for declaration of basename and getopt.
101 * config.in: Regenerate.
102 * configure: Regenerate.
103 * internal.h (ustrcspn): New.
104 * macro.c (create_iso_definition): Fix allocation of memory.
105 (padding_token): Add cast to remove const-ness.
106 * pch.c (cpp_read_state): Use ustrcspn.
108 2005-02-08 Mike Stump <mrs@apple.com>
110 * files.c (pchf_adder): Remove.
111 (struct pchf_adder_info): Likewise.
112 (_cpp_save_file_entries): Write out all files so that #import works.
114 2005-01-23 Joseph S. Myers <joseph@codesourcery.com>
116 * configure: Regenerate.
118 2005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
120 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
122 * include/cpplib.h: Also update copyright years.
124 2005-01-03 Geoffrey Keating <geoffk@apple.com>
126 * files.c (_cpp_find_file): Add files found by search_path_exhausted
127 to the list of all files.
129 2005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
131 * internal.h: Update references to Cpp lib filenames.
132 * directives.c: Likewise.
135 * traditional.c: Likewise.
137 2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
139 PR preprocessor/15167
140 * files.c (destroy_cpp_file): New function.
141 (should_stack_file): Make a new file if the
142 compared file is still stacked.
144 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
146 PR preprocessor/17610
147 * directives.c (do_include_common): Error out if an empty filename
148 is given for #include (or #include_next or #import).
150 2004-11-27 Roger Sayle <roger@eyesopen.com>
151 Zack Weinberg <zack@codesourcery.com>
153 * internal.h: Replace all uses of uchar with unsigned char.
154 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
155 with !IN_GCC, so uchar is only defined whilst building libcpp.
157 2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
159 * aclocal.m4: Regenerate.
161 2004-11-24 Roger Sayle <roger@eyesopen.com>
163 PR preprocessor/15824
164 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
165 directly, instead of the non-existant "system.h" and "ansidecl.h".
166 * configure: Regenerate.
168 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
169 Joseph Myers <joseph@codesourcery.com>
171 * internal.h (struct lexer_state): Add in_deferred_pragma.
172 * directives.c (struct pragma_entry): Add allow_expansion.
173 (insert_pragma_entry): Take allow_expansion flag.
174 (register_pragma): Likewise.
175 (cpp_register_pragma): Likewise.
176 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
177 (do_pragma): Honor allow_expansion.
178 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
179 * include/cpplib.h (cpp_register_pragma): Update prototype.
181 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
182 Mark Mitchell <mark@codesourcery.com>
184 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
185 need_64bit_hwint=yes.
186 * configure: Regenerate.
188 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
190 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
192 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
193 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
194 Remove local srcdir path from generated file.
196 2004-11-04 Zack Weinberg <zack@codesourcery.com>
197 Gerald Pfeifer <gerald@pfeifer.com>
199 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
202 2004-10-27 Zack Weinberg <zack@codesourcery.com>
205 * directives.c (do_pragma): Do not defer pragmas which are unknown.
206 (cpp_handle_deferred_pragma): Add cast to silence warning.
208 2004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
210 * errors.c (_cpp_begin_message): Print "error: " for errors.
212 2004-10-10 Andreas Jaeger <aj@suse.de>
214 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
215 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
217 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
219 * pch.c (cpp_write_pch_state): Remove variable z as it is not
221 (cpp_read_state): Remove unused variables, m, d and mac_count.
223 2004-09-29 Per Bothner <per@bothner.com>
225 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
226 cb.line_change. Otherwise do_pragma will call the line_change
227 call-back with a meaningless line number.
229 2004-09-24 Zack Weinberg <zack@codesourcery.com>
231 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
232 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
233 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
234 * aclocal.m4, configure: Regenerate.
235 * init.c: Include localedir.h.
236 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
238 (.c.o): Use $(ALL_CFLAGS).
239 (localedir.h, localedir.hs): New rules.
240 (clean): Use rm -rf to remove directories.
241 (distclean): Also delete localedir.h and localedir.hs.
242 (init.o): Update dependencies.
244 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
246 * Makefile.in (aclocal.m4): Update dependencies.
247 * configure.ac (AC_CONFIG_MACRO_DIR): New.
248 * aclocal.m4, configure: Regenerate.
250 2004-09-17 Zack Weinberg <zack@codesourcery.com>
252 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
253 (_cpp_convert_input, _cpp_default_encoding): Add comments.
254 Some other comments in this file also tweaked.
256 * directives.c (do_pragma): Save current buffer position
257 before lexing the pragma keywords; don't call
258 _cpp_backup_tokens in the defer_pragmas case.
260 2004-09-15 Per Bothner <per@bothner.com>
262 * include/line-map.h (line_map_start): Add parameter names so
263 preceding comment makes sense.
264 (linemap_add): Remove from comment mention of non-existing parameter.
266 2004-09-09 Matt Austern <austern@apple.com>
267 Zack Weinberg <zack@codesourcery.com>
269 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
270 prefixes throughout. Add entry for PRAGMA. Remove
271 unnecessary "= 0" from EQ.
272 (enum cpp_ttype): Adjust OP and TK definitions to restore
273 prefixes, via token-paste.
274 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
275 Change from #defines to additional cpp_ttype enumerators.
276 (struct cpp_options): Add defer_pragmas.
277 (cpp_handle_deferred_pragma): Prototype new interface.
279 * internal.h (struct cpp_reader): Add directive_result.
280 * directives.c (struct pragma_entry): Add is_internal field;
281 give boolean fields type bool.
282 (start_directive): Initialize pfile->directive_result.type.
283 (_cpp_do__Pragma): Likewise.
284 (run_directive): Do not crash if pfile->buffer->prev is NULL.
285 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
287 (register_pragma): New static function, bulk of former
288 cpp_register_pragma here; add 'internal' argument, pass along
289 to insert_pragma_entry.
290 (cpp_register_pragma): Now a wrapper around register_pragma which
291 always passes false for 'internal' argument.
292 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
294 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
295 an internal pragma, save text till the end of the line as a CPP_PRAGMA
296 token instead of executing the pragma.
297 (cpp_handle_deferred_pragma): New interface.
298 * lex.c (token_spellings): Adjust OP and TK definitions to
299 match changes to cpplib.h.
300 (_cpp_lex_token): Check for a directive-result token and
301 return it if present.
302 (cpp_token_val_index): Handle CPP_PRAGMA.
303 * macro.c (cpp_builtin_macro_text): Correct comment.
304 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
306 2004-09-06 Serge Belyshev <belyshev@lubercy.com>
308 PR preprocessor/14699
309 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
310 from size_t to double.
312 2004-08-28 Andreas Schwab <schwab@suse.de>
313 Andreas Jaeger <aj@suse.de>
315 * configure.ac: Set PACKAGE correctly.
316 * configure: Regenerated.
318 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
320 * Makefile.in: Add back top_builddir.
322 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
324 * configure.ac: Replace Automake macro invocations
325 with manual Autoconf checks and substitutions.
326 * configure: Regenerate.
327 * aclocal.m4: Regenerate.
328 * config.in: Regenerate.
329 * Makefile.am: Removed.
330 * Makefile.in: Heavy simplification and reorganization.
332 2004-08-09 Mark Mitchell <mark@codesourcery.com>
334 * configure.ac (arm*-*-eabi*): New target.
335 (arm*-*-symbianelf*): Likewise.
336 * configure: Regenerated.
338 2004-07-24 Bernardo Innocenti <bernie@develer.com>
340 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
341 * directives.c: Use XNEW-family macros from libiberty.
344 * cpplib.h (cpp_deps_style): Export enum with name.
346 2004-07-23 Matthias Klose <doko@debian.org>
348 * init.c (init_library): Use PACKAGE for the text domain.
350 2004-07-16 Andris Pavenis <pavenis@latnet.lv>
352 PR preprocessor/16366
353 * internal.h (struct cpp_reader): New field dir_hash.
354 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
355 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
357 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
359 PR preprocessor/16192
360 PR preprocessor/15913
361 PR preprocessor/15572
362 * expr.c (_cpp_parse_expr): Handle remaining cases where an
363 expression is missing.
364 * init.c (post_options): Traditional cpp doesn't do // comments.
366 2004-06-30 Per Bothner <per@bothner.com>
368 * include/line-map.h (fileline): Remove old typedef.
369 * internal.h (struct cpp_reader): Use source_location typedef instead.
371 2004-06-26 Zack Weinberg <zack@codesourcery.com>
373 Partially revert patch of 2004-06-05.
374 * files.c (search_cache): Remove pfile argument. Don't check
375 for file that would be found by "" or <> search here...
376 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
377 Do not apply directory-of-current-file correction to files
378 found by this check. Rearrange code slightly.
380 2004-06-21 Geoffrey Keating <geoffk@apple.com>
382 * files.c (should_stack_file): Correct swapped parameters to call
384 * pch.c (cpp_valid_state): Handle -fpreprocessed.
386 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
388 * Makefile.in: Regenerate with automake 1.8.5.
389 * aclocal.m4: Likewise.
390 * configure: Regenerate.
392 2004-06-11 Zack Weinberg <zack@codesourcery.com>
394 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
395 * configure, config.in: Regenerate.
396 * system.h: Unconditionally define bool as unsigned char,
397 BOOL_BITFIELD as unsigned int.
398 * .cvsignore: New file.
400 2004-06-09 Geoffrey Keating <geoffk@apple.com>
402 * traditional.c (push_replacement_text): Set macro->traditional.
403 (save_replacement_text): Likewise.
404 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
405 (struct save_macro_item): Delete.
406 (struct save_macro_data): Use a character array not the previous
408 (save_macros): Save macro as text not as internal structures.
409 (cpp_prepare_state): Update for changes to save_macro_data.
410 (cpp_read_state): Don't read macros defined in PCH. Restore
412 * macro.c (create_iso_definition): Honour alloc_subobject.
413 Clear traditional flag.
414 (_cpp_create_definition): Honour alloc_subobject.
415 * lex.c (cpp_token_val_index): New.
416 * internal.h: Include cpp-id-data.h.
417 (uchar): Move definition to cpp-id-data.h.
419 (cpp_macro): Likewise.
420 * directives.c (struct answer): Move to cpp-id-data.h.
421 (do_assert): Honour alloc_subobject.
423 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
424 * include/cpplib.h (struct cpp_string): Add GTY marker.
425 (enum cpp_token_fld_kind): New.
426 (struct cpp_token): Add GTY markers.
427 (cpp_token_val_index): Prototype.
428 (CPP_HASHNODE_VALUE_IDX): New.
429 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
430 * include/cpp-id-data.h: New file.
432 2004-06-09 Paolo Bonzini <bonzini@gnu.org>
434 * Makefile.am (all-local): New.
435 * Makefile.in: Regenerate.
437 2004-06-06 Roger Sayle <roger@eyesopen.com>
439 * Makefile.am (LIBICONV): Declare.
440 (makedepend_LDADD): Use LIBICONV.
441 * Makefile.in: Regenerate.
443 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
445 * Makefile.am (LIBINTL): Declare
446 (makedepend_LDADD): Use LIBINTL.
447 * Makefile.in: Regenerate.
449 2004-06-05 Zack Weinberg <zack@codesourcery.com>
451 * Makefile.am: Add makedepend.
452 * Makefile.in, aclocal.m4: Regenerate.
453 * charset.c: Insert a space to avoid a warning.
454 * directives.c: Include mkdeps.h.
455 (_cpp_handle_directive): Reenable macro expander if appropriate.
456 (undefine_macros): Inline body of _cpp_free_definition for speed.
457 Do not call undef callback or _cpp_warn_if_unused_macro.
458 (cpp_get_deps): New interface.
459 * files.c (search_cache): Add pfile argument. Check for file
460 that would be found by "" or <> search here...
461 (_cpp_find_file): ...not here. Correct recorded start_dir of
462 files found by directory-of-current-file search that would be
463 found by "" or <> search.
464 * init.c (cpp_add_dependency_target): Delete.
465 * internal.h (struct lexer_state): Add discarding_output flag.
466 * lex.c (lex_identifier): Compute hash function while scanning.
467 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
469 * makedepend.c: New file.
470 * mkdeps.c (struct deps): Add vpath vector.
471 (apply_vpath, deps_add_vpath): New function.
472 (deps_free): Free vpath vector.
473 (deps_add_dep, deps_add_target): Use apply_vpath.
474 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
475 (ht_lookup_with_hash): New function.
476 * cpplib.h, mkdeps.h: Update prototypes.
477 * symtab.h: Update prototypes.
478 (HT_HASHSTEP, HT_FINISH): New macros.
480 2004-05-29 Geoffrey Keating <geoffk@apple.com>
482 * symtab.c (ht_create): Set entries_owned.
483 (ht_destroy): Honour entries_owned.
484 (ht_expand): Likewise.
486 * include/symtab.h (struct ht): New field 'entries_owned'
487 (ht_load): New prototype.
489 2004-05-26 Paolo Bonzini <bonzini@gnu.org>
492 * configure.ac: Fix m4 quoting when picking
493 the size of HOST_WIDE_INT.
494 * configure: Regenerate.
496 2004-05-25 Paolo Bonzini <bonzini@gnu.org>
498 * Makefile.am: the correct directory for
499 gettext include files is given by @INCINTL@.
500 * Makefile.in: Regenerate.
502 2004-05-24 Paolo Bonzini <bonzini@gnu.org>
504 * system.h [!ENABLE_NLS]: dgettext takes two
507 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
509 Moved libcpp from the gcc subdirectory to the toplevel.
510 * Makefile.am: New file.
511 * Makefile.in: Regenerate.
512 * configure.ac: New file.
513 * configure: Regenerate.
514 * config.in: Regenerate.
515 * charset.c: Moved from gcc/cppcharset.c. Add note about
516 brokenness of input charset detection. Adjust for change
517 in name of cppucnid.h.
518 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
519 * expr.c: Moved from gcc/cppexp.c.
520 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
521 Remove #define of O_BINARY, it is in system.h.
522 * identifiers.c: Moved from gcc/cpphash.c.
523 * internal.h: Moved from gcc/cpphash.h. Change header
524 guard name. All other files adjusted to match name change.
525 * init.c: Moved from gcc/cppinit.c.
526 (init_library) [ENABLE_NLS]: Call bindtextdomain.
527 * lex.c: Moved from gcc/cpplex.c.
528 * directives.c: Moved from gcc/cpplib.c.
529 * macro.c: Moved from gcc/cppmacro.c.
530 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
531 * traditional.c: Moved from gcc/cpptrad.c.
532 * ucnid.h: Moved from gcc/cppucnid.h. Change header
534 * ucnid.pl: Moved from gcc/cppucnid.pl.
535 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
537 * symtab.c: Moved from gcc/hashtable.c.
538 * line-map.c: Moved from gcc. Do not include intl.h.
539 * mkdeps.c: Moved from gcc.
540 * system.h: New file.
541 * include/cpplib.h: Moved from gcc. Change header guard name.
542 * include/line-map.h: Moved from gcc. Change header guard name.
543 * include/mkdeps.h: Moved from gcc. Change header guard name.
544 * include/symtab.h: Moved from gcc/hashtable.h. Change header