OSDN Git Service

24f3f8debcf5bc4a32994fb9b543c49239eb4c2b
[pf3gnuchains/gcc-fork.git] / libcpp / ChangeLog
1 2009-04-25  Joseph Myers  <joseph@codesourcery.com>
2
3         PR preprocessor/39559
4         * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
5         constants larger than intmax_t in C99 mode.
6
7 2009-04-21  Taras Glek <tglek@mozilla.com>
8
9         * include/cpp-id-data.h: Update GTY annotations to new syntax.
10         * include/cpplib.h: Likewise.
11         * include/line-map.h: Likewise.
12         * include/symtab.h: Likewise.
13
14 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
15
16         PR c++/14875
17         * lex.c (cpp_type2name): Take a flags parameter. Call
18         cpp_named_operator2name for named operators and cpp_digraph2name
19         for digraphs.
20         (cpp_digraph2name): New.
21         (cpp_spell_token): Use it.
22         (cpp_output_token): Likewise.
23         * include/cpplib.h (cpp_type2name): Update declaration.
24         * init.c (cpp_named_operator2name): New.
25         * internal.h (cpp_named_operator2name): Declare.
26
27 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
28
29         PR c++/13358
30         * init.c (cpp_create_reader): Wlong_long is disabled by default.
31         * expr.c (cpp_classify_number): Give different messages for C and
32         C++ front-ends.
33
34 2009-04-19  Joseph Myers  <joseph@codesourcery.com>
35
36         PR preprocessor/20078
37         * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
38         field.
39         * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
40         (struct cpp_token): Change flags to unsigned short.
41         * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
42         (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
43         (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
44         tokens.
45         * macro.c (macro_real_token_count): New.
46         (enter_macro_context, replace_args): Use macro_real_token_count.
47         (create_iso_definition): Record whitespace surrounding and digraph
48         spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
49         Set extra_tokens and save CPP_PASTE tokens with arg_no set for
50         multiple consecutive ## tokens.
51         (_cpp_create_definition): Initialize extra_tokens.
52         (cpp_macro_definition): Use macro_real_token_count.
53
54 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
55
56         * directives.c (parse_include): Pass true to check_eol.
57
58 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
59
60         PR preprocessor/39646
61         * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
62         * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
63         * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
64         place of LC_RENAME.
65
66 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
67
68         PR preprocessor/39647
69         * directives.c (check_eol): Add parameter expand.
70         (do_undef, parse_include, do_line, do_linemarker, do_ident,
71         do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
72         do_else, do_endif, do_assert, do_unassert): All callers changed.
73         Pass true from do_line, false elsewhere.
74
75 2009-04-12  Joseph Myers  <joseph@codesourcery.com>
76
77         PR preprocessor/31869
78         * macro.c (stringify_arg): Handle NULL source token in padding
79         token where previous padding token did not have source token with
80         preceding whitespace.
81
82 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
83
84         * Makefile.in: Change copyright header to refer to version
85         3 of the GNU General Public License and to point readers at the
86         COPYING3 file and the FSF's license web page.
87         * charset.c: Likewise.
88         * directives-only.c: Likewise.
89         * directives.c: Likewise.
90         * errors.c: Likewise.
91         * expr.c: Likewise.
92         * files.c: Likewise.
93         * identifiers.c: Likewise.
94         * include/cpp-id-data.h: Likewise.
95         * include/cpplib.h: Likewise.
96         * include/line-map.h: Likewise.
97         * include/mkdeps.h: Likewise.
98         * include/symtab.h: Likewise.
99         * init.c: Likewise.
100         * internal.h: Likewise.
101         * lex.c: Likewise.
102         * line-map.c: Likewise.
103         * macro.c: Likewise.
104         * makeucnid.c: Likewise.
105         * mkdeps.c: Likewise.
106         * pch.c: Likewise.
107         * symtab.c: Likewise.
108         * system.h: Likewise.
109         * traditional.c: Likewise.
110         * ucnid.tab: Likewise.
111         * ucnid.h: Regenerate.
112
113 2009-04-01  Janis Johnson  <janis187@us.ibm.com>
114
115         PR c/39027
116         * include/cpplib.h (CPP_N_DEFAULT): Define.
117         * expr.c (interpret_float_suffix): Recognize d or D for double,
118         return new value for default.
119         (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
120
121         PR c/33466
122         * expr.c (interpret_float_suffix): Reject invalid suffix that uses
123         letters from decimal float and fixed-point suffixes.
124
125 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
126
127         PR preprocessor/15638
128         * files.c (_cpp_find_file): Call open_file_failed after diagnosing
129         invalid PCH.
130         (open_file_failed): Make error for missing file fatal.
131         * include/cpplib.h (CPP_DL_FATAL): Define.
132
133 2009-03-30  Sergiy Vyshnevetskiy  <serg@vostok.net>
134
135         PR preprocessor/31932:
136         * internal.h: Don't mention HAVE_ICONV_H.
137         * configure, config.in: Rebuild.
138         * configure.ac: Don't check for iconv.h.
139
140 2009-03-30  Tom Tromey  <tromey@redhat.com>
141
142         PR preprocessor/39512:
143         * line-map.c (linemap_init): Initialize 'reallocator' field.
144
145 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
146
147         PR target/39558
148         * macro.c (cpp_get_token): If macro_to_expand returns NULL
149         and used some tokens, add CPP_PADDING before next token.
150
151 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
152
153         PR preprocessor/34695
154         * makedepend.c: Remove.
155         * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
156         (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
157         * directives.c (cpp_errors): Remove.
158         * errors.c (print_location, _cpp_begin_message, v_message):
159         Remove.
160         (cpp_error, cpp_error_with_line): Always use error callback.
161         (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
162         * include/cpplib.h (cpp_options): Remove pedantic_errors,
163         inhibit_warnings, warn_system_headers, inhibit_errors,
164         warnings_are_errors, client_diagnostic.
165         (cpp_callbacks): Add extra arguments to error callback; make it
166         return bool.
167         (cpp_finish): Return void.
168         (cpp_destroy): Remove inaccurate comment about return value.
169         (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
170         (CPP_DL_NOTE): Define.
171         * include/line-map.h (linemap_print_containing_files): Remove.
172         * init.c (cpp_finish): Do not check for or return number of
173         errors.
174         * internal.h (cpp_reader): Remove errors field.
175         * line-map.c (linemap_print_containing_files): Remove.
176         * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
177         about previous definition.  Only emit it if previous diagnostic
178         was emitted.
179
180 2009-03-28  Joseph Myers  <joseph@codesourcery.com>
181
182         * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
183         mkinstalldirs.
184
185 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
186
187         * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
188
189 2009-02-21  Joseph Myers  <joseph@codesourcery.com>
190
191         * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
192         header name.
193         (_cpp_lex_direct): Handle this.
194
195 2009-02-15  Richard Guenther  <rguenther@suse.de>
196
197         Revert last change.
198
199 2009-02-13  Richard Guenther  <rguenther@suse.de>
200
201         * configure.ac: Enable LFS.
202         * configure: Re-generate.
203         * config.in: Likewise.
204
205 2009-01-05  Ben Elliston  <bje@au.ibm.com>
206
207         * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
208         (.po.pox): Likewise.
209         (po/$(PACKAGE).pot): Likewise.
210
211 2008-12-10  Alexandre Oliva  <aoliva@redhat.com>
212
213         PR target/37033
214         * pch.c (cpp_valid_state): Improve message for poisoned symbols.
215         Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
216
217 2008-11-29  Joseph Myers  <joseph@codesourcery.com>
218
219         * lex.c (cpp_token_len): Use 6 as default length.
220
221 2008-10-31  Manuel López-Ibáñez  <manu@gcc.gnu.org>
222
223         * expr.c (struct op): Add location.
224         (_cpp_parse_expr): Propagate locations throught the stack
225         of expressions.
226         (reduce): Likewise.
227         (check_promotion): Use explicit location in errors.
228
229 2008-10-05  Matthew Gingell  <gingell@adacore.com>
230             Arnaud Charlet  <charlet@adacore.com>
231
232         * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
233         (cpp_get_comments): New function.
234         * internal.h (struct cpp_reader): Add comments field.
235         * init.c (cpp_destroy): Free comments.
236         * lex.c (store_comment, cpp_get_comments): New functions.
237         (comments): New struct.
238         (save_comment): Store comments in comments struct.
239
240 2008-09-18  Simon Baldwin  <simonb@google.com>
241
242         * include/cpplib.h (struct cpp_options): Add new boolean flag
243         warn_builtin_macro_redefined.
244         * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
245         * (struct builtin_operator): Split out from previous struct builtin,
246         enhance extra const correctness.
247         * (struct builtin_macro): Split out from previous struct builtin, add
248         new always_warn_if_redefined flag, enhance const correctness.
249         * (mark_named_operators): Use struct builtin_operator.
250         * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
251         to builtins selectively.
252         * macro.c (warn_of_redefinition): Return false if a builtin macro
253         is not flagged with NODE_WARN.
254
255 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
256
257         PR preprocessor/36649
258         * files.c (struct report_missing_guard_data): New type.
259         (report_missing_guard): Put paths into an array instead of printing
260         them right away.  Return 1 rather than 0.
261         (report_missing_guard_cmp): New function.
262         (_cpp_report_missing_guards): Sort and print paths gathered by
263         report_missing_guard callback.
264
265 2008-07-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
266
267         PR 28079
268         * directives.c (strtolinenum): Handle overflow.
269         (do_line): Give a warning if line number overflowed.
270         (do_linemarker): Update call to strtolinenum.
271
272 2008-07-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
273
274         * include/line-map.h (linenum_type): New typedef.
275         (struct line_map): Use it.
276         (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
277         (SOURCE_COLUMN): Likewise.
278         * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
279         source_location values in a variable of type linenum_type.
280         * directives.c (struct if_stack): Use linenum_type.
281         (strtoul_for_line): Rename as strtolinenum.
282         (do_line): Use linenum_type.
283         (do_linemarker): Use linenum_type and strtolinenum.
284         (_cpp_do_file_change): Use linenum_t.
285         * line-map.c (linemap_add): Likewise.
286         (linemap_line_start): Likewise.
287         * traditional.c (struct fun_macro): 'line' is a source_location.
288         * errors.c (print_location): Use linenum_type.
289         * directives-only.c (_cpp_preprocess_dir_only): Likewise.
290         * internal.h (CPP_INCREMENT_LINE): Likewise.
291         * lex.c (_cpp_skip_block_comment): Use source_location.
292         
293 2008-07-14  Ben Elliston  <bje@au.ibm.com>
294
295         * include/cpplib.h (NODE_CONDITIONAL): New.
296         (struct cpp_callbacks): New macro_to_expand field.
297         (struct cpp_hashnode): Adjust size of flags and type fields.
298         (cpp_peek_token): Prototype.
299         * lex.c (cpp_peek_token): New function.
300         (_cpp_temp_token): Protect pre-existing lookaheads.
301         * macro.c (cpp_get_token): Expand any conditional macros.
302         (_cpp_backup_tokens_direct): New.
303         (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
304         (warn_of_redefinition): Silently allow redefined conditional
305         macros.
306         (_cpp_create_definition): Remove the conditional flag when a user
307         defines one of the conditional macros.
308         * internal.h (_cpp_backup_tokens_direct): New prototype.
309
310 2008-06-13  Andrew Haley  <aph@redhat.com>
311
312         PR preprocessor/33305
313         * macro.c (replace_args): Print a warning for empty macro
314         arguments in C89 and C++.
315
316 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
317
318         * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
319         * configure: Regenerate.
320
321 2008-06-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
322
323         * Makefile.in (datarootdir): New variable.
324
325 2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>
326
327         PR preprocessor/36479
328         * charset.c (cpp_interpret_string_notranslate): Also set
329         narrow_cset_desc.width.
330
331 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
332
333         * configure.ac (parisc*64*-*-*): Remove.
334         * configure: Regenerate.
335
336 2008-05-30  Tom Tromey  <tromey@redhat.com>
337
338         PR preprocessor/36320:
339         * internal.h (_cpp_parse_expr): Update.
340         * expr.c (_cpp_parse_expr): Add 'is_if' argument.  Update error
341         messages.
342         * directives.c (do_if): Update.
343         (do_elif): Require expression if processing group.
344
345 2008-05-30  Danny Smith  <dannysmith@users.sourceforge.net>
346
347         * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
348
349 2008-05-21  Tom Tromey  <tromey@redhat.com>
350
351         PR preprocessor/27777:
352         * lex.c (cpp_output_line_to_string): New function.
353         * internal.h (_cpp_begin_message): Don't declare.
354         * errors.c (_cpp_begin_message): Now static.
355         * include/cpplib.h (cpp_output_line_to_string): Declare.
356         * directives.c (do_diagnostic): Rewrote.  Use
357         cpp_output_line_to_string.  Don't use _cpp_begin_message.
358
359 2008-05-21  Tom Tromey  <tromey@redhat.com>
360
361         * include/symtab.h (HT_ALLOCED): Remove.
362         (ht_purge): Declare.
363         * symtab.c (DELETED): New define.
364         (ht_lookup): Update comment.
365         (ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
366         code.  Use subobject allocator for strings, if it exists.
367         (ht_expand): Handle deleted entries.
368         (ht_forall): Likewise.
369         (ht_purge): New function.
370         (ht_dump_statistics): Print deletion statistics.
371
372 2008-05-13  Tom Tromey  <tromey@redhat.com>
373
374         PR preprocessor/22168:
375         * include/cpplib.h (struct cpp_options) <objc>: Update
376         documentation.
377         * expr.c (eval_token): Warn for use of assertions.
378         * directives.c (directive_diagnostics): Warn about extensions.
379         (DEPRECATED): New define.
380         (DIRECTIVE_TABLE): Use it.
381
382 2008-05-06  Tom Tromey  <tromey@redhat.com>
383
384         PR preprocessor/35313, PR preprocessor/36088:
385         * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
386         (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
387
388 2008-05-04  David S. Miller  <davem@davemloft.net>
389
390         * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
391         * configure: Regenerate.
392
393 2008-04-22  Daniel Franke  <franke.daniel@gmail.com>
394
395         * include/cpplib.h (cpp_define_formatted): New.
396         * directives.c (cpp_define_formatted): New.
397
398 2008-04-21  Tom Tromey  <tromey@redhat.com>
399
400         PR libcpp/33415:
401         * charset.c (_cpp_convert_input): Add buffer_start argument.
402         Ignore UTF-8 BOM if seen.
403         * internal.h (_cpp_convert_input): Add argument.
404         * files.c (struct _cpp_file) <buffer_start>: New field.
405         (destroy_cpp_file): Free buffer_start, not buffer.
406         (_cpp_pop_file_buffer): Likewise.
407         (read_file_guts): Update.
408
409 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
410
411         * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
412         * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
413         (struct cpp_options): Added uliterals.
414         (cpp_interpret_string): Update prototype.
415         (cpp_interpret_string_notranslate): Idem.
416         * charset.c (init_iconv_desc): New width member in cset_converter.
417         (cpp_init_iconv): Add support for char{16,32}_cset_desc.
418         (convert_ucn): Idem.
419         (emit_numeric_escape): Idem.
420         (convert_hex): Idem.
421         (convert_oct): Idem.
422         (convert_escape): Idem.
423         (converter_for_type): New function.
424         (cpp_interpret_string): Use converter_for_type, support u and U prefix.
425         (cpp_interpret_string_notranslate): Match changed prototype.
426         (wide_str_to_charconst): Use converter_for_type.
427         (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
428         * directives.c (linemarker_dir): Macro U changed to UC.
429         (parse_include): Idem.
430         (register_pragma_1): Idem.
431         (restore_registered_pragmas): Idem.
432         (get__Pragma_string): Support CPP_STRING{16,32}.
433         * expr.c (eval_token): Support CPP_CHAR{16,32}.
434         * init.c (struct lang_flags): Added uliterals.
435         (lang_defaults): Idem.
436         * internal.h (struct cset_converter) <width>: New field.
437         (struct cpp_reader) <char16_cset_desc>: Idem.
438         (struct cpp_reader) <char32_cset_desc>: Idem.
439         * lex.c (digraph_spellings): Macro U changed to UC.
440         (OP, TK): Idem.
441         (lex_string): Add support for u'...', U'...', u"..." and U"...".
442         (_cpp_lex_direct): Idem.
443         * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
444         (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
445
446 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
447
448         PR bootstrap/35457
449         * aclocal.m4: Regenerate.
450         * configure: Regenerate.
451
452 2008-04-17  Tom Tromey  <tromey@redhat.com>
453
454         PR libcpp/34866:
455         * errors.c (cpp_error): Don't reference a token before the start
456         of the current run.
457
458 2008-04-16  Tom Tromey  <tromey@redhat.com>
459
460         * Makefile.in (TAGS_SOURCES): New variable.
461         (TAGS): New target.
462
463 2008-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
464
465         * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
466         and shbe-*-*.
467         * configure: Rebuilt.
468
469 2008-04-02  Joseph Myers  <joseph@codesourcery.com>
470
471         * include/cpplib.h (struct cpp_callbacks): Add used_define,
472         used_undef and before_define.
473         (NODE_USED): Define.
474         * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
475         do_ifndef, cpp_pop_definition): Handle new flag and use new
476         callbacks.
477         * expr.c (parse_defined): Handle new flag and use new callbacks.
478         * macro.c (enter_macro_context, _cpp_free_definition): Handle new
479         flag and use new callbacks.
480
481 2008-04-01  Jakub Jelinek  <jakub@redhat.com>
482
483         PR pch/13675
484         * files.c (struct _cpp_file): Remove pch field.
485         (pch_open_file): Don't set file->pch, just file->pchname.
486         (should_stack_file): After pfile->cb.read_pch call
487         free pchname and clear pchname, don't close file->fd.
488         Test file->pchname instead of file->pch.  Don't close fd after cb.
489         (_cpp_stack_include): Test file->pchname instead of file->pch.
490
491 2008-03-28  Tom Tromey  <tromey@redhat.com>
492
493         * Makefile.in (POSTCOMPILE): New variable.
494         (.c.o): Use it.
495
496 2008-03-13  Tom Tromey  <tromey@redhat.com>
497
498         PR libcpp/35322:
499         * directives.c (destringize_and_run): Set pfile->directive.
500
501 2008-03-06  Markus Milleder  <markus.milleder@generali.at>
502
503         PR preprocessor/35458
504         * mkdeps.c (munge): Quote '#' with a '\'.
505
506 2008-02-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
507
508         PR preprocessor/35379
509         * mkdeps.c (deps_write): Ensure the first target always appears
510         in the first column, without leading backslash newline.  Avoid
511         some more extra whitespace.
512
513 2008-02-25  Thiemo Seufer <ths@mips.com>
514
515         * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
516
517 2008-02-19  Tom Tromey  <tromey@redhat.com>
518
519         * traditional.c (lex_identifier): Use CPP_HASHNODE.
520         * lex.c (lex_identifier): Use CPP_HASHNODE.
521         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
522         do-while.
523         * identifiers.c (alloc_node): Change return type.
524         (_cpp_init_hashtable): Don't cast 'alloc_node'.
525         (proxy_assertion_broken): New declaration.
526         (cpp_forall_identifiers): Move comment.
527         * line-map.c (linemap_add): Comment fix.
528         (linemap_line_start): Indentation fix.
529
530 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
531
532         PR preprocessor/34692
533         * macro.c (collect_args): Add pragma_buff argument.  Push
534         CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
535         than into arguments.  Reset prevent_expansion and parsing_args
536         state at CPP_PRAGMA_EOL/CPP_EOF.
537         (funlike_invocation_p): Add pragma_buff argument, pass it through
538         to collect_args.
539         (enter_macro_context): Add result argument.  Adjust
540         funlike_invocation_p caller.  Emit all deferred pragma tokens
541         gathered during collect_args before the expansion, add a padding
542         token.  Return 2 instead of 1 if any pragma tokens were prepended.
543         (cpp_get_token): If enter_macro_context returns 2, don't return
544         a padding token, instead cycle to grab CPP_PRAGMA token.
545         * directives.c (_cpp_handle_directive): If was_parsing_args
546         in deferred pragma, leave parsing_args and prevent_expansion as is.
547
548 2008-01-22  Tom Tromey  <tromey@redhat.com>
549
550         PR c++/34859
551         * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
552         __STDC_CONSTANT_MACROS.
553
554 2008-01-07  Fred Fish  <fnf@specifix.com>
555
556         PR preprocessor/30363
557         * traditional.c (replace_args_and_push): Add local variable
558         cxtquote, calculate the replacement text size assuming a 
559         worst case of every input character quoted with backslash,
560         and properly handle output quoting of quote characters in
561         actual arguments used in function-like macros.
562
563 2008-01-03  Tom Tromey  <tromey@redhat.com>
564
565         PR preprocessor/34602
566         * directives.c (do_line): Don't try to spell EOF token.
567         (do_linemarker): Add comment.
568
569 2007-12-11  DJ Delorie  <dj@redhat.com>
570
571         * charset.c (convert_using_iconv): Close out any shift states,
572         returning to the initial state.
573
574 2007-12-06  Tom Tromey  <tromey@redhat.com>
575
576         PR c/29172
577         * internal.h (struct cpp_reader) <file_hash_entries>: Changed
578         type.
579         <file_hash_entries_allocated, file_hash_entries_used>: Removed.
580         * files.c (FILE_HASH_POOL_SIZE): New macro.
581         (struct file_hash_entry_pool): New.
582         (destroy_all_cpp_files): New function.
583         (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
584         (new_file_hash_entry): Update.
585         (free_file_hash_entries): New function.
586         (_cpp_cleanup_files): Call free_file_hash_entries and
587         destroy_all_cpp_files.
588         (cpp_clear_file_cache): New function.
589         * include/cpplib.h (cpp_clear_file_cache): Declare.
590
591 2007-12-03  Tom Tromey  <tromey@redhat.com>
592
593         PR preprocessor/34288
594         * configure.ac, config.in: Rebuilt.
595         * configure.ac: Check for ssize_t.
596
597 2007-11-30  Tom Tromey  <tromey@redhat.com>
598
599         PR preprocessor/32868
600         * macro.c (_cpp_create_definition): Special case
601         __STDC_FORMAT_MACROS.
602
603 2007-11-16  Michael Matz  <matz@suse.de>
604
605         * files.c (search_path_head): Fix check for absolute paths.
606
607 2007-11-11  Tom Tromey  <tromey@redhat.com>
608
609         PR c++/17557
610         * include/cpplib.h (cpp_included_before): Declare.
611         * files.c (struct file_hash_entry) <location>: New field.
612         (_cpp_find_file): Initialize new field.
613         (make_cpp_dir): Likewise.
614         (cpp_included_before): New function.
615
616 2007-11-01  Tom Tromey  <tromey@redhat.com>
617
618         PR preprocessor/30805
619         * macro.c (paste_tokens): Handle padding token.
620         (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
621
622 2007-10-31  Tom Tromey  <tromey@redhat.com>
623
624         PR preprocessor/30786
625         * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
626         * directives.c (_cpp_do__Pragma): Return error status.
627         * internal.h (_cpp_do__Pragma): Update.
628         * directives.c (get__Pragma_string): Back up if EOF seen.
629
630 2007-09-06  Tom Tromey  <tromey@redhat.com>
631
632         * internal.h (struct cpp_reader) <invocation_location>: New
633         field.
634         (struct cpp_reader) <set_invocation_location>: Likewise.
635         * init.c (cpp_set_line_map): New function.
636         * line-map.c (linemap_add): Use linemap's allocator.
637         * include/line-map.h (GTY): Define.
638         (line_map_realloc): New typedef.
639         (struct line_map): Mark with GTY.
640         (struct line_maps): Likewise.
641         (struct line_maps) <maps>: Likewise.
642         (struct line_maps) <reallocator>: New field.
643         * include/symtab.h (GTY): Conditionally define.
644         * include/cpplib.h (cpp_set_line_map): Declare.
645         (cpp_get_token_with_location): Declare.
646         * macro.c (cpp_get_token): Set invocation_location on the reader.
647         (cpp_get_token_with_location): New function.
648
649 2007-08-30  Chao-ying Fu  <fu@mips.com>
650
651         * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
652         ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
653         (cpp_classify_number): Support decimal fixed-point constants without
654         exponents.
655         Warn about fixed-point constants when -pedantic.
656         * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
657         comments to support fixed-point values.
658         (CPP_N_FRACT, CPP_N_ACCUM): Define.
659
660 2007-08-18  Tom Tromey  <tromey@redhat.com>
661
662         PR preprocessor/32974
663         * directives.c (parse_include): Don't check for EOL when
664         processing #pragma dependency.
665
666 2007-07-30  Ollie Wild  <aaw@google.com>
667
668         * directives-only.c: New file.
669         * internal.h (struct _cpp_dir_only_callbacks): New.
670         (_cpp_preprocess_dir_only): New function.
671         * directives.c (_cpp_handle_directive): Check directives_only before
672         disabling execution of indented directives.
673         * files.c (_cpp_stack_file): Add directives_only check.
674         * include/cpplib.h (struct cpp_options): Add directives_only.
675         (cpp_init_special_builtins): New function.
676         * init.c (cpp_init_special_builtins): New function.
677         (cpp_init_builtins): Move builtin_array initialization to
678         cpp_init_special_builtins.
679         (post_options): Check directives_only before setting
680         pfile->state.prevent_expansion = 1.
681         * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
682         is expanded inside a directive while -fdirectives-only is enabled.
683         * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
684         (libcpp_a_SOURCES): Add directives-only.c.
685
686 2007-07-04  Uros Bizjak  <ubizjak@gmail.com>
687
688         * traditional.c (_cpp_scan_out_logical_line): Initialize
689         fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
690         fmacro.args to prevent 'may be used uninitialized' warning.
691
692 2007-07-03  Uros Bizjak  <ubizjak@gmail.com>
693
694         * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
695         Add new constants.
696         * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
697         suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
698         for 'q' or 'Q' suffixes.
699
700 2007-06-17  Danny Smith  <dannysmith@users.sourceforge.net
701
702         * files.c (open_file): Correct typo.
703
704 2007-06-16  Vladimir Prus  <vladimir@codesourcery.com>
705
706         * files.c (open_file): Prevent the call
707         for stat from overwriting errno.
708
709 2007-06-09  Vladimir Prus  <vladimir@codesourcery.com>
710
711         * files.c (open_file): Account for the
712         fact that on windows, opening a directory gives
713         EACCES.
714
715 2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
716
717         PR preprocessor/23479
718         * expr.c (cpp_classify_number): Implement 0b-prefixed binary
719         integer constants.
720         (append_digit): Likewise.
721         * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
722         binary integer constants.
723
724 2007-05-31  Dave Korn  <dave.korn@artimi.com>
725
726         PR preprocessor/14331
727         * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
728
729 2007-05-24  Ollie Wild  <aaw@google.com>
730
731         * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
732         * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
733         (cpp_write_pch_state): Save __COUNTER__ state.
734         (cpp_valid_state): Check valid __COUNTER__ state.
735         (cpp_read_state): Read new __COUNTER__ state.
736         * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
737         * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
738         * internal.h (struct cpp_reader): Add counter member.
739
740 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
741
742         PR preprocessor/20077
743         * macro.c (create_iso_definition): Fixed the method to determine
744         whether the token-pasting operator appears at the beginning or the end
745         of a macro.
746
747 2007-05-21  Ian Lance Taylor  <iant@google.com>
748
749         * internal.h (struct cpp_reader): Add new fields:
750         nonexistent_file_hash and nonexistent_file_ob.
751         * files.c: Include "obstack.h".
752         (find_file_in_dir): Before trying to open the file, look up the
753         path name in the hash table of nonexistent files.  After failing
754         to open the file, add the path name to the hash table.
755         (_cpp_find_file): Cache the results of looking up the file name
756         starting with the quote and bracket chain heads, if we can.
757         (nonexistent_file_hash_eq): New static function.
758         (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
759         pfile->nonexistent_file_ob.
760         (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
761         pfile->nonexistent_file_ob.
762
763 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
764
765         * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
766
767         PR c/31924
768         * expr.c (interpret_float_suffix): Check for invalid suffix.
769
770 2007-05-02  Eric Christopher  <echristo@apple.com>
771
772         * expr.c (num_div_op): Don't overflow if the result is
773         zero.
774
775 2007-05-02  Tom Tromey  <tromey@redhat.com>
776
777         PR preprocessor/28709
778         * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
779
780 2007-03-30  Michael Meissner  <michael.meissner@amd.com>
781
782         * directives.c (lex_macro_node_from_str): Fix alloca call to be
783         type correct.
784
785 2007-03-30  Richard Henderson  <rth@redhat.com>
786
787         * directives.c (lex_macro_node_from_str): New.
788         (cpp_push_definition, cpp_pop_definition): New.
789         * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
790
791 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
792
793         * Makefile.in: Add dummy install-pdf target.
794
795 2007-01-30  Tom Tromey  <tromey@redhat.com>
796
797         PR preprocessor/30468
798         * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
799         './'.
800
801 2007-01-30  Tom Tromey  <tromey@redhat.com>
802
803         PR preprocessor/29966
804         * macro.c (lex_expansion_token): Save and restore cpp_reader's
805         cur_token.
806         (_cpp_create_definition): Don't restore cur_token here.
807         * lex.c (_cpp_lex_token): Added assertion.
808
809 2007-01-27  Tom Tromey  <tromey@redhat.com>
810
811         * configure: Rebuilt.
812
813 2007-01-12  Tom Tromey  <tromey@redhat.com>
814
815         PR preprocessor/28227
816         * directives.c (lex_macro_node): Added 'is_def_or_undef'
817         argument.
818         (do_define): Update.
819         (do_undef): Update.
820         (do_ifdef): Update.
821         (do_ifndef): Update.
822
823 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
824
825         * configure: Regenerate.
826
827 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
828
829         * configure: Regenerate.
830
831 2007-01-04  Tom Tromey  <tromey@redhat.com>
832
833         PR preprocessor/28165
834         * internal.h (cpp_in_primary_file): New function.
835         * directives.c (do_include_next): Use cpp_in_primary_file.
836         (do_pragma_once): Likewise.
837         (do_pragma_system_header): Likewise.
838
839 2006-12-29  Ian Lance Taylor  <iant@google.com>
840
841         * lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
842         look backward at the end of the line unless we saw a backslash.
843
844 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
845
846         PR preprocessor/29612
847         * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
848         only when new_sysp is non-zero.
849
850 2006-12-28  Tom Tromey  <tromey@redhat.com>
851
852         PR preprocessor/30001
853         * charset.c (_cpp_convert_input): Check that to.len is greater
854         than zero.
855
856 2006-11-20  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
857
858         * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
859         * configure: Rebuilt.
860
861 2006-11-01      Douglas Gregor <doug.gregor@gmail.com>
862
863         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
864         for experimental C++0x mode.
865         * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
866         adopted the preprocessor changes introduced in C99.
867
868 2006-10-29  Joseph Myers  <joseph@codesourcery.com>
869
870         * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
871         depending on --enable-targets=all.
872         * configure: Regenerate.
873
874 2006-10-12  Jakub Jelinek  <jakub@redhat.com>
875
876         PR preprocessor/28709
877         * macro.c (paste_tokens): Do error reporting here, use BUF with the
878         spelled LHS token as opposed to spelling it again.
879         (paste_all_tokens): Don't report errors here, just break on failure.
880
881 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
882
883         * Makefile.in: Added empty "pdf" target.
884
885 2006-09-22  Geoffrey Keating  <geoffk@apple.com>
886
887         * configure.ac: Make need_64_bit_hwint case for x86-darwin
888         match exactly the glob in gcc/config.gcc.
889         * configure: Regenerate.
890
891 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
892
893         PR c/28768
894         PR preprocessor/14634
895         * lex.c (lex_string): Pedwarn for unterminated literals.
896
897 2006-09-08  Eric Christopher  <echristo@apple.com>
898
899         * configure.ac: Add 64-bit HWI support for i?86-darwin.
900
901 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
902
903         PR c++/28288
904         PR c++/14556
905         * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
906         (CPP_LAST_EQ): Change.
907         (CPP_LAST_PUNCTUATOR): Change.
908         * expr.c (cpp_operator): Remove MIN and MAX.
909         (reduce): Remove CPP_MIN and CPP_MAX.
910         (num_binary_op): Ditto.
911         * lex.c (_cpp_lex_direct): Ditto.
912         (cpp_avoid_paste): Remove ? as legal symbol after > or <.
913
914 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
915
916         PR preprocessor/27746
917         * directives.c (do_pragma): Handle pragma with valid namespace
918         and invalid name coming from macro expansion.
919         * directives.c (destringize_and_run): Initialize next field in
920         context.
921
922         PR c/27747
923         PR c++/27748
924         * directives.c (destringize_and_run): Set NO_EXPAND on the
925         tokens.
926
927         * macro.c (_cpp_backup_tokens): Fix comment typo.
928
929 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
930
931         * Makefile.in (CATALOGS): Add po/ prefix.
932         * configure: Regenerated.
933
934 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
935
936         * Makefile.in: Add install-html target. Add install-html to .PHONY
937
938 2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
939
940         * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
941         * files.c (_cpp_get_file_stat): New function.
942         * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
943         * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
944         * internal.h (_cpp_get_file_stat): Prototype.
945         (struct cpp_buffer): Add timestamp.
946
947 2006-01-23  Jakub Jelinek  <jakub@redhat.com>
948
949         PR preprocessor/25717
950         * init.c (cpp_init_builtins): If __STDC__ will not change value
951         between system headers and other sources, define it as a normal
952         macro rather than a builtin.
953         * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
954         cpp_in_system_header condition.
955
956 2006-01-05  Paolo Bonzini  <bonzini@gnu.org>
957
958         * Makefile.in: Use -MMD instead of -MD.
959
960 2006-01-04  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
961             Richard Henderson  <rth@redhat.com>
962
963         Merge from gomp branch:
964         * directives.c (struct pragma_entry): Add is_deferred.  Add ident
965         entry to value union.
966         (end_directive): Don't eat the line if in_deferred_pragma.
967         (run_directive): Remove pragma hacks.
968         (insert_pragma_entry): Remove.
969         (new_pragma_entry): New.
970         (register_pragma_1): Split out of register_pragma.  Only handle
971         the lookup tree and return the new entry.
972         (cpp_register_pragma): Fill in the pragma entry here.
973         (cpp_register_deferred_pragma): New.
974         (register_pragma_internal): New.
975         (_cpp_init_internal_pragmas): Use register_pragma_internal.
976         (do_pragma): Allow pragma expansion after namespace.  For deferred
977         pragmas, don't slurp the line into a string.
978         (destringize_and_run): Save tokens for deferred pragmas.
979         (cpp_handle_deferred_pragma): Remove.
980         * macro.c (builtin_macro): Remove pragma token hack.
981         (_cpp_push_token_context): Rename from push_token_context and export.
982         * internal.h (struct lexer_state): Add pragma_allow_expansion.
983         (_cpp_push_token_context): Declare.
984         * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
985         a token.  Update the line number correctly if so.
986         (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
987         (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
988         * include/cpplib.h (PRAGMA_EOL): New.
989         (CPP_TOKEN_FLD_PRAGMA): New.
990         (struct cpp_token): Add val.pragma.
991         (struct cpp_options): Remove defer_pragmas.
992         (cpp_handle_deferred_pragma): Remove.
993         (cpp_register_deferred_pragma): Declare.
994
995 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
996
997         PR c++/25294
998         * directives.c (do_pragma): If pragma line ends with multi-line
999         block comment, end the saved deferred pragma string before that
1000         comment.  Handle embedded '\0' chars on the pragma line.
1001
1002 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1003
1004         PR c++/23333
1005         * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
1006
1007 2005-12-07  Jon Grimm  <jgrimm2@us.ibm.com>
1008             Ben Elliston  <bje@au.ibm.com>
1009
1010         * include/cpplib.h (CPP_N_DFLOAT): New.
1011         * expr.c (interpret_float_suffix): Identify df, dd, and dl
1012         suffixes as decimal floating point constants.
1013         (cpp_classify_number): Disallow hexadecimal DFP constants.
1014
1015 2005-11-14  Gerald Pfeifer  <gerald@pfeifer.com>
1016             Ian Lance Taylor  <ian@airs.com>
1017
1018         * include/cpplib.h (struct cpp_callbacks): Annotate error with
1019         ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
1020
1021 2005-11-09  Per Bothner  <per@bothner.com>
1022             Uros Bizjak  <uros@kss-loka.si>
1023
1024         PR c/24101
1025         * init.c (read_original_filename): Temporarily set
1026         state.in_directive before calling _cpp_lex_direct for
1027         CPP_HASH tokens.
1028
1029 2005-11-03  James E Wilson  <wilson@specifix.com>
1030
1031         PR preprocessor/24202
1032         * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
1033
1034 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
1035
1036         * include/cpplib.h (struct cpp_callbacks): Make error take
1037         va_list* parameter.
1038         * errors.c (cpp_error): Update call to callback.
1039
1040 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
1041
1042         PR preprocessor/22042
1043         * macro.c (_cpp_builtin_macro_text): Lower the needed max
1044         buffer size.
1045         (cpp_quote_string): Don't octalify non printable
1046         charactors.
1047
1048 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
1049
1050         PR c++/17964
1051         * include/cpplib.h (struct cpp_options): Add client_diagnostic.
1052         (struct cpp_callbacks): Add error.
1053         * errors.c (cpp_error): If client_diagnostic, use error callback.
1054         * charset.c (convert_escape): Don't use %03o in diagnostic.
1055
1056 2005-10-21  James E Wilson  <wilson@specifix.com>
1057
1058         PR preprocessor/15220
1059         * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
1060         callers.  Pass to open_file_failed.
1061         (open_file_failed): New parameter angle_brackets.  Fix all callers.
1062         Use in print_dep assignment.
1063         * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
1064         * internal.h (_cpp_find_file): Add new parm to declaration.
1065
1066 2005-10-08  Kazu Hirata  <kazu@codesourcery.com>
1067
1068         * configure.ac: Require 64-bit int for arm*-*-*eabi*.
1069         * configure: Regenerate.
1070
1071 2005-10-04  Ian Lance Taylor  <ian@airs.com>
1072
1073         PR preprocessor/13726
1074         * directives.c (check_eol_return_comments): New static function.
1075         (parse_include): Add buf parameter.  Change all callers.
1076         (do_include_common): If not discard comments, turn on
1077         save_comments.  Pass collected comments to include callback.
1078         * include/cpplib.h (struct cpp_callbacks): Add new parameter to
1079         include callback: cpp_token list.
1080
1081 2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
1082
1083         * include/cpplib.h (struct cpp_options): Add extended_identifiers.
1084         * init.c (struct lang_flags, lang_defaults): Add
1085         extended_identifiers.
1086         (cpp_set_lang): Use it.
1087         * lex.c (forms_identifier_p): Check extended_identifiers.
1088
1089 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
1090
1091         PR preprocessor/20348
1092         PR preprocessor/20356
1093         * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
1094         2004-06-05 changes.
1095
1096 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1097
1098         * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
1099         -Wmissing-format-attribute.
1100
1101         * configure: Regenerate.
1102
1103 2005-06-29  Kelley Cook  <kcook@gcc.gnu.org>
1104
1105         * all files: Update FSF address in copyright headers.
1106         * makeucnid.c (write_copyright): Update outputted FSF address.
1107
1108 2005-06-13  Zack Weinberg  <zack@codesourcery.com>
1109
1110         * configure.ac: Invoke ZW_CREATE_DEPDIR and
1111         ZW_PROG_COMPILER_DEPENDENCIES.
1112         * aclocal.m4, configure: Regenerate.
1113         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
1114         New variables.
1115         (distclean): Clean up $(DEPDIR) and its contents.
1116         (.c.o): Use $(COMPILE).
1117         Include $(DEPDIR)/*.Po for most object->header dependencies.
1118
1119 2005-05-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1120
1121         * configure.ac: Check declarations for asprintf and vasprintf.
1122         * config.in: Regenerate.
1123         * configure: Likewise.
1124
1125         * charset.c (conversion_loop): Use XRESIZEVEC.
1126         (convert_no_conversion): Likewise.
1127         (convert_using_iconv): Likewise.
1128         (init_iconv_desc): Cast return value of alloca.
1129         (cpp_host_to_exec_charset): Use XNEWVEC.
1130         (emit_numeric_escape): Use XRESIZEVEC.
1131         (cpp_interpret_string): Use XNEWVEC.
1132         (cpp_interpret_string): Use XRESIZEVEC.
1133         (_cpp_interpret_identifier): Cast return value of alloca.
1134         (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
1135         * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
1136         (parse_include): Use XNEWVEC.
1137         (insert_pragma_entry): Rename local variable "new" to
1138         "new_entry".
1139         (save_registered_pragmas): Cast return value of xmemdup.
1140         (destringize_and_run): Same for alloca.
1141         (parse_assertion): Likewise.
1142         (do_assert): Cast allocated storage to proper type.
1143         (cpp_define): Likewise.
1144         (_cpp_define_builtin): Likewise.
1145         (cpp_undef): Likewise.
1146         (handle_assertion): Likewise.
1147         (cpp_push_buffer): Rename local variable "new" to "new_buffer".
1148         * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
1149         (CPP_UMINUS): Likewise.
1150         (struct cpp_operator): Rename from struct operator.
1151         (_cpp_expand_op_stack): Use XRESIZEVEC.
1152         * files.c (pch_open_file): Use XNEWVEC.
1153         (pch_open_file): Use XRESIZEVEC.
1154         (read_file_guts): Use XNEWVEC and XRESIZEVEC.
1155         (dir_name_of_file): Use XNEWVEC.
1156         (make_cpp_file): Use XCNEW.
1157         (make_cpp_dir): Likewise.
1158         (allocate_file_hash_entries): USE XNEWVEC.
1159         (cpp_included): Cast return value of htab_find_with_hash.
1160         (append_file_to_dir): Use XNEWVEC.
1161         (read_filename_string): Likewise. Use XRESIZEVEC too.
1162         (read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
1163         (remap_filename): Use XNEWVEC.
1164         (struct pchf_entry): Move definition out of struct pchf_data.
1165         (_cpp_save_file_entries): Use XCNEWVAR.
1166         (_cpp_read_file_entries): Use XNEWVAR.
1167         * identifiers.c (alloc_node): Use XOBNEW.
1168         * init.c (cpp_create_reader): Use XCNEW.
1169         (cpp_init_builtins): Cast of b->value to enum builtin_type.
1170         (read_original_directory): Cast return value of alloca.
1171         * lex.c (add_line_note): Use XRESIZEVEC.
1172         (warn_about_normalization): Use XNEWVEC.
1173         (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
1174         (new_buff): Use XNEWVEC.
1175         * line-map.c (linemap_add): Use XRESIZEVEC.
1176         * macro.c (builtin_macro): Cast return value of alloca.
1177         (paste_tokens): Likewise.
1178         (expand_arg): Use XNEWVEC and XRESIZEVEC.
1179         (_cpp_save_parameter): Use XRESIZEVEC.
1180         (create_iso_definition): Cast allocated storage to proper type.
1181         (_cpp_create_definition): Likewise.
1182         (cpp_macro_definition): Use XRESIZEVEC.
1183         * makedepend.c (add_clm): Use XNEW.
1184         (add_dir): Likewise.
1185         * mkdeps.c (munge): Use XNEWVEC.
1186         (deps_init): Use XCNEW.
1187         (deps_add_target): Use XRESIZEVEC.
1188         (deps_add_default_target): Cast return value of alloca.
1189         (deps_add_dep): Use XRESIZEVEC.
1190         (deps_add_vpath): Likewise.  Use XNEWVEC too.
1191         (deps_restore): Likewise.
1192         * pch.c (save_idents): Use XNEW and XNEWVEC.
1193         (cpp_save_state): Use XNEW.
1194         (count_defs): Cast return value of htab_find.
1195         (write_defs): Likewise.
1196         (cpp_write_pch_deps): Use XNEWVEC.
1197         (collect_ht_nodes): Use XRESIZEVEC.
1198         (cpp_valid_state): Use XNEWVEC.
1199         (save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
1200         * symtab.c (ht_create): Use XCNEW.
1201         (ht_lookup_with_hash): Cast return value of obstack_copy0.
1202         (ht_expand): Use XCNEWVEC.
1203         * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
1204         (bool): Do not define if __cplusplus.
1205
1206 2005-05-12  Zack Weinberg  <zack@codesourcery.com>
1207
1208         * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
1209         (do_sccs): Delete function definition, #define to do_ident.
1210         (do_ident): Don't hardwire directive name.
1211
1212 2005-05-12  Ryota Kunisawa  <kunisawa@access.co.jp>
1213
1214         PR bootstrap/21230
1215         * configure: Regenerate.
1216
1217 2005-04-27  Andris Pavenis  <pavenis@latnet.lv>
1218
1219         * files.c: Include io.h for DJGPP to get prototype of setmode.
1220
1221 2005-04-19  Per Bothner  <per@bothner.com>
1222
1223         PR preprocessor/20907
1224         * line-map.c (linemap_line_start): Fix bug when we need to increse
1225         column_bits but can re-use the current line_map.
1226
1227 2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1228
1229         * system.h (fopen, fdopen, freopen): Define these to the unlocked
1230         libiberty functions.
1231
1232 2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1233
1234         * configure.ac (libcpp_UNLOCKED_FUNCS): New.
1235         (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
1236         * system.h (putchar, getc, getchar, clearerr, feof, fileno,
1237         fflush, fgetc, fgets, ferror, fread): Redefine to the associated
1238         _unlocked function.
1239         (fwrite_unlocked): Fix prototype.
1240
1241         * configure, config.in: Regenerate.
1242
1243 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1244
1245         PR preprocessor/19475
1246         * macro.c (create_iso_definition): For < ISO C99, don't
1247         pedwarn if there is no whitespace between macro name and its
1248         replacement, but the replacement starts with a basic character
1249         set character.
1250
1251 2005-03-28  Andreas Jaeger  <aj@suse.de>
1252
1253         * lex.c (warn_about_normalization): Cast field width to int to
1254         avoid warning.
1255
1256 2005-03-19  Joseph S. Myers  <joseph@codesourcery.com>
1257
1258         * configure.ac: Consistently use solaris2.1[0-9]* instead of
1259         solaris2.1[0-9].
1260         * configure: Regenerate.
1261
1262 2005-03-15  Geoffrey Keating  <geoffk@apple.com>
1263
1264         * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
1265         UCN rather than printing an error.
1266
1267 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
1268
1269         * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
1270
1271 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
1272
1273         * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
1274         * charset.c: Update for new format of ucnid.h.
1275         (ucn_valid_in_identifier): Update for new format of ucnid.h.
1276         Add NST parameter, and update it; update callers.
1277         (cpp_valid_ucn): Add NST parameter, update callers.  Replace abort
1278         with cpp_error.
1279         (convert_ucn): Pass normalize_state to cpp_valid_ucn.
1280         * internal.h (struct normalize_state): New.
1281         (INITIAL_NORMALIZE_STATE): New.
1282         (NORMALIZE_STATE_RESULT): New.
1283         (NORMALIZE_STATE_UPDATE_IDNUM): New.
1284         (_cpp_valid_ucn): New.
1285         * lex.c (warn_about_normalization): New.
1286         (forms_identifier_p): Add normalize_state parameter, update callers.
1287         (lex_identifier): Add normalize_state parameter, update callers.  Keep
1288         the state current.
1289         (lex_number): Likewise.
1290         (_cpp_lex_direct): Pass normalize_state to subroutines.  Check
1291         it with warn_about_normalization.
1292         * makeucnid.c: New.
1293         * ucnid.h: Replace.
1294         * ucnid.pl: Remove.
1295         * ucnid.tab: Make appropriate for input to makeucnid.c.  Remove
1296         comments about obsolete version of C++.
1297         * include/cpplib.h (enum cpp_normalize_level): New.
1298         (struct cpp_options): Add warn_normalize field.
1299
1300 2005-03-11  Geoffrey Keating  <geoffk@apple.com>
1301
1302         * directives.c (glue_header_name): Update call to cpp_spell_token.
1303         * internal.h (_cpp_interpret_identifier): New.
1304         * charset.c (_cpp_interpret_identifier): New.
1305         (_cpp_valid_ucn): Allow UCN version of '$'.
1306         * lex.c (lex_identifier): Add extra parameter to indicate if initial
1307         character was '$' or '\'.  Support identifiers with UCNs.
1308         (forms_identifier_p): Allow UCNs.
1309         (_cpp_lex_direct): Pass extra parameter to lex_identifier.
1310         (utf8_to_ucn): New.
1311         (cpp_spell_token): Add FORSTRING parameter.  Use it.
1312         (cpp_token_as_text): Update call to cpp_spell_token.
1313         (cpp_output_token): Write UCNs back out.
1314         (stringify_arg): Update call to cpp_spell_token.
1315         (paste_tokens): Likewise.
1316         (cpp_macro_definition): Likewise.
1317         * macro.c (stringify_arg): Likewise.
1318         (paste_tokens): Likewise.
1319         (cpp_macro_definition): Likewise.
1320         * include/cpplib.h: Add parameter to cpp_spell_token.
1321
1322 2005-03-04  Jakub Jelinek  <jakub@redhat.com>
1323
1324         PR bootstrap/20282
1325         PR bootstrap/20305
1326         * macro.c (replace_args, cpp_get_token): Copy whole
1327         cpp_token_u instead of just cpp_string field from it.
1328
1329 2005-02-28  Devang Patel  <dpatel@apple.com>
1330
1331         * directives.c (do_line): Save sysp early before line table is
1332         realloc'ed.
1333
1334 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
1335
1336         PR 18785
1337         * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1338         (cpp_host_to_exec_charset): New function.
1339         * include/cpplib.h: Declare cpp_host_to_exec_charset.
1340
1341 2005-02-19  Devang Patel  <dpatel@apple.com>
1342
1343         * charset.c (_cpp_convert_input): Check '\r' before inserting
1344         '\n' at the end.
1345
1346 2005-02-15  Eric Christopher  <echristo@redhat.com>
1347
1348         PR preprocessor/19077
1349         * macro.c (cpp_macro_definition): Move handling of whitespace
1350         to PREV_WHITE conditional. Remove overloading of len
1351         variable.
1352
1353 2005-02-14  Kazu Hirata  <kazu@cs.umass.edu>
1354
1355         * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1356         traditional.c: Update copyright.
1357
1358 2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
1359
1360         PR bootstrap/19818
1361         * configure.ac: Check for declaration of basename and getopt.
1362         * config.in: Regenerate.
1363         * configure: Regenerate.
1364         * internal.h (ustrcspn): New.
1365         * macro.c (create_iso_definition): Fix allocation of memory.
1366         (padding_token): Add cast to remove const-ness.
1367         * pch.c (cpp_read_state): Use ustrcspn.
1368
1369 2005-02-08  Mike Stump  <mrs@apple.com>
1370
1371         * files.c (pchf_adder): Remove.
1372         (struct pchf_adder_info): Likewise.
1373         (_cpp_save_file_entries): Write out all files so that #import works.
1374
1375 2005-01-23  Joseph S. Myers  <joseph@codesourcery.com>
1376
1377         * configure: Regenerate.
1378
1379 2005-01-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1380
1381         * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1382
1383         * include/cpplib.h: Also update copyright years.
1384
1385 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
1386
1387         * files.c (_cpp_find_file): Add files found by search_path_exhausted
1388         to the list of all files.
1389
1390 2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1391
1392         * internal.h: Update references to Cpp lib filenames.
1393         * directives.c: Likewise.
1394         * init.c: Likewise.
1395         * macro.c: Likewise.
1396         * traditional.c: Likewise.
1397
1398 2004-12-15  Eric Botcazou  <ebotcazou@libertysurf.fr>
1399
1400         PR preprocessor/15167
1401         * files.c (destroy_cpp_file): New function.
1402         (should_stack_file): Make a new file if the
1403         compared file is still stacked.
1404
1405 2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>
1406
1407         PR preprocessor/17610
1408         * directives.c (do_include_common): Error out if an empty filename
1409         is given for #include (or #include_next or #import).
1410
1411 2004-11-27  Roger Sayle  <roger@eyesopen.com>
1412             Zack Weinberg  <zack@codesourcery.com>
1413
1414         * internal.h: Replace all uses of uchar with unsigned char.
1415         * include/cpp-id-data.h: Likewise.  Guard typedef of uchar
1416         with !IN_GCC, so uchar is only defined whilst building libcpp.
1417
1418 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
1419
1420         * aclocal.m4: Regenerate.
1421
1422 2004-11-24  Roger Sayle  <roger@eyesopen.com>
1423
1424         PR preprocessor/15824
1425         * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1426         directly, instead of the non-existant "system.h" and "ansidecl.h".
1427         * configure: Regenerate.
1428
1429 2004-11-23  Daniel Jacobowitz  <dan@codesourcery.com>
1430             Joseph Myers  <joseph@codesourcery.com>
1431
1432         * internal.h (struct lexer_state): Add in_deferred_pragma.
1433         * directives.c (struct pragma_entry): Add allow_expansion.
1434         (insert_pragma_entry): Take allow_expansion flag.
1435         (register_pragma): Likewise.
1436         (cpp_register_pragma): Likewise.
1437         (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1438         (do_pragma): Honor allow_expansion.
1439         (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1440         * include/cpplib.h (cpp_register_pragma): Update prototype.
1441
1442 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
1443             Mark Mitchell  <mark@codesourcery.com>
1444
1445         * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1446         need_64bit_hwint=yes.
1447         * configure: Regenerate.
1448
1449 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
1450
1451         * Makefile.in ($(PACKAGE).pot): New rule.  Depend on
1452         po/$(PACKAGE).pot.
1453         (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1454         arguments.  Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1455         Remove local srcdir path from generated file.
1456
1457 2004-11-04  Zack Weinberg  <zack@codesourcery.com>
1458             Gerald Pfeifer  <gerald@pfeifer.com>
1459
1460         * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1461         as well.
1462
1463 2004-10-27  Zack Weinberg  <zack@codesourcery.com>
1464
1465         PR 18075
1466         * directives.c (do_pragma): Do not defer pragmas which are unknown.
1467         (cpp_handle_deferred_pragma): Add cast to silence warning.
1468
1469 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
1470
1471         * errors.c (_cpp_begin_message): Print "error: " for errors.
1472
1473 2004-10-10  Andreas Jaeger  <aj@suse.de>
1474
1475         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1476         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1477
1478 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
1479
1480         * pch.c (cpp_write_pch_state): Remove variable z as it is not
1481         used.
1482         (cpp_read_state): Remove unused variables, m, d and mac_count.
1483
1484 2004-09-29  Per Bothner  <per@bothner.com>
1485
1486         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
1487         cb.line_change.  Otherwise do_pragma will call the line_change
1488         call-back with a meaningless line number.
1489
1490 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
1491
1492         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1493         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1494         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1495         * aclocal.m4, configure: Regenerate.
1496         * init.c: Include localedir.h.
1497         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1498         (DEFS): Delete.
1499         (.c.o): Use $(ALL_CFLAGS).
1500         (localedir.h, localedir.hs): New rules.
1501         (clean): Use rm -rf to remove directories.
1502         (distclean): Also delete localedir.h and localedir.hs.
1503         (init.o): Update dependencies.
1504
1505 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
1506
1507         * Makefile.in (aclocal.m4): Update dependencies.
1508         * configure.ac (AC_CONFIG_MACRO_DIR): New.
1509         * aclocal.m4, configure: Regenerate.
1510
1511 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
1512
1513         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1514         (_cpp_convert_input, _cpp_default_encoding): Add comments.
1515         Some other comments in this file also tweaked.
1516
1517         * directives.c (do_pragma): Save current buffer position
1518         before lexing the pragma keywords; don't call
1519         _cpp_backup_tokens in the defer_pragmas case.
1520
1521 2004-09-15  Per Bothner  <per@bothner.com>
1522
1523         * include/line-map.h (line_map_start):  Add parameter names so
1524         preceding comment makes sense.
1525         (linemap_add):  Remove from comment mention of non-existing parameter.
1526
1527 2004-09-09  Matt Austern  <austern@apple.com>
1528             Zack Weinberg  <zack@codesourcery.com>
1529
1530         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1531         prefixes throughout.  Add entry for PRAGMA.  Remove
1532         unnecessary "= 0" from EQ.
1533         (enum cpp_ttype): Adjust OP and TK definitions to restore
1534         prefixes, via token-paste.
1535         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1536         Change from #defines to additional cpp_ttype enumerators.
1537         (struct cpp_options): Add defer_pragmas.
1538         (cpp_handle_deferred_pragma): Prototype new interface.
1539
1540         * internal.h (struct cpp_reader): Add directive_result.
1541         * directives.c (struct pragma_entry): Add is_internal field;
1542         give boolean fields type bool.
1543         (start_directive): Initialize pfile->directive_result.type.
1544         (_cpp_do__Pragma): Likewise.
1545         (run_directive): Do not crash if pfile->buffer->prev is NULL.
1546         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1547         from it.
1548         (register_pragma): New static function, bulk of former
1549         cpp_register_pragma here; add 'internal' argument, pass along
1550         to insert_pragma_entry.
1551         (cpp_register_pragma): Now a wrapper around register_pragma which
1552         always passes false for 'internal' argument.
1553         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1554         true for 'internal'.
1555         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1556         an internal pragma, save text till the end of the line as a CPP_PRAGMA
1557         token instead of executing the pragma.
1558         (cpp_handle_deferred_pragma): New interface.
1559         * lex.c (token_spellings): Adjust OP and TK definitions to
1560         match changes to cpplib.h.
1561         (_cpp_lex_token): Check for a directive-result token and
1562         return it if present.
1563         (cpp_token_val_index): Handle CPP_PRAGMA.
1564         * macro.c (cpp_builtin_macro_text): Correct comment.
1565         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1566
1567 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
1568
1569         PR preprocessor/14699
1570         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1571         from size_t to double.
1572
1573 2004-08-28  Andreas Schwab  <schwab@suse.de>
1574             Andreas Jaeger <aj@suse.de>
1575
1576         * configure.ac: Set PACKAGE correctly.
1577         * configure: Regenerated.
1578
1579 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
1580
1581         * Makefile.in: Add back top_builddir.
1582
1583 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
1584
1585         * configure.ac: Replace Automake macro invocations
1586         with manual Autoconf checks and substitutions.
1587         * configure: Regenerate.
1588         * aclocal.m4: Regenerate.
1589         * config.in: Regenerate.
1590         * Makefile.am: Removed.
1591         * Makefile.in: Heavy simplification and reorganization.
1592
1593 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
1594
1595         * configure.ac (arm*-*-eabi*): New target.
1596         (arm*-*-symbianelf*): Likewise.
1597         * configure: Regenerated.
1598
1599 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
1600
1601         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1602         * directives.c: Use XNEW-family macros from libiberty.
1603         * lex.c: Likewise.
1604         * macro.c: Likewise.
1605         * cpplib.h (cpp_deps_style): Export enum with name.
1606
1607 2004-07-23  Matthias Klose  <doko@debian.org>
1608
1609         * init.c (init_library): Use PACKAGE for the text domain.
1610
1611 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
1612
1613         PR preprocessor/16366
1614         * internal.h (struct cpp_reader): New field dir_hash.
1615         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1616         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1617
1618 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
1619
1620         PR preprocessor/16192
1621         PR preprocessor/15913
1622         PR preprocessor/15572
1623         * expr.c (_cpp_parse_expr): Handle remaining cases where an
1624         expression is missing.
1625         * init.c (post_options): Traditional cpp doesn't do // comments.
1626
1627 2004-06-30  Per Bothner  <per@bothner.com>
1628
1629         * include/line-map.h (fileline):  Remove old typedef.
1630         * internal.h (struct cpp_reader):  Use source_location typedef instead.
1631
1632 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
1633
1634         Partially revert patch of 2004-06-05.
1635         * files.c (search_cache): Remove pfile argument.  Don't check
1636         for file that would be found by "" or <> search here...
1637         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1638         Do not apply directory-of-current-file correction to files
1639         found by this check.  Rearrange code slightly.
1640
1641 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
1642
1643         * files.c (should_stack_file): Correct swapped parameters to call
1644         to cb.read_pch.
1645         * pch.c (cpp_valid_state): Handle -fpreprocessed.
1646
1647 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1648
1649         * Makefile.in: Regenerate with automake 1.8.5.
1650         * aclocal.m4: Likewise.
1651         * configure: Regenerate.
1652
1653 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
1654
1655         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1656         * configure, config.in: Regenerate.
1657         * system.h: Unconditionally define bool as unsigned char,
1658         BOOL_BITFIELD as unsigned int.
1659         * .cvsignore: New file.
1660
1661 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
1662
1663         * traditional.c (push_replacement_text): Set macro->traditional.
1664         (save_replacement_text): Likewise.
1665         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1666         (struct save_macro_item): Delete.
1667         (struct save_macro_data): Use a character array not the previous
1668         structured format.
1669         (save_macros): Save macro as text not as internal structures.
1670         (cpp_prepare_state): Update for changes to save_macro_data.
1671         (cpp_read_state): Don't read macros defined in PCH.  Restore
1672         -D macros as text.
1673         * macro.c (create_iso_definition): Honour alloc_subobject.
1674         Clear traditional flag.
1675         (_cpp_create_definition): Honour alloc_subobject.
1676         * lex.c (cpp_token_val_index): New.
1677         * internal.h: Include cpp-id-data.h.
1678         (uchar): Move definition to cpp-id-data.h.
1679         (U): Likewise.
1680         (cpp_macro): Likewise.
1681         * directives.c (struct answer): Move to cpp-id-data.h.
1682         (do_assert): Honour alloc_subobject.
1683
1684         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1685         * include/cpplib.h (struct cpp_string): Add GTY marker.
1686         (enum cpp_token_fld_kind): New.
1687         (struct cpp_token): Add GTY markers.
1688         (cpp_token_val_index): Prototype.
1689         (CPP_HASHNODE_VALUE_IDX): New.
1690         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1691         * include/cpp-id-data.h: New file.
1692
1693 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
1694
1695         * Makefile.am (all-local): New.
1696         * Makefile.in: Regenerate.
1697
1698 2004-06-06  Roger Sayle  <roger@eyesopen.com>
1699
1700         * Makefile.am (LIBICONV): Declare.
1701         (makedepend_LDADD): Use LIBICONV.
1702         * Makefile.in: Regenerate.
1703
1704 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
1705
1706         * Makefile.am (LIBINTL): Declare
1707         (makedepend_LDADD): Use LIBINTL.
1708         * Makefile.in: Regenerate.
1709
1710 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
1711
1712         * Makefile.am: Add makedepend.
1713         * Makefile.in, aclocal.m4: Regenerate.
1714         * charset.c: Insert a space to avoid a warning.
1715         * directives.c: Include mkdeps.h.
1716         (_cpp_handle_directive): Reenable macro expander if appropriate.
1717         (undefine_macros): Inline body of _cpp_free_definition for speed.
1718         Do not call undef callback or _cpp_warn_if_unused_macro.
1719         (cpp_get_deps): New interface.
1720         * files.c (search_cache): Add pfile argument.  Check for file
1721         that would be found by "" or <> search here...
1722         (_cpp_find_file): ...not here.  Correct recorded start_dir of
1723         files found by directory-of-current-file search that would be
1724         found by "" or <> search.
1725         * init.c (cpp_add_dependency_target): Delete.
1726         * internal.h (struct lexer_state): Add discarding_output flag.
1727         * lex.c (lex_identifier): Compute hash function while scanning.
1728         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1729         directives.
1730         * makedepend.c: New file.
1731         * mkdeps.c (struct deps): Add vpath vector.
1732         (apply_vpath, deps_add_vpath): New function.
1733         (deps_free): Free vpath vector.
1734         (deps_add_dep, deps_add_target): Use apply_vpath.
1735         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1736         (ht_lookup_with_hash): New function.
1737         * cpplib.h, mkdeps.h: Update prototypes.
1738         * symtab.h: Update prototypes.
1739         (HT_HASHSTEP, HT_FINISH): New macros.
1740
1741 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
1742
1743         * symtab.c (ht_create): Set entries_owned.
1744         (ht_destroy): Honour entries_owned.
1745         (ht_expand): Likewise.
1746         (ht_load): New.
1747         * include/symtab.h (struct ht): New field 'entries_owned'
1748         (ht_load): New prototype.
1749
1750 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
1751
1752         PR bootstrap/15651
1753         * configure.ac: Fix m4 quoting when picking
1754         the size of HOST_WIDE_INT.
1755         * configure: Regenerate.
1756
1757 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
1758
1759         * Makefile.am: the correct directory for
1760         gettext include files is given by @INCINTL@.
1761         * Makefile.in: Regenerate.
1762
1763 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
1764
1765         * system.h [!ENABLE_NLS]: dgettext takes two
1766         parameters.
1767
1768 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
1769
1770         Moved libcpp from the gcc subdirectory to the toplevel.
1771         * Makefile.am: New file.
1772         * Makefile.in: Regenerate.
1773         * configure.ac: New file.
1774         * configure: Regenerate.
1775         * config.in: Regenerate.
1776         * charset.c: Moved from gcc/cppcharset.c.  Add note about
1777         brokenness of input charset detection.  Adjust for change
1778         in name of cppucnid.h.
1779         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
1780         * expr.c: Moved from gcc/cppexp.c.
1781         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
1782         Remove #define of O_BINARY, it is in system.h.
1783         * identifiers.c: Moved from gcc/cpphash.c.
1784         * internal.h: Moved from gcc/cpphash.h.  Change header
1785         guard name.  All other files adjusted to match name change.
1786         * init.c: Moved from gcc/cppinit.c.
1787         (init_library) [ENABLE_NLS]: Call bindtextdomain.
1788         * lex.c: Moved from gcc/cpplex.c.
1789         * directives.c: Moved from gcc/cpplib.c.
1790         * macro.c: Moved from gcc/cppmacro.c.
1791         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
1792         * traditional.c: Moved from gcc/cpptrad.c.
1793         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
1794         guard name.
1795         * ucnid.pl: Moved from gcc/cppucnid.pl.
1796         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
1797         guard name.
1798         * symtab.c: Moved from gcc/hashtable.c.
1799         * line-map.c: Moved from gcc.  Do not include intl.h.
1800         * mkdeps.c: Moved from gcc.
1801         * system.h: New file.
1802         * include/cpplib.h: Moved from gcc.  Change header guard name.
1803         * include/line-map.h: Moved from gcc.  Change header guard name.
1804         * include/mkdeps.h: Moved from gcc.  Change header guard name.
1805         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
1806         guard name.