OSDN Git Service

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