OSDN Git Service

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