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