OSDN Git Service

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