OSDN Git Service

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