1 2008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3 * include/line-map.h (linenum_type): New typedef.
4 (struct line_map): Use it.
5 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
6 (SOURCE_COLUMN): Likewise.
7 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
8 source_location values in a variable of type linenum_type.
9 * directives.c (struct if_stack): Use linenum_type.
10 (strtoul_for_line): Rename as strtolinenum.
11 (do_line): Use linenum_type.
12 (do_linemarker): Use linenum_type and strtolinenum.
13 (_cpp_do_file_change): Use linenum_t.
14 * line-map.c (linemap_add): Likewise.
15 (linemap_line_start): Likewise.
16 * traditional.c (struct fun_macro): 'line' is a source_location.
17 * errors.c (print_location): Use linenum_type.
18 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
19 * internal.h (CPP_INCREMENT_LINE): Likewise.
20 * lex.c (_cpp_skip_block_comment): Use source_location.
22 2008-07-14 Ben Elliston <bje@au.ibm.com>
24 * include/cpplib.h (NODE_CONDITIONAL): New.
25 (struct cpp_callbacks): New macro_to_expand field.
26 (struct cpp_hashnode): Adjust size of flags and type fields.
27 (cpp_peek_token): Prototype.
28 * lex.c (cpp_peek_token): New function.
29 (_cpp_temp_token): Protect pre-existing lookaheads.
30 * macro.c (cpp_get_token): Expand any conditional macros.
31 (_cpp_backup_tokens_direct): New.
32 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
33 (warn_of_redefinition): Silently allow redefined conditional
35 (_cpp_create_definition): Remove the conditional flag when a user
36 defines one of the conditional macros.
37 * internal.h (_cpp_backup_tokens_direct): New prototype.
39 2008-06-13 Andrew Haley <aph@redhat.com>
42 * macro.c (replace_args): Print a warning for empty macro
43 arguments in C89 and C++.
45 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
47 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
48 * configure: Regenerate.
50 2008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
52 * Makefile.in (datarootdir): New variable.
54 2008-06-12 H.J. Lu <hongjiu.lu@intel.com>
57 * charset.c (cpp_interpret_string_notranslate): Also set
58 narrow_cset_desc.width.
60 2008-06-07 Joseph Myers <joseph@codesourcery.com>
62 * configure.ac (parisc*64*-*-*): Remove.
63 * configure: Regenerate.
65 2008-05-30 Tom Tromey <tromey@redhat.com>
67 PR preprocessor/36320:
68 * internal.h (_cpp_parse_expr): Update.
69 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
71 * directives.c (do_if): Update.
72 (do_elif): Require expression if processing group.
74 2008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
76 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
78 2008-05-21 Tom Tromey <tromey@redhat.com>
80 PR preprocessor/27777:
81 * lex.c (cpp_output_line_to_string): New function.
82 * internal.h (_cpp_begin_message): Don't declare.
83 * errors.c (_cpp_begin_message): Now static.
84 * include/cpplib.h (cpp_output_line_to_string): Declare.
85 * directives.c (do_diagnostic): Rewrote. Use
86 cpp_output_line_to_string. Don't use _cpp_begin_message.
88 2008-05-21 Tom Tromey <tromey@redhat.com>
90 * include/symtab.h (HT_ALLOCED): Remove.
92 * symtab.c (DELETED): New define.
93 (ht_lookup): Update comment.
94 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
95 code. Use subobject allocator for strings, if it exists.
96 (ht_expand): Handle deleted entries.
97 (ht_forall): Likewise.
98 (ht_purge): New function.
99 (ht_dump_statistics): Print deletion statistics.
101 2008-05-13 Tom Tromey <tromey@redhat.com>
103 PR preprocessor/22168:
104 * include/cpplib.h (struct cpp_options) <objc>: Update
106 * expr.c (eval_token): Warn for use of assertions.
107 * directives.c (directive_diagnostics): Warn about extensions.
108 (DEPRECATED): New define.
109 (DIRECTIVE_TABLE): Use it.
111 2008-05-06 Tom Tromey <tromey@redhat.com>
113 PR preprocessor/35313, PR preprocessor/36088:
114 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
115 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
117 2008-05-04 David S. Miller <davem@davemloft.net>
119 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
120 * configure: Regenerate.
122 2008-04-22 Daniel Franke <franke.daniel@gmail.com>
124 * include/cpplib.h (cpp_define_formatted): New.
125 * directives.c (cpp_define_formatted): New.
127 2008-04-21 Tom Tromey <tromey@redhat.com>
130 * charset.c (_cpp_convert_input): Add buffer_start argument.
131 Ignore UTF-8 BOM if seen.
132 * internal.h (_cpp_convert_input): Add argument.
133 * files.c (struct _cpp_file) <buffer_start>: New field.
134 (destroy_cpp_file): Free buffer_start, not buffer.
135 (_cpp_pop_file_buffer): Likewise.
136 (read_file_guts): Update.
138 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
140 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
141 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
142 (struct cpp_options): Added uliterals.
143 (cpp_interpret_string): Update prototype.
144 (cpp_interpret_string_notranslate): Idem.
145 * charset.c (init_iconv_desc): New width member in cset_converter.
146 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
148 (emit_numeric_escape): Idem.
151 (convert_escape): Idem.
152 (converter_for_type): New function.
153 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
154 (cpp_interpret_string_notranslate): Match changed prototype.
155 (wide_str_to_charconst): Use converter_for_type.
156 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
157 * directives.c (linemarker_dir): Macro U changed to UC.
158 (parse_include): Idem.
159 (register_pragma_1): Idem.
160 (restore_registered_pragmas): Idem.
161 (get__Pragma_string): Support CPP_STRING{16,32}.
162 * expr.c (eval_token): Support CPP_CHAR{16,32}.
163 * init.c (struct lang_flags): Added uliterals.
164 (lang_defaults): Idem.
165 * internal.h (struct cset_converter) <width>: New field.
166 (struct cpp_reader) <char16_cset_desc>: Idem.
167 (struct cpp_reader) <char32_cset_desc>: Idem.
168 * lex.c (digraph_spellings): Macro U changed to UC.
170 (lex_string): Add support for u'...', U'...', u"..." and U"...".
171 (_cpp_lex_direct): Idem.
172 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
173 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
175 2008-04-18 Paolo Bonzini <bonzini@gnu.org>
178 * aclocal.m4: Regenerate.
179 * configure: Regenerate.
181 2008-04-17 Tom Tromey <tromey@redhat.com>
184 * errors.c (cpp_error): Don't reference a token before the start
187 2008-04-16 Tom Tromey <tromey@redhat.com>
189 * Makefile.in (TAGS_SOURCES): New variable.
192 2008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
194 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
196 * configure: Rebuilt.
198 2008-04-02 Joseph Myers <joseph@codesourcery.com>
200 * include/cpplib.h (struct cpp_callbacks): Add used_define,
201 used_undef and before_define.
203 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
204 do_ifndef, cpp_pop_definition): Handle new flag and use new
206 * expr.c (parse_defined): Handle new flag and use new callbacks.
207 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
208 flag and use new callbacks.
210 2008-04-01 Jakub Jelinek <jakub@redhat.com>
213 * files.c (struct _cpp_file): Remove pch field.
214 (pch_open_file): Don't set file->pch, just file->pchname.
215 (should_stack_file): After pfile->cb.read_pch call
216 free pchname and clear pchname, don't close file->fd.
217 Test file->pchname instead of file->pch. Don't close fd after cb.
218 (_cpp_stack_include): Test file->pchname instead of file->pch.
220 2008-03-28 Tom Tromey <tromey@redhat.com>
222 * Makefile.in (POSTCOMPILE): New variable.
225 2008-03-13 Tom Tromey <tromey@redhat.com>
228 * directives.c (destringize_and_run): Set pfile->directive.
230 2008-03-06 Markus Milleder <markus.milleder@generali.at>
232 PR preprocessor/35458
233 * mkdeps.c (munge): Quote '#' with a '\'.
235 2008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
237 PR preprocessor/35379
238 * mkdeps.c (deps_write): Ensure the first target always appears
239 in the first column, without leading backslash newline. Avoid
240 some more extra whitespace.
242 2008-02-25 Thiemo Seufer <ths@mips.com>
244 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
246 2008-02-19 Tom Tromey <tromey@redhat.com>
248 * traditional.c (lex_identifier): Use CPP_HASHNODE.
249 * lex.c (lex_identifier): Use CPP_HASHNODE.
250 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
252 * identifiers.c (alloc_node): Change return type.
253 (_cpp_init_hashtable): Don't cast 'alloc_node'.
254 (proxy_assertion_broken): New declaration.
255 (cpp_forall_identifiers): Move comment.
256 * line-map.c (linemap_add): Comment fix.
257 (linemap_line_start): Indentation fix.
259 2008-01-25 Jakub Jelinek <jakub@redhat.com>
261 PR preprocessor/34692
262 * macro.c (collect_args): Add pragma_buff argument. Push
263 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
264 than into arguments. Reset prevent_expansion and parsing_args
265 state at CPP_PRAGMA_EOL/CPP_EOF.
266 (funlike_invocation_p): Add pragma_buff argument, pass it through
268 (enter_macro_context): Add result argument. Adjust
269 funlike_invocation_p caller. Emit all deferred pragma tokens
270 gathered during collect_args before the expansion, add a padding
271 token. Return 2 instead of 1 if any pragma tokens were prepended.
272 (cpp_get_token): If enter_macro_context returns 2, don't return
273 a padding token, instead cycle to grab CPP_PRAGMA token.
274 * directives.c (_cpp_handle_directive): If was_parsing_args
275 in deferred pragma, leave parsing_args and prevent_expansion as is.
277 2008-01-22 Tom Tromey <tromey@redhat.com>
280 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
281 __STDC_CONSTANT_MACROS.
283 2008-01-07 Fred Fish <fnf@specifix.com>
285 PR preprocessor/30363
286 * traditional.c (replace_args_and_push): Add local variable
287 cxtquote, calculate the replacement text size assuming a
288 worst case of every input character quoted with backslash,
289 and properly handle output quoting of quote characters in
290 actual arguments used in function-like macros.
292 2008-01-03 Tom Tromey <tromey@redhat.com>
294 PR preprocessor/34602
295 * directives.c (do_line): Don't try to spell EOF token.
296 (do_linemarker): Add comment.
298 2007-12-11 DJ Delorie <dj@redhat.com>
300 * charset.c (convert_using_iconv): Close out any shift states,
301 returning to the initial state.
303 2007-12-06 Tom Tromey <tromey@redhat.com>
306 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
308 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
309 * files.c (FILE_HASH_POOL_SIZE): New macro.
310 (struct file_hash_entry_pool): New.
311 (destroy_all_cpp_files): New function.
312 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
313 (new_file_hash_entry): Update.
314 (free_file_hash_entries): New function.
315 (_cpp_cleanup_files): Call free_file_hash_entries and
316 destroy_all_cpp_files.
317 (cpp_clear_file_cache): New function.
318 * include/cpplib.h (cpp_clear_file_cache): Declare.
320 2007-12-03 Tom Tromey <tromey@redhat.com>
322 PR preprocessor/34288
323 * configure.ac, config.in: Rebuilt.
324 * configure.ac: Check for ssize_t.
326 2007-11-30 Tom Tromey <tromey@redhat.com>
328 PR preprocessor/32868
329 * macro.c (_cpp_create_definition): Special case
330 __STDC_FORMAT_MACROS.
332 2007-11-16 Michael Matz <matz@suse.de>
334 * files.c (search_path_head): Fix check for absolute paths.
336 2007-11-11 Tom Tromey <tromey@redhat.com>
339 * include/cpplib.h (cpp_included_before): Declare.
340 * files.c (struct file_hash_entry) <location>: New field.
341 (_cpp_find_file): Initialize new field.
342 (make_cpp_dir): Likewise.
343 (cpp_included_before): New function.
345 2007-11-01 Tom Tromey <tromey@redhat.com>
347 PR preprocessor/30805
348 * macro.c (paste_tokens): Handle padding token.
349 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
351 2007-10-31 Tom Tromey <tromey@redhat.com>
353 PR preprocessor/30786
354 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
355 * directives.c (_cpp_do__Pragma): Return error status.
356 * internal.h (_cpp_do__Pragma): Update.
357 * directives.c (get__Pragma_string): Back up if EOF seen.
359 2007-09-06 Tom Tromey <tromey@redhat.com>
361 * internal.h (struct cpp_reader) <invocation_location>: New
363 (struct cpp_reader) <set_invocation_location>: Likewise.
364 * init.c (cpp_set_line_map): New function.
365 * line-map.c (linemap_add): Use linemap's allocator.
366 * include/line-map.h (GTY): Define.
367 (line_map_realloc): New typedef.
368 (struct line_map): Mark with GTY.
369 (struct line_maps): Likewise.
370 (struct line_maps) <maps>: Likewise.
371 (struct line_maps) <reallocator>: New field.
372 * include/symtab.h (GTY): Conditionally define.
373 * include/cpplib.h (cpp_set_line_map): Declare.
374 (cpp_get_token_with_location): Declare.
375 * macro.c (cpp_get_token): Set invocation_location on the reader.
376 (cpp_get_token_with_location): New function.
378 2007-08-30 Chao-ying Fu <fu@mips.com>
380 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
381 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
382 (cpp_classify_number): Support decimal fixed-point constants without
384 Warn about fixed-point constants when -pedantic.
385 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
386 comments to support fixed-point values.
387 (CPP_N_FRACT, CPP_N_ACCUM): Define.
389 2007-08-18 Tom Tromey <tromey@redhat.com>
391 PR preprocessor/32974
392 * directives.c (parse_include): Don't check for EOL when
393 processing #pragma dependency.
395 2007-07-30 Ollie Wild <aaw@google.com>
397 * directives-only.c: New file.
398 * internal.h (struct _cpp_dir_only_callbacks): New.
399 (_cpp_preprocess_dir_only): New function.
400 * directives.c (_cpp_handle_directive): Check directives_only before
401 disabling execution of indented directives.
402 * files.c (_cpp_stack_file): Add directives_only check.
403 * include/cpplib.h (struct cpp_options): Add directives_only.
404 (cpp_init_special_builtins): New function.
405 * init.c (cpp_init_special_builtins): New function.
406 (cpp_init_builtins): Move builtin_array initialization to
407 cpp_init_special_builtins.
408 (post_options): Check directives_only before setting
409 pfile->state.prevent_expansion = 1.
410 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
411 is expanded inside a directive while -fdirectives-only is enabled.
412 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
413 (libcpp_a_SOURCES): Add directives-only.c.
415 2007-07-04 Uros Bizjak <ubizjak@gmail.com>
417 * traditional.c (_cpp_scan_out_logical_line): Initialize
418 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
419 fmacro.args to prevent 'may be used uninitialized' warning.
421 2007-07-03 Uros Bizjak <ubizjak@gmail.com>
423 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
425 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
426 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
427 for 'q' or 'Q' suffixes.
429 2007-06-17 Danny Smith <dannysmith@users.sourceforge.net
431 * files.c (open_file): Correct typo.
433 2007-06-16 Vladimir Prus <vladimir@codesourcery.com>
435 * files.c (open_file): Prevent the call
436 for stat from overwriting errno.
438 2007-06-09 Vladimir Prus <vladimir@codesourcery.com>
440 * files.c (open_file): Account for the
441 fact that on windows, opening a directory gives
444 2007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
446 PR preprocessor/23479
447 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
449 (append_digit): Likewise.
450 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
451 binary integer constants.
453 2007-05-31 Dave Korn <dave.korn@artimi.com>
455 PR preprocessor/14331
456 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
458 2007-05-24 Ollie Wild <aaw@google.com>
460 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
461 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
462 (cpp_write_pch_state): Save __COUNTER__ state.
463 (cpp_valid_state): Check valid __COUNTER__ state.
464 (cpp_read_state): Read new __COUNTER__ state.
465 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
466 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
467 * internal.h (struct cpp_reader): Add counter member.
469 2007-05-23 Simon Martin <simartin@users.sourceforge.net>
471 PR preprocessor/20077
472 * macro.c (create_iso_definition): Fixed the method to determine
473 whether the token-pasting operator appears at the beginning or the end
476 2007-05-21 Ian Lance Taylor <iant@google.com>
478 * internal.h (struct cpp_reader): Add new fields:
479 nonexistent_file_hash and nonexistent_file_ob.
480 * files.c: Include "obstack.h".
481 (find_file_in_dir): Before trying to open the file, look up the
482 path name in the hash table of nonexistent files. After failing
483 to open the file, add the path name to the hash table.
484 (_cpp_find_file): Cache the results of looking up the file name
485 starting with the quote and bracket chain heads, if we can.
486 (nonexistent_file_hash_eq): New static function.
487 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
488 pfile->nonexistent_file_ob.
489 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
490 pfile->nonexistent_file_ob.
492 2007-05-14 Janis Johnson <janis187@us.ibm.com>
494 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
497 * expr.c (interpret_float_suffix): Check for invalid suffix.
499 2007-05-02 Eric Christopher <echristo@apple.com>
501 * expr.c (num_div_op): Don't overflow if the result is
504 2007-05-02 Tom Tromey <tromey@redhat.com>
506 PR preprocessor/28709
507 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
509 2007-03-30 Michael Meissner <michael.meissner@amd.com>
511 * directives.c (lex_macro_node_from_str): Fix alloca call to be
514 2007-03-30 Richard Henderson <rth@redhat.com>
516 * directives.c (lex_macro_node_from_str): New.
517 (cpp_push_definition, cpp_pop_definition): New.
518 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
520 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
522 * Makefile.in: Add dummy install-pdf target.
524 2007-01-30 Tom Tromey <tromey@redhat.com>
526 PR preprocessor/30468
527 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
530 2007-01-30 Tom Tromey <tromey@redhat.com>
532 PR preprocessor/29966
533 * macro.c (lex_expansion_token): Save and restore cpp_reader's
535 (_cpp_create_definition): Don't restore cur_token here.
536 * lex.c (_cpp_lex_token): Added assertion.
538 2007-01-27 Tom Tromey <tromey@redhat.com>
540 * configure: Rebuilt.
542 2007-01-12 Tom Tromey <tromey@redhat.com>
544 PR preprocessor/28227
545 * directives.c (lex_macro_node): Added 'is_def_or_undef'
552 2007-01-11 Paolo Bonzini <bonzini@gnu.org>
554 * configure: Regenerate.
556 2007-01-11 Paolo Bonzini <bonzini@gnu.org>
558 * configure: Regenerate.
560 2007-01-04 Tom Tromey <tromey@redhat.com>
562 PR preprocessor/28165
563 * internal.h (cpp_in_primary_file): New function.
564 * directives.c (do_include_next): Use cpp_in_primary_file.
565 (do_pragma_once): Likewise.
566 (do_pragma_system_header): Likewise.
568 2006-12-29 Ian Lance Taylor <iant@google.com>
570 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
571 look backward at the end of the line unless we saw a backslash.
573 2006-12-29 Jakub Jelinek <jakub@redhat.com>
575 PR preprocessor/29612
576 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
577 only when new_sysp is non-zero.
579 2006-12-28 Tom Tromey <tromey@redhat.com>
581 PR preprocessor/30001
582 * charset.c (_cpp_convert_input): Check that to.len is greater
585 2006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
587 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
588 * configure: Rebuilt.
590 2006-11-01 Douglas Gregor <doug.gregor@gmail.com>
592 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
593 for experimental C++0x mode.
594 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
595 adopted the preprocessor changes introduced in C99.
597 2006-10-29 Joseph Myers <joseph@codesourcery.com>
599 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
600 depending on --enable-targets=all.
601 * configure: Regenerate.
603 2006-10-12 Jakub Jelinek <jakub@redhat.com>
605 PR preprocessor/28709
606 * macro.c (paste_tokens): Do error reporting here, use BUF with the
607 spelled LHS token as opposed to spelling it again.
608 (paste_all_tokens): Don't report errors here, just break on failure.
610 2006-10-10 Brooks Moses <bmoses@stanford.edu>
612 * Makefile.in: Added empty "pdf" target.
614 2006-09-22 Geoffrey Keating <geoffk@apple.com>
616 * configure.ac: Make need_64_bit_hwint case for x86-darwin
617 match exactly the glob in gcc/config.gcc.
618 * configure: Regenerate.
620 2006-09-13 Joseph S. Myers <joseph@codesourcery.com>
623 PR preprocessor/14634
624 * lex.c (lex_string): Pedwarn for unterminated literals.
626 2006-09-08 Eric Christopher <echristo@apple.com>
628 * configure.ac: Add 64-bit HWI support for i?86-darwin.
630 2006-08-14 Steve Ellcey <sje@cup.hp.com>
634 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
635 (CPP_LAST_EQ): Change.
636 (CPP_LAST_PUNCTUATOR): Change.
637 * expr.c (cpp_operator): Remove MIN and MAX.
638 (reduce): Remove CPP_MIN and CPP_MAX.
639 (num_binary_op): Ditto.
640 * lex.c (_cpp_lex_direct): Ditto.
641 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
643 2006-06-09 Jakub Jelinek <jakub@redhat.com>
645 PR preprocessor/27746
646 * directives.c (do_pragma): Handle pragma with valid namespace
647 and invalid name coming from macro expansion.
648 * directives.c (destringize_and_run): Initialize next field in
653 * directives.c (destringize_and_run): Set NO_EXPAND on the
656 * macro.c (_cpp_backup_tokens): Fix comment typo.
658 2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
660 * Makefile.in (CATALOGS): Add po/ prefix.
661 * configure: Regenerated.
663 2006-05-23 Carlos O'Donell <carlos@codesourcery.com>
665 * Makefile.in: Add install-html target. Add install-html to .PHONY
667 2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
669 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
670 * files.c (_cpp_get_file_stat): New function.
671 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
672 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
673 * internal.h (_cpp_get_file_stat): Prototype.
674 (struct cpp_buffer): Add timestamp.
676 2006-01-23 Jakub Jelinek <jakub@redhat.com>
678 PR preprocessor/25717
679 * init.c (cpp_init_builtins): If __STDC__ will not change value
680 between system headers and other sources, define it as a normal
681 macro rather than a builtin.
682 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
683 cpp_in_system_header condition.
685 2006-01-05 Paolo Bonzini <bonzini@gnu.org>
687 * Makefile.in: Use -MMD instead of -MD.
689 2006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
690 Richard Henderson <rth@redhat.com>
692 Merge from gomp branch:
693 * directives.c (struct pragma_entry): Add is_deferred. Add ident
694 entry to value union.
695 (end_directive): Don't eat the line if in_deferred_pragma.
696 (run_directive): Remove pragma hacks.
697 (insert_pragma_entry): Remove.
698 (new_pragma_entry): New.
699 (register_pragma_1): Split out of register_pragma. Only handle
700 the lookup tree and return the new entry.
701 (cpp_register_pragma): Fill in the pragma entry here.
702 (cpp_register_deferred_pragma): New.
703 (register_pragma_internal): New.
704 (_cpp_init_internal_pragmas): Use register_pragma_internal.
705 (do_pragma): Allow pragma expansion after namespace. For deferred
706 pragmas, don't slurp the line into a string.
707 (destringize_and_run): Save tokens for deferred pragmas.
708 (cpp_handle_deferred_pragma): Remove.
709 * macro.c (builtin_macro): Remove pragma token hack.
710 (_cpp_push_token_context): Rename from push_token_context and export.
711 * internal.h (struct lexer_state): Add pragma_allow_expansion.
712 (_cpp_push_token_context): Declare.
713 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
714 a token. Update the line number correctly if so.
715 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
716 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
717 * include/cpplib.h (PRAGMA_EOL): New.
718 (CPP_TOKEN_FLD_PRAGMA): New.
719 (struct cpp_token): Add val.pragma.
720 (struct cpp_options): Remove defer_pragmas.
721 (cpp_handle_deferred_pragma): Remove.
722 (cpp_register_deferred_pragma): Declare.
724 2006-01-01 Jakub Jelinek <jakub@redhat.com>
727 * directives.c (do_pragma): If pragma line ends with multi-line
728 block comment, end the saved deferred pragma string before that
729 comment. Handle embedded '\0' chars on the pragma line.
731 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
734 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
736 2005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
737 Ben Elliston <bje@au.ibm.com>
739 * include/cpplib.h (CPP_N_DFLOAT): New.
740 * expr.c (interpret_float_suffix): Identify df, dd, and dl
741 suffixes as decimal floating point constants.
742 (cpp_classify_number): Disallow hexadecimal DFP constants.
744 2005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
745 Ian Lance Taylor <ian@airs.com>
747 * include/cpplib.h (struct cpp_callbacks): Annotate error with
748 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
750 2005-11-09 Per Bothner <per@bothner.com>
751 Uros Bizjak <uros@kss-loka.si>
754 * init.c (read_original_filename): Temporarily set
755 state.in_directive before calling _cpp_lex_direct for
758 2005-11-03 James E Wilson <wilson@specifix.com>
760 PR preprocessor/24202
761 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
763 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
765 * include/cpplib.h (struct cpp_callbacks): Make error take
767 * errors.c (cpp_error): Update call to callback.
769 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
771 PR preprocessor/22042
772 * macro.c (_cpp_builtin_macro_text): Lower the needed max
774 (cpp_quote_string): Don't octalify non printable
777 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
780 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
781 (struct cpp_callbacks): Add error.
782 * errors.c (cpp_error): If client_diagnostic, use error callback.
783 * charset.c (convert_escape): Don't use %03o in diagnostic.
785 2005-10-21 James E Wilson <wilson@specifix.com>
787 PR preprocessor/15220
788 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
789 callers. Pass to open_file_failed.
790 (open_file_failed): New parameter angle_brackets. Fix all callers.
791 Use in print_dep assignment.
792 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
793 * internal.h (_cpp_find_file): Add new parm to declaration.
795 2005-10-08 Kazu Hirata <kazu@codesourcery.com>
797 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
798 * configure: Regenerate.
800 2005-10-04 Ian Lance Taylor <ian@airs.com>
802 PR preprocessor/13726
803 * directives.c (check_eol_return_comments): New static function.
804 (parse_include): Add buf parameter. Change all callers.
805 (do_include_common): If not discard comments, turn on
806 save_comments. Pass collected comments to include callback.
807 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
808 include callback: cpp_token list.
810 2005-09-20 Joseph S. Myers <joseph@codesourcery.com>
812 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
813 * init.c (struct lang_flags, lang_defaults): Add
814 extended_identifiers.
815 (cpp_set_lang): Use it.
816 * lex.c (forms_identifier_p): Check extended_identifiers.
818 2005-08-30 Jakub Jelinek <jakub@redhat.com>
820 PR preprocessor/20348
821 PR preprocessor/20356
822 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
825 2005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
827 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
828 -Wmissing-format-attribute.
830 * configure: Regenerate.
832 2005-06-29 Kelley Cook <kcook@gcc.gnu.org>
834 * all files: Update FSF address in copyright headers.
835 * makeucnid.c (write_copyright): Update outputted FSF address.
837 2005-06-13 Zack Weinberg <zack@codesourcery.com>
839 * configure.ac: Invoke ZW_CREATE_DEPDIR and
840 ZW_PROG_COMPILER_DEPENDENCIES.
841 * aclocal.m4, configure: Regenerate.
842 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
844 (distclean): Clean up $(DEPDIR) and its contents.
845 (.c.o): Use $(COMPILE).
846 Include $(DEPDIR)/*.Po for most object->header dependencies.
848 2005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
850 * configure.ac: Check declarations for asprintf and vasprintf.
851 * config.in: Regenerate.
852 * configure: Likewise.
854 * charset.c (conversion_loop): Use XRESIZEVEC.
855 (convert_no_conversion): Likewise.
856 (convert_using_iconv): Likewise.
857 (init_iconv_desc): Cast return value of alloca.
858 (cpp_host_to_exec_charset): Use XNEWVEC.
859 (emit_numeric_escape): Use XRESIZEVEC.
860 (cpp_interpret_string): Use XNEWVEC.
861 (cpp_interpret_string): Use XRESIZEVEC.
862 (_cpp_interpret_identifier): Cast return value of alloca.
863 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
864 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
865 (parse_include): Use XNEWVEC.
866 (insert_pragma_entry): Rename local variable "new" to
868 (save_registered_pragmas): Cast return value of xmemdup.
869 (destringize_and_run): Same for alloca.
870 (parse_assertion): Likewise.
871 (do_assert): Cast allocated storage to proper type.
872 (cpp_define): Likewise.
873 (_cpp_define_builtin): Likewise.
874 (cpp_undef): Likewise.
875 (handle_assertion): Likewise.
876 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
877 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
878 (CPP_UMINUS): Likewise.
879 (struct cpp_operator): Rename from struct operator.
880 (_cpp_expand_op_stack): Use XRESIZEVEC.
881 * files.c (pch_open_file): Use XNEWVEC.
882 (pch_open_file): Use XRESIZEVEC.
883 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
884 (dir_name_of_file): Use XNEWVEC.
885 (make_cpp_file): Use XCNEW.
886 (make_cpp_dir): Likewise.
887 (allocate_file_hash_entries): USE XNEWVEC.
888 (cpp_included): Cast return value of htab_find_with_hash.
889 (append_file_to_dir): Use XNEWVEC.
890 (read_filename_string): Likewise. Use XRESIZEVEC too.
891 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
892 (remap_filename): Use XNEWVEC.
893 (struct pchf_entry): Move definition out of struct pchf_data.
894 (_cpp_save_file_entries): Use XCNEWVAR.
895 (_cpp_read_file_entries): Use XNEWVAR.
896 * identifiers.c (alloc_node): Use XOBNEW.
897 * init.c (cpp_create_reader): Use XCNEW.
898 (cpp_init_builtins): Cast of b->value to enum builtin_type.
899 (read_original_directory): Cast return value of alloca.
900 * lex.c (add_line_note): Use XRESIZEVEC.
901 (warn_about_normalization): Use XNEWVEC.
902 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
903 (new_buff): Use XNEWVEC.
904 * line-map.c (linemap_add): Use XRESIZEVEC.
905 * macro.c (builtin_macro): Cast return value of alloca.
906 (paste_tokens): Likewise.
907 (expand_arg): Use XNEWVEC and XRESIZEVEC.
908 (_cpp_save_parameter): Use XRESIZEVEC.
909 (create_iso_definition): Cast allocated storage to proper type.
910 (_cpp_create_definition): Likewise.
911 (cpp_macro_definition): Use XRESIZEVEC.
912 * makedepend.c (add_clm): Use XNEW.
914 * mkdeps.c (munge): Use XNEWVEC.
915 (deps_init): Use XCNEW.
916 (deps_add_target): Use XRESIZEVEC.
917 (deps_add_default_target): Cast return value of alloca.
918 (deps_add_dep): Use XRESIZEVEC.
919 (deps_add_vpath): Likewise. Use XNEWVEC too.
920 (deps_restore): Likewise.
921 * pch.c (save_idents): Use XNEW and XNEWVEC.
922 (cpp_save_state): Use XNEW.
923 (count_defs): Cast return value of htab_find.
924 (write_defs): Likewise.
925 (cpp_write_pch_deps): Use XNEWVEC.
926 (collect_ht_nodes): Use XRESIZEVEC.
927 (cpp_valid_state): Use XNEWVEC.
928 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
929 * symtab.c (ht_create): Use XCNEW.
930 (ht_lookup_with_hash): Cast return value of obstack_copy0.
931 (ht_expand): Use XCNEWVEC.
932 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
933 (bool): Do not define if __cplusplus.
935 2005-05-12 Zack Weinberg <zack@codesourcery.com>
937 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
938 (do_sccs): Delete function definition, #define to do_ident.
939 (do_ident): Don't hardwire directive name.
941 2005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
944 * configure: Regenerate.
946 2005-04-27 Andris Pavenis <pavenis@latnet.lv>
948 * files.c: Include io.h for DJGPP to get prototype of setmode.
950 2005-04-19 Per Bothner <per@bothner.com>
952 PR preprocessor/20907
953 * line-map.c (linemap_line_start): Fix bug when we need to increse
954 column_bits but can re-use the current line_map.
956 2005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
958 * system.h (fopen, fdopen, freopen): Define these to the unlocked
961 2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
963 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
964 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
965 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
966 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
968 (fwrite_unlocked): Fix prototype.
970 * configure, config.in: Regenerate.
972 2005-04-05 Jakub Jelinek <jakub@redhat.com>
974 PR preprocessor/19475
975 * macro.c (create_iso_definition): For < ISO C99, don't
976 pedwarn if there is no whitespace between macro name and its
977 replacement, but the replacement starts with a basic character
980 2005-03-28 Andreas Jaeger <aj@suse.de>
982 * lex.c (warn_about_normalization): Cast field width to int to
985 2005-03-19 Joseph S. Myers <joseph@codesourcery.com>
987 * configure.ac: Consistently use solaris2.1[0-9]* instead of
989 * configure: Regenerate.
991 2005-03-15 Geoffrey Keating <geoffk@apple.com>
993 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
994 UCN rather than printing an error.
996 2005-03-14 Geoffrey Keating <geoffk@apple.com>
998 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
1000 2005-03-14 Geoffrey Keating <geoffk@apple.com>
1002 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
1003 * charset.c: Update for new format of ucnid.h.
1004 (ucn_valid_in_identifier): Update for new format of ucnid.h.
1005 Add NST parameter, and update it; update callers.
1006 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
1008 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
1009 * internal.h (struct normalize_state): New.
1010 (INITIAL_NORMALIZE_STATE): New.
1011 (NORMALIZE_STATE_RESULT): New.
1012 (NORMALIZE_STATE_UPDATE_IDNUM): New.
1013 (_cpp_valid_ucn): New.
1014 * lex.c (warn_about_normalization): New.
1015 (forms_identifier_p): Add normalize_state parameter, update callers.
1016 (lex_identifier): Add normalize_state parameter, update callers. Keep
1018 (lex_number): Likewise.
1019 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
1020 it with warn_about_normalization.
1024 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
1025 comments about obsolete version of C++.
1026 * include/cpplib.h (enum cpp_normalize_level): New.
1027 (struct cpp_options): Add warn_normalize field.
1029 2005-03-11 Geoffrey Keating <geoffk@apple.com>
1031 * directives.c (glue_header_name): Update call to cpp_spell_token.
1032 * internal.h (_cpp_interpret_identifier): New.
1033 * charset.c (_cpp_interpret_identifier): New.
1034 (_cpp_valid_ucn): Allow UCN version of '$'.
1035 * lex.c (lex_identifier): Add extra parameter to indicate if initial
1036 character was '$' or '\'. Support identifiers with UCNs.
1037 (forms_identifier_p): Allow UCNs.
1038 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
1040 (cpp_spell_token): Add FORSTRING parameter. Use it.
1041 (cpp_token_as_text): Update call to cpp_spell_token.
1042 (cpp_output_token): Write UCNs back out.
1043 (stringify_arg): Update call to cpp_spell_token.
1044 (paste_tokens): Likewise.
1045 (cpp_macro_definition): Likewise.
1046 * macro.c (stringify_arg): Likewise.
1047 (paste_tokens): Likewise.
1048 (cpp_macro_definition): Likewise.
1049 * include/cpplib.h: Add parameter to cpp_spell_token.
1051 2005-03-04 Jakub Jelinek <jakub@redhat.com>
1055 * macro.c (replace_args, cpp_get_token): Copy whole
1056 cpp_token_u instead of just cpp_string field from it.
1058 2005-02-28 Devang Patel <dpatel@apple.com>
1060 * directives.c (do_line): Save sysp early before line table is
1063 2005-02-20 Zack Weinberg <zack@codesourcery.com>
1066 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1067 (cpp_host_to_exec_charset): New function.
1068 * include/cpplib.h: Declare cpp_host_to_exec_charset.
1070 2005-02-19 Devang Patel <dpatel@apple.com>
1072 * charset.c (_cpp_convert_input): Check '\r' before inserting
1075 2005-02-15 Eric Christopher <echristo@redhat.com>
1077 PR preprocessor/19077
1078 * macro.c (cpp_macro_definition): Move handling of whitespace
1079 to PREV_WHITE conditional. Remove overloading of len
1082 2005-02-14 Kazu Hirata <kazu@cs.umass.edu>
1084 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1085 traditional.c: Update copyright.
1087 2005-02-14 Paolo Bonzini <bonzini@gnu.org>
1090 * configure.ac: Check for declaration of basename and getopt.
1091 * config.in: Regenerate.
1092 * configure: Regenerate.
1093 * internal.h (ustrcspn): New.
1094 * macro.c (create_iso_definition): Fix allocation of memory.
1095 (padding_token): Add cast to remove const-ness.
1096 * pch.c (cpp_read_state): Use ustrcspn.
1098 2005-02-08 Mike Stump <mrs@apple.com>
1100 * files.c (pchf_adder): Remove.
1101 (struct pchf_adder_info): Likewise.
1102 (_cpp_save_file_entries): Write out all files so that #import works.
1104 2005-01-23 Joseph S. Myers <joseph@codesourcery.com>
1106 * configure: Regenerate.
1108 2005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1110 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1112 * include/cpplib.h: Also update copyright years.
1114 2005-01-03 Geoffrey Keating <geoffk@apple.com>
1116 * files.c (_cpp_find_file): Add files found by search_path_exhausted
1117 to the list of all files.
1119 2005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1121 * internal.h: Update references to Cpp lib filenames.
1122 * directives.c: Likewise.
1124 * macro.c: Likewise.
1125 * traditional.c: Likewise.
1127 2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
1129 PR preprocessor/15167
1130 * files.c (destroy_cpp_file): New function.
1131 (should_stack_file): Make a new file if the
1132 compared file is still stacked.
1134 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
1136 PR preprocessor/17610
1137 * directives.c (do_include_common): Error out if an empty filename
1138 is given for #include (or #include_next or #import).
1140 2004-11-27 Roger Sayle <roger@eyesopen.com>
1141 Zack Weinberg <zack@codesourcery.com>
1143 * internal.h: Replace all uses of uchar with unsigned char.
1144 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
1145 with !IN_GCC, so uchar is only defined whilst building libcpp.
1147 2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
1149 * aclocal.m4: Regenerate.
1151 2004-11-24 Roger Sayle <roger@eyesopen.com>
1153 PR preprocessor/15824
1154 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1155 directly, instead of the non-existant "system.h" and "ansidecl.h".
1156 * configure: Regenerate.
1158 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
1159 Joseph Myers <joseph@codesourcery.com>
1161 * internal.h (struct lexer_state): Add in_deferred_pragma.
1162 * directives.c (struct pragma_entry): Add allow_expansion.
1163 (insert_pragma_entry): Take allow_expansion flag.
1164 (register_pragma): Likewise.
1165 (cpp_register_pragma): Likewise.
1166 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1167 (do_pragma): Honor allow_expansion.
1168 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1169 * include/cpplib.h (cpp_register_pragma): Update prototype.
1171 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
1172 Mark Mitchell <mark@codesourcery.com>
1174 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1175 need_64bit_hwint=yes.
1176 * configure: Regenerate.
1178 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1180 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1182 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1183 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1184 Remove local srcdir path from generated file.
1186 2004-11-04 Zack Weinberg <zack@codesourcery.com>
1187 Gerald Pfeifer <gerald@pfeifer.com>
1189 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1192 2004-10-27 Zack Weinberg <zack@codesourcery.com>
1195 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1196 (cpp_handle_deferred_pragma): Add cast to silence warning.
1198 2004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1200 * errors.c (_cpp_begin_message): Print "error: " for errors.
1202 2004-10-10 Andreas Jaeger <aj@suse.de>
1204 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1205 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1207 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1209 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1211 (cpp_read_state): Remove unused variables, m, d and mac_count.
1213 2004-09-29 Per Bothner <per@bothner.com>
1215 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1216 cb.line_change. Otherwise do_pragma will call the line_change
1217 call-back with a meaningless line number.
1219 2004-09-24 Zack Weinberg <zack@codesourcery.com>
1221 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1222 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1223 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1224 * aclocal.m4, configure: Regenerate.
1225 * init.c: Include localedir.h.
1226 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1228 (.c.o): Use $(ALL_CFLAGS).
1229 (localedir.h, localedir.hs): New rules.
1230 (clean): Use rm -rf to remove directories.
1231 (distclean): Also delete localedir.h and localedir.hs.
1232 (init.o): Update dependencies.
1234 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1236 * Makefile.in (aclocal.m4): Update dependencies.
1237 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1238 * aclocal.m4, configure: Regenerate.
1240 2004-09-17 Zack Weinberg <zack@codesourcery.com>
1242 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1243 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1244 Some other comments in this file also tweaked.
1246 * directives.c (do_pragma): Save current buffer position
1247 before lexing the pragma keywords; don't call
1248 _cpp_backup_tokens in the defer_pragmas case.
1250 2004-09-15 Per Bothner <per@bothner.com>
1252 * include/line-map.h (line_map_start): Add parameter names so
1253 preceding comment makes sense.
1254 (linemap_add): Remove from comment mention of non-existing parameter.
1256 2004-09-09 Matt Austern <austern@apple.com>
1257 Zack Weinberg <zack@codesourcery.com>
1259 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1260 prefixes throughout. Add entry for PRAGMA. Remove
1261 unnecessary "= 0" from EQ.
1262 (enum cpp_ttype): Adjust OP and TK definitions to restore
1263 prefixes, via token-paste.
1264 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1265 Change from #defines to additional cpp_ttype enumerators.
1266 (struct cpp_options): Add defer_pragmas.
1267 (cpp_handle_deferred_pragma): Prototype new interface.
1269 * internal.h (struct cpp_reader): Add directive_result.
1270 * directives.c (struct pragma_entry): Add is_internal field;
1271 give boolean fields type bool.
1272 (start_directive): Initialize pfile->directive_result.type.
1273 (_cpp_do__Pragma): Likewise.
1274 (run_directive): Do not crash if pfile->buffer->prev is NULL.
1275 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1277 (register_pragma): New static function, bulk of former
1278 cpp_register_pragma here; add 'internal' argument, pass along
1279 to insert_pragma_entry.
1280 (cpp_register_pragma): Now a wrapper around register_pragma which
1281 always passes false for 'internal' argument.
1282 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1283 true for 'internal'.
1284 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1285 an internal pragma, save text till the end of the line as a CPP_PRAGMA
1286 token instead of executing the pragma.
1287 (cpp_handle_deferred_pragma): New interface.
1288 * lex.c (token_spellings): Adjust OP and TK definitions to
1289 match changes to cpplib.h.
1290 (_cpp_lex_token): Check for a directive-result token and
1291 return it if present.
1292 (cpp_token_val_index): Handle CPP_PRAGMA.
1293 * macro.c (cpp_builtin_macro_text): Correct comment.
1294 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1296 2004-09-06 Serge Belyshev <belyshev@lubercy.com>
1298 PR preprocessor/14699
1299 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1300 from size_t to double.
1302 2004-08-28 Andreas Schwab <schwab@suse.de>
1303 Andreas Jaeger <aj@suse.de>
1305 * configure.ac: Set PACKAGE correctly.
1306 * configure: Regenerated.
1308 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
1310 * Makefile.in: Add back top_builddir.
1312 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
1314 * configure.ac: Replace Automake macro invocations
1315 with manual Autoconf checks and substitutions.
1316 * configure: Regenerate.
1317 * aclocal.m4: Regenerate.
1318 * config.in: Regenerate.
1319 * Makefile.am: Removed.
1320 * Makefile.in: Heavy simplification and reorganization.
1322 2004-08-09 Mark Mitchell <mark@codesourcery.com>
1324 * configure.ac (arm*-*-eabi*): New target.
1325 (arm*-*-symbianelf*): Likewise.
1326 * configure: Regenerated.
1328 2004-07-24 Bernardo Innocenti <bernie@develer.com>
1330 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1331 * directives.c: Use XNEW-family macros from libiberty.
1333 * macro.c: Likewise.
1334 * cpplib.h (cpp_deps_style): Export enum with name.
1336 2004-07-23 Matthias Klose <doko@debian.org>
1338 * init.c (init_library): Use PACKAGE for the text domain.
1340 2004-07-16 Andris Pavenis <pavenis@latnet.lv>
1342 PR preprocessor/16366
1343 * internal.h (struct cpp_reader): New field dir_hash.
1344 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1345 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1347 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
1349 PR preprocessor/16192
1350 PR preprocessor/15913
1351 PR preprocessor/15572
1352 * expr.c (_cpp_parse_expr): Handle remaining cases where an
1353 expression is missing.
1354 * init.c (post_options): Traditional cpp doesn't do // comments.
1356 2004-06-30 Per Bothner <per@bothner.com>
1358 * include/line-map.h (fileline): Remove old typedef.
1359 * internal.h (struct cpp_reader): Use source_location typedef instead.
1361 2004-06-26 Zack Weinberg <zack@codesourcery.com>
1363 Partially revert patch of 2004-06-05.
1364 * files.c (search_cache): Remove pfile argument. Don't check
1365 for file that would be found by "" or <> search here...
1366 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1367 Do not apply directory-of-current-file correction to files
1368 found by this check. Rearrange code slightly.
1370 2004-06-21 Geoffrey Keating <geoffk@apple.com>
1372 * files.c (should_stack_file): Correct swapped parameters to call
1374 * pch.c (cpp_valid_state): Handle -fpreprocessed.
1376 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1378 * Makefile.in: Regenerate with automake 1.8.5.
1379 * aclocal.m4: Likewise.
1380 * configure: Regenerate.
1382 2004-06-11 Zack Weinberg <zack@codesourcery.com>
1384 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1385 * configure, config.in: Regenerate.
1386 * system.h: Unconditionally define bool as unsigned char,
1387 BOOL_BITFIELD as unsigned int.
1388 * .cvsignore: New file.
1390 2004-06-09 Geoffrey Keating <geoffk@apple.com>
1392 * traditional.c (push_replacement_text): Set macro->traditional.
1393 (save_replacement_text): Likewise.
1394 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1395 (struct save_macro_item): Delete.
1396 (struct save_macro_data): Use a character array not the previous
1398 (save_macros): Save macro as text not as internal structures.
1399 (cpp_prepare_state): Update for changes to save_macro_data.
1400 (cpp_read_state): Don't read macros defined in PCH. Restore
1402 * macro.c (create_iso_definition): Honour alloc_subobject.
1403 Clear traditional flag.
1404 (_cpp_create_definition): Honour alloc_subobject.
1405 * lex.c (cpp_token_val_index): New.
1406 * internal.h: Include cpp-id-data.h.
1407 (uchar): Move definition to cpp-id-data.h.
1409 (cpp_macro): Likewise.
1410 * directives.c (struct answer): Move to cpp-id-data.h.
1411 (do_assert): Honour alloc_subobject.
1413 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1414 * include/cpplib.h (struct cpp_string): Add GTY marker.
1415 (enum cpp_token_fld_kind): New.
1416 (struct cpp_token): Add GTY markers.
1417 (cpp_token_val_index): Prototype.
1418 (CPP_HASHNODE_VALUE_IDX): New.
1419 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1420 * include/cpp-id-data.h: New file.
1422 2004-06-09 Paolo Bonzini <bonzini@gnu.org>
1424 * Makefile.am (all-local): New.
1425 * Makefile.in: Regenerate.
1427 2004-06-06 Roger Sayle <roger@eyesopen.com>
1429 * Makefile.am (LIBICONV): Declare.
1430 (makedepend_LDADD): Use LIBICONV.
1431 * Makefile.in: Regenerate.
1433 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
1435 * Makefile.am (LIBINTL): Declare
1436 (makedepend_LDADD): Use LIBINTL.
1437 * Makefile.in: Regenerate.
1439 2004-06-05 Zack Weinberg <zack@codesourcery.com>
1441 * Makefile.am: Add makedepend.
1442 * Makefile.in, aclocal.m4: Regenerate.
1443 * charset.c: Insert a space to avoid a warning.
1444 * directives.c: Include mkdeps.h.
1445 (_cpp_handle_directive): Reenable macro expander if appropriate.
1446 (undefine_macros): Inline body of _cpp_free_definition for speed.
1447 Do not call undef callback or _cpp_warn_if_unused_macro.
1448 (cpp_get_deps): New interface.
1449 * files.c (search_cache): Add pfile argument. Check for file
1450 that would be found by "" or <> search here...
1451 (_cpp_find_file): ...not here. Correct recorded start_dir of
1452 files found by directory-of-current-file search that would be
1453 found by "" or <> search.
1454 * init.c (cpp_add_dependency_target): Delete.
1455 * internal.h (struct lexer_state): Add discarding_output flag.
1456 * lex.c (lex_identifier): Compute hash function while scanning.
1457 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1459 * makedepend.c: New file.
1460 * mkdeps.c (struct deps): Add vpath vector.
1461 (apply_vpath, deps_add_vpath): New function.
1462 (deps_free): Free vpath vector.
1463 (deps_add_dep, deps_add_target): Use apply_vpath.
1464 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1465 (ht_lookup_with_hash): New function.
1466 * cpplib.h, mkdeps.h: Update prototypes.
1467 * symtab.h: Update prototypes.
1468 (HT_HASHSTEP, HT_FINISH): New macros.
1470 2004-05-29 Geoffrey Keating <geoffk@apple.com>
1472 * symtab.c (ht_create): Set entries_owned.
1473 (ht_destroy): Honour entries_owned.
1474 (ht_expand): Likewise.
1476 * include/symtab.h (struct ht): New field 'entries_owned'
1477 (ht_load): New prototype.
1479 2004-05-26 Paolo Bonzini <bonzini@gnu.org>
1482 * configure.ac: Fix m4 quoting when picking
1483 the size of HOST_WIDE_INT.
1484 * configure: Regenerate.
1486 2004-05-25 Paolo Bonzini <bonzini@gnu.org>
1488 * Makefile.am: the correct directory for
1489 gettext include files is given by @INCINTL@.
1490 * Makefile.in: Regenerate.
1492 2004-05-24 Paolo Bonzini <bonzini@gnu.org>
1494 * system.h [!ENABLE_NLS]: dgettext takes two
1497 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1499 Moved libcpp from the gcc subdirectory to the toplevel.
1500 * Makefile.am: New file.
1501 * Makefile.in: Regenerate.
1502 * configure.ac: New file.
1503 * configure: Regenerate.
1504 * config.in: Regenerate.
1505 * charset.c: Moved from gcc/cppcharset.c. Add note about
1506 brokenness of input charset detection. Adjust for change
1507 in name of cppucnid.h.
1508 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
1509 * expr.c: Moved from gcc/cppexp.c.
1510 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
1511 Remove #define of O_BINARY, it is in system.h.
1512 * identifiers.c: Moved from gcc/cpphash.c.
1513 * internal.h: Moved from gcc/cpphash.h. Change header
1514 guard name. All other files adjusted to match name change.
1515 * init.c: Moved from gcc/cppinit.c.
1516 (init_library) [ENABLE_NLS]: Call bindtextdomain.
1517 * lex.c: Moved from gcc/cpplex.c.
1518 * directives.c: Moved from gcc/cpplib.c.
1519 * macro.c: Moved from gcc/cppmacro.c.
1520 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
1521 * traditional.c: Moved from gcc/cpptrad.c.
1522 * ucnid.h: Moved from gcc/cppucnid.h. Change header
1524 * ucnid.pl: Moved from gcc/cppucnid.pl.
1525 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
1527 * symtab.c: Moved from gcc/hashtable.c.
1528 * line-map.c: Moved from gcc. Do not include intl.h.
1529 * mkdeps.c: Moved from gcc.
1530 * system.h: New file.
1531 * include/cpplib.h: Moved from gcc. Change header guard name.
1532 * include/line-map.h: Moved from gcc. Change header guard name.
1533 * include/mkdeps.h: Moved from gcc. Change header guard name.
1534 * include/symtab.h: Moved from gcc/hashtable.h. Change header