1 2008-05-04 David S. Miller <davem@davemloft.net>
3 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
4 * configure: Regenerate.
6 2008-04-22 Daniel Franke <franke.daniel@gmail.com>
8 * include/cpplib.h (cpp_define_formatted): New.
9 * directives.c (cpp_define_formatted): New.
11 2008-04-21 Tom Tromey <tromey@redhat.com>
14 * charset.c (_cpp_convert_input): Add buffer_start argument.
15 Ignore UTF-8 BOM if seen.
16 * internal.h (_cpp_convert_input): Add argument.
17 * files.c (struct _cpp_file) <buffer_start>: New field.
18 (destroy_cpp_file): Free buffer_start, not buffer.
19 (_cpp_pop_file_buffer): Likewise.
20 (read_file_guts): Update.
22 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
24 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
25 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
26 (struct cpp_options): Added uliterals.
27 (cpp_interpret_string): Update prototype.
28 (cpp_interpret_string_notranslate): Idem.
29 * charset.c (init_iconv_desc): New width member in cset_converter.
30 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
32 (emit_numeric_escape): Idem.
35 (convert_escape): Idem.
36 (converter_for_type): New function.
37 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
38 (cpp_interpret_string_notranslate): Match changed prototype.
39 (wide_str_to_charconst): Use converter_for_type.
40 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
41 * directives.c (linemarker_dir): Macro U changed to UC.
42 (parse_include): Idem.
43 (register_pragma_1): Idem.
44 (restore_registered_pragmas): Idem.
45 (get__Pragma_string): Support CPP_STRING{16,32}.
46 * expr.c (eval_token): Support CPP_CHAR{16,32}.
47 * init.c (struct lang_flags): Added uliterals.
48 (lang_defaults): Idem.
49 * internal.h (struct cset_converter) <width>: New field.
50 (struct cpp_reader) <char16_cset_desc>: Idem.
51 (struct cpp_reader) <char32_cset_desc>: Idem.
52 * lex.c (digraph_spellings): Macro U changed to UC.
54 (lex_string): Add support for u'...', U'...', u"..." and U"...".
55 (_cpp_lex_direct): Idem.
56 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
57 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
59 2008-04-18 Paolo Bonzini <bonzini@gnu.org>
62 * aclocal.m4: Regenerate.
63 * configure: Regenerate.
65 2008-04-17 Tom Tromey <tromey@redhat.com>
68 * errors.c (cpp_error): Don't reference a token before the start
71 2008-04-16 Tom Tromey <tromey@redhat.com>
73 * Makefile.in (TAGS_SOURCES): New variable.
76 2008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
78 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
82 2008-04-02 Joseph Myers <joseph@codesourcery.com>
84 * include/cpplib.h (struct cpp_callbacks): Add used_define,
85 used_undef and before_define.
87 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
88 do_ifndef, cpp_pop_definition): Handle new flag and use new
90 * expr.c (parse_defined): Handle new flag and use new callbacks.
91 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
92 flag and use new callbacks.
94 2008-04-01 Jakub Jelinek <jakub@redhat.com>
97 * files.c (struct _cpp_file): Remove pch field.
98 (pch_open_file): Don't set file->pch, just file->pchname.
99 (should_stack_file): After pfile->cb.read_pch call
100 free pchname and clear pchname, don't close file->fd.
101 Test file->pchname instead of file->pch. Don't close fd after cb.
102 (_cpp_stack_include): Test file->pchname instead of file->pch.
104 2008-03-28 Tom Tromey <tromey@redhat.com>
106 * Makefile.in (POSTCOMPILE): New variable.
109 2008-03-13 Tom Tromey <tromey@redhat.com>
112 * directives.c (destringize_and_run): Set pfile->directive.
114 2008-03-06 Markus Milleder <markus.milleder@generali.at>
116 PR preprocessor/35458
117 * mkdeps.c (munge): Quote '#' with a '\'.
119 2008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
121 PR preprocessor/35379
122 * mkdeps.c (deps_write): Ensure the first target always appears
123 in the first column, without leading backslash newline. Avoid
124 some more extra whitespace.
126 2008-02-25 Thiemo Seufer <ths@mips.com>
128 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
130 2008-02-19 Tom Tromey <tromey@redhat.com>
132 * traditional.c (lex_identifier): Use CPP_HASHNODE.
133 * lex.c (lex_identifier): Use CPP_HASHNODE.
134 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
136 * identifiers.c (alloc_node): Change return type.
137 (_cpp_init_hashtable): Don't cast 'alloc_node'.
138 (proxy_assertion_broken): New declaration.
139 (cpp_forall_identifiers): Move comment.
140 * line-map.c (linemap_add): Comment fix.
141 (linemap_line_start): Indentation fix.
143 2008-01-25 Jakub Jelinek <jakub@redhat.com>
145 PR preprocessor/34692
146 * macro.c (collect_args): Add pragma_buff argument. Push
147 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
148 than into arguments. Reset prevent_expansion and parsing_args
149 state at CPP_PRAGMA_EOL/CPP_EOF.
150 (funlike_invocation_p): Add pragma_buff argument, pass it through
152 (enter_macro_context): Add result argument. Adjust
153 funlike_invocation_p caller. Emit all deferred pragma tokens
154 gathered during collect_args before the expansion, add a padding
155 token. Return 2 instead of 1 if any pragma tokens were prepended.
156 (cpp_get_token): If enter_macro_context returns 2, don't return
157 a padding token, instead cycle to grab CPP_PRAGMA token.
158 * directives.c (_cpp_handle_directive): If was_parsing_args
159 in deferred pragma, leave parsing_args and prevent_expansion as is.
161 2008-01-22 Tom Tromey <tromey@redhat.com>
164 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
165 __STDC_CONSTANT_MACROS.
167 2008-01-07 Fred Fish <fnf@specifix.com>
169 PR preprocessor/30363
170 * traditional.c (replace_args_and_push): Add local variable
171 cxtquote, calculate the replacement text size assuming a
172 worst case of every input character quoted with backslash,
173 and properly handle output quoting of quote characters in
174 actual arguments used in function-like macros.
176 2008-01-03 Tom Tromey <tromey@redhat.com>
178 PR preprocessor/34602
179 * directives.c (do_line): Don't try to spell EOF token.
180 (do_linemarker): Add comment.
182 2007-12-11 DJ Delorie <dj@redhat.com>
184 * charset.c (convert_using_iconv): Close out any shift states,
185 returning to the initial state.
187 2007-12-06 Tom Tromey <tromey@redhat.com>
190 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
192 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
193 * files.c (FILE_HASH_POOL_SIZE): New macro.
194 (struct file_hash_entry_pool): New.
195 (destroy_all_cpp_files): New function.
196 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
197 (new_file_hash_entry): Update.
198 (free_file_hash_entries): New function.
199 (_cpp_cleanup_files): Call free_file_hash_entries and
200 destroy_all_cpp_files.
201 (cpp_clear_file_cache): New function.
202 * include/cpplib.h (cpp_clear_file_cache): Declare.
204 2007-12-03 Tom Tromey <tromey@redhat.com>
206 PR preprocessor/34288
207 * configure.ac, config.in: Rebuilt.
208 * configure.ac: Check for ssize_t.
210 2007-11-30 Tom Tromey <tromey@redhat.com>
212 PR preprocessor/32868
213 * macro.c (_cpp_create_definition): Special case
214 __STDC_FORMAT_MACROS.
216 2007-11-16 Michael Matz <matz@suse.de>
218 * files.c (search_path_head): Fix check for absolute paths.
220 2007-11-11 Tom Tromey <tromey@redhat.com>
223 * include/cpplib.h (cpp_included_before): Declare.
224 * files.c (struct file_hash_entry) <location>: New field.
225 (_cpp_find_file): Initialize new field.
226 (make_cpp_dir): Likewise.
227 (cpp_included_before): New function.
229 2007-11-01 Tom Tromey <tromey@redhat.com>
231 PR preprocessor/30805
232 * macro.c (paste_tokens): Handle padding token.
233 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
235 2007-10-31 Tom Tromey <tromey@redhat.com>
237 PR preprocessor/30786
238 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
239 * directives.c (_cpp_do__Pragma): Return error status.
240 * internal.h (_cpp_do__Pragma): Update.
241 * directives.c (get__Pragma_string): Back up if EOF seen.
243 2007-09-06 Tom Tromey <tromey@redhat.com>
245 * internal.h (struct cpp_reader) <invocation_location>: New
247 (struct cpp_reader) <set_invocation_location>: Likewise.
248 * init.c (cpp_set_line_map): New function.
249 * line-map.c (linemap_add): Use linemap's allocator.
250 * include/line-map.h (GTY): Define.
251 (line_map_realloc): New typedef.
252 (struct line_map): Mark with GTY.
253 (struct line_maps): Likewise.
254 (struct line_maps) <maps>: Likewise.
255 (struct line_maps) <reallocator>: New field.
256 * include/symtab.h (GTY): Conditionally define.
257 * include/cpplib.h (cpp_set_line_map): Declare.
258 (cpp_get_token_with_location): Declare.
259 * macro.c (cpp_get_token): Set invocation_location on the reader.
260 (cpp_get_token_with_location): New function.
262 2007-08-30 Chao-ying Fu <fu@mips.com>
264 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
265 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
266 (cpp_classify_number): Support decimal fixed-point constants without
268 Warn about fixed-point constants when -pedantic.
269 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
270 comments to support fixed-point values.
271 (CPP_N_FRACT, CPP_N_ACCUM): Define.
273 2007-08-18 Tom Tromey <tromey@redhat.com>
275 PR preprocessor/32974
276 * directives.c (parse_include): Don't check for EOL when
277 processing #pragma dependency.
279 2007-07-30 Ollie Wild <aaw@google.com>
281 * directives-only.c: New file.
282 * internal.h (struct _cpp_dir_only_callbacks): New.
283 (_cpp_preprocess_dir_only): New function.
284 * directives.c (_cpp_handle_directive): Check directives_only before
285 disabling execution of indented directives.
286 * files.c (_cpp_stack_file): Add directives_only check.
287 * include/cpplib.h (struct cpp_options): Add directives_only.
288 (cpp_init_special_builtins): New function.
289 * init.c (cpp_init_special_builtins): New function.
290 (cpp_init_builtins): Move builtin_array initialization to
291 cpp_init_special_builtins.
292 (post_options): Check directives_only before setting
293 pfile->state.prevent_expansion = 1.
294 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
295 is expanded inside a directive while -fdirectives-only is enabled.
296 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
297 (libcpp_a_SOURCES): Add directives-only.c.
299 2007-07-04 Uros Bizjak <ubizjak@gmail.com>
301 * traditional.c (_cpp_scan_out_logical_line): Initialize
302 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
303 fmacro.args to prevent 'may be used uninitialized' warning.
305 2007-07-03 Uros Bizjak <ubizjak@gmail.com>
307 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
309 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
310 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
311 for 'q' or 'Q' suffixes.
313 2007-06-17 Danny Smith <dannysmith@users.sourceforge.net
315 * files.c (open_file): Correct typo.
317 2007-06-16 Vladimir Prus <vladimir@codesourcery.com>
319 * files.c (open_file): Prevent the call
320 for stat from overwriting errno.
322 2007-06-09 Vladimir Prus <vladimir@codesourcery.com>
324 * files.c (open_file): Account for the
325 fact that on windows, opening a directory gives
328 2007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
330 PR preprocessor/23479
331 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
333 (append_digit): Likewise.
334 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
335 binary integer constants.
337 2007-05-31 Dave Korn <dave.korn@artimi.com>
339 PR preprocessor/14331
340 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
342 2007-05-24 Ollie Wild <aaw@google.com>
344 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
345 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
346 (cpp_write_pch_state): Save __COUNTER__ state.
347 (cpp_valid_state): Check valid __COUNTER__ state.
348 (cpp_read_state): Read new __COUNTER__ state.
349 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
350 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
351 * internal.h (struct cpp_reader): Add counter member.
353 2007-05-23 Simon Martin <simartin@users.sourceforge.net>
355 PR preprocessor/20077
356 * macro.c (create_iso_definition): Fixed the method to determine
357 whether the token-pasting operator appears at the beginning or the end
360 2007-05-21 Ian Lance Taylor <iant@google.com>
362 * internal.h (struct cpp_reader): Add new fields:
363 nonexistent_file_hash and nonexistent_file_ob.
364 * files.c: Include "obstack.h".
365 (find_file_in_dir): Before trying to open the file, look up the
366 path name in the hash table of nonexistent files. After failing
367 to open the file, add the path name to the hash table.
368 (_cpp_find_file): Cache the results of looking up the file name
369 starting with the quote and bracket chain heads, if we can.
370 (nonexistent_file_hash_eq): New static function.
371 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
372 pfile->nonexistent_file_ob.
373 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
374 pfile->nonexistent_file_ob.
376 2007-05-14 Janis Johnson <janis187@us.ibm.com>
378 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
381 * expr.c (interpret_float_suffix): Check for invalid suffix.
383 2007-05-02 Eric Christopher <echristo@apple.com>
385 * expr.c (num_div_op): Don't overflow if the result is
388 2007-05-02 Tom Tromey <tromey@redhat.com>
390 PR preprocessor/28709
391 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
393 2007-03-30 Michael Meissner <michael.meissner@amd.com>
395 * directives.c (lex_macro_node_from_str): Fix alloca call to be
398 2007-03-30 Richard Henderson <rth@redhat.com>
400 * directives.c (lex_macro_node_from_str): New.
401 (cpp_push_definition, cpp_pop_definition): New.
402 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
404 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
406 * Makefile.in: Add dummy install-pdf target.
408 2007-01-30 Tom Tromey <tromey@redhat.com>
410 PR preprocessor/30468
411 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
414 2007-01-30 Tom Tromey <tromey@redhat.com>
416 PR preprocessor/29966
417 * macro.c (lex_expansion_token): Save and restore cpp_reader's
419 (_cpp_create_definition): Don't restore cur_token here.
420 * lex.c (_cpp_lex_token): Added assertion.
422 2007-01-27 Tom Tromey <tromey@redhat.com>
424 * configure: Rebuilt.
426 2007-01-12 Tom Tromey <tromey@redhat.com>
428 PR preprocessor/28227
429 * directives.c (lex_macro_node): Added 'is_def_or_undef'
436 2007-01-11 Paolo Bonzini <bonzini@gnu.org>
438 * configure: Regenerate.
440 2007-01-11 Paolo Bonzini <bonzini@gnu.org>
442 * configure: Regenerate.
444 2007-01-04 Tom Tromey <tromey@redhat.com>
446 PR preprocessor/28165
447 * internal.h (cpp_in_primary_file): New function.
448 * directives.c (do_include_next): Use cpp_in_primary_file.
449 (do_pragma_once): Likewise.
450 (do_pragma_system_header): Likewise.
452 2006-12-29 Ian Lance Taylor <iant@google.com>
454 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
455 look backward at the end of the line unless we saw a backslash.
457 2006-12-29 Jakub Jelinek <jakub@redhat.com>
459 PR preprocessor/29612
460 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
461 only when new_sysp is non-zero.
463 2006-12-28 Tom Tromey <tromey@redhat.com>
465 PR preprocessor/30001
466 * charset.c (_cpp_convert_input): Check that to.len is greater
469 2006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
471 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
472 * configure: Rebuilt.
474 2006-11-01 Douglas Gregor <doug.gregor@gmail.com>
476 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
477 for experimental C++0x mode.
478 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
479 adopted the preprocessor changes introduced in C99.
481 2006-10-29 Joseph Myers <joseph@codesourcery.com>
483 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
484 depending on --enable-targets=all.
485 * configure: Regenerate.
487 2006-10-12 Jakub Jelinek <jakub@redhat.com>
489 PR preprocessor/28709
490 * macro.c (paste_tokens): Do error reporting here, use BUF with the
491 spelled LHS token as opposed to spelling it again.
492 (paste_all_tokens): Don't report errors here, just break on failure.
494 2006-10-10 Brooks Moses <bmoses@stanford.edu>
496 * Makefile.in: Added empty "pdf" target.
498 2006-09-22 Geoffrey Keating <geoffk@apple.com>
500 * configure.ac: Make need_64_bit_hwint case for x86-darwin
501 match exactly the glob in gcc/config.gcc.
502 * configure: Regenerate.
504 2006-09-13 Joseph S. Myers <joseph@codesourcery.com>
507 PR preprocessor/14634
508 * lex.c (lex_string): Pedwarn for unterminated literals.
510 2006-09-08 Eric Christopher <echristo@apple.com>
512 * configure.ac: Add 64-bit HWI support for i?86-darwin.
514 2006-08-14 Steve Ellcey <sje@cup.hp.com>
518 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
519 (CPP_LAST_EQ): Change.
520 (CPP_LAST_PUNCTUATOR): Change.
521 * expr.c (cpp_operator): Remove MIN and MAX.
522 (reduce): Remove CPP_MIN and CPP_MAX.
523 (num_binary_op): Ditto.
524 * lex.c (_cpp_lex_direct): Ditto.
525 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
527 2006-06-09 Jakub Jelinek <jakub@redhat.com>
529 PR preprocessor/27746
530 * directives.c (do_pragma): Handle pragma with valid namespace
531 and invalid name coming from macro expansion.
532 * directives.c (destringize_and_run): Initialize next field in
537 * directives.c (destringize_and_run): Set NO_EXPAND on the
540 * macro.c (_cpp_backup_tokens): Fix comment typo.
542 2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
544 * Makefile.in (CATALOGS): Add po/ prefix.
545 * configure: Regenerated.
547 2006-05-23 Carlos O'Donell <carlos@codesourcery.com>
549 * Makefile.in: Add install-html target. Add install-html to .PHONY
551 2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
553 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
554 * files.c (_cpp_get_file_stat): New function.
555 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
556 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
557 * internal.h (_cpp_get_file_stat): Prototype.
558 (struct cpp_buffer): Add timestamp.
560 2006-01-23 Jakub Jelinek <jakub@redhat.com>
562 PR preprocessor/25717
563 * init.c (cpp_init_builtins): If __STDC__ will not change value
564 between system headers and other sources, define it as a normal
565 macro rather than a builtin.
566 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
567 cpp_in_system_header condition.
569 2006-01-05 Paolo Bonzini <bonzini@gnu.org>
571 * Makefile.in: Use -MMD instead of -MD.
573 2006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
574 Richard Henderson <rth@redhat.com>
576 Merge from gomp branch:
577 * directives.c (struct pragma_entry): Add is_deferred. Add ident
578 entry to value union.
579 (end_directive): Don't eat the line if in_deferred_pragma.
580 (run_directive): Remove pragma hacks.
581 (insert_pragma_entry): Remove.
582 (new_pragma_entry): New.
583 (register_pragma_1): Split out of register_pragma. Only handle
584 the lookup tree and return the new entry.
585 (cpp_register_pragma): Fill in the pragma entry here.
586 (cpp_register_deferred_pragma): New.
587 (register_pragma_internal): New.
588 (_cpp_init_internal_pragmas): Use register_pragma_internal.
589 (do_pragma): Allow pragma expansion after namespace. For deferred
590 pragmas, don't slurp the line into a string.
591 (destringize_and_run): Save tokens for deferred pragmas.
592 (cpp_handle_deferred_pragma): Remove.
593 * macro.c (builtin_macro): Remove pragma token hack.
594 (_cpp_push_token_context): Rename from push_token_context and export.
595 * internal.h (struct lexer_state): Add pragma_allow_expansion.
596 (_cpp_push_token_context): Declare.
597 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
598 a token. Update the line number correctly if so.
599 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
600 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
601 * include/cpplib.h (PRAGMA_EOL): New.
602 (CPP_TOKEN_FLD_PRAGMA): New.
603 (struct cpp_token): Add val.pragma.
604 (struct cpp_options): Remove defer_pragmas.
605 (cpp_handle_deferred_pragma): Remove.
606 (cpp_register_deferred_pragma): Declare.
608 2006-01-01 Jakub Jelinek <jakub@redhat.com>
611 * directives.c (do_pragma): If pragma line ends with multi-line
612 block comment, end the saved deferred pragma string before that
613 comment. Handle embedded '\0' chars on the pragma line.
615 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
618 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
620 2005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
621 Ben Elliston <bje@au.ibm.com>
623 * include/cpplib.h (CPP_N_DFLOAT): New.
624 * expr.c (interpret_float_suffix): Identify df, dd, and dl
625 suffixes as decimal floating point constants.
626 (cpp_classify_number): Disallow hexadecimal DFP constants.
628 2005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
629 Ian Lance Taylor <ian@airs.com>
631 * include/cpplib.h (struct cpp_callbacks): Annotate error with
632 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
634 2005-11-09 Per Bothner <per@bothner.com>
635 Uros Bizjak <uros@kss-loka.si>
638 * init.c (read_original_filename): Temporarily set
639 state.in_directive before calling _cpp_lex_direct for
642 2005-11-03 James E Wilson <wilson@specifix.com>
644 PR preprocessor/24202
645 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
647 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
649 * include/cpplib.h (struct cpp_callbacks): Make error take
651 * errors.c (cpp_error): Update call to callback.
653 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
655 PR preprocessor/22042
656 * macro.c (_cpp_builtin_macro_text): Lower the needed max
658 (cpp_quote_string): Don't octalify non printable
661 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
664 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
665 (struct cpp_callbacks): Add error.
666 * errors.c (cpp_error): If client_diagnostic, use error callback.
667 * charset.c (convert_escape): Don't use %03o in diagnostic.
669 2005-10-21 James E Wilson <wilson@specifix.com>
671 PR preprocessor/15220
672 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
673 callers. Pass to open_file_failed.
674 (open_file_failed): New parameter angle_brackets. Fix all callers.
675 Use in print_dep assignment.
676 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
677 * internal.h (_cpp_find_file): Add new parm to declaration.
679 2005-10-08 Kazu Hirata <kazu@codesourcery.com>
681 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
682 * configure: Regenerate.
684 2005-10-04 Ian Lance Taylor <ian@airs.com>
686 PR preprocessor/13726
687 * directives.c (check_eol_return_comments): New static function.
688 (parse_include): Add buf parameter. Change all callers.
689 (do_include_common): If not discard comments, turn on
690 save_comments. Pass collected comments to include callback.
691 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
692 include callback: cpp_token list.
694 2005-09-20 Joseph S. Myers <joseph@codesourcery.com>
696 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
697 * init.c (struct lang_flags, lang_defaults): Add
698 extended_identifiers.
699 (cpp_set_lang): Use it.
700 * lex.c (forms_identifier_p): Check extended_identifiers.
702 2005-08-30 Jakub Jelinek <jakub@redhat.com>
704 PR preprocessor/20348
705 PR preprocessor/20356
706 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
709 2005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
711 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
712 -Wmissing-format-attribute.
714 * configure: Regenerate.
716 2005-06-29 Kelley Cook <kcook@gcc.gnu.org>
718 * all files: Update FSF address in copyright headers.
719 * makeucnid.c (write_copyright): Update outputted FSF address.
721 2005-06-13 Zack Weinberg <zack@codesourcery.com>
723 * configure.ac: Invoke ZW_CREATE_DEPDIR and
724 ZW_PROG_COMPILER_DEPENDENCIES.
725 * aclocal.m4, configure: Regenerate.
726 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
728 (distclean): Clean up $(DEPDIR) and its contents.
729 (.c.o): Use $(COMPILE).
730 Include $(DEPDIR)/*.Po for most object->header dependencies.
732 2005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
734 * configure.ac: Check declarations for asprintf and vasprintf.
735 * config.in: Regenerate.
736 * configure: Likewise.
738 * charset.c (conversion_loop): Use XRESIZEVEC.
739 (convert_no_conversion): Likewise.
740 (convert_using_iconv): Likewise.
741 (init_iconv_desc): Cast return value of alloca.
742 (cpp_host_to_exec_charset): Use XNEWVEC.
743 (emit_numeric_escape): Use XRESIZEVEC.
744 (cpp_interpret_string): Use XNEWVEC.
745 (cpp_interpret_string): Use XRESIZEVEC.
746 (_cpp_interpret_identifier): Cast return value of alloca.
747 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
748 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
749 (parse_include): Use XNEWVEC.
750 (insert_pragma_entry): Rename local variable "new" to
752 (save_registered_pragmas): Cast return value of xmemdup.
753 (destringize_and_run): Same for alloca.
754 (parse_assertion): Likewise.
755 (do_assert): Cast allocated storage to proper type.
756 (cpp_define): Likewise.
757 (_cpp_define_builtin): Likewise.
758 (cpp_undef): Likewise.
759 (handle_assertion): Likewise.
760 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
761 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
762 (CPP_UMINUS): Likewise.
763 (struct cpp_operator): Rename from struct operator.
764 (_cpp_expand_op_stack): Use XRESIZEVEC.
765 * files.c (pch_open_file): Use XNEWVEC.
766 (pch_open_file): Use XRESIZEVEC.
767 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
768 (dir_name_of_file): Use XNEWVEC.
769 (make_cpp_file): Use XCNEW.
770 (make_cpp_dir): Likewise.
771 (allocate_file_hash_entries): USE XNEWVEC.
772 (cpp_included): Cast return value of htab_find_with_hash.
773 (append_file_to_dir): Use XNEWVEC.
774 (read_filename_string): Likewise. Use XRESIZEVEC too.
775 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
776 (remap_filename): Use XNEWVEC.
777 (struct pchf_entry): Move definition out of struct pchf_data.
778 (_cpp_save_file_entries): Use XCNEWVAR.
779 (_cpp_read_file_entries): Use XNEWVAR.
780 * identifiers.c (alloc_node): Use XOBNEW.
781 * init.c (cpp_create_reader): Use XCNEW.
782 (cpp_init_builtins): Cast of b->value to enum builtin_type.
783 (read_original_directory): Cast return value of alloca.
784 * lex.c (add_line_note): Use XRESIZEVEC.
785 (warn_about_normalization): Use XNEWVEC.
786 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
787 (new_buff): Use XNEWVEC.
788 * line-map.c (linemap_add): Use XRESIZEVEC.
789 * macro.c (builtin_macro): Cast return value of alloca.
790 (paste_tokens): Likewise.
791 (expand_arg): Use XNEWVEC and XRESIZEVEC.
792 (_cpp_save_parameter): Use XRESIZEVEC.
793 (create_iso_definition): Cast allocated storage to proper type.
794 (_cpp_create_definition): Likewise.
795 (cpp_macro_definition): Use XRESIZEVEC.
796 * makedepend.c (add_clm): Use XNEW.
798 * mkdeps.c (munge): Use XNEWVEC.
799 (deps_init): Use XCNEW.
800 (deps_add_target): Use XRESIZEVEC.
801 (deps_add_default_target): Cast return value of alloca.
802 (deps_add_dep): Use XRESIZEVEC.
803 (deps_add_vpath): Likewise. Use XNEWVEC too.
804 (deps_restore): Likewise.
805 * pch.c (save_idents): Use XNEW and XNEWVEC.
806 (cpp_save_state): Use XNEW.
807 (count_defs): Cast return value of htab_find.
808 (write_defs): Likewise.
809 (cpp_write_pch_deps): Use XNEWVEC.
810 (collect_ht_nodes): Use XRESIZEVEC.
811 (cpp_valid_state): Use XNEWVEC.
812 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
813 * symtab.c (ht_create): Use XCNEW.
814 (ht_lookup_with_hash): Cast return value of obstack_copy0.
815 (ht_expand): Use XCNEWVEC.
816 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
817 (bool): Do not define if __cplusplus.
819 2005-05-12 Zack Weinberg <zack@codesourcery.com>
821 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
822 (do_sccs): Delete function definition, #define to do_ident.
823 (do_ident): Don't hardwire directive name.
825 2005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
828 * configure: Regenerate.
830 2005-04-27 Andris Pavenis <pavenis@latnet.lv>
832 * files.c: Include io.h for DJGPP to get prototype of setmode.
834 2005-04-19 Per Bothner <per@bothner.com>
836 PR preprocessor/20907
837 * line-map.c (linemap_line_start): Fix bug when we need to increse
838 column_bits but can re-use the current line_map.
840 2005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
842 * system.h (fopen, fdopen, freopen): Define these to the unlocked
845 2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
847 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
848 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
849 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
850 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
852 (fwrite_unlocked): Fix prototype.
854 * configure, config.in: Regenerate.
856 2005-04-05 Jakub Jelinek <jakub@redhat.com>
858 PR preprocessor/19475
859 * macro.c (create_iso_definition): For < ISO C99, don't
860 pedwarn if there is no whitespace between macro name and its
861 replacement, but the replacement starts with a basic character
864 2005-03-28 Andreas Jaeger <aj@suse.de>
866 * lex.c (warn_about_normalization): Cast field width to int to
869 2005-03-19 Joseph S. Myers <joseph@codesourcery.com>
871 * configure.ac: Consistently use solaris2.1[0-9]* instead of
873 * configure: Regenerate.
875 2005-03-15 Geoffrey Keating <geoffk@apple.com>
877 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
878 UCN rather than printing an error.
880 2005-03-14 Geoffrey Keating <geoffk@apple.com>
882 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
884 2005-03-14 Geoffrey Keating <geoffk@apple.com>
886 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
887 * charset.c: Update for new format of ucnid.h.
888 (ucn_valid_in_identifier): Update for new format of ucnid.h.
889 Add NST parameter, and update it; update callers.
890 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
892 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
893 * internal.h (struct normalize_state): New.
894 (INITIAL_NORMALIZE_STATE): New.
895 (NORMALIZE_STATE_RESULT): New.
896 (NORMALIZE_STATE_UPDATE_IDNUM): New.
897 (_cpp_valid_ucn): New.
898 * lex.c (warn_about_normalization): New.
899 (forms_identifier_p): Add normalize_state parameter, update callers.
900 (lex_identifier): Add normalize_state parameter, update callers. Keep
902 (lex_number): Likewise.
903 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
904 it with warn_about_normalization.
908 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
909 comments about obsolete version of C++.
910 * include/cpplib.h (enum cpp_normalize_level): New.
911 (struct cpp_options): Add warn_normalize field.
913 2005-03-11 Geoffrey Keating <geoffk@apple.com>
915 * directives.c (glue_header_name): Update call to cpp_spell_token.
916 * internal.h (_cpp_interpret_identifier): New.
917 * charset.c (_cpp_interpret_identifier): New.
918 (_cpp_valid_ucn): Allow UCN version of '$'.
919 * lex.c (lex_identifier): Add extra parameter to indicate if initial
920 character was '$' or '\'. Support identifiers with UCNs.
921 (forms_identifier_p): Allow UCNs.
922 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
924 (cpp_spell_token): Add FORSTRING parameter. Use it.
925 (cpp_token_as_text): Update call to cpp_spell_token.
926 (cpp_output_token): Write UCNs back out.
927 (stringify_arg): Update call to cpp_spell_token.
928 (paste_tokens): Likewise.
929 (cpp_macro_definition): Likewise.
930 * macro.c (stringify_arg): Likewise.
931 (paste_tokens): Likewise.
932 (cpp_macro_definition): Likewise.
933 * include/cpplib.h: Add parameter to cpp_spell_token.
935 2005-03-04 Jakub Jelinek <jakub@redhat.com>
939 * macro.c (replace_args, cpp_get_token): Copy whole
940 cpp_token_u instead of just cpp_string field from it.
942 2005-02-28 Devang Patel <dpatel@apple.com>
944 * directives.c (do_line): Save sysp early before line table is
947 2005-02-20 Zack Weinberg <zack@codesourcery.com>
950 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
951 (cpp_host_to_exec_charset): New function.
952 * include/cpplib.h: Declare cpp_host_to_exec_charset.
954 2005-02-19 Devang Patel <dpatel@apple.com>
956 * charset.c (_cpp_convert_input): Check '\r' before inserting
959 2005-02-15 Eric Christopher <echristo@redhat.com>
961 PR preprocessor/19077
962 * macro.c (cpp_macro_definition): Move handling of whitespace
963 to PREV_WHITE conditional. Remove overloading of len
966 2005-02-14 Kazu Hirata <kazu@cs.umass.edu>
968 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
969 traditional.c: Update copyright.
971 2005-02-14 Paolo Bonzini <bonzini@gnu.org>
974 * configure.ac: Check for declaration of basename and getopt.
975 * config.in: Regenerate.
976 * configure: Regenerate.
977 * internal.h (ustrcspn): New.
978 * macro.c (create_iso_definition): Fix allocation of memory.
979 (padding_token): Add cast to remove const-ness.
980 * pch.c (cpp_read_state): Use ustrcspn.
982 2005-02-08 Mike Stump <mrs@apple.com>
984 * files.c (pchf_adder): Remove.
985 (struct pchf_adder_info): Likewise.
986 (_cpp_save_file_entries): Write out all files so that #import works.
988 2005-01-23 Joseph S. Myers <joseph@codesourcery.com>
990 * configure: Regenerate.
992 2005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
994 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
996 * include/cpplib.h: Also update copyright years.
998 2005-01-03 Geoffrey Keating <geoffk@apple.com>
1000 * files.c (_cpp_find_file): Add files found by search_path_exhausted
1001 to the list of all files.
1003 2005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1005 * internal.h: Update references to Cpp lib filenames.
1006 * directives.c: Likewise.
1008 * macro.c: Likewise.
1009 * traditional.c: Likewise.
1011 2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
1013 PR preprocessor/15167
1014 * files.c (destroy_cpp_file): New function.
1015 (should_stack_file): Make a new file if the
1016 compared file is still stacked.
1018 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
1020 PR preprocessor/17610
1021 * directives.c (do_include_common): Error out if an empty filename
1022 is given for #include (or #include_next or #import).
1024 2004-11-27 Roger Sayle <roger@eyesopen.com>
1025 Zack Weinberg <zack@codesourcery.com>
1027 * internal.h: Replace all uses of uchar with unsigned char.
1028 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
1029 with !IN_GCC, so uchar is only defined whilst building libcpp.
1031 2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
1033 * aclocal.m4: Regenerate.
1035 2004-11-24 Roger Sayle <roger@eyesopen.com>
1037 PR preprocessor/15824
1038 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1039 directly, instead of the non-existant "system.h" and "ansidecl.h".
1040 * configure: Regenerate.
1042 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
1043 Joseph Myers <joseph@codesourcery.com>
1045 * internal.h (struct lexer_state): Add in_deferred_pragma.
1046 * directives.c (struct pragma_entry): Add allow_expansion.
1047 (insert_pragma_entry): Take allow_expansion flag.
1048 (register_pragma): Likewise.
1049 (cpp_register_pragma): Likewise.
1050 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1051 (do_pragma): Honor allow_expansion.
1052 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1053 * include/cpplib.h (cpp_register_pragma): Update prototype.
1055 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
1056 Mark Mitchell <mark@codesourcery.com>
1058 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1059 need_64bit_hwint=yes.
1060 * configure: Regenerate.
1062 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1064 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1066 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1067 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1068 Remove local srcdir path from generated file.
1070 2004-11-04 Zack Weinberg <zack@codesourcery.com>
1071 Gerald Pfeifer <gerald@pfeifer.com>
1073 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1076 2004-10-27 Zack Weinberg <zack@codesourcery.com>
1079 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1080 (cpp_handle_deferred_pragma): Add cast to silence warning.
1082 2004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1084 * errors.c (_cpp_begin_message): Print "error: " for errors.
1086 2004-10-10 Andreas Jaeger <aj@suse.de>
1088 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1089 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1091 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1093 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1095 (cpp_read_state): Remove unused variables, m, d and mac_count.
1097 2004-09-29 Per Bothner <per@bothner.com>
1099 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1100 cb.line_change. Otherwise do_pragma will call the line_change
1101 call-back with a meaningless line number.
1103 2004-09-24 Zack Weinberg <zack@codesourcery.com>
1105 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1106 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1107 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1108 * aclocal.m4, configure: Regenerate.
1109 * init.c: Include localedir.h.
1110 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1112 (.c.o): Use $(ALL_CFLAGS).
1113 (localedir.h, localedir.hs): New rules.
1114 (clean): Use rm -rf to remove directories.
1115 (distclean): Also delete localedir.h and localedir.hs.
1116 (init.o): Update dependencies.
1118 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1120 * Makefile.in (aclocal.m4): Update dependencies.
1121 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1122 * aclocal.m4, configure: Regenerate.
1124 2004-09-17 Zack Weinberg <zack@codesourcery.com>
1126 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1127 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1128 Some other comments in this file also tweaked.
1130 * directives.c (do_pragma): Save current buffer position
1131 before lexing the pragma keywords; don't call
1132 _cpp_backup_tokens in the defer_pragmas case.
1134 2004-09-15 Per Bothner <per@bothner.com>
1136 * include/line-map.h (line_map_start): Add parameter names so
1137 preceding comment makes sense.
1138 (linemap_add): Remove from comment mention of non-existing parameter.
1140 2004-09-09 Matt Austern <austern@apple.com>
1141 Zack Weinberg <zack@codesourcery.com>
1143 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1144 prefixes throughout. Add entry for PRAGMA. Remove
1145 unnecessary "= 0" from EQ.
1146 (enum cpp_ttype): Adjust OP and TK definitions to restore
1147 prefixes, via token-paste.
1148 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1149 Change from #defines to additional cpp_ttype enumerators.
1150 (struct cpp_options): Add defer_pragmas.
1151 (cpp_handle_deferred_pragma): Prototype new interface.
1153 * internal.h (struct cpp_reader): Add directive_result.
1154 * directives.c (struct pragma_entry): Add is_internal field;
1155 give boolean fields type bool.
1156 (start_directive): Initialize pfile->directive_result.type.
1157 (_cpp_do__Pragma): Likewise.
1158 (run_directive): Do not crash if pfile->buffer->prev is NULL.
1159 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1161 (register_pragma): New static function, bulk of former
1162 cpp_register_pragma here; add 'internal' argument, pass along
1163 to insert_pragma_entry.
1164 (cpp_register_pragma): Now a wrapper around register_pragma which
1165 always passes false for 'internal' argument.
1166 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1167 true for 'internal'.
1168 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1169 an internal pragma, save text till the end of the line as a CPP_PRAGMA
1170 token instead of executing the pragma.
1171 (cpp_handle_deferred_pragma): New interface.
1172 * lex.c (token_spellings): Adjust OP and TK definitions to
1173 match changes to cpplib.h.
1174 (_cpp_lex_token): Check for a directive-result token and
1175 return it if present.
1176 (cpp_token_val_index): Handle CPP_PRAGMA.
1177 * macro.c (cpp_builtin_macro_text): Correct comment.
1178 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1180 2004-09-06 Serge Belyshev <belyshev@lubercy.com>
1182 PR preprocessor/14699
1183 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1184 from size_t to double.
1186 2004-08-28 Andreas Schwab <schwab@suse.de>
1187 Andreas Jaeger <aj@suse.de>
1189 * configure.ac: Set PACKAGE correctly.
1190 * configure: Regenerated.
1192 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
1194 * Makefile.in: Add back top_builddir.
1196 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
1198 * configure.ac: Replace Automake macro invocations
1199 with manual Autoconf checks and substitutions.
1200 * configure: Regenerate.
1201 * aclocal.m4: Regenerate.
1202 * config.in: Regenerate.
1203 * Makefile.am: Removed.
1204 * Makefile.in: Heavy simplification and reorganization.
1206 2004-08-09 Mark Mitchell <mark@codesourcery.com>
1208 * configure.ac (arm*-*-eabi*): New target.
1209 (arm*-*-symbianelf*): Likewise.
1210 * configure: Regenerated.
1212 2004-07-24 Bernardo Innocenti <bernie@develer.com>
1214 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1215 * directives.c: Use XNEW-family macros from libiberty.
1217 * macro.c: Likewise.
1218 * cpplib.h (cpp_deps_style): Export enum with name.
1220 2004-07-23 Matthias Klose <doko@debian.org>
1222 * init.c (init_library): Use PACKAGE for the text domain.
1224 2004-07-16 Andris Pavenis <pavenis@latnet.lv>
1226 PR preprocessor/16366
1227 * internal.h (struct cpp_reader): New field dir_hash.
1228 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1229 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1231 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
1233 PR preprocessor/16192
1234 PR preprocessor/15913
1235 PR preprocessor/15572
1236 * expr.c (_cpp_parse_expr): Handle remaining cases where an
1237 expression is missing.
1238 * init.c (post_options): Traditional cpp doesn't do // comments.
1240 2004-06-30 Per Bothner <per@bothner.com>
1242 * include/line-map.h (fileline): Remove old typedef.
1243 * internal.h (struct cpp_reader): Use source_location typedef instead.
1245 2004-06-26 Zack Weinberg <zack@codesourcery.com>
1247 Partially revert patch of 2004-06-05.
1248 * files.c (search_cache): Remove pfile argument. Don't check
1249 for file that would be found by "" or <> search here...
1250 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1251 Do not apply directory-of-current-file correction to files
1252 found by this check. Rearrange code slightly.
1254 2004-06-21 Geoffrey Keating <geoffk@apple.com>
1256 * files.c (should_stack_file): Correct swapped parameters to call
1258 * pch.c (cpp_valid_state): Handle -fpreprocessed.
1260 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1262 * Makefile.in: Regenerate with automake 1.8.5.
1263 * aclocal.m4: Likewise.
1264 * configure: Regenerate.
1266 2004-06-11 Zack Weinberg <zack@codesourcery.com>
1268 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1269 * configure, config.in: Regenerate.
1270 * system.h: Unconditionally define bool as unsigned char,
1271 BOOL_BITFIELD as unsigned int.
1272 * .cvsignore: New file.
1274 2004-06-09 Geoffrey Keating <geoffk@apple.com>
1276 * traditional.c (push_replacement_text): Set macro->traditional.
1277 (save_replacement_text): Likewise.
1278 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1279 (struct save_macro_item): Delete.
1280 (struct save_macro_data): Use a character array not the previous
1282 (save_macros): Save macro as text not as internal structures.
1283 (cpp_prepare_state): Update for changes to save_macro_data.
1284 (cpp_read_state): Don't read macros defined in PCH. Restore
1286 * macro.c (create_iso_definition): Honour alloc_subobject.
1287 Clear traditional flag.
1288 (_cpp_create_definition): Honour alloc_subobject.
1289 * lex.c (cpp_token_val_index): New.
1290 * internal.h: Include cpp-id-data.h.
1291 (uchar): Move definition to cpp-id-data.h.
1293 (cpp_macro): Likewise.
1294 * directives.c (struct answer): Move to cpp-id-data.h.
1295 (do_assert): Honour alloc_subobject.
1297 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1298 * include/cpplib.h (struct cpp_string): Add GTY marker.
1299 (enum cpp_token_fld_kind): New.
1300 (struct cpp_token): Add GTY markers.
1301 (cpp_token_val_index): Prototype.
1302 (CPP_HASHNODE_VALUE_IDX): New.
1303 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1304 * include/cpp-id-data.h: New file.
1306 2004-06-09 Paolo Bonzini <bonzini@gnu.org>
1308 * Makefile.am (all-local): New.
1309 * Makefile.in: Regenerate.
1311 2004-06-06 Roger Sayle <roger@eyesopen.com>
1313 * Makefile.am (LIBICONV): Declare.
1314 (makedepend_LDADD): Use LIBICONV.
1315 * Makefile.in: Regenerate.
1317 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
1319 * Makefile.am (LIBINTL): Declare
1320 (makedepend_LDADD): Use LIBINTL.
1321 * Makefile.in: Regenerate.
1323 2004-06-05 Zack Weinberg <zack@codesourcery.com>
1325 * Makefile.am: Add makedepend.
1326 * Makefile.in, aclocal.m4: Regenerate.
1327 * charset.c: Insert a space to avoid a warning.
1328 * directives.c: Include mkdeps.h.
1329 (_cpp_handle_directive): Reenable macro expander if appropriate.
1330 (undefine_macros): Inline body of _cpp_free_definition for speed.
1331 Do not call undef callback or _cpp_warn_if_unused_macro.
1332 (cpp_get_deps): New interface.
1333 * files.c (search_cache): Add pfile argument. Check for file
1334 that would be found by "" or <> search here...
1335 (_cpp_find_file): ...not here. Correct recorded start_dir of
1336 files found by directory-of-current-file search that would be
1337 found by "" or <> search.
1338 * init.c (cpp_add_dependency_target): Delete.
1339 * internal.h (struct lexer_state): Add discarding_output flag.
1340 * lex.c (lex_identifier): Compute hash function while scanning.
1341 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1343 * makedepend.c: New file.
1344 * mkdeps.c (struct deps): Add vpath vector.
1345 (apply_vpath, deps_add_vpath): New function.
1346 (deps_free): Free vpath vector.
1347 (deps_add_dep, deps_add_target): Use apply_vpath.
1348 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1349 (ht_lookup_with_hash): New function.
1350 * cpplib.h, mkdeps.h: Update prototypes.
1351 * symtab.h: Update prototypes.
1352 (HT_HASHSTEP, HT_FINISH): New macros.
1354 2004-05-29 Geoffrey Keating <geoffk@apple.com>
1356 * symtab.c (ht_create): Set entries_owned.
1357 (ht_destroy): Honour entries_owned.
1358 (ht_expand): Likewise.
1360 * include/symtab.h (struct ht): New field 'entries_owned'
1361 (ht_load): New prototype.
1363 2004-05-26 Paolo Bonzini <bonzini@gnu.org>
1366 * configure.ac: Fix m4 quoting when picking
1367 the size of HOST_WIDE_INT.
1368 * configure: Regenerate.
1370 2004-05-25 Paolo Bonzini <bonzini@gnu.org>
1372 * Makefile.am: the correct directory for
1373 gettext include files is given by @INCINTL@.
1374 * Makefile.in: Regenerate.
1376 2004-05-24 Paolo Bonzini <bonzini@gnu.org>
1378 * system.h [!ENABLE_NLS]: dgettext takes two
1381 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1383 Moved libcpp from the gcc subdirectory to the toplevel.
1384 * Makefile.am: New file.
1385 * Makefile.in: Regenerate.
1386 * configure.ac: New file.
1387 * configure: Regenerate.
1388 * config.in: Regenerate.
1389 * charset.c: Moved from gcc/cppcharset.c. Add note about
1390 brokenness of input charset detection. Adjust for change
1391 in name of cppucnid.h.
1392 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
1393 * expr.c: Moved from gcc/cppexp.c.
1394 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
1395 Remove #define of O_BINARY, it is in system.h.
1396 * identifiers.c: Moved from gcc/cpphash.c.
1397 * internal.h: Moved from gcc/cpphash.h. Change header
1398 guard name. All other files adjusted to match name change.
1399 * init.c: Moved from gcc/cppinit.c.
1400 (init_library) [ENABLE_NLS]: Call bindtextdomain.
1401 * lex.c: Moved from gcc/cpplex.c.
1402 * directives.c: Moved from gcc/cpplib.c.
1403 * macro.c: Moved from gcc/cppmacro.c.
1404 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
1405 * traditional.c: Moved from gcc/cpptrad.c.
1406 * ucnid.h: Moved from gcc/cppucnid.h. Change header
1408 * ucnid.pl: Moved from gcc/cppucnid.pl.
1409 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
1411 * symtab.c: Moved from gcc/hashtable.c.
1412 * line-map.c: Moved from gcc. Do not include intl.h.
1413 * mkdeps.c: Moved from gcc.
1414 * system.h: New file.
1415 * include/cpplib.h: Moved from gcc. Change header guard name.
1416 * include/line-map.h: Moved from gcc. Change header guard name.
1417 * include/mkdeps.h: Moved from gcc. Change header guard name.
1418 * include/symtab.h: Moved from gcc/hashtable.h. Change header