2012-11-16 Janus Weil <janus@gcc.gnu.org>
[official-gcc.git] / libcpp / ChangeLog
blob4f78ecf761c4373406bff7f5ee01387f1798888c
1 2012-11-09  Ed Smith-Rowland  <3dw4rd@verizon.net>
3         PR c++/54413
4         * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg.
5         (cpp_interpret_int_suffix): Add cpp_reader* arg.
6         * init.c (cpp_create_reader): Iitialize new flags.
7         * expr.c (interpret_float_suffix): Use new flags.
8         (cpp_interpret_float_suffix): Add cpp_reader* arg.
9         (interpret_int_suffix): Use new flags.
10         (cpp_interpret_int_suffix): Add cpp_reader* arg.
11         (cpp_classify_number): Adjust calls to interpret_x_suffix.
13 2012-10-23  Ian Bolton  <ian.bolton@arm.com>
14             Jim MacArthur  <jim.macarthur@arm.com>
15             Marcus Shawcroft  <marcus.shawcroft@arm.com>
16             Nigel Stephens  <nigel.stephens@arm.com>
17             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18             Richard Earnshaw  <rearnsha@arm.com>
19             Sofiane Naci  <sofiane.naci@arm.com>
20             Stephen Thomas  <stephen.thomas@arm.com>
21             Tejas Belagod  <tejas.belagod@arm.com>
22             Yufeng Zhang  <yufeng.zhang@arm.com>
24         * configure.ac: Enable AArch64.
25         * configure: Regenerate.
27 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
29         * files.c (struct _cpp_file): Add implicit_preinclude.
30         (pch_open_file): Allow a previously opened implicitly included
31         file.
32         (_cpp_find_file): Add implicit_preinclude argument.  Free file and
33         do not call open_file_failed if implicit_preinclude.  Store
34         implicit_preinclude value.
35         (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date):
36         Update calls to _cpp_find_file.
37         (_cpp_stack_include): Handle IT_DEFAULT.
38         (cpp_push_default_include): New.
39         * include/cpplib.h (cpp_push_default_include): Declare.
40         * init.c (cpp_read_main_file): Update call to _cpp_find_file.
41         * internal.h (enum include_type): Add IT_DEFAULT.
42         (_cpp_find_file): Update prototype.
44 2012-10-15  Tobias Burnus  <burnus@net-b.de>
46         * files.c (read_file_guts, _cpp_save_file_entries): Free memory
47         before returning.
48         * lex.c (warn_about_normalization): Ditto.
49         * mkdeps.c (deps_save): Ditto.
50         * pch.c (cpp_valid_state): Ditto.
52 2012-10-04  Florian Weimer  <fweimer@redhat.com>
54         * directives.c (do_pragma_warning_or_error): New.
55         (do_pragma_warning): New.
56         (do_pragma_error): New.
57         (_cpp_init_internal_pragmas): Register new pragmas.
59 2012-09-25  Dehao Chen  <dehao@google.com>
61         PR middle-end/54704
62         * line-map.c (location_adhoc_data_hash): Fix the hash function.
64 2012-09-25  Dehao Chen  <dehao@google.com>
66         PR middle-end/54645
67         * include/line-map.h (location_adhoc_data): Move location_adhoc_data
68         into GC.
69         (location_adhoc_data_map): Likewise.
70         (line_maps): Likewise.
71         (rebuild_location_adhoc_htab): New Function.
72         * line-map.c (+rebuild_location_adhoc_htab): new Funcion.
73         (get_combined_adhoc_loc): Move location_adhoc_data into GC.
74         (location_adhoc_data_fini): Likewise.
75         (linemap_init): Likewise.
76         (location_adhoc_data_init): Remove Function.
78 2012-09-19  Dehao Chen  <dehao@google.com>
80         * include/line-map.h (MAX_SOURCE_LOCATION): New value.
81         (location_adhoc_data_fini): New.
82         (get_combined_adhoc_loc): New.
83         (get_data_from_adhoc_loc): New.
84         (get_location_from_adhoc_loc): New.
85         (location_adhoc_data_map): New.
86         (COMBINE_LOCATION_DATA): New.
87         (IS_ADHOC_LOC): New.
88         (expanded_location): New field.
89         (line_maps): New field.
90         * line-map.c (location_adhoc_data): New.
91         (location_adhoc_data_hash): New.
92         (location_adhoc_data_eq): New.
93         (location_adhoc_data_update): New.
94         (get_combined_adhoc_loc): New.
95         (get_data_from_adhoc_loc): New.
96         (get_location_from_adhoc_loc): New.
97         (location_adhoc_data_init): New.
98         (location_adhoc_data_fini): New.
99         (linemap_init): Initialize location_adhoc_data.
100         (linemap_lookup): Change to use new location.
101         (linemap_ordinary_map_lookup): Likewise.
102         (linemap_macro_map_lookup): Likewise.
103         (linemap_macro_map_loc_to_def_point): Likewise.
104         (linemap_macro_map_loc_unwind_toward_spel): Likewise.
105         (linemap_get_expansion_line): Likewise.
106         (linemap_get_expansion_filename): Likewise.
107         (linemap_location_in_system_header_p): Likewise.
108         (linemap_location_from_macro_expansion_p): Likewise.
109         (linemap_macro_loc_to_spelling_point): Likewise.
110         (linemap_macro_loc_to_def_point): Likewise.
111         (linemap_macro_loc_to_exp_point): Likewise.
112         (linemap_resolve_location): Likewise.
113         (linemap_unwind_toward_expansion): Likewise.
114         (linemap_unwind_to_first_non_reserved_loc): Likewise.
115         (linemap_expand_location): Likewise.
116         (linemap_dump_location): Likewise.
117         (linemap_line_start): Likewise.
119 2012-05-25  Dodji Seketeli  <dodji@redhat.com>
121         PR preprocessor/53469
122         * directives.c (do_pragma): Use the virtual location for the
123         pragma token, instead of its spelling location.
125 2012-08-14   Diego Novillo  <dnovillo@google.com>
127         Merge from cxx-conversion branch.  Configury.
129         * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
130         * configure.ac: Likewise.
131         * configure: Regenerate.
133 2012-08-14   Lawrence Crowl  <crowl@google.com>
135         Merge from cxx-conversion branch.  New C++ hash table.
137         * include/symtab.h (typedef struct ht hash_table): Change the typedef
138         name to cpp_hash_table.  Update all users of the typedef.
140 2012-07-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
142         * include/line-map.h (line_map_macro): Use the "atomic" GTY option
143         for the macro_locations field.
145 2011-06-19  Uros Bizjak  <ubizjak@gmail.com>
147         * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
148         __builtin_ia32_pcmpestri128 instead of asm.
150 2012-06-04  Dimitrios Apostolou <jimis@gmx.net>
152         * line-map.c (linemap_enter_macro): Don't zero max_column_hint in
153         every macro. This improves performance by reducing the number of
154         reallocations when track-macro-expansion is on.
156 2012-06-04  Dodji Seketeli  <dodji@redhat.com>
158         PR preprocessor/53463
159         * line-map.c (linemap_location_in_system_header_p): For built-in
160         macro tokens, check the first expansion point location that is not
161         for a token coming from a built-in macro.
163 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
165         * directives.c: Fix typos.
166         * include/line-map.h: Fix typos.
167         * line-map.c: Fix typos.
168         * macro.c: Fix typos.
170 2012-05-25  Dodji Seketeli  <dodji@redhat.com>
172         PR bootstrap/53459
173         * lex.c (search_line_fast): Avoid unused local typedefs to simulate
174         a static assertion.
176 2012-05-29  Dodji Seketeli  <dodji@redhat.com>
178         PR preprocessor/53229
179         * internal.h (cpp_reader::set_invocation_location): Remove.
180         (cpp_reader::about_to_expand_macro_p): New member flag.
181         * directives.c (do_pragma):  Remove Kludge as
182         pfile->set_invocation_location is no more.
183         * macro.c (cpp_get_token_1): Do away with the use of
184         cpp_reader::set_invocation_location.  Just collect the macro
185         expansion point when we are about to expand the top-most macro.
186         Do not override cpp_reader::about_to_expand_macro_p.
187         This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
188         properly handle locations of expansion points.
189         (cpp_get_token_with_location): Adjust, as
190         cpp_reader::set_invocation_location is no more.
191         (paste_tokens): Take a virtual location parameter for
192         the LHS of the pasting operator.  Use it in diagnostics.  Update
193         comments.
194         (paste_all_tokens): Tighten the assert.  Propagate the location of
195         the expansion point when no virtual locations are available.
196         Pass the virtual location to paste_tokens.
197         (in_macro_expansion_p): New static function.
198         (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
199         flag until we really start expanding the macro.
201 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
203         PR preprocessor/7263
204         * include/cpplib.h (cpp_classify_number): Take a location
205         parameter.
206         * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
207         macros that take a location parameter.
208         (cpp_classify_number): Take a (virtual) location parameter.  Use
209         it for diagnostics.  Adjust comments.
210         (eval_token): Take a location parameter.  Pass it to
211         cpp_classify_number and to diagnostic routines.
212         (_cpp_parse_expr): Use virtual locations of tokens when parsing
213         expressions.  Pass a virtual location to eval_token and to
214         diagnostic routines.
216 2012-05-10  Tristan Gingold  <gingold@adacore.com>
218         * expr.c (interpret_float_suffix): Add a guard.
220 2012-05-02  Dodji Seketeli  <dodji@redhat.com>
222         Properly initialize cpp_context in destringize_and_run
223         * directives.c (destringize_and_run): Properly initialize the new
224         context.
225         * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
226         the initial base context, which has the same life time as the
227         current instance of cpp_file.
229 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
230             Dodji Seketeli  <dodji@seketeli.org>
232         PR c++/52974
233         * libcpp/files.c (maybe_shorter_path): New.
234         (find_file_in_dir): Use it.
236 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
238         Switch -ftrack-macro-expansion=2 on by default.
239         * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
240         by default.  Add comments.
242         Strip "<built-in>" loc from displayed expansion context
243         * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
244         in comment.
245         (linemap_unwind_to_first_non_reserved_loc): Declare new function.
246         * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
247         new function.
249         Fix expansion point loc for macro-like tokens
250         * macro.c (macro_of_context): New static function.
251         (_cpp_push_token_context, push_extended_tokens_context): If the
252         macro argument is NULL, it means we are continuing the expansion
253         of the current macro, if any.  Update comments.
254         (_cpp_pop_context): Re-enable expansion of the macro only when we
255         are really out of the context of the current expansion.
257         Fix token pasting with -ftrack-macro-expansion
258         * macro.c (paste_all_tokens): Put the token resulting from pasting
259         into an extended token context with -ftrack-macro-location is in
260         effect.
262         Fix cpp_sys_macro_p with -ftrack-macro-expansion
263         * macro.c (cpp_sys_macro_p):  Support -ftrack-macro-expansion.
265 2012-04-29  Dodji Seketeli  <dodji@redhat.com>
267         * lex.c (lex_raw_string): Change C++ style comments into C style
268         comments.
269         (lex_string): Likewise.
271 2012-04-27   Ollie Wild  <aaw@google.com>
273         * include/cpplib.h (struct cpp_options): Add new field,
274         warn_literal_suffix.
275         (CPP_W_LITERAL_SUFFIX): New enum.
276         * init.c (cpp_create_reader): Default initialization of
277         warn_literal_suffix.
278         * lex.c (lex_raw_string): Treat user-defined literals which don't
279         begin with '_' as separate tokens and produce a warning.
280         (lex_string): Ditto.
282 2012-04-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
284         * line-map.c (linemap_resolve_location): Synchronize comments with
285         those in line-map.h.
286         * include/line-map.h (linemap_resolve_location): Fix spelling in
287         comment.
289 2012-03-22  Richard Earnshaw  <rearnsha@arm.com>
291         * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
293 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
295         * lex.c: Remove Solaris 8 reference.
297 2012-02-14  Walter Lee  <walt@tilera.com>
299         * configure.ac: Require 64-bit hwint for tilegx and tilepro.
300         * configure: Regenerate.
302 2012-01-09  Richard Guenther  <rguenther@suse.de>
304         * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
306 2012-01-09  Gary Funck  <gary@intrepid.com>
308         PR preprocessor/33919
309         * files.c (_cpp_get_file_name): New. Implement file name
310         access function.
311         * internal.h (_cpp_get_file_name): New prototype.
312         * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
313         to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
315 2012-01-03  Olivier Hainque  <hainque@adacore.com>
317         * system.h: Prior to #define, #undef fopen and freopen unconditionally.
319 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
321         * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
322         (CLK_STDC1X): Change to CLK_STDC11.
323         * init.c (lang_defaults): Update comments.
324         (cpp_init_builtins): Update language tests.  Use 201112L for C11
325         __STDC_VERSION__.
327 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
329         * configure: Regenerate.
331 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
333         * configure: Regenerate.
335 2011-12-07  Jakub Jelinek  <jakub@redhat.com>
337         PR bootstrap/50237
338         * internal.h (_cpp_init_lexer): New prototype.
339         * init.c (init_library): Call it.
340         * lex.c (init_vectorized_lexer): Remove constructor attribute,
341         add inline keyword.
342         (HAVE_init_vectorized_lexer): Define.
343         (_cpp_init_lexer): New function.
345 2011-12-03  Dodji Seketeli  <dodji@redhat.com>
347         * macro.c (tokens_buff_remove_last_token)
348         (tokens_buff_put_token_to): Add an 'inline' function specifier to
349         the prototype.
351 2011-11-22   Diego Novillo  <dnovillo@google.com>
353         * include/line-map.h (linemap_dump): Declare.
354         (line_table_dump): Declare.
355         * line-map.c (linemap_dump): New.
356         (line_table_dump): New.
358 2011-11-21  Ed Smith-Rowland  <3dw4rd@verizon.net>
360         PR c++/50958
361         * expr.c (cpp_userdef_char_remove_type): Fix typo.
363 2011-11-03  Michael Matz  <matz@suse.de>
365         PR bootstrap/50857
366         * configure.ac: Check for -fno-exceptions -fno-rtti.
367         * configure: Regenerate.
368         * Makefile.in (NOEXCEPTION_FLAGS): New flag.
369         (ALL_CXXFLAGS): Use it.
371 2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
373         * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
375 2011-11-02  Jason Merrill  <jason@redhat.com>
377         PR c++/50810
378         * configure.ac: Add -Wno-narrowing to warning options.
380 2011-10-31  Jason Merrill  <jason@redhat.com>
382         PR libstdc++/1773
383         * init.c (cpp_init_builtins): Set __cplusplus for C++11.
385         PR c++/50920
386         * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
387         CLK_GNUCXX0X to CLK_GNUCXX11.
389 2011-10-26  Ed Smith-Rowland  <3dw4rd@verizon.net>
391         Implement C++11 user-defined literals.
392         * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
393         cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
394         cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
395         cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
396         (cpp_classify_number): Classify unrecognized tokens as user-defined
397         literals.
398         * include/cpplib.h: Add new tokens for user-defined literals.
399         * init.c: Add new preprocessor flag (cxx11).
400         * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
401         including concatenation and promotion with suffixes.
403 2011-10-24  Dodji Seketeli  <dodji@redhat.com>
405         * line-map.c (linemap_macro_map_lookup): Fix logic.
407 2011-10-24  Dodji Seketeli  <dodji@redhat.com>
409         * include/line-map.h (linemap_expand_location): Take a line table
410         parameter.  Update comment.
411         (linemap_resolve_location): Update comment.
412         (linemap_expand_location_full): Remove.
413         * line-map.c (linemap_resolve_location):  Handle reserved
414         locations; return a NULL map in those cases.
415         (linemap_expand_location): If location is reserved, return a
416         zeroed expanded location.  Update comment.  Take a line table to
417         assert that the function takes non-virtual locations only.
418         (linemap_expand_location_full): remove.
419         (linemap_dump_location): Handle the fact that
420         linemap_resolve_location can return NULL line maps when the
421         location resolves to a reserved location.
423         * line-map.c (linemap_macro_map_lookup): Fix logic.
425 2011-10-22  Dodji Seketeli  <dodji@redhat.com>
427         PR bootstrap/50778
428         * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
429         context to act upon.
430         * lex.c (_cpp_remaining_tokens_num_in_context): Likewise.  Update
431         comment.
432         (cpp_token_from_context_at): Likewise.
433         (cpp_peek_token): Use the context to peek tokens from.
435 2011-10-20  Dodji Seketeli  <dodji@redhat.com>
437         PR bootstrap/50801
438         * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
439         number of tokens.
441 2011-10-18  Dodji Seketeli  <dodji@redhat.com>
443         PR bootstrap/50760
444         * include/line-map.h (struct linemap_stats): Change the type of
445         the members from size_t to long.
446         * macro.c (macro_arg_token_iter_init): Unconditionally initialize
447         iter->location_ptr.
449 2011-10-17  Dodji Seketeli  <dodji@redhat.com>
451         * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
452         variable without using it if ENABLE_CHECKING is not defined.  Mark
453         the LOCATION parameter as being unused.
455 2011-10-15  Tom Tromey  <tromey@redhat.com>
456             Dodji Seketeli  <dodji@redhat.com>
458         * include/line-map.h (struct line_maps::alloced_size_for_request):
459         New member.
460         * line-map.c (new_linemap): Use set->alloced_size_for_request to
461         get the actual allocated size of line maps.
463 2011-10-15  Tom Tromey  <tromey@redhat.com>
464             Dodji Seketeli  <dodji@redhat.com>
466         * line-map.h (struct linemap_stats): Declare new struct.
467         (linemap_get_statistics): Declare ...
468         * line-map.c (linemap_get_statistics):  ... new function.
469         * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
470         Declare new counters.
471         (enter_macro_context, replace_args): Update
472         num_macro_tokens_counter.
473         (cpp_get_token_1): Update num_expanded_macros_counter.
475 2011-10-15  Tom Tromey  <tromey@redhat.com>
476             Dodji Seketeli  <dodji@redhat.com>
478         * include/cpplib.h (struct cpp_options)<debug>: New struct member.
479         * include/line-map.h (linemap_dump_location): Declare ...
480         * line-map.c (linemap_dump_location): ... new function.
482 2011-10-15  Tom Tromey  <tromey@redhat.com>
483             Dodji Seketeli  <dodji@redhat.com>
485         * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
486         New option.
487         * internal.h (struct macro_context): New struct.
488         (enum context_tokens_kind): New enum.
489         (struct cpp_context)<tokens_kind>: New member of type enum
490         context_tokens_kind.
491         (struct cpp_context)<macro>: Remove this.  Replace it with an enum
492         of macro and  macro_context.
493         (struct cpp_context)<direct_p>: Remove.
494         (_cpp_remaining_tokens_num_in_context): Declare new function.
495         * directives.c (destringize_and_run): Adjust.
496         * lex.c (_cpp_remaining_tokens_num_in_context)
497         (_cpp_token_from_context_at): Define new functions
498         (cpp_peek_token): Use them.
499         * init.c (cpp_create_reader): Initialize the base context to zero.
500         (_cpp_token_from_context_at): Define new static function.
501         (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
502         _cpp_token_from_context_at.
503         * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
504         members.
505         (enum macro_arg_token_kind): New enum.
506         (struct macro_arg_token_iter): New struct.
507         (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
508         (alloc_expanded_arg_mem, ensure_expanded_arg_room)
509         (delete_macro_args, set_arg_token, get_arg_token_location)
510         (arg_token_ptr_at, macro_arg_token_iter_init)
511         (macro_arg_token_iter_get_token)
512         (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
513         (expanded_token_index, tokens_buff_new, tokens_buff_count)
514         (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
515         (tokens_buff_add_token, tokens_buff_remove_last_token)
516         (reached_end_of_context, consume_next_token_from_context): New
517         static functions.
518         (cpp_get_token_1): New static function. Split and extended from
519         cpp_get_token.  Use reached_end_of_context and
520         consume_next_token_from_context.  Unify its return point.  Move
521         the location tweaking from cpp_get_token_with_location in here.
522         (cpp_get_token): Use cpp_get_token_1
523         (stringify_arg): Use the new arg_token_at.
524         (paste_all_tokens): Support tokens coming from extended tokens
525         contexts.
526         (collect_args): Return the number of collected arguments, by
527         parameter.  Store virtual locations of tokens that constitute the
528         collected args.
529         (funlike_invocation_p): Return the number of collected arguments,
530         by parameter.
531         (enter_macro_context): Add a parameter for macro expansion point.
532         Pass it to replace_args and to the "used" cpp callback.  Get the
533         number of function-like macro arguments from funlike_invocation_p,
534         pass it to the new delete_macro_args to free the memory used by
535         macro args.  When -ftrack-macro-expansion is in effect, for macros
536         that have no arguments, create a macro map for the macro expansion
537         and use it to allocate proper virtual locations for tokens
538         resulting from the expansion.  Push an extended tokens context
539         containing the tokens resulting from macro expansion and their
540         virtual locations.
541         (replace_args): Rename the different variables named 'count' into
542         variables with more meaningful names.  Create a macro map;
543         allocate virtual locations of tokens resulting from this
544         expansion.  Use macro_arg_token_iter to iterate over tokens of a
545         given macro.  Handle the case of the argument of
546         -ftrack-macro-expansion being < 2.  Don't free macro arguments
547         memory resulting from expand_arg here, as these are freed by the
548         caller of replace_arg using delete_macro_args now.  Push extended
549         token context.
550         (next_context, push_ptoken_context, _cpp_push_token_context)
551         (_cpp_push_text_context): Properly initialize the context.
552         (expand_arg): Use the new alloc_expanded_arg_mem,
553         push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
554         (_cpp_pop_context): Really free the memory held by the context.
555         Handle freeing memory used by extended tokens contexts.
556         (cpp_get_token_with_location): Use cpp_get_token_1.
557         (cpp_sys_macro_p): Adjust.
558         (_cpp_backup_tokens): Support the new kinds of token contexts.
559         * traditional.c (recursive_macro): Adjust.
561 2011-10-15  Tom Tromey  <tromey@redhat>
562             Dodji Seketeli  <dodji@redhat.com>
564         * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
565         member.
566         (MAX_SOURCE_LOCATION): New constant.
567         (struct line_map_ordinary, struct line_map_macro): New structs.
568         (struct line_map): Turn this into a union of the two above.  Add
569         comments.
570         (struct maps_info): New struct.
571         (struct line_maps)<info_ordinary, info_macro>: Two new fields.
572         These now carry the map information that was previously scattered
573         in struct line_maps.
574         (struct map_info::allocated): Fix comment.
575         (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
576         (ORDINARY_MAP_STARTING_LINE_NUMBER)
577         (ORDINARY_MAP_INCLUDER_FILE_INDEX)
578         (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
579         (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
580         (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
581         (MACRO_MAP_EXPANSION_POINT_LOCATION)
582         (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
583         (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
584         (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
585         (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
586         (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
587         (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
588         (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
589         (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
590         (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
591         (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
592         (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
593         information.
594         (linemap_check_ordinary, linemap_assert)
595         (linemap_location_before_p): New macros.
596         (linemap_position_for_line_and_column)
597         (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
598         (linemap_macro_expansion_map_p)
599         (linemap_macro_map_loc_to_def_point)
600         (linemap_macro_map_loc_unwind_once)
601         (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
602         (linemap_get_source_line linemap_get_source_column)
603         (linemap_map_get_macro_name, linemap_get_file_path)
604         (linemap_location_in_system_header_p)
605         (linemap_location_from_macro_expansion_p): Declare new functions.
606         (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
607         (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
608         accessors act on ordinary maps only.
609         (INCLUDED_FROM): Return NULL for main files; use the new
610         accessors.
611         (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
612         (struct expanded_location): Move here from gcc/input.h
613         (linemap_resolve_location, linemap_expand_location)
614         (linemap_expand_location_full): Declare new functions.
615         * line-map.c: Include cpplib.h, internal.h
616         (linemap_enter_macro, linemap_add_macro_token)
617         (linemap_get_expansion_line, linemap_get_expansion_filename): New
618         functions that are private to libcpp.
619         (linemap_assert): New macro.
620         (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
621         (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
622         (linemap_macro_map_loc_unwind_toward_spelling)
623         (linemap_macro_map_loc_to_exp_point)
624         (first_map_in_common_1, first_map_in_common): New static
625         functions.
626         (new_linemap): Define new static functions.  Extracted and
627         enhanced from ...
628         (linemap_add): ... here.  Use linemap_assert in lieu of abort
629         previously.
630         (linemap_tracks_macro_expansion_locs_p)
631         (linemap_add_macro_token, linemap_macro_expansion_map_p)
632         (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
633         (linemap_macro_map_loc_to_def_point)
634         (linemap_macro_map_loc_unwind_once)
635         (linemap_step_out_once, linemap_map_get_index)
636         (linemap_get_source_line,linemap_get_source_column)
637         (linemap_get_file_path, linemap_map_get_macro_name)
638         (linemap_location_in_system_header_p)
639         (linemap_location_originated_from_system_header_p)
640         (linemap_location_from_macro_expansion_p)
641         (linemap_tracks_macro_expansion_locs_p)
642         (linemap_resolve_location, linemap_expand_location)
643         (linemap_expand_location_full)
644         (linemap_tracks_macro_expansion_locs_p)
645         (linemap_position_for_line_and_column, linemap_compare_locations):
646         Define new public functions.
647         (linemap_init): Initialize ordinary and macro maps information in
648         the map set.
649         (linemap_check_files_exited): Use the new accessors.
650         (linemap_free): Remove this dead code.
651         (linemap_line_start): Assert this uses an ordinary map.  Adjust to
652         use the new ordinary map accessors and data structures.  Don't
653         overflow past the lowest possible macro token's location.
654         (linemap_position_for_column): Assert the ordinary maps of the map
655         set are really ordinary.  Use ordinary map accessors.
656         (linemap_lookup): Keep the same logic but generalize to allow
657         lookup of both ordinary and macro maps.  Do not crash when called
658         with an empty line table.
659         * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
660         new API of line-map.h.
661         * directives.c (start_directive, do_line, do_linemarker)
662         (do_linemarker): Likewise.
663         * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
664         (make_cpp_dir, cpp_make_system_header): Likewise.
665         * init.c (cpp_read_main_file): Likewise.
666         * internal.h (CPP_INCREMENT_LINE): Likewise.
667         (linemap_enter_macro, linemap_add_macro_token)
668         (linemap_get_expansion_line, linemap_get_expansion_filename): New
669         functions private to libcpp.
670         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
671         (skip_line_comment, skip_whitespace, lex_raw_string)
672         (_cpp_lex_direct): Likewise.
673         * macro.c (_cpp_builtin_macro_text): Likewise.
674         (_cpp_aligned_alloc): Initialize the new name member of the macro.
675         * traditional.c (copy_comment, _cpp_scan_out_logical_line):
676         Likewise.
677         * errors.c (cpp_diagnostic): Adjust to new linemap API.
679 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
681         * line-map.c (linemap_add): Assert that reason must not be
682         LC_RENAME when called for the first time on a "main input file".
684 2011-08-22  Gabriel Charette  <gchare@google.com>
686         * init.c (cpp_create_reader): Inititalize forced_token_location_p.
687         * internal.h (struct cpp_reader): Add field forced_token_location_p.
688         * lex.c (_cpp_lex_direct): Use forced_token_location_p.
689         (cpp_force_token_locations): New.
690         (cpp_stop_forcing_token_locations): New.
692 2011-08-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
694         PR libstdc++/1773
695         * init.c (cpp_init_builtins): Define __cplusplus 19971L.
697 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
699         * include/cpplib.h (struct cpp_options): Fix typo.
701 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
703         * include/cpplib.h (struct cpp_options): Add rliterals.
704         * init.c  (struct lang_flags, lang_defaults): Add rliterals.
705         (cpp_set_lang): Set rliterals option.
706         (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
707         * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
709 2011-08-15  Gabriel Charette  <gchare@google.com>
711         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
712         Update all users to use linemap_position_for_column instead.
714 2011-07-28  Gabriel Charette  <gchare@google.com>
716         * include/line-map.h (struct line_maps):
717         Remove unused field last_listed. Update all users.
719 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
721         * configure.ac: Set need_64bit_hwint to yes for x86 targets.
722         * configure: Regenerated.
724 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
726         * system.h [__cplusplus]: Wrap C function declarations in extern "C".
728 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
729             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
731         PR bootstrap/49794
732         * configure.ac: Test AM_ICONV with CXX.
733         * configure: Regenerate.
734         * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
736 2011-07-15  Dodji Seketeli  <dodji@redhat.com>
738         * directives.c (struct if_stack): Use source_location as type
739         here.
740         * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
741         indent, def_pragma, used_define, used_undef>: Properly use
742         source_location as parameter type, rather than unsigned int.
744 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
746         PR target/39150
747         * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
748         like i[34567]86-*-solaris2.1[0-9]*.
749         * configure: Regenerate.
751 2011-06-16  Jason Merrill  <jason@redhat.com>
753         PR c++/45399
754         * lex.c (lex_raw_string): Don't check for embedded NUL.
756 2011-06-06  Dodji Seketeli  <dodji@redhat.com>
758         PR preprocessor/48532
759         * directives.c (do_pragma): Don't forget the invocation location
760         when parsing the pragma name of a namespaced pragma directive.
762 2011-05-29  John Tytgat  <John.Tytgat@aaug.net>
764         * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
766 2011-05-22  Uros Bizjak  <ubizjak@gmail.com>
768         PR target/49104
769         * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
770         is defined.  Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
772 2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
774         * system.h (ENUM_BITFIELD): Remove.
776 2011-04-24  Jakub Jelinek  <jakub@redhat.com>
778         PR preprocessor/48740
779         * lex.c (lex_raw_string): When raw string ends with
780         ??) followed by raw prefix and ", ensure it is preprocessed
781         with ??) rather than ??].
783 2011-04-20  Jim Meyering  <meyering@redhat.com>
785         * files.c (destroy_cpp_file): Remove useless if-before-free.
786         * init.c (cpp_destroy): Likewise.
787         * macro.c (replace_args): Likewise.
788         * pch.c (cpp_valid_state): Likewise.
790 2011-03-25  Kai Tietz  <ktietz@redhat.com>
792         * files.c (file_hash_eq): Use filename_cmp
793         instead of strcmp.
794         (nonexistent_file_hash_eq): Likewise.
795         (remap_filename): Likewise.
796         Handle absolute DOS-path,
797         (append_file_to_dir): Check for IS_DIR_SEPARATOR
798         instead of slash.
799         (read_name_map): Likewise.
800         * linemap.c (linemap_add): Use filename_cmp
801         instead of strcmp.
802         * mkdeps.c (apply_vpath): Use filename_ncmp
803         instead of strncmp.
804         (deps_restore): Use filename_cmp instead of
805         strcmp.
806         * init.c (read_original_directory): Use
807         IS_DIR_SEPARATOR instead of checking for slash.
809 2011-03-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
811         PR preprocessor/48192
812         * directives.c (do_ifdef): Do not consider conditional macros as
813         being defined.
814         (do_ifndef): Ditto.
815         * expr.c (parse_defined): Ditto.
817 2011-03-18  Richard Henderson  <rth@redhat.com>
819         PR bootstrap/45381
820         * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
822 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
823             Jakub Jelinek  <jakub@redhat.com>
825         PR preprocessor/39213
826         * directives.c (end_directive): Call _cpp_remove_overlay for deferred
827         pragmas as well in traditional mode.
829 2010-11-17  Ian Lance Taylor  <iant@google.com>
831         PR bootstrap/45538
832         * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS.  Remove switch of
833         AC_LANG based on ENABLE_BUILD_WITH_CXX.
835 2010-11-16  Kai Tietz  <kai.tietz@onevision.com>
837         PR preprocessor/17349
838         * lex.c (save_comment): Handle in argument passing c++
839         comments special.
841 2010-11-02  Ian Lance Taylor  <iant@google.com>
843         * configure.ac: Use AC_SYS_LARGEFILE.
844         * configure: Rebuild.
845         * config.in: Rebuild.
847 2010-10-19  Basile Starynkevitch  <basile@starynkevitch.net>
849         * line-map.h (source_location): Remove obsolete comment
850         mentioning location_s.
852 2010-09-29  Kai Tietz  <kai.tietz@onevision.com>
854         PR preprocessor/45362
855         * directives.c (cpp_pop_definition): Make static.
856         (do_pragma_push_macro): Reworked to store text
857         definition.
858         (do_pragma_pop_macro): Add free text definition.
859         (cpp_push_definition): Removed.
860         * include/cpplib.h (cpp_push_definition): Removed.
861         (cpp_pop_definition): Likewise.
862         * internal.h (def_pragma_macro): Remove member 'value'
863         and add new members 'definition', 'line',
864         'syshdr', 'sued' and 'is_undef'.
865         * pch.c (_cpp_restore_pushed_macros): Rework to work
866         on text definition and store additional macro flags.
867         (_cpp_save_pushed_macros): Likewise.
869 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
871         * include/cpplib.h (cpp_options): Rename warn_deprecated,
872         warn_traditional, warn_long_long and pedantic.
873         * directives.c (directive_diagnostics, _cpp_handle_directive):
874         Update names of cpp_options members.
875         * expr.c (cpp_classify_number, eval_token): Update names of
876         cpp_options members.
877         * init.c (cpp_create_reader, post_options): Update names of
878         cpp_options members.
879         * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
880         cpp_options members.
881         * macro.c (parse_params): Update names of cpp_options members.
883 2010-09-15  Ian Lance Taylor  <iant@google.com>
885         * init.c: Fix type name in comment.
887 2010-08-31  Jakub Jelinek  <jakub@redhat.com>
889         PR preprocessor/45457
890         * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
891         needed.
892         * directives.c (do_ifdef, do_ifndef): Likewise.
894 2010-08-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
896         * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
898 2010-08-24  Richard Henderson  <rth@redhat.com>
900         PR bootstrap/45376
901         * configure.ac (HAVE_SSE4): New check.
902         * configure, config.in: Rebuild.
903         * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
905 2010-08-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
907         * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
908         etc. on Solaris 2/x86.
910 2010-08-21  Richard Henderson  <rth@redhat.com>
911             Andi Kleen <ak@linux.intel.com>
912             David S. Miller  <davem@davemloft.net>
914         * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
915         (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
916         (ptrdiff_t): Check via AC_CHECK_TYPE.
917         * config.in, configure: Rebuild.
918         * system.h: Include stdint.h, if available.
919         * lex.c (WORDS_BIGENDIAN): Provide default.
920         (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
921         acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
922         search_line_sse2, search_line_sse42, init_vectorized_lexer,
923         search_line_fast): New.
924         (_cpp_clean_line): Use search_line_fast.  Restructure the fast
925         loop to make it clear when we're leaving the loop.  Stay in the
926         fast loop for non-trigraph '?'.
928 2010-06-11  Jakub Jelinek  <jakub@redhat.com>
930         * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
931         callback.
932         (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
933         (cpp_macro_definition): Remove const qual from second argument.
934         * macro.c (enter_macro_context): Call user_builtin_macro callback for
935         NODE_BUILTIN !NODE_USED macros.
936         (warn_of_redefinition): Likewise.  Remove const qual from second
937         argument.
938         (cpp_macro_definition): Likewise.
939         * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
940         for NODE_BUILTIN !NODE_USED macros.
942 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
944         * include/cpplib.h (struct cpp_options): Remove show_column.
945         * init.c (cpp_create_reader, post_options): Don't set show_column.
947 2010-06-09  Joern Rennecke  <joern.rennecke@embecosm.com>
949         PR bootstrap/44432
950         * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
951         check that C++ compiler works.
952         * configure: Regenerate.
954 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
956         * include/symtab.h (ht_identifier_ptr): New.
958 2010-06-03  Joern Rennecke <joern.rennecke@embecosm.com>
959             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
961         PR bootstrap/42798
962         * configure.ac: Check for declaration of 'basename(char *)'.
963         * configure: Regenerate.
964         * config.in: Regenerate.
966 2010-04-25  Joseph Myers  <joseph@codesourcery.com>
968         * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
969         * init.c (lang_defaults): Add entries for new language variants.
970         (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
971         variants.
973 2010-04-09  Manuel López-Ibáñez <manu@gcc.gnu.org>
975         PR cpp/43195
976         * files.c (report_missing_guard): Test for #pragma once.
978 2010-04-07  Simon Baldwin  <simonb@google.com>
980         * directives.c (do_diagnostic): Add warning reason argument,
981         call appropriate error reporting function for code.
982         (directive_diagnostics): Call specific warning functions with
983         warning reason where appropriate.
984         (do_error, do_warning, do_pragma_dependency): Add warning reason
985         argument to do_diagnostic calls.
986         * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
987         _cpp_create_definition): Call specific warning functions with
988         warning reason where appropriate.
989         * Makefile.in: Add new diagnostic functions to gettext translations.
990         * include/cpplib.h (struct cpp_callbacks): Add warning reason code
991         to error callback.
992         (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
993         CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
994         (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
995         CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
996         CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
997         CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
998         CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
999         CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
1000         CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
1001         warning reason codes.
1002         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
1003         cpp_warning_with_line, cpp_pedwarning_with_line,
1004         cpp_warning_with_line_syshdr): New specific error reporting functions.
1005         * pch.c (cpp_valid_state): Call specific warning functions with
1006         warning reason where appropriate.
1007         * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
1008         diagnostic handlers.
1009         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
1010         cpp_warning_with_line, cpp_pedwarning_with_line,
1011         cpp_warning_with_line_syshdr): New specific error reporting functions.
1012         * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
1013         specific warning functions with warning reason where appropriate.
1014         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
1015         warn_about_normalization, lex_identifier_intern, lex_identifier,
1016         _cpp_lex_direct): Ditto.
1017         * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
1018         narrow_str_to_charconst): Ditto.
1020 2010-04-06  Jakub Jelinek  <jakub@redhat.com>
1022         PR preprocessor/43642
1023         * lex.c (lex_raw_string): Change type of TYPE variable to
1024         unsigned char.
1026 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1028         * aclocal.m4: Regenerate.
1030 2010-03-29  Jason Merrill  <jason@redhat.com>
1032         More N3077 raw string changes
1033         * charset.c (cpp_interpret_string): Don't transform UCNs in raw
1034         strings.
1035         * lex.c (bufring_append): Split out from...
1036         (lex_raw_string): ...here.  Undo trigraph and line splicing
1037         transformations.  Do process line notes in multi-line literals.
1038         (_cpp_process_line_notes): Ignore notes that were already handled.
1040         Some raw string changes from N3077
1041         * charset.c (cpp_interpret_string): Change inner delimiters to ().
1042         * lex.c (lex_raw_string): Likewise.  Also disallow '\' in delimiter.
1044 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
1046         * init.c (read_original_filename): Don't call read_original_directory
1047         if _cpp_handle_directive returns 0.
1049 2010-01-01  Joseph Myers  <joseph@codesourcery.com>
1051         PR preprocessor/41947
1052         * expr.c (cpp_classify_number): Give error for hexadecimal
1053         floating-point constant with no digits before or after point.
1055 2009-11-20  Arnaud Charlet  <charlet@adacore.com>
1057         * macro.c (enter_macro_context): Call cb.used callback if defined.
1058         * directives.c (do_idef, do_ifndef): Ditto.
1059         * include/cpplib.h (struct cpp_callbacks): Add used callback.
1061 2009-11-11  Kai Tietz  <kai.tietz@onevision.com>
1063         * directives.c (do_pragma_push_macro): New pragma handler.
1064         (do_pragma_pop_macro): Likewise.
1065         (_cpp_init_internal_pragmas): Add push_macro and
1066         pop_macro handler to internal pragmas.
1067         (lex_macro_node_from_str): Removed.
1068         (cpp_push_definition): Replace lex_macro_node_from_str
1069         by _cpp_lex_identifier.
1070         (cpp_pop_definition): Likewise.
1071         * internal.h (_cpp_lex_identifier): New prototype.
1072         (def_pragma_macro): New structure.
1073         (cpp_reader): New member pushed_macros.
1074         * lex.c (_cpp_lex_identifier): New function.
1075         (lex_identifier_intern): New function.
1076         * init.c (cpp_create_reader): Initialize pushed_macros
1077         member.
1078         (cpp_destroy): Free elements in pushed_macros member.
1079         * pch.c (_cpp_save_pushed_macros): New function.
1080         (_cpp_restore_pushed_macros): Likewise.
1081         (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
1082         (cpp_read_state): Use _cpp_restore_pushed_macros.
1084 2009-10-19  Jakub Jelinek  <jakub@redhat.com>
1086         * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
1087         (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
1088         and char32_cset_desc.
1089         (converter_for_type): Handle CPP_UTF8STRING.
1090         (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
1091         * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
1092         (parse_include): Reject raw strings.
1093         * include/cpplib.h (CPP_UTF8STRING): New token type.
1094         * internal.h (struct cpp_reader): Add utf8_cset_desc field.
1095         * lex.c (lex_raw_string): New function.
1096         (lex_string): Handle u8 string literals, call lex_raw_string
1097         for raw string literals.
1098         (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
1099         sequences.
1100         * macro.c (stringify_arg): Handle CPP_UTF8STRING.
1102 2009-10-14  Jakub Jelinek  <jakub@redhat.com>
1104         PR preprocessor/41543
1105         * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
1106         * line-map.c (linemap_init): Initialize highest_location and
1107         highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
1109 2009-10-09  Jason Merrill  <jason@redhat.com>
1111         * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
1113 2009-10-09  Neil Vachharajani <nvachhar@google.com>
1115         * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
1116         sccs.
1118 2009-09-23  Loren J. Rittle  <ljrittle@acm.org>
1120         * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
1121         * configure: Rebuilt.
1123 2009-09-22  Richard Guenther  <rguenther@suse.de>
1125         PR pch/38987
1126         * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
1128 2009-09-18  Chris Demetriou  <cgd@google.com>
1130         PR preprocessor/28435:
1131         * include/cpplib.h (struct cpp_options): Add new member
1132         deps.need_preprocessor_output.
1133         * files.c (open_file_failed): If preprocessor output is needed
1134         always report an error.
1136 2009-09-13  Kai Tietz  <kai.tietz@onevision.com>
1138         * configure.ac: Set for i?86-w64-mingw*
1139         need_64bit_hwint to yes.
1140         * configure: Regenerated.
1142 2009-09-10  Jason Merrill  <jason@redhat.com>
1144         * directives.c (cpp_define): constify.
1146 2009-09-02  Ian Lance Taylor  <iant@google.com>
1148         * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
1150 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1152         * configure.ac (AC_PREREQ): Bump to 2.64.
1154 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1156         * aclocal.m4: Regenerate.
1157         * config.in: Regenerate.
1158         * configure: Regenerate.
1160 2009-08-17  Tom Tromey  <tromey@redhat.com>
1162         PR preprocessor/41067:
1163         * charset.c (convert_escape): Add missing ":" to error text.
1165 2009-07-27  Douglas B Rupp  <rupp@gnat.com>
1167         * include/cpplib.h (INO_T_CPP): New macro.
1168         (struct cpp_dir): Use it.
1170 2009-07-20  Jerry Quinn  <jlquinn@optonline.net>
1172         PR regression/40800
1173         * configure.ac: Use = instead of == for testing
1174         ENABLE_BUILD_WITH_CXX.
1175         * configure: Rebuild.
1177 2009-07-17  Jerry Quinn  <jlquinn@optonline.net>
1179         * directives.c (do_linemarker, do_line): Use CPP_STRING for
1180         ignored enum value.
1181         * files.c (find_file_in_dir): Add cast from void* to char*.
1182         * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
1183         * Makefile.in: (WARN_CFLAGS): Use general and C-specific
1184         warnings.
1185         (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
1186         ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
1187         COMPILER_FLAGS): New.
1188         (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
1189         (COMPILE.base): Use COMPILER instead of CC.  Use COMPILER_FLAGS
1190         instead of ALL_CFLAGS.
1191         * configure.ac: Invoke AC_PROG_CXX.  Separate C-specific warnings
1192         from other warnings.  Add -Wc++-compat to C-specific warnings.
1193         Check for --enable-build-with-cxx.  Set and substitute
1194         ENABLE_BUILD_WITH_CXX.  Invoke ZW_PROG_COMPILER_DEPENDENCIES
1195         according to ENABLE_BUILD_WITH_CXX.  Invoke AC_LANG before
1196         AC_CHECK_HEADERS.
1197         * configure: Rebuild.
1198         * include/cpp-id-data.h: Remove extern "C".
1199         * include/line-map.h: Likewise.
1200         * include/mkdeps.h: Likewise.
1201         * include/symtab.h: Likewise.
1202         * internal.h: Likewise.
1204 2009-06-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1206         * directives.c (parse_include): Add location argument. Update all
1207         calls.
1208         (parse_answer): Likewise.
1209         (do_include_common): Error with exact location.
1210         (parse_assertion): Likewise.
1212 2009-06-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1214         * expr.c (num_div_op): Take explicit location.
1216 2009-06-17  Ian Lance Taylor  <iant@google.com>
1218         * include/cpplib.h (progname): Don't declare.
1220 2009-06-12  Ian Lance Taylor  <iant@google.com>
1222         * include/cpplib.h (struct cpp_options): Add
1223         warn_cxx_operator_names field.
1224         (NODE_WARN_OPERATOR): Define.
1225         (struct cpp_hashnode): Increase flags field to 10 bits, decrease
1226         type to 6 bits.
1227         * init.c (mark_named_operators): Add flags parameter.
1228         (cpp_post_options): Pick flags value to pass to
1229         mark_named_operators.
1230         * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
1231         identifier is an operator name in C++.
1233 2009-06-01  Aldy Hernandez  <aldyh@redhat.com>
1235         * include/line-map.h (LAST_SOURCE_COLUMN): New.
1237 2009-06-01  Ian Lance Taylor  <iant@google.com>
1239         * include/cpp-id-data.h: Add extern "C".
1240         * include/line-map.h: Likewise.
1241         * include/mkdeps.h: Likewise.
1242         * include/symtab.h: Likewise.
1243         * internal.h: Likewise.
1245 2009-05-15  Ian Lance Taylor  <iant@google.com>
1247         * include/cpplib.h (enum cpp_builtin_type): Rename from enum
1248         builtin_type.  Change all uses.
1250 2009-05-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1252         PR cpp/36674
1253         * directives (do_linemarker): Compensate for the increment in
1254         location that occurs when we reach the end of line.
1255         * files (_cpp_stack_include): Mention _cpp_find_file in the
1256         comment.
1258 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
1260         * include/cpplib.h (enum cpp_token_fld_kind): Add
1261         CPP_TOKEN_FLD_TOKEN_NO.
1262         (struct cpp_macro_arg, struct cpp_identifier): Define.
1263         (union cpp_token_u): Use struct cpp_identifier for identifiers.
1264         Use struct cpp_macro_arg for macro arguments.  Add token_no for
1265         CPP_PASTE token numbers.
1266         * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
1267         do_pragma_poison, parse_assertion): Use val.node.node in place of
1268         val.node.
1269         * expr.c (parse_defined, eval_token): Use val.node.node in place
1270         of val.node.
1271         * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
1272         cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
1273         cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
1274         place of val.arg_no.  Use val.node.node in place of val.node.
1275         * macro.c (replace_args, cpp_get_token, parse_params,
1276         lex_expansion_token, create_iso_definition, cpp_macro_definition):
1277         Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
1278         Use val.node.node in place of val.node.
1280 2009-05-03  Joseph Myers  <joseph@codesourcery.com>
1282         * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
1283         UTF-8 sequences.
1285 2009-04-25  Joseph Myers  <joseph@codesourcery.com>
1287         PR preprocessor/39559
1288         * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
1289         constants larger than intmax_t in C99 mode.
1291 2009-04-21  Taras Glek <tglek@mozilla.com>
1293         * include/cpp-id-data.h: Update GTY annotations to new syntax.
1294         * include/cpplib.h: Likewise.
1295         * include/line-map.h: Likewise.
1296         * include/symtab.h: Likewise.
1298 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1300         PR c++/14875
1301         * lex.c (cpp_type2name): Take a flags parameter. Call
1302         cpp_named_operator2name for named operators and cpp_digraph2name
1303         for digraphs.
1304         (cpp_digraph2name): New.
1305         (cpp_spell_token): Use it.
1306         (cpp_output_token): Likewise.
1307         * include/cpplib.h (cpp_type2name): Update declaration.
1308         * init.c (cpp_named_operator2name): New.
1309         * internal.h (cpp_named_operator2name): Declare.
1311 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1313         PR c++/13358
1314         * init.c (cpp_create_reader): Wlong_long is disabled by default.
1315         * expr.c (cpp_classify_number): Give different messages for C and
1316         C++ front-ends.
1318 2009-04-19  Joseph Myers  <joseph@codesourcery.com>
1320         PR preprocessor/20078
1321         * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
1322         field.
1323         * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
1324         (struct cpp_token): Change flags to unsigned short.
1325         * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
1326         (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
1327         (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
1328         tokens.
1329         * macro.c (macro_real_token_count): New.
1330         (enter_macro_context, replace_args): Use macro_real_token_count.
1331         (create_iso_definition): Record whitespace surrounding and digraph
1332         spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
1333         Set extra_tokens and save CPP_PASTE tokens with arg_no set for
1334         multiple consecutive ## tokens.
1335         (_cpp_create_definition): Initialize extra_tokens.
1336         (cpp_macro_definition): Use macro_real_token_count.
1338 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1340         * directives.c (parse_include): Pass true to check_eol.
1342 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1344         PR preprocessor/39646
1345         * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
1346         * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
1347         * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
1348         place of LC_RENAME.
1350 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1352         PR preprocessor/39647
1353         * directives.c (check_eol): Add parameter expand.
1354         (do_undef, parse_include, do_line, do_linemarker, do_ident,
1355         do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
1356         do_else, do_endif, do_assert, do_unassert): All callers changed.
1357         Pass true from do_line, false elsewhere.
1359 2009-04-12  Joseph Myers  <joseph@codesourcery.com>
1361         PR preprocessor/31869
1362         * macro.c (stringify_arg): Handle NULL source token in padding
1363         token where previous padding token did not have source token with
1364         preceding whitespace.
1366 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
1368         * Makefile.in: Change copyright header to refer to version
1369         3 of the GNU General Public License and to point readers at the
1370         COPYING3 file and the FSF's license web page.
1371         * charset.c: Likewise.
1372         * directives-only.c: Likewise.
1373         * directives.c: Likewise.
1374         * errors.c: Likewise.
1375         * expr.c: Likewise.
1376         * files.c: Likewise.
1377         * identifiers.c: Likewise.
1378         * include/cpp-id-data.h: Likewise.
1379         * include/cpplib.h: Likewise.
1380         * include/line-map.h: Likewise.
1381         * include/mkdeps.h: Likewise.
1382         * include/symtab.h: Likewise.
1383         * init.c: Likewise.
1384         * internal.h: Likewise.
1385         * lex.c: Likewise.
1386         * line-map.c: Likewise.
1387         * macro.c: Likewise.
1388         * makeucnid.c: Likewise.
1389         * mkdeps.c: Likewise.
1390         * pch.c: Likewise.
1391         * symtab.c: Likewise.
1392         * system.h: Likewise.
1393         * traditional.c: Likewise.
1394         * ucnid.tab: Likewise.
1395         * ucnid.h: Regenerate.
1397 2009-04-01  Janis Johnson  <janis187@us.ibm.com>
1399         PR c/39027
1400         * include/cpplib.h (CPP_N_DEFAULT): Define.
1401         * expr.c (interpret_float_suffix): Recognize d or D for double,
1402         return new value for default.
1403         (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
1405         PR c/33466
1406         * expr.c (interpret_float_suffix): Reject invalid suffix that uses
1407         letters from decimal float and fixed-point suffixes.
1409 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
1411         PR preprocessor/15638
1412         * files.c (_cpp_find_file): Call open_file_failed after diagnosing
1413         invalid PCH.
1414         (open_file_failed): Make error for missing file fatal.
1415         * include/cpplib.h (CPP_DL_FATAL): Define.
1417 2009-03-30  Sergiy Vyshnevetskiy  <serg@vostok.net>
1419         PR preprocessor/31932:
1420         * internal.h: Don't mention HAVE_ICONV_H.
1421         * configure, config.in: Rebuild.
1422         * configure.ac: Don't check for iconv.h.
1424 2009-03-30  Tom Tromey  <tromey@redhat.com>
1426         PR preprocessor/39512:
1427         * line-map.c (linemap_init): Initialize 'reallocator' field.
1429 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
1431         PR target/39558
1432         * macro.c (cpp_get_token): If macro_to_expand returns NULL
1433         and used some tokens, add CPP_PADDING before next token.
1435 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
1437         PR preprocessor/34695
1438         * makedepend.c: Remove.
1439         * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
1440         (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
1441         * directives.c (cpp_errors): Remove.
1442         * errors.c (print_location, _cpp_begin_message, v_message):
1443         Remove.
1444         (cpp_error, cpp_error_with_line): Always use error callback.
1445         (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
1446         * include/cpplib.h (cpp_options): Remove pedantic_errors,
1447         inhibit_warnings, warn_system_headers, inhibit_errors,
1448         warnings_are_errors, client_diagnostic.
1449         (cpp_callbacks): Add extra arguments to error callback; make it
1450         return bool.
1451         (cpp_finish): Return void.
1452         (cpp_destroy): Remove inaccurate comment about return value.
1453         (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
1454         (CPP_DL_NOTE): Define.
1455         * include/line-map.h (linemap_print_containing_files): Remove.
1456         * init.c (cpp_finish): Do not check for or return number of
1457         errors.
1458         * internal.h (cpp_reader): Remove errors field.
1459         * line-map.c (linemap_print_containing_files): Remove.
1460         * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
1461         about previous definition.  Only emit it if previous diagnostic
1462         was emitted.
1464 2009-03-28  Joseph Myers  <joseph@codesourcery.com>
1466         * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1467         mkinstalldirs.
1469 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
1471         * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1473 2009-02-21  Joseph Myers  <joseph@codesourcery.com>
1475         * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1476         header name.
1477         (_cpp_lex_direct): Handle this.
1479 2009-02-15  Richard Guenther  <rguenther@suse.de>
1481         Revert last change.
1483 2009-02-13  Richard Guenther  <rguenther@suse.de>
1485         * configure.ac: Enable LFS.
1486         * configure: Re-generate.
1487         * config.in: Likewise.
1489 2009-01-05  Ben Elliston  <bje@au.ibm.com>
1491         * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1492         (.po.pox): Likewise.
1493         (po/$(PACKAGE).pot): Likewise.
1495 2008-12-10  Alexandre Oliva  <aoliva@redhat.com>
1497         PR target/37033
1498         * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1499         Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1501 2008-11-29  Joseph Myers  <joseph@codesourcery.com>
1503         * lex.c (cpp_token_len): Use 6 as default length.
1505 2008-10-31  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1507         * expr.c (struct op): Add location.
1508         (_cpp_parse_expr): Propagate locations throught the stack
1509         of expressions.
1510         (reduce): Likewise.
1511         (check_promotion): Use explicit location in errors.
1513 2008-10-05  Matthew Gingell  <gingell@adacore.com>
1514             Arnaud Charlet  <charlet@adacore.com>
1516         * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1517         (cpp_get_comments): New function.
1518         * internal.h (struct cpp_reader): Add comments field.
1519         * init.c (cpp_destroy): Free comments.
1520         * lex.c (store_comment, cpp_get_comments): New functions.
1521         (comments): New struct.
1522         (save_comment): Store comments in comments struct.
1524 2008-09-18  Simon Baldwin  <simonb@google.com>
1526         * include/cpplib.h (struct cpp_options): Add new boolean flag
1527         warn_builtin_macro_redefined.
1528         * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1529         * (struct builtin_operator): Split out from previous struct builtin,
1530         enhance extra const correctness.
1531         * (struct builtin_macro): Split out from previous struct builtin, add
1532         new always_warn_if_redefined flag, enhance const correctness.
1533         * (mark_named_operators): Use struct builtin_operator.
1534         * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1535         to builtins selectively.
1536         * macro.c (warn_of_redefinition): Return false if a builtin macro
1537         is not flagged with NODE_WARN.
1539 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
1541         PR preprocessor/36649
1542         * files.c (struct report_missing_guard_data): New type.
1543         (report_missing_guard): Put paths into an array instead of printing
1544         them right away.  Return 1 rather than 0.
1545         (report_missing_guard_cmp): New function.
1546         (_cpp_report_missing_guards): Sort and print paths gathered by
1547         report_missing_guard callback.
1549 2008-07-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1551         PR 28079
1552         * directives.c (strtolinenum): Handle overflow.
1553         (do_line): Give a warning if line number overflowed.
1554         (do_linemarker): Update call to strtolinenum.
1556 2008-07-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1558         * include/line-map.h (linenum_type): New typedef.
1559         (struct line_map): Use it.
1560         (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1561         (SOURCE_COLUMN): Likewise.
1562         * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1563         source_location values in a variable of type linenum_type.
1564         * directives.c (struct if_stack): Use linenum_type.
1565         (strtoul_for_line): Rename as strtolinenum.
1566         (do_line): Use linenum_type.
1567         (do_linemarker): Use linenum_type and strtolinenum.
1568         (_cpp_do_file_change): Use linenum_t.
1569         * line-map.c (linemap_add): Likewise.
1570         (linemap_line_start): Likewise.
1571         * traditional.c (struct fun_macro): 'line' is a source_location.
1572         * errors.c (print_location): Use linenum_type.
1573         * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1574         * internal.h (CPP_INCREMENT_LINE): Likewise.
1575         * lex.c (_cpp_skip_block_comment): Use source_location.
1576         
1577 2008-07-14  Ben Elliston  <bje@au.ibm.com>
1579         * include/cpplib.h (NODE_CONDITIONAL): New.
1580         (struct cpp_callbacks): New macro_to_expand field.
1581         (struct cpp_hashnode): Adjust size of flags and type fields.
1582         (cpp_peek_token): Prototype.
1583         * lex.c (cpp_peek_token): New function.
1584         (_cpp_temp_token): Protect pre-existing lookaheads.
1585         * macro.c (cpp_get_token): Expand any conditional macros.
1586         (_cpp_backup_tokens_direct): New.
1587         (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1588         (warn_of_redefinition): Silently allow redefined conditional
1589         macros.
1590         (_cpp_create_definition): Remove the conditional flag when a user
1591         defines one of the conditional macros.
1592         * internal.h (_cpp_backup_tokens_direct): New prototype.
1594 2008-06-13  Andrew Haley  <aph@redhat.com>
1596         PR preprocessor/33305
1597         * macro.c (replace_args): Print a warning for empty macro
1598         arguments in C89 and C++.
1600 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1602         * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1603         * configure: Regenerate.
1605 2008-06-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1607         * Makefile.in (datarootdir): New variable.
1609 2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1611         PR preprocessor/36479
1612         * charset.c (cpp_interpret_string_notranslate): Also set
1613         narrow_cset_desc.width.
1615 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
1617         * configure.ac (parisc*64*-*-*): Remove.
1618         * configure: Regenerate.
1620 2008-05-30  Tom Tromey  <tromey@redhat.com>
1622         PR preprocessor/36320:
1623         * internal.h (_cpp_parse_expr): Update.
1624         * expr.c (_cpp_parse_expr): Add 'is_if' argument.  Update error
1625         messages.
1626         * directives.c (do_if): Update.
1627         (do_elif): Require expression if processing group.
1629 2008-05-30  Danny Smith  <dannysmith@users.sourceforge.net>
1631         * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1633 2008-05-21  Tom Tromey  <tromey@redhat.com>
1635         PR preprocessor/27777:
1636         * lex.c (cpp_output_line_to_string): New function.
1637         * internal.h (_cpp_begin_message): Don't declare.
1638         * errors.c (_cpp_begin_message): Now static.
1639         * include/cpplib.h (cpp_output_line_to_string): Declare.
1640         * directives.c (do_diagnostic): Rewrote.  Use
1641         cpp_output_line_to_string.  Don't use _cpp_begin_message.
1643 2008-05-21  Tom Tromey  <tromey@redhat.com>
1645         * include/symtab.h (HT_ALLOCED): Remove.
1646         (ht_purge): Declare.
1647         * symtab.c (DELETED): New define.
1648         (ht_lookup): Update comment.
1649         (ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
1650         code.  Use subobject allocator for strings, if it exists.
1651         (ht_expand): Handle deleted entries.
1652         (ht_forall): Likewise.
1653         (ht_purge): New function.
1654         (ht_dump_statistics): Print deletion statistics.
1656 2008-05-13  Tom Tromey  <tromey@redhat.com>
1658         PR preprocessor/22168:
1659         * include/cpplib.h (struct cpp_options) <objc>: Update
1660         documentation.
1661         * expr.c (eval_token): Warn for use of assertions.
1662         * directives.c (directive_diagnostics): Warn about extensions.
1663         (DEPRECATED): New define.
1664         (DIRECTIVE_TABLE): Use it.
1666 2008-05-06  Tom Tromey  <tromey@redhat.com>
1668         PR preprocessor/35313, PR preprocessor/36088:
1669         * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1670         (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1672 2008-05-04  David S. Miller  <davem@davemloft.net>
1674         * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1675         * configure: Regenerate.
1677 2008-04-22  Daniel Franke  <franke.daniel@gmail.com>
1679         * include/cpplib.h (cpp_define_formatted): New.
1680         * directives.c (cpp_define_formatted): New.
1682 2008-04-21  Tom Tromey  <tromey@redhat.com>
1684         PR libcpp/33415:
1685         * charset.c (_cpp_convert_input): Add buffer_start argument.
1686         Ignore UTF-8 BOM if seen.
1687         * internal.h (_cpp_convert_input): Add argument.
1688         * files.c (struct _cpp_file) <buffer_start>: New field.
1689         (destroy_cpp_file): Free buffer_start, not buffer.
1690         (_cpp_pop_file_buffer): Likewise.
1691         (read_file_guts): Update.
1693 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
1695         * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1696         * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1697         (struct cpp_options): Added uliterals.
1698         (cpp_interpret_string): Update prototype.
1699         (cpp_interpret_string_notranslate): Idem.
1700         * charset.c (init_iconv_desc): New width member in cset_converter.
1701         (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1702         (convert_ucn): Idem.
1703         (emit_numeric_escape): Idem.
1704         (convert_hex): Idem.
1705         (convert_oct): Idem.
1706         (convert_escape): Idem.
1707         (converter_for_type): New function.
1708         (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1709         (cpp_interpret_string_notranslate): Match changed prototype.
1710         (wide_str_to_charconst): Use converter_for_type.
1711         (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1712         * directives.c (linemarker_dir): Macro U changed to UC.
1713         (parse_include): Idem.
1714         (register_pragma_1): Idem.
1715         (restore_registered_pragmas): Idem.
1716         (get__Pragma_string): Support CPP_STRING{16,32}.
1717         * expr.c (eval_token): Support CPP_CHAR{16,32}.
1718         * init.c (struct lang_flags): Added uliterals.
1719         (lang_defaults): Idem.
1720         * internal.h (struct cset_converter) <width>: New field.
1721         (struct cpp_reader) <char16_cset_desc>: Idem.
1722         (struct cpp_reader) <char32_cset_desc>: Idem.
1723         * lex.c (digraph_spellings): Macro U changed to UC.
1724         (OP, TK): Idem.
1725         (lex_string): Add support for u'...', U'...', u"..." and U"...".
1726         (_cpp_lex_direct): Idem.
1727         * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1728         (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1730 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
1732         PR bootstrap/35457
1733         * aclocal.m4: Regenerate.
1734         * configure: Regenerate.
1736 2008-04-17  Tom Tromey  <tromey@redhat.com>
1738         PR libcpp/34866:
1739         * errors.c (cpp_error): Don't reference a token before the start
1740         of the current run.
1742 2008-04-16  Tom Tromey  <tromey@redhat.com>
1744         * Makefile.in (TAGS_SOURCES): New variable.
1745         (TAGS): New target.
1747 2008-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
1749         * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1750         and shbe-*-*.
1751         * configure: Rebuilt.
1753 2008-04-02  Joseph Myers  <joseph@codesourcery.com>
1755         * include/cpplib.h (struct cpp_callbacks): Add used_define,
1756         used_undef and before_define.
1757         (NODE_USED): Define.
1758         * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1759         do_ifndef, cpp_pop_definition): Handle new flag and use new
1760         callbacks.
1761         * expr.c (parse_defined): Handle new flag and use new callbacks.
1762         * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1763         flag and use new callbacks.
1765 2008-04-01  Jakub Jelinek  <jakub@redhat.com>
1767         PR pch/13675
1768         * files.c (struct _cpp_file): Remove pch field.
1769         (pch_open_file): Don't set file->pch, just file->pchname.
1770         (should_stack_file): After pfile->cb.read_pch call
1771         free pchname and clear pchname, don't close file->fd.
1772         Test file->pchname instead of file->pch.  Don't close fd after cb.
1773         (_cpp_stack_include): Test file->pchname instead of file->pch.
1775 2008-03-28  Tom Tromey  <tromey@redhat.com>
1777         * Makefile.in (POSTCOMPILE): New variable.
1778         (.c.o): Use it.
1780 2008-03-13  Tom Tromey  <tromey@redhat.com>
1782         PR libcpp/35322:
1783         * directives.c (destringize_and_run): Set pfile->directive.
1785 2008-03-06  Markus Milleder  <markus.milleder@generali.at>
1787         PR preprocessor/35458
1788         * mkdeps.c (munge): Quote '#' with a '\'.
1790 2008-02-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1792         PR preprocessor/35379
1793         * mkdeps.c (deps_write): Ensure the first target always appears
1794         in the first column, without leading backslash newline.  Avoid
1795         some more extra whitespace.
1797 2008-02-25  Thiemo Seufer <ths@mips.com>
1799         * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
1801 2008-02-19  Tom Tromey  <tromey@redhat.com>
1803         * traditional.c (lex_identifier): Use CPP_HASHNODE.
1804         * lex.c (lex_identifier): Use CPP_HASHNODE.
1805         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
1806         do-while.
1807         * identifiers.c (alloc_node): Change return type.
1808         (_cpp_init_hashtable): Don't cast 'alloc_node'.
1809         (proxy_assertion_broken): New declaration.
1810         (cpp_forall_identifiers): Move comment.
1811         * line-map.c (linemap_add): Comment fix.
1812         (linemap_line_start): Indentation fix.
1814 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
1816         PR preprocessor/34692
1817         * macro.c (collect_args): Add pragma_buff argument.  Push
1818         CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1819         than into arguments.  Reset prevent_expansion and parsing_args
1820         state at CPP_PRAGMA_EOL/CPP_EOF.
1821         (funlike_invocation_p): Add pragma_buff argument, pass it through
1822         to collect_args.
1823         (enter_macro_context): Add result argument.  Adjust
1824         funlike_invocation_p caller.  Emit all deferred pragma tokens
1825         gathered during collect_args before the expansion, add a padding
1826         token.  Return 2 instead of 1 if any pragma tokens were prepended.
1827         (cpp_get_token): If enter_macro_context returns 2, don't return
1828         a padding token, instead cycle to grab CPP_PRAGMA token.
1829         * directives.c (_cpp_handle_directive): If was_parsing_args
1830         in deferred pragma, leave parsing_args and prevent_expansion as is.
1832 2008-01-22  Tom Tromey  <tromey@redhat.com>
1834         PR c++/34859
1835         * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1836         __STDC_CONSTANT_MACROS.
1838 2008-01-07  Fred Fish  <fnf@specifix.com>
1840         PR preprocessor/30363
1841         * traditional.c (replace_args_and_push): Add local variable
1842         cxtquote, calculate the replacement text size assuming a 
1843         worst case of every input character quoted with backslash,
1844         and properly handle output quoting of quote characters in
1845         actual arguments used in function-like macros.
1847 2008-01-03  Tom Tromey  <tromey@redhat.com>
1849         PR preprocessor/34602
1850         * directives.c (do_line): Don't try to spell EOF token.
1851         (do_linemarker): Add comment.
1853 2007-12-11  DJ Delorie  <dj@redhat.com>
1855         * charset.c (convert_using_iconv): Close out any shift states,
1856         returning to the initial state.
1858 2007-12-06  Tom Tromey  <tromey@redhat.com>
1860         PR c/29172
1861         * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1862         type.
1863         <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1864         * files.c (FILE_HASH_POOL_SIZE): New macro.
1865         (struct file_hash_entry_pool): New.
1866         (destroy_all_cpp_files): New function.
1867         (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1868         (new_file_hash_entry): Update.
1869         (free_file_hash_entries): New function.
1870         (_cpp_cleanup_files): Call free_file_hash_entries and
1871         destroy_all_cpp_files.
1872         (cpp_clear_file_cache): New function.
1873         * include/cpplib.h (cpp_clear_file_cache): Declare.
1875 2007-12-03  Tom Tromey  <tromey@redhat.com>
1877         PR preprocessor/34288
1878         * configure.ac, config.in: Rebuilt.
1879         * configure.ac: Check for ssize_t.
1881 2007-11-30  Tom Tromey  <tromey@redhat.com>
1883         PR preprocessor/32868
1884         * macro.c (_cpp_create_definition): Special case
1885         __STDC_FORMAT_MACROS.
1887 2007-11-16  Michael Matz  <matz@suse.de>
1889         * files.c (search_path_head): Fix check for absolute paths.
1891 2007-11-11  Tom Tromey  <tromey@redhat.com>
1893         PR c++/17557
1894         * include/cpplib.h (cpp_included_before): Declare.
1895         * files.c (struct file_hash_entry) <location>: New field.
1896         (_cpp_find_file): Initialize new field.
1897         (make_cpp_dir): Likewise.
1898         (cpp_included_before): New function.
1900 2007-11-01  Tom Tromey  <tromey@redhat.com>
1902         PR preprocessor/30805
1903         * macro.c (paste_tokens): Handle padding token.
1904         (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1906 2007-10-31  Tom Tromey  <tromey@redhat.com>
1908         PR preprocessor/30786
1909         * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1910         * directives.c (_cpp_do__Pragma): Return error status.
1911         * internal.h (_cpp_do__Pragma): Update.
1912         * directives.c (get__Pragma_string): Back up if EOF seen.
1914 2007-09-06  Tom Tromey  <tromey@redhat.com>
1916         * internal.h (struct cpp_reader) <invocation_location>: New
1917         field.
1918         (struct cpp_reader) <set_invocation_location>: Likewise.
1919         * init.c (cpp_set_line_map): New function.
1920         * line-map.c (linemap_add): Use linemap's allocator.
1921         * include/line-map.h (GTY): Define.
1922         (line_map_realloc): New typedef.
1923         (struct line_map): Mark with GTY.
1924         (struct line_maps): Likewise.
1925         (struct line_maps) <maps>: Likewise.
1926         (struct line_maps) <reallocator>: New field.
1927         * include/symtab.h (GTY): Conditionally define.
1928         * include/cpplib.h (cpp_set_line_map): Declare.
1929         (cpp_get_token_with_location): Declare.
1930         * macro.c (cpp_get_token): Set invocation_location on the reader.
1931         (cpp_get_token_with_location): New function.
1933 2007-08-30  Chao-ying Fu  <fu@mips.com>
1935         * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1936         ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1937         (cpp_classify_number): Support decimal fixed-point constants without
1938         exponents.
1939         Warn about fixed-point constants when -pedantic.
1940         * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1941         comments to support fixed-point values.
1942         (CPP_N_FRACT, CPP_N_ACCUM): Define.
1944 2007-08-18  Tom Tromey  <tromey@redhat.com>
1946         PR preprocessor/32974
1947         * directives.c (parse_include): Don't check for EOL when
1948         processing #pragma dependency.
1950 2007-07-30  Ollie Wild  <aaw@google.com>
1952         * directives-only.c: New file.
1953         * internal.h (struct _cpp_dir_only_callbacks): New.
1954         (_cpp_preprocess_dir_only): New function.
1955         * directives.c (_cpp_handle_directive): Check directives_only before
1956         disabling execution of indented directives.
1957         * files.c (_cpp_stack_file): Add directives_only check.
1958         * include/cpplib.h (struct cpp_options): Add directives_only.
1959         (cpp_init_special_builtins): New function.
1960         * init.c (cpp_init_special_builtins): New function.
1961         (cpp_init_builtins): Move builtin_array initialization to
1962         cpp_init_special_builtins.
1963         (post_options): Check directives_only before setting
1964         pfile->state.prevent_expansion = 1.
1965         * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1966         is expanded inside a directive while -fdirectives-only is enabled.
1967         * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1968         (libcpp_a_SOURCES): Add directives-only.c.
1970 2007-07-04  Uros Bizjak  <ubizjak@gmail.com>
1972         * traditional.c (_cpp_scan_out_logical_line): Initialize
1973         fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1974         fmacro.args to prevent 'may be used uninitialized' warning.
1976 2007-07-03  Uros Bizjak  <ubizjak@gmail.com>
1978         * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1979         Add new constants.
1980         * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1981         suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1982         for 'q' or 'Q' suffixes.
1984 2007-06-17  Danny Smith  <dannysmith@users.sourceforge.net
1986         * files.c (open_file): Correct typo.
1988 2007-06-16  Vladimir Prus  <vladimir@codesourcery.com>
1990         * files.c (open_file): Prevent the call
1991         for stat from overwriting errno.
1993 2007-06-09  Vladimir Prus  <vladimir@codesourcery.com>
1995         * files.c (open_file): Account for the
1996         fact that on windows, opening a directory gives
1997         EACCES.
1999 2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
2001         PR preprocessor/23479
2002         * expr.c (cpp_classify_number): Implement 0b-prefixed binary
2003         integer constants.
2004         (append_digit): Likewise.
2005         * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
2006         binary integer constants.
2008 2007-05-31  Dave Korn  <dave.korn@artimi.com>
2010         PR preprocessor/14331
2011         * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
2013 2007-05-24  Ollie Wild  <aaw@google.com>
2015         * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
2016         * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
2017         (cpp_write_pch_state): Save __COUNTER__ state.
2018         (cpp_valid_state): Check valid __COUNTER__ state.
2019         (cpp_read_state): Read new __COUNTER__ state.
2020         * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
2021         * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
2022         * internal.h (struct cpp_reader): Add counter member.
2024 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
2026         PR preprocessor/20077
2027         * macro.c (create_iso_definition): Fixed the method to determine
2028         whether the token-pasting operator appears at the beginning or the end
2029         of a macro.
2031 2007-05-21  Ian Lance Taylor  <iant@google.com>
2033         * internal.h (struct cpp_reader): Add new fields:
2034         nonexistent_file_hash and nonexistent_file_ob.
2035         * files.c: Include "obstack.h".
2036         (find_file_in_dir): Before trying to open the file, look up the
2037         path name in the hash table of nonexistent files.  After failing
2038         to open the file, add the path name to the hash table.
2039         (_cpp_find_file): Cache the results of looking up the file name
2040         starting with the quote and bracket chain heads, if we can.
2041         (nonexistent_file_hash_eq): New static function.
2042         (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
2043         pfile->nonexistent_file_ob.
2044         (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
2045         pfile->nonexistent_file_ob.
2047 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
2049         * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
2051         PR c/31924
2052         * expr.c (interpret_float_suffix): Check for invalid suffix.
2054 2007-05-02  Eric Christopher  <echristo@apple.com>
2056         * expr.c (num_div_op): Don't overflow if the result is
2057         zero.
2059 2007-05-02  Tom Tromey  <tromey@redhat.com>
2061         PR preprocessor/28709
2062         * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
2064 2007-03-30  Michael Meissner  <michael.meissner@amd.com>
2066         * directives.c (lex_macro_node_from_str): Fix alloca call to be
2067         type correct.
2069 2007-03-30  Richard Henderson  <rth@redhat.com>
2071         * directives.c (lex_macro_node_from_str): New.
2072         (cpp_push_definition, cpp_pop_definition): New.
2073         * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
2075 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2077         * Makefile.in: Add dummy install-pdf target.
2079 2007-01-30  Tom Tromey  <tromey@redhat.com>
2081         PR preprocessor/30468
2082         * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
2083         './'.
2085 2007-01-30  Tom Tromey  <tromey@redhat.com>
2087         PR preprocessor/29966
2088         * macro.c (lex_expansion_token): Save and restore cpp_reader's
2089         cur_token.
2090         (_cpp_create_definition): Don't restore cur_token here.
2091         * lex.c (_cpp_lex_token): Added assertion.
2093 2007-01-27  Tom Tromey  <tromey@redhat.com>
2095         * configure: Rebuilt.
2097 2007-01-12  Tom Tromey  <tromey@redhat.com>
2099         PR preprocessor/28227
2100         * directives.c (lex_macro_node): Added 'is_def_or_undef'
2101         argument.
2102         (do_define): Update.
2103         (do_undef): Update.
2104         (do_ifdef): Update.
2105         (do_ifndef): Update.
2107 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
2109         * configure: Regenerate.
2111 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
2113         * configure: Regenerate.
2115 2007-01-04  Tom Tromey  <tromey@redhat.com>
2117         PR preprocessor/28165
2118         * internal.h (cpp_in_primary_file): New function.
2119         * directives.c (do_include_next): Use cpp_in_primary_file.
2120         (do_pragma_once): Likewise.
2121         (do_pragma_system_header): Likewise.
2123 2006-12-29  Ian Lance Taylor  <iant@google.com>
2125         * lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
2126         look backward at the end of the line unless we saw a backslash.
2128 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
2130         PR preprocessor/29612
2131         * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
2132         only when new_sysp is non-zero.
2134 2006-12-28  Tom Tromey  <tromey@redhat.com>
2136         PR preprocessor/30001
2137         * charset.c (_cpp_convert_input): Check that to.len is greater
2138         than zero.
2140 2006-11-20  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
2142         * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
2143         * configure: Rebuilt.
2145 2006-11-01      Douglas Gregor <doug.gregor@gmail.com>
2147         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
2148         for experimental C++0x mode.
2149         * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
2150         adopted the preprocessor changes introduced in C99.
2152 2006-10-29  Joseph Myers  <joseph@codesourcery.com>
2154         * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
2155         depending on --enable-targets=all.
2156         * configure: Regenerate.
2158 2006-10-12  Jakub Jelinek  <jakub@redhat.com>
2160         PR preprocessor/28709
2161         * macro.c (paste_tokens): Do error reporting here, use BUF with the
2162         spelled LHS token as opposed to spelling it again.
2163         (paste_all_tokens): Don't report errors here, just break on failure.
2165 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2167         * Makefile.in: Added empty "pdf" target.
2169 2006-09-22  Geoffrey Keating  <geoffk@apple.com>
2171         * configure.ac: Make need_64_bit_hwint case for x86-darwin
2172         match exactly the glob in gcc/config.gcc.
2173         * configure: Regenerate.
2175 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
2177         PR c/28768
2178         PR preprocessor/14634
2179         * lex.c (lex_string): Pedwarn for unterminated literals.
2181 2006-09-08  Eric Christopher  <echristo@apple.com>
2183         * configure.ac: Add 64-bit HWI support for i?86-darwin.
2185 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
2187         PR c++/28288
2188         PR c++/14556
2189         * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
2190         (CPP_LAST_EQ): Change.
2191         (CPP_LAST_PUNCTUATOR): Change.
2192         * expr.c (cpp_operator): Remove MIN and MAX.
2193         (reduce): Remove CPP_MIN and CPP_MAX.
2194         (num_binary_op): Ditto.
2195         * lex.c (_cpp_lex_direct): Ditto.
2196         (cpp_avoid_paste): Remove ? as legal symbol after > or <.
2198 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
2200         PR preprocessor/27746
2201         * directives.c (do_pragma): Handle pragma with valid namespace
2202         and invalid name coming from macro expansion.
2203         * directives.c (destringize_and_run): Initialize next field in
2204         context.
2206         PR c/27747
2207         PR c++/27748
2208         * directives.c (destringize_and_run): Set NO_EXPAND on the
2209         tokens.
2211         * macro.c (_cpp_backup_tokens): Fix comment typo.
2213 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
2215         * Makefile.in (CATALOGS): Add po/ prefix.
2216         * configure: Regenerated.
2218 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
2220         * Makefile.in: Add install-html target. Add install-html to .PHONY
2222 2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
2224         * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
2225         * files.c (_cpp_get_file_stat): New function.
2226         * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
2227         * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
2228         * internal.h (_cpp_get_file_stat): Prototype.
2229         (struct cpp_buffer): Add timestamp.
2231 2006-01-23  Jakub Jelinek  <jakub@redhat.com>
2233         PR preprocessor/25717
2234         * init.c (cpp_init_builtins): If __STDC__ will not change value
2235         between system headers and other sources, define it as a normal
2236         macro rather than a builtin.
2237         * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
2238         cpp_in_system_header condition.
2240 2006-01-05  Paolo Bonzini  <bonzini@gnu.org>
2242         * Makefile.in: Use -MMD instead of -MD.
2244 2006-01-04  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2245             Richard Henderson  <rth@redhat.com>
2247         Merge from gomp branch:
2248         * directives.c (struct pragma_entry): Add is_deferred.  Add ident
2249         entry to value union.
2250         (end_directive): Don't eat the line if in_deferred_pragma.
2251         (run_directive): Remove pragma hacks.
2252         (insert_pragma_entry): Remove.
2253         (new_pragma_entry): New.
2254         (register_pragma_1): Split out of register_pragma.  Only handle
2255         the lookup tree and return the new entry.
2256         (cpp_register_pragma): Fill in the pragma entry here.
2257         (cpp_register_deferred_pragma): New.
2258         (register_pragma_internal): New.
2259         (_cpp_init_internal_pragmas): Use register_pragma_internal.
2260         (do_pragma): Allow pragma expansion after namespace.  For deferred
2261         pragmas, don't slurp the line into a string.
2262         (destringize_and_run): Save tokens for deferred pragmas.
2263         (cpp_handle_deferred_pragma): Remove.
2264         * macro.c (builtin_macro): Remove pragma token hack.
2265         (_cpp_push_token_context): Rename from push_token_context and export.
2266         * internal.h (struct lexer_state): Add pragma_allow_expansion.
2267         (_cpp_push_token_context): Declare.
2268         * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
2269         a token.  Update the line number correctly if so.
2270         (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
2271         (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
2272         * include/cpplib.h (PRAGMA_EOL): New.
2273         (CPP_TOKEN_FLD_PRAGMA): New.
2274         (struct cpp_token): Add val.pragma.
2275         (struct cpp_options): Remove defer_pragmas.
2276         (cpp_handle_deferred_pragma): Remove.
2277         (cpp_register_deferred_pragma): Declare.
2279 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
2281         PR c++/25294
2282         * directives.c (do_pragma): If pragma line ends with multi-line
2283         block comment, end the saved deferred pragma string before that
2284         comment.  Handle embedded '\0' chars on the pragma line.
2286 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2288         PR c++/23333
2289         * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
2291 2005-12-07  Jon Grimm  <jgrimm2@us.ibm.com>
2292             Ben Elliston  <bje@au.ibm.com>
2294         * include/cpplib.h (CPP_N_DFLOAT): New.
2295         * expr.c (interpret_float_suffix): Identify df, dd, and dl
2296         suffixes as decimal floating point constants.
2297         (cpp_classify_number): Disallow hexadecimal DFP constants.
2299 2005-11-14  Gerald Pfeifer  <gerald@pfeifer.com>
2300             Ian Lance Taylor  <ian@airs.com>
2302         * include/cpplib.h (struct cpp_callbacks): Annotate error with
2303         ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
2305 2005-11-09  Per Bothner  <per@bothner.com>
2306             Uros Bizjak  <uros@kss-loka.si>
2308         PR c/24101
2309         * init.c (read_original_filename): Temporarily set
2310         state.in_directive before calling _cpp_lex_direct for
2311         CPP_HASH tokens.
2313 2005-11-03  James E Wilson  <wilson@specifix.com>
2315         PR preprocessor/24202
2316         * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
2318 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
2320         * include/cpplib.h (struct cpp_callbacks): Make error take
2321         va_list* parameter.
2322         * errors.c (cpp_error): Update call to callback.
2324 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
2326         PR preprocessor/22042
2327         * macro.c (_cpp_builtin_macro_text): Lower the needed max
2328         buffer size.
2329         (cpp_quote_string): Don't octalify non printable
2330         charactors.
2332 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
2334         PR c++/17964
2335         * include/cpplib.h (struct cpp_options): Add client_diagnostic.
2336         (struct cpp_callbacks): Add error.
2337         * errors.c (cpp_error): If client_diagnostic, use error callback.
2338         * charset.c (convert_escape): Don't use %03o in diagnostic.
2340 2005-10-21  James E Wilson  <wilson@specifix.com>
2342         PR preprocessor/15220
2343         * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
2344         callers.  Pass to open_file_failed.
2345         (open_file_failed): New parameter angle_brackets.  Fix all callers.
2346         Use in print_dep assignment.
2347         * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
2348         * internal.h (_cpp_find_file): Add new parm to declaration.
2350 2005-10-08  Kazu Hirata  <kazu@codesourcery.com>
2352         * configure.ac: Require 64-bit int for arm*-*-*eabi*.
2353         * configure: Regenerate.
2355 2005-10-04  Ian Lance Taylor  <ian@airs.com>
2357         PR preprocessor/13726
2358         * directives.c (check_eol_return_comments): New static function.
2359         (parse_include): Add buf parameter.  Change all callers.
2360         (do_include_common): If not discard comments, turn on
2361         save_comments.  Pass collected comments to include callback.
2362         * include/cpplib.h (struct cpp_callbacks): Add new parameter to
2363         include callback: cpp_token list.
2365 2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
2367         * include/cpplib.h (struct cpp_options): Add extended_identifiers.
2368         * init.c (struct lang_flags, lang_defaults): Add
2369         extended_identifiers.
2370         (cpp_set_lang): Use it.
2371         * lex.c (forms_identifier_p): Check extended_identifiers.
2373 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
2375         PR preprocessor/20348
2376         PR preprocessor/20356
2377         * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
2378         2004-06-05 changes.
2380 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2382         * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
2383         -Wmissing-format-attribute.
2385         * configure: Regenerate.
2387 2005-06-29  Kelley Cook  <kcook@gcc.gnu.org>
2389         * all files: Update FSF address in copyright headers.
2390         * makeucnid.c (write_copyright): Update outputted FSF address.
2392 2005-06-13  Zack Weinberg  <zack@codesourcery.com>
2394         * configure.ac: Invoke ZW_CREATE_DEPDIR and
2395         ZW_PROG_COMPILER_DEPENDENCIES.
2396         * aclocal.m4, configure: Regenerate.
2397         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
2398         New variables.
2399         (distclean): Clean up $(DEPDIR) and its contents.
2400         (.c.o): Use $(COMPILE).
2401         Include $(DEPDIR)/*.Po for most object->header dependencies.
2403 2005-05-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2405         * configure.ac: Check declarations for asprintf and vasprintf.
2406         * config.in: Regenerate.
2407         * configure: Likewise.
2409         * charset.c (conversion_loop): Use XRESIZEVEC.
2410         (convert_no_conversion): Likewise.
2411         (convert_using_iconv): Likewise.
2412         (init_iconv_desc): Cast return value of alloca.
2413         (cpp_host_to_exec_charset): Use XNEWVEC.
2414         (emit_numeric_escape): Use XRESIZEVEC.
2415         (cpp_interpret_string): Use XNEWVEC.
2416         (cpp_interpret_string): Use XRESIZEVEC.
2417         (_cpp_interpret_identifier): Cast return value of alloca.
2418         (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
2419         * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
2420         (parse_include): Use XNEWVEC.
2421         (insert_pragma_entry): Rename local variable "new" to
2422         "new_entry".
2423         (save_registered_pragmas): Cast return value of xmemdup.
2424         (destringize_and_run): Same for alloca.
2425         (parse_assertion): Likewise.
2426         (do_assert): Cast allocated storage to proper type.
2427         (cpp_define): Likewise.
2428         (_cpp_define_builtin): Likewise.
2429         (cpp_undef): Likewise.
2430         (handle_assertion): Likewise.
2431         (cpp_push_buffer): Rename local variable "new" to "new_buffer".
2432         * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
2433         (CPP_UMINUS): Likewise.
2434         (struct cpp_operator): Rename from struct operator.
2435         (_cpp_expand_op_stack): Use XRESIZEVEC.
2436         * files.c (pch_open_file): Use XNEWVEC.
2437         (pch_open_file): Use XRESIZEVEC.
2438         (read_file_guts): Use XNEWVEC and XRESIZEVEC.
2439         (dir_name_of_file): Use XNEWVEC.
2440         (make_cpp_file): Use XCNEW.
2441         (make_cpp_dir): Likewise.
2442         (allocate_file_hash_entries): USE XNEWVEC.
2443         (cpp_included): Cast return value of htab_find_with_hash.
2444         (append_file_to_dir): Use XNEWVEC.
2445         (read_filename_string): Likewise. Use XRESIZEVEC too.
2446         (read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
2447         (remap_filename): Use XNEWVEC.
2448         (struct pchf_entry): Move definition out of struct pchf_data.
2449         (_cpp_save_file_entries): Use XCNEWVAR.
2450         (_cpp_read_file_entries): Use XNEWVAR.
2451         * identifiers.c (alloc_node): Use XOBNEW.
2452         * init.c (cpp_create_reader): Use XCNEW.
2453         (cpp_init_builtins): Cast of b->value to enum builtin_type.
2454         (read_original_directory): Cast return value of alloca.
2455         * lex.c (add_line_note): Use XRESIZEVEC.
2456         (warn_about_normalization): Use XNEWVEC.
2457         (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
2458         (new_buff): Use XNEWVEC.
2459         * line-map.c (linemap_add): Use XRESIZEVEC.
2460         * macro.c (builtin_macro): Cast return value of alloca.
2461         (paste_tokens): Likewise.
2462         (expand_arg): Use XNEWVEC and XRESIZEVEC.
2463         (_cpp_save_parameter): Use XRESIZEVEC.
2464         (create_iso_definition): Cast allocated storage to proper type.
2465         (_cpp_create_definition): Likewise.
2466         (cpp_macro_definition): Use XRESIZEVEC.
2467         * makedepend.c (add_clm): Use XNEW.
2468         (add_dir): Likewise.
2469         * mkdeps.c (munge): Use XNEWVEC.
2470         (deps_init): Use XCNEW.
2471         (deps_add_target): Use XRESIZEVEC.
2472         (deps_add_default_target): Cast return value of alloca.
2473         (deps_add_dep): Use XRESIZEVEC.
2474         (deps_add_vpath): Likewise.  Use XNEWVEC too.
2475         (deps_restore): Likewise.
2476         * pch.c (save_idents): Use XNEW and XNEWVEC.
2477         (cpp_save_state): Use XNEW.
2478         (count_defs): Cast return value of htab_find.
2479         (write_defs): Likewise.
2480         (cpp_write_pch_deps): Use XNEWVEC.
2481         (collect_ht_nodes): Use XRESIZEVEC.
2482         (cpp_valid_state): Use XNEWVEC.
2483         (save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
2484         * symtab.c (ht_create): Use XCNEW.
2485         (ht_lookup_with_hash): Cast return value of obstack_copy0.
2486         (ht_expand): Use XCNEWVEC.
2487         * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2488         (bool): Do not define if __cplusplus.
2490 2005-05-12  Zack Weinberg  <zack@codesourcery.com>
2492         * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2493         (do_sccs): Delete function definition, #define to do_ident.
2494         (do_ident): Don't hardwire directive name.
2496 2005-05-12  Ryota Kunisawa  <kunisawa@access.co.jp>
2498         PR bootstrap/21230
2499         * configure: Regenerate.
2501 2005-04-27  Andris Pavenis  <pavenis@latnet.lv>
2503         * files.c: Include io.h for DJGPP to get prototype of setmode.
2505 2005-04-19  Per Bothner  <per@bothner.com>
2507         PR preprocessor/20907
2508         * line-map.c (linemap_line_start): Fix bug when we need to increse
2509         column_bits but can re-use the current line_map.
2511 2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2513         * system.h (fopen, fdopen, freopen): Define these to the unlocked
2514         libiberty functions.
2516 2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2518         * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2519         (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2520         * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2521         fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2522         _unlocked function.
2523         (fwrite_unlocked): Fix prototype.
2525         * configure, config.in: Regenerate.
2527 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2529         PR preprocessor/19475
2530         * macro.c (create_iso_definition): For < ISO C99, don't
2531         pedwarn if there is no whitespace between macro name and its
2532         replacement, but the replacement starts with a basic character
2533         set character.
2535 2005-03-28  Andreas Jaeger  <aj@suse.de>
2537         * lex.c (warn_about_normalization): Cast field width to int to
2538         avoid warning.
2540 2005-03-19  Joseph S. Myers  <joseph@codesourcery.com>
2542         * configure.ac: Consistently use solaris2.1[0-9]* instead of
2543         solaris2.1[0-9].
2544         * configure: Regenerate.
2546 2005-03-15  Geoffrey Keating  <geoffk@apple.com>
2548         * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2549         UCN rather than printing an error.
2551 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
2553         * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2555 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
2557         * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2558         * charset.c: Update for new format of ucnid.h.
2559         (ucn_valid_in_identifier): Update for new format of ucnid.h.
2560         Add NST parameter, and update it; update callers.
2561         (cpp_valid_ucn): Add NST parameter, update callers.  Replace abort
2562         with cpp_error.
2563         (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2564         * internal.h (struct normalize_state): New.
2565         (INITIAL_NORMALIZE_STATE): New.
2566         (NORMALIZE_STATE_RESULT): New.
2567         (NORMALIZE_STATE_UPDATE_IDNUM): New.
2568         (_cpp_valid_ucn): New.
2569         * lex.c (warn_about_normalization): New.
2570         (forms_identifier_p): Add normalize_state parameter, update callers.
2571         (lex_identifier): Add normalize_state parameter, update callers.  Keep
2572         the state current.
2573         (lex_number): Likewise.
2574         (_cpp_lex_direct): Pass normalize_state to subroutines.  Check
2575         it with warn_about_normalization.
2576         * makeucnid.c: New.
2577         * ucnid.h: Replace.
2578         * ucnid.pl: Remove.
2579         * ucnid.tab: Make appropriate for input to makeucnid.c.  Remove
2580         comments about obsolete version of C++.
2581         * include/cpplib.h (enum cpp_normalize_level): New.
2582         (struct cpp_options): Add warn_normalize field.
2584 2005-03-11  Geoffrey Keating  <geoffk@apple.com>
2586         * directives.c (glue_header_name): Update call to cpp_spell_token.
2587         * internal.h (_cpp_interpret_identifier): New.
2588         * charset.c (_cpp_interpret_identifier): New.
2589         (_cpp_valid_ucn): Allow UCN version of '$'.
2590         * lex.c (lex_identifier): Add extra parameter to indicate if initial
2591         character was '$' or '\'.  Support identifiers with UCNs.
2592         (forms_identifier_p): Allow UCNs.
2593         (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2594         (utf8_to_ucn): New.
2595         (cpp_spell_token): Add FORSTRING parameter.  Use it.
2596         (cpp_token_as_text): Update call to cpp_spell_token.
2597         (cpp_output_token): Write UCNs back out.
2598         (stringify_arg): Update call to cpp_spell_token.
2599         (paste_tokens): Likewise.
2600         (cpp_macro_definition): Likewise.
2601         * macro.c (stringify_arg): Likewise.
2602         (paste_tokens): Likewise.
2603         (cpp_macro_definition): Likewise.
2604         * include/cpplib.h: Add parameter to cpp_spell_token.
2606 2005-03-04  Jakub Jelinek  <jakub@redhat.com>
2608         PR bootstrap/20282
2609         PR bootstrap/20305
2610         * macro.c (replace_args, cpp_get_token): Copy whole
2611         cpp_token_u instead of just cpp_string field from it.
2613 2005-02-28  Devang Patel  <dpatel@apple.com>
2615         * directives.c (do_line): Save sysp early before line table is
2616         realloc'ed.
2618 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
2620         PR 18785
2621         * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2622         (cpp_host_to_exec_charset): New function.
2623         * include/cpplib.h: Declare cpp_host_to_exec_charset.
2625 2005-02-19  Devang Patel  <dpatel@apple.com>
2627         * charset.c (_cpp_convert_input): Check '\r' before inserting
2628         '\n' at the end.
2630 2005-02-15  Eric Christopher  <echristo@redhat.com>
2632         PR preprocessor/19077
2633         * macro.c (cpp_macro_definition): Move handling of whitespace
2634         to PREV_WHITE conditional. Remove overloading of len
2635         variable.
2637 2005-02-14  Kazu Hirata  <kazu@cs.umass.edu>
2639         * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2640         traditional.c: Update copyright.
2642 2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
2644         PR bootstrap/19818
2645         * configure.ac: Check for declaration of basename and getopt.
2646         * config.in: Regenerate.
2647         * configure: Regenerate.
2648         * internal.h (ustrcspn): New.
2649         * macro.c (create_iso_definition): Fix allocation of memory.
2650         (padding_token): Add cast to remove const-ness.
2651         * pch.c (cpp_read_state): Use ustrcspn.
2653 2005-02-08  Mike Stump  <mrs@apple.com>
2655         * files.c (pchf_adder): Remove.
2656         (struct pchf_adder_info): Likewise.
2657         (_cpp_save_file_entries): Write out all files so that #import works.
2659 2005-01-23  Joseph S. Myers  <joseph@codesourcery.com>
2661         * configure: Regenerate.
2663 2005-01-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2665         * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2667         * include/cpplib.h: Also update copyright years.
2669 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
2671         * files.c (_cpp_find_file): Add files found by search_path_exhausted
2672         to the list of all files.
2674 2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2676         * internal.h: Update references to Cpp lib filenames.
2677         * directives.c: Likewise.
2678         * init.c: Likewise.
2679         * macro.c: Likewise.
2680         * traditional.c: Likewise.
2682 2004-12-15  Eric Botcazou  <ebotcazou@libertysurf.fr>
2684         PR preprocessor/15167
2685         * files.c (destroy_cpp_file): New function.
2686         (should_stack_file): Make a new file if the
2687         compared file is still stacked.
2689 2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>
2691         PR preprocessor/17610
2692         * directives.c (do_include_common): Error out if an empty filename
2693         is given for #include (or #include_next or #import).
2695 2004-11-27  Roger Sayle  <roger@eyesopen.com>
2696             Zack Weinberg  <zack@codesourcery.com>
2698         * internal.h: Replace all uses of uchar with unsigned char.
2699         * include/cpp-id-data.h: Likewise.  Guard typedef of uchar
2700         with !IN_GCC, so uchar is only defined whilst building libcpp.
2702 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
2704         * aclocal.m4: Regenerate.
2706 2004-11-24  Roger Sayle  <roger@eyesopen.com>
2708         PR preprocessor/15824
2709         * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2710         directly, instead of the non-existant "system.h" and "ansidecl.h".
2711         * configure: Regenerate.
2713 2004-11-23  Daniel Jacobowitz  <dan@codesourcery.com>
2714             Joseph Myers  <joseph@codesourcery.com>
2716         * internal.h (struct lexer_state): Add in_deferred_pragma.
2717         * directives.c (struct pragma_entry): Add allow_expansion.
2718         (insert_pragma_entry): Take allow_expansion flag.
2719         (register_pragma): Likewise.
2720         (cpp_register_pragma): Likewise.
2721         (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2722         (do_pragma): Honor allow_expansion.
2723         (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2724         * include/cpplib.h (cpp_register_pragma): Update prototype.
2726 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
2727             Mark Mitchell  <mark@codesourcery.com>
2729         * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2730         need_64bit_hwint=yes.
2731         * configure: Regenerate.
2733 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2735         * Makefile.in ($(PACKAGE).pot): New rule.  Depend on
2736         po/$(PACKAGE).pot.
2737         (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2738         arguments.  Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2739         Remove local srcdir path from generated file.
2741 2004-11-04  Zack Weinberg  <zack@codesourcery.com>
2742             Gerald Pfeifer  <gerald@pfeifer.com>
2744         * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2745         as well.
2747 2004-10-27  Zack Weinberg  <zack@codesourcery.com>
2749         PR 18075
2750         * directives.c (do_pragma): Do not defer pragmas which are unknown.
2751         (cpp_handle_deferred_pragma): Add cast to silence warning.
2753 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
2755         * errors.c (_cpp_begin_message): Print "error: " for errors.
2757 2004-10-10  Andreas Jaeger  <aj@suse.de>
2759         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2760         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2762 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
2764         * pch.c (cpp_write_pch_state): Remove variable z as it is not
2765         used.
2766         (cpp_read_state): Remove unused variables, m, d and mac_count.
2768 2004-09-29  Per Bothner  <per@bothner.com>
2770         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
2771         cb.line_change.  Otherwise do_pragma will call the line_change
2772         call-back with a meaningless line number.
2774 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
2776         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
2777         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
2778         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2779         * aclocal.m4, configure: Regenerate.
2780         * init.c: Include localedir.h.
2781         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
2782         (DEFS): Delete.
2783         (.c.o): Use $(ALL_CFLAGS).
2784         (localedir.h, localedir.hs): New rules.
2785         (clean): Use rm -rf to remove directories.
2786         (distclean): Also delete localedir.h and localedir.hs.
2787         (init.o): Update dependencies.
2789 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
2791         * Makefile.in (aclocal.m4): Update dependencies.
2792         * configure.ac (AC_CONFIG_MACRO_DIR): New.
2793         * aclocal.m4, configure: Regenerate.
2795 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
2797         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
2798         (_cpp_convert_input, _cpp_default_encoding): Add comments.
2799         Some other comments in this file also tweaked.
2801         * directives.c (do_pragma): Save current buffer position
2802         before lexing the pragma keywords; don't call
2803         _cpp_backup_tokens in the defer_pragmas case.
2805 2004-09-15  Per Bothner  <per@bothner.com>
2807         * include/line-map.h (line_map_start):  Add parameter names so
2808         preceding comment makes sense.
2809         (linemap_add):  Remove from comment mention of non-existing parameter.
2811 2004-09-09  Matt Austern  <austern@apple.com>
2812             Zack Weinberg  <zack@codesourcery.com>
2814         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
2815         prefixes throughout.  Add entry for PRAGMA.  Remove
2816         unnecessary "= 0" from EQ.
2817         (enum cpp_ttype): Adjust OP and TK definitions to restore
2818         prefixes, via token-paste.
2819         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2820         Change from #defines to additional cpp_ttype enumerators.
2821         (struct cpp_options): Add defer_pragmas.
2822         (cpp_handle_deferred_pragma): Prototype new interface.
2824         * internal.h (struct cpp_reader): Add directive_result.
2825         * directives.c (struct pragma_entry): Add is_internal field;
2826         give boolean fields type bool.
2827         (start_directive): Initialize pfile->directive_result.type.
2828         (_cpp_do__Pragma): Likewise.
2829         (run_directive): Do not crash if pfile->buffer->prev is NULL.
2830         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2831         from it.
2832         (register_pragma): New static function, bulk of former
2833         cpp_register_pragma here; add 'internal' argument, pass along
2834         to insert_pragma_entry.
2835         (cpp_register_pragma): Now a wrapper around register_pragma which
2836         always passes false for 'internal' argument.
2837         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2838         true for 'internal'.
2839         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2840         an internal pragma, save text till the end of the line as a CPP_PRAGMA
2841         token instead of executing the pragma.
2842         (cpp_handle_deferred_pragma): New interface.
2843         * lex.c (token_spellings): Adjust OP and TK definitions to
2844         match changes to cpplib.h.
2845         (_cpp_lex_token): Check for a directive-result token and
2846         return it if present.
2847         (cpp_token_val_index): Handle CPP_PRAGMA.
2848         * macro.c (cpp_builtin_macro_text): Correct comment.
2849         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2851 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
2853         PR preprocessor/14699
2854         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2855         from size_t to double.
2857 2004-08-28  Andreas Schwab  <schwab@suse.de>
2858             Andreas Jaeger <aj@suse.de>
2860         * configure.ac: Set PACKAGE correctly.
2861         * configure: Regenerated.
2863 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
2865         * Makefile.in: Add back top_builddir.
2867 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
2869         * configure.ac: Replace Automake macro invocations
2870         with manual Autoconf checks and substitutions.
2871         * configure: Regenerate.
2872         * aclocal.m4: Regenerate.
2873         * config.in: Regenerate.
2874         * Makefile.am: Removed.
2875         * Makefile.in: Heavy simplification and reorganization.
2877 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
2879         * configure.ac (arm*-*-eabi*): New target.
2880         (arm*-*-symbianelf*): Likewise.
2881         * configure: Regenerated.
2883 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
2885         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2886         * directives.c: Use XNEW-family macros from libiberty.
2887         * lex.c: Likewise.
2888         * macro.c: Likewise.
2889         * cpplib.h (cpp_deps_style): Export enum with name.
2891 2004-07-23  Matthias Klose  <doko@debian.org>
2893         * init.c (init_library): Use PACKAGE for the text domain.
2895 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
2897         PR preprocessor/16366
2898         * internal.h (struct cpp_reader): New field dir_hash.
2899         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2900         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2902 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
2904         PR preprocessor/16192
2905         PR preprocessor/15913
2906         PR preprocessor/15572
2907         * expr.c (_cpp_parse_expr): Handle remaining cases where an
2908         expression is missing.
2909         * init.c (post_options): Traditional cpp doesn't do // comments.
2911 2004-06-30  Per Bothner  <per@bothner.com>
2913         * include/line-map.h (fileline):  Remove old typedef.
2914         * internal.h (struct cpp_reader):  Use source_location typedef instead.
2916 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
2918         Partially revert patch of 2004-06-05.
2919         * files.c (search_cache): Remove pfile argument.  Don't check
2920         for file that would be found by "" or <> search here...
2921         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2922         Do not apply directory-of-current-file correction to files
2923         found by this check.  Rearrange code slightly.
2925 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
2927         * files.c (should_stack_file): Correct swapped parameters to call
2928         to cb.read_pch.
2929         * pch.c (cpp_valid_state): Handle -fpreprocessed.
2931 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
2933         * Makefile.in: Regenerate with automake 1.8.5.
2934         * aclocal.m4: Likewise.
2935         * configure: Regenerate.
2937 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
2939         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2940         * configure, config.in: Regenerate.
2941         * system.h: Unconditionally define bool as unsigned char,
2942         BOOL_BITFIELD as unsigned int.
2943         * .cvsignore: New file.
2945 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
2947         * traditional.c (push_replacement_text): Set macro->traditional.
2948         (save_replacement_text): Likewise.
2949         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2950         (struct save_macro_item): Delete.
2951         (struct save_macro_data): Use a character array not the previous
2952         structured format.
2953         (save_macros): Save macro as text not as internal structures.
2954         (cpp_prepare_state): Update for changes to save_macro_data.
2955         (cpp_read_state): Don't read macros defined in PCH.  Restore
2956         -D macros as text.
2957         * macro.c (create_iso_definition): Honour alloc_subobject.
2958         Clear traditional flag.
2959         (_cpp_create_definition): Honour alloc_subobject.
2960         * lex.c (cpp_token_val_index): New.
2961         * internal.h: Include cpp-id-data.h.
2962         (uchar): Move definition to cpp-id-data.h.
2963         (U): Likewise.
2964         (cpp_macro): Likewise.
2965         * directives.c (struct answer): Move to cpp-id-data.h.
2966         (do_assert): Honour alloc_subobject.
2968         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2969         * include/cpplib.h (struct cpp_string): Add GTY marker.
2970         (enum cpp_token_fld_kind): New.
2971         (struct cpp_token): Add GTY markers.
2972         (cpp_token_val_index): Prototype.
2973         (CPP_HASHNODE_VALUE_IDX): New.
2974         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2975         * include/cpp-id-data.h: New file.
2977 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
2979         * Makefile.am (all-local): New.
2980         * Makefile.in: Regenerate.
2982 2004-06-06  Roger Sayle  <roger@eyesopen.com>
2984         * Makefile.am (LIBICONV): Declare.
2985         (makedepend_LDADD): Use LIBICONV.
2986         * Makefile.in: Regenerate.
2988 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
2990         * Makefile.am (LIBINTL): Declare
2991         (makedepend_LDADD): Use LIBINTL.
2992         * Makefile.in: Regenerate.
2994 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
2996         * Makefile.am: Add makedepend.
2997         * Makefile.in, aclocal.m4: Regenerate.
2998         * charset.c: Insert a space to avoid a warning.
2999         * directives.c: Include mkdeps.h.
3000         (_cpp_handle_directive): Reenable macro expander if appropriate.
3001         (undefine_macros): Inline body of _cpp_free_definition for speed.
3002         Do not call undef callback or _cpp_warn_if_unused_macro.
3003         (cpp_get_deps): New interface.
3004         * files.c (search_cache): Add pfile argument.  Check for file
3005         that would be found by "" or <> search here...
3006         (_cpp_find_file): ...not here.  Correct recorded start_dir of
3007         files found by directory-of-current-file search that would be
3008         found by "" or <> search.
3009         * init.c (cpp_add_dependency_target): Delete.
3010         * internal.h (struct lexer_state): Add discarding_output flag.
3011         * lex.c (lex_identifier): Compute hash function while scanning.
3012         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
3013         directives.
3014         * makedepend.c: New file.
3015         * mkdeps.c (struct deps): Add vpath vector.
3016         (apply_vpath, deps_add_vpath): New function.
3017         (deps_free): Free vpath vector.
3018         (deps_add_dep, deps_add_target): Use apply_vpath.
3019         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
3020         (ht_lookup_with_hash): New function.
3021         * cpplib.h, mkdeps.h: Update prototypes.
3022         * symtab.h: Update prototypes.
3023         (HT_HASHSTEP, HT_FINISH): New macros.
3025 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
3027         * symtab.c (ht_create): Set entries_owned.
3028         (ht_destroy): Honour entries_owned.
3029         (ht_expand): Likewise.
3030         (ht_load): New.
3031         * include/symtab.h (struct ht): New field 'entries_owned'
3032         (ht_load): New prototype.
3034 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
3036         PR bootstrap/15651
3037         * configure.ac: Fix m4 quoting when picking
3038         the size of HOST_WIDE_INT.
3039         * configure: Regenerate.
3041 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
3043         * Makefile.am: the correct directory for
3044         gettext include files is given by @INCINTL@.
3045         * Makefile.in: Regenerate.
3047 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
3049         * system.h [!ENABLE_NLS]: dgettext takes two
3050         parameters.
3052 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
3054         Moved libcpp from the gcc subdirectory to the toplevel.
3055         * Makefile.am: New file.
3056         * Makefile.in: Regenerate.
3057         * configure.ac: New file.
3058         * configure: Regenerate.
3059         * config.in: Regenerate.
3060         * charset.c: Moved from gcc/cppcharset.c.  Add note about
3061         brokenness of input charset detection.  Adjust for change
3062         in name of cppucnid.h.
3063         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
3064         * expr.c: Moved from gcc/cppexp.c.
3065         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
3066         Remove #define of O_BINARY, it is in system.h.
3067         * identifiers.c: Moved from gcc/cpphash.c.
3068         * internal.h: Moved from gcc/cpphash.h.  Change header
3069         guard name.  All other files adjusted to match name change.
3070         * init.c: Moved from gcc/cppinit.c.
3071         (init_library) [ENABLE_NLS]: Call bindtextdomain.
3072         * lex.c: Moved from gcc/cpplex.c.
3073         * directives.c: Moved from gcc/cpplib.c.
3074         * macro.c: Moved from gcc/cppmacro.c.
3075         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
3076         * traditional.c: Moved from gcc/cpptrad.c.
3077         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
3078         guard name.
3079         * ucnid.pl: Moved from gcc/cppucnid.pl.
3080         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
3081         guard name.
3082         * symtab.c: Moved from gcc/hashtable.c.
3083         * line-map.c: Moved from gcc.  Do not include intl.h.
3084         * mkdeps.c: Moved from gcc.
3085         * system.h: New file.
3086         * include/cpplib.h: Moved from gcc.  Change header guard name.
3087         * include/line-map.h: Moved from gcc.  Change header guard name.
3088         * include/mkdeps.h: Moved from gcc.  Change header guard name.
3089         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
3090         guard name.