* gcc.dg/tree-prof/unroll-1.c: New testcase.
[official-gcc.git] / libcpp / ChangeLog
blobfdc151c9aa68558b906f15b466001b3ef61a4e94
1 2012-10-15  Tobias Burnus  <burnus@net-b.de>
3         * files.c (read_file_guts, _cpp_save_file_entries): Free memory
4         before returning.
5         * lex.c (warn_about_normalization): Ditto.
6         * mkdeps.c (deps_save): Ditto.
7         * pch.c (cpp_valid_state): Ditto.
9 2012-10-04  Florian Weimer  <fweimer@redhat.com>
11         * directives.c (do_pragma_warning_or_error): New.
12         (do_pragma_warning): New.
13         (do_pragma_error): New.
14         (_cpp_init_internal_pragmas): Register new pragmas.
16 2012-09-25  Dehao Chen  <dehao@google.com>
18         PR middle-end/54704
19         * line-map.c (location_adhoc_data_hash): Fix the hash function.
21 2012-09-25  Dehao Chen  <dehao@google.com>
23         PR middle-end/54645
24         * include/line-map.h (location_adhoc_data): Move location_adhoc_data
25         into GC.
26         (location_adhoc_data_map): Likewise.
27         (line_maps): Likewise.
28         (rebuild_location_adhoc_htab): New Function.
29         * line-map.c (+rebuild_location_adhoc_htab): new Funcion.
30         (get_combined_adhoc_loc): Move location_adhoc_data into GC.
31         (location_adhoc_data_fini): Likewise.
32         (linemap_init): Likewise.
33         (location_adhoc_data_init): Remove Function.
35 2012-09-19  Dehao Chen  <dehao@google.com>
37         * include/line-map.h (MAX_SOURCE_LOCATION): New value.
38         (location_adhoc_data_fini): New.
39         (get_combined_adhoc_loc): New.
40         (get_data_from_adhoc_loc): New.
41         (get_location_from_adhoc_loc): New.
42         (location_adhoc_data_map): New.
43         (COMBINE_LOCATION_DATA): New.
44         (IS_ADHOC_LOC): New.
45         (expanded_location): New field.
46         (line_maps): New field.
47         * line-map.c (location_adhoc_data): New.
48         (location_adhoc_data_hash): New.
49         (location_adhoc_data_eq): New.
50         (location_adhoc_data_update): New.
51         (get_combined_adhoc_loc): New.
52         (get_data_from_adhoc_loc): New.
53         (get_location_from_adhoc_loc): New.
54         (location_adhoc_data_init): New.
55         (location_adhoc_data_fini): New.
56         (linemap_init): Initialize location_adhoc_data.
57         (linemap_lookup): Change to use new location.
58         (linemap_ordinary_map_lookup): Likewise.
59         (linemap_macro_map_lookup): Likewise.
60         (linemap_macro_map_loc_to_def_point): Likewise.
61         (linemap_macro_map_loc_unwind_toward_spel): Likewise.
62         (linemap_get_expansion_line): Likewise.
63         (linemap_get_expansion_filename): Likewise.
64         (linemap_location_in_system_header_p): Likewise.
65         (linemap_location_from_macro_expansion_p): Likewise.
66         (linemap_macro_loc_to_spelling_point): Likewise.
67         (linemap_macro_loc_to_def_point): Likewise.
68         (linemap_macro_loc_to_exp_point): Likewise.
69         (linemap_resolve_location): Likewise.
70         (linemap_unwind_toward_expansion): Likewise.
71         (linemap_unwind_to_first_non_reserved_loc): Likewise.
72         (linemap_expand_location): Likewise.
73         (linemap_dump_location): Likewise.
74         (linemap_line_start): Likewise.
76 2012-05-25  Dodji Seketeli  <dodji@redhat.com>
78         PR preprocessor/53469
79         * directives.c (do_pragma): Use the virtual location for the
80         pragma token, instead of its spelling location.
82 2012-08-14   Diego Novillo  <dnovillo@google.com>
84         Merge from cxx-conversion branch.  Configury.
86         * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
87         * configure.ac: Likewise.
88         * configure: Regenerate.
90 2012-08-14   Lawrence Crowl  <crowl@google.com>
92         Merge from cxx-conversion branch.  New C++ hash table.
94         * include/symtab.h (typedef struct ht hash_table): Change the typedef
95         name to cpp_hash_table.  Update all users of the typedef.
97 2012-07-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
99         * include/line-map.h (line_map_macro): Use the "atomic" GTY option
100         for the macro_locations field.
102 2011-06-19  Uros Bizjak  <ubizjak@gmail.com>
104         * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
105         __builtin_ia32_pcmpestri128 instead of asm.
107 2012-06-04  Dimitrios Apostolou <jimis@gmx.net>
109         * line-map.c (linemap_enter_macro): Don't zero max_column_hint in
110         every macro. This improves performance by reducing the number of
111         reallocations when track-macro-expansion is on.
113 2012-06-04  Dodji Seketeli  <dodji@redhat.com>
115         PR preprocessor/53463
116         * line-map.c (linemap_location_in_system_header_p): For built-in
117         macro tokens, check the first expansion point location that is not
118         for a token coming from a built-in macro.
120 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
122         * directives.c: Fix typos.
123         * include/line-map.h: Fix typos.
124         * line-map.c: Fix typos.
125         * macro.c: Fix typos.
127 2012-05-25  Dodji Seketeli  <dodji@redhat.com>
129         PR bootstrap/53459
130         * lex.c (search_line_fast): Avoid unused local typedefs to simulate
131         a static assertion.
133 2012-05-29  Dodji Seketeli  <dodji@redhat.com>
135         PR preprocessor/53229
136         * internal.h (cpp_reader::set_invocation_location): Remove.
137         (cpp_reader::about_to_expand_macro_p): New member flag.
138         * directives.c (do_pragma):  Remove Kludge as
139         pfile->set_invocation_location is no more.
140         * macro.c (cpp_get_token_1): Do away with the use of
141         cpp_reader::set_invocation_location.  Just collect the macro
142         expansion point when we are about to expand the top-most macro.
143         Do not override cpp_reader::about_to_expand_macro_p.
144         This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
145         properly handle locations of expansion points.
146         (cpp_get_token_with_location): Adjust, as
147         cpp_reader::set_invocation_location is no more.
148         (paste_tokens): Take a virtual location parameter for
149         the LHS of the pasting operator.  Use it in diagnostics.  Update
150         comments.
151         (paste_all_tokens): Tighten the assert.  Propagate the location of
152         the expansion point when no virtual locations are available.
153         Pass the virtual location to paste_tokens.
154         (in_macro_expansion_p): New static function.
155         (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
156         flag until we really start expanding the macro.
158 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
160         PR preprocessor/7263
161         * include/cpplib.h (cpp_classify_number): Take a location
162         parameter.
163         * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
164         macros that take a location parameter.
165         (cpp_classify_number): Take a (virtual) location parameter.  Use
166         it for diagnostics.  Adjust comments.
167         (eval_token): Take a location parameter.  Pass it to
168         cpp_classify_number and to diagnostic routines.
169         (_cpp_parse_expr): Use virtual locations of tokens when parsing
170         expressions.  Pass a virtual location to eval_token and to
171         diagnostic routines.
173 2012-05-10  Tristan Gingold  <gingold@adacore.com>
175         * expr.c (interpret_float_suffix): Add a guard.
177 2012-05-02  Dodji Seketeli  <dodji@redhat.com>
179         Properly initialize cpp_context in destringize_and_run
180         * directives.c (destringize_and_run): Properly initialize the new
181         context.
182         * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
183         the initial base context, which has the same life time as the
184         current instance of cpp_file.
186 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
187             Dodji Seketeli  <dodji@seketeli.org>
189         PR c++/52974
190         * libcpp/files.c (maybe_shorter_path): New.
191         (find_file_in_dir): Use it.
193 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
195         Switch -ftrack-macro-expansion=2 on by default.
196         * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
197         by default.  Add comments.
199         Strip "<built-in>" loc from displayed expansion context
200         * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
201         in comment.
202         (linemap_unwind_to_first_non_reserved_loc): Declare new function.
203         * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
204         new function.
206         Fix expansion point loc for macro-like tokens
207         * macro.c (macro_of_context): New static function.
208         (_cpp_push_token_context, push_extended_tokens_context): If the
209         macro argument is NULL, it means we are continuing the expansion
210         of the current macro, if any.  Update comments.
211         (_cpp_pop_context): Re-enable expansion of the macro only when we
212         are really out of the context of the current expansion.
214         Fix token pasting with -ftrack-macro-expansion
215         * macro.c (paste_all_tokens): Put the token resulting from pasting
216         into an extended token context with -ftrack-macro-location is in
217         effect.
219         Fix cpp_sys_macro_p with -ftrack-macro-expansion
220         * macro.c (cpp_sys_macro_p):  Support -ftrack-macro-expansion.
222 2012-04-29  Dodji Seketeli  <dodji@redhat.com>
224         * lex.c (lex_raw_string): Change C++ style comments into C style
225         comments.
226         (lex_string): Likewise.
228 2012-04-27   Ollie Wild  <aaw@google.com>
230         * include/cpplib.h (struct cpp_options): Add new field,
231         warn_literal_suffix.
232         (CPP_W_LITERAL_SUFFIX): New enum.
233         * init.c (cpp_create_reader): Default initialization of
234         warn_literal_suffix.
235         * lex.c (lex_raw_string): Treat user-defined literals which don't
236         begin with '_' as separate tokens and produce a warning.
237         (lex_string): Ditto.
239 2012-04-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
241         * line-map.c (linemap_resolve_location): Synchronize comments with
242         those in line-map.h.
243         * include/line-map.h (linemap_resolve_location): Fix spelling in
244         comment.
246 2012-03-22  Richard Earnshaw  <rearnsha@arm.com>
248         * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
250 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
252         * lex.c: Remove Solaris 8 reference.
254 2012-02-14  Walter Lee  <walt@tilera.com>
256         * configure.ac: Require 64-bit hwint for tilegx and tilepro.
257         * configure: Regenerate.
259 2012-01-09  Richard Guenther  <rguenther@suse.de>
261         * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
263 2012-01-09  Gary Funck  <gary@intrepid.com>
265         PR preprocessor/33919
266         * files.c (_cpp_get_file_name): New. Implement file name
267         access function.
268         * internal.h (_cpp_get_file_name): New prototype.
269         * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
270         to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
272 2012-01-03  Olivier Hainque  <hainque@adacore.com>
274         * system.h: Prior to #define, #undef fopen and freopen unconditionally.
276 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
278         * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
279         (CLK_STDC1X): Change to CLK_STDC11.
280         * init.c (lang_defaults): Update comments.
281         (cpp_init_builtins): Update language tests.  Use 201112L for C11
282         __STDC_VERSION__.
284 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
286         * configure: Regenerate.
288 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
290         * configure: Regenerate.
292 2011-12-07  Jakub Jelinek  <jakub@redhat.com>
294         PR bootstrap/50237
295         * internal.h (_cpp_init_lexer): New prototype.
296         * init.c (init_library): Call it.
297         * lex.c (init_vectorized_lexer): Remove constructor attribute,
298         add inline keyword.
299         (HAVE_init_vectorized_lexer): Define.
300         (_cpp_init_lexer): New function.
302 2011-12-03  Dodji Seketeli  <dodji@redhat.com>
304         * macro.c (tokens_buff_remove_last_token)
305         (tokens_buff_put_token_to): Add an 'inline' function specifier to
306         the prototype.
308 2011-11-22   Diego Novillo  <dnovillo@google.com>
310         * include/line-map.h (linemap_dump): Declare.
311         (line_table_dump): Declare.
312         * line-map.c (linemap_dump): New.
313         (line_table_dump): New.
315 2011-11-21  Ed Smith-Rowland  <3dw4rd@verizon.net>
317         PR c++/50958
318         * expr.c (cpp_userdef_char_remove_type): Fix typo.
320 2011-11-03  Michael Matz  <matz@suse.de>
322         PR bootstrap/50857
323         * configure.ac: Check for -fno-exceptions -fno-rtti.
324         * configure: Regenerate.
325         * Makefile.in (NOEXCEPTION_FLAGS): New flag.
326         (ALL_CXXFLAGS): Use it.
328 2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
330         * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
332 2011-11-02  Jason Merrill  <jason@redhat.com>
334         PR c++/50810
335         * configure.ac: Add -Wno-narrowing to warning options.
337 2011-10-31  Jason Merrill  <jason@redhat.com>
339         PR libstdc++/1773
340         * init.c (cpp_init_builtins): Set __cplusplus for C++11.
342         PR c++/50920
343         * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
344         CLK_GNUCXX0X to CLK_GNUCXX11.
346 2011-10-26  Ed Smith-Rowland  <3dw4rd@verizon.net>
348         Implement C++11 user-defined literals.
349         * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
350         cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
351         cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
352         cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
353         (cpp_classify_number): Classify unrecognized tokens as user-defined
354         literals.
355         * include/cpplib.h: Add new tokens for user-defined literals.
356         * init.c: Add new preprocessor flag (cxx11).
357         * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
358         including concatenation and promotion with suffixes.
360 2011-10-24  Dodji Seketeli  <dodji@redhat.com>
362         * line-map.c (linemap_macro_map_lookup): Fix logic.
364 2011-10-24  Dodji Seketeli  <dodji@redhat.com>
366         * include/line-map.h (linemap_expand_location): Take a line table
367         parameter.  Update comment.
368         (linemap_resolve_location): Update comment.
369         (linemap_expand_location_full): Remove.
370         * line-map.c (linemap_resolve_location):  Handle reserved
371         locations; return a NULL map in those cases.
372         (linemap_expand_location): If location is reserved, return a
373         zeroed expanded location.  Update comment.  Take a line table to
374         assert that the function takes non-virtual locations only.
375         (linemap_expand_location_full): remove.
376         (linemap_dump_location): Handle the fact that
377         linemap_resolve_location can return NULL line maps when the
378         location resolves to a reserved location.
380         * line-map.c (linemap_macro_map_lookup): Fix logic.
382 2011-10-22  Dodji Seketeli  <dodji@redhat.com>
384         PR bootstrap/50778
385         * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
386         context to act upon.
387         * lex.c (_cpp_remaining_tokens_num_in_context): Likewise.  Update
388         comment.
389         (cpp_token_from_context_at): Likewise.
390         (cpp_peek_token): Use the context to peek tokens from.
392 2011-10-20  Dodji Seketeli  <dodji@redhat.com>
394         PR bootstrap/50801
395         * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
396         number of tokens.
398 2011-10-18  Dodji Seketeli  <dodji@redhat.com>
400         PR bootstrap/50760
401         * include/line-map.h (struct linemap_stats): Change the type of
402         the members from size_t to long.
403         * macro.c (macro_arg_token_iter_init): Unconditionally initialize
404         iter->location_ptr.
406 2011-10-17  Dodji Seketeli  <dodji@redhat.com>
408         * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
409         variable without using it if ENABLE_CHECKING is not defined.  Mark
410         the LOCATION parameter as being unused.
412 2011-10-15  Tom Tromey  <tromey@redhat.com>
413             Dodji Seketeli  <dodji@redhat.com>
415         * include/line-map.h (struct line_maps::alloced_size_for_request):
416         New member.
417         * line-map.c (new_linemap): Use set->alloced_size_for_request to
418         get the actual allocated size of line maps.
420 2011-10-15  Tom Tromey  <tromey@redhat.com>
421             Dodji Seketeli  <dodji@redhat.com>
423         * line-map.h (struct linemap_stats): Declare new struct.
424         (linemap_get_statistics): Declare ...
425         * line-map.c (linemap_get_statistics):  ... new function.
426         * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
427         Declare new counters.
428         (enter_macro_context, replace_args): Update
429         num_macro_tokens_counter.
430         (cpp_get_token_1): Update num_expanded_macros_counter.
432 2011-10-15  Tom Tromey  <tromey@redhat.com>
433             Dodji Seketeli  <dodji@redhat.com>
435         * include/cpplib.h (struct cpp_options)<debug>: New struct member.
436         * include/line-map.h (linemap_dump_location): Declare ...
437         * line-map.c (linemap_dump_location): ... new function.
439 2011-10-15  Tom Tromey  <tromey@redhat.com>
440             Dodji Seketeli  <dodji@redhat.com>
442         * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
443         New option.
444         * internal.h (struct macro_context): New struct.
445         (enum context_tokens_kind): New enum.
446         (struct cpp_context)<tokens_kind>: New member of type enum
447         context_tokens_kind.
448         (struct cpp_context)<macro>: Remove this.  Replace it with an enum
449         of macro and  macro_context.
450         (struct cpp_context)<direct_p>: Remove.
451         (_cpp_remaining_tokens_num_in_context): Declare new function.
452         * directives.c (destringize_and_run): Adjust.
453         * lex.c (_cpp_remaining_tokens_num_in_context)
454         (_cpp_token_from_context_at): Define new functions
455         (cpp_peek_token): Use them.
456         * init.c (cpp_create_reader): Initialize the base context to zero.
457         (_cpp_token_from_context_at): Define new static function.
458         (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
459         _cpp_token_from_context_at.
460         * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
461         members.
462         (enum macro_arg_token_kind): New enum.
463         (struct macro_arg_token_iter): New struct.
464         (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
465         (alloc_expanded_arg_mem, ensure_expanded_arg_room)
466         (delete_macro_args, set_arg_token, get_arg_token_location)
467         (arg_token_ptr_at, macro_arg_token_iter_init)
468         (macro_arg_token_iter_get_token)
469         (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
470         (expanded_token_index, tokens_buff_new, tokens_buff_count)
471         (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
472         (tokens_buff_add_token, tokens_buff_remove_last_token)
473         (reached_end_of_context, consume_next_token_from_context): New
474         static functions.
475         (cpp_get_token_1): New static function. Split and extended from
476         cpp_get_token.  Use reached_end_of_context and
477         consume_next_token_from_context.  Unify its return point.  Move
478         the location tweaking from cpp_get_token_with_location in here.
479         (cpp_get_token): Use cpp_get_token_1
480         (stringify_arg): Use the new arg_token_at.
481         (paste_all_tokens): Support tokens coming from extended tokens
482         contexts.
483         (collect_args): Return the number of collected arguments, by
484         parameter.  Store virtual locations of tokens that constitute the
485         collected args.
486         (funlike_invocation_p): Return the number of collected arguments,
487         by parameter.
488         (enter_macro_context): Add a parameter for macro expansion point.
489         Pass it to replace_args and to the "used" cpp callback.  Get the
490         number of function-like macro arguments from funlike_invocation_p,
491         pass it to the new delete_macro_args to free the memory used by
492         macro args.  When -ftrack-macro-expansion is in effect, for macros
493         that have no arguments, create a macro map for the macro expansion
494         and use it to allocate proper virtual locations for tokens
495         resulting from the expansion.  Push an extended tokens context
496         containing the tokens resulting from macro expansion and their
497         virtual locations.
498         (replace_args): Rename the different variables named 'count' into
499         variables with more meaningful names.  Create a macro map;
500         allocate virtual locations of tokens resulting from this
501         expansion.  Use macro_arg_token_iter to iterate over tokens of a
502         given macro.  Handle the case of the argument of
503         -ftrack-macro-expansion being < 2.  Don't free macro arguments
504         memory resulting from expand_arg here, as these are freed by the
505         caller of replace_arg using delete_macro_args now.  Push extended
506         token context.
507         (next_context, push_ptoken_context, _cpp_push_token_context)
508         (_cpp_push_text_context): Properly initialize the context.
509         (expand_arg): Use the new alloc_expanded_arg_mem,
510         push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
511         (_cpp_pop_context): Really free the memory held by the context.
512         Handle freeing memory used by extended tokens contexts.
513         (cpp_get_token_with_location): Use cpp_get_token_1.
514         (cpp_sys_macro_p): Adjust.
515         (_cpp_backup_tokens): Support the new kinds of token contexts.
516         * traditional.c (recursive_macro): Adjust.
518 2011-10-15  Tom Tromey  <tromey@redhat>
519             Dodji Seketeli  <dodji@redhat.com>
521         * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
522         member.
523         (MAX_SOURCE_LOCATION): New constant.
524         (struct line_map_ordinary, struct line_map_macro): New structs.
525         (struct line_map): Turn this into a union of the two above.  Add
526         comments.
527         (struct maps_info): New struct.
528         (struct line_maps)<info_ordinary, info_macro>: Two new fields.
529         These now carry the map information that was previously scattered
530         in struct line_maps.
531         (struct map_info::allocated): Fix comment.
532         (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
533         (ORDINARY_MAP_STARTING_LINE_NUMBER)
534         (ORDINARY_MAP_INCLUDER_FILE_INDEX)
535         (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
536         (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
537         (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
538         (MACRO_MAP_EXPANSION_POINT_LOCATION)
539         (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
540         (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
541         (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
542         (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
543         (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
544         (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
545         (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
546         (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
547         (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
548         (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
549         (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
550         information.
551         (linemap_check_ordinary, linemap_assert)
552         (linemap_location_before_p): New macros.
553         (linemap_position_for_line_and_column)
554         (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
555         (linemap_macro_expansion_map_p)
556         (linemap_macro_map_loc_to_def_point)
557         (linemap_macro_map_loc_unwind_once)
558         (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
559         (linemap_get_source_line linemap_get_source_column)
560         (linemap_map_get_macro_name, linemap_get_file_path)
561         (linemap_location_in_system_header_p)
562         (linemap_location_from_macro_expansion_p): Declare new functions.
563         (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
564         (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
565         accessors act on ordinary maps only.
566         (INCLUDED_FROM): Return NULL for main files; use the new
567         accessors.
568         (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
569         (struct expanded_location): Move here from gcc/input.h
570         (linemap_resolve_location, linemap_expand_location)
571         (linemap_expand_location_full): Declare new functions.
572         * line-map.c: Include cpplib.h, internal.h
573         (linemap_enter_macro, linemap_add_macro_token)
574         (linemap_get_expansion_line, linemap_get_expansion_filename): New
575         functions that are private to libcpp.
576         (linemap_assert): New macro.
577         (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
578         (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
579         (linemap_macro_map_loc_unwind_toward_spelling)
580         (linemap_macro_map_loc_to_exp_point)
581         (first_map_in_common_1, first_map_in_common): New static
582         functions.
583         (new_linemap): Define new static functions.  Extracted and
584         enhanced from ...
585         (linemap_add): ... here.  Use linemap_assert in lieu of abort
586         previously.
587         (linemap_tracks_macro_expansion_locs_p)
588         (linemap_add_macro_token, linemap_macro_expansion_map_p)
589         (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
590         (linemap_macro_map_loc_to_def_point)
591         (linemap_macro_map_loc_unwind_once)
592         (linemap_step_out_once, linemap_map_get_index)
593         (linemap_get_source_line,linemap_get_source_column)
594         (linemap_get_file_path, linemap_map_get_macro_name)
595         (linemap_location_in_system_header_p)
596         (linemap_location_originated_from_system_header_p)
597         (linemap_location_from_macro_expansion_p)
598         (linemap_tracks_macro_expansion_locs_p)
599         (linemap_resolve_location, linemap_expand_location)
600         (linemap_expand_location_full)
601         (linemap_tracks_macro_expansion_locs_p)
602         (linemap_position_for_line_and_column, linemap_compare_locations):
603         Define new public functions.
604         (linemap_init): Initialize ordinary and macro maps information in
605         the map set.
606         (linemap_check_files_exited): Use the new accessors.
607         (linemap_free): Remove this dead code.
608         (linemap_line_start): Assert this uses an ordinary map.  Adjust to
609         use the new ordinary map accessors and data structures.  Don't
610         overflow past the lowest possible macro token's location.
611         (linemap_position_for_column): Assert the ordinary maps of the map
612         set are really ordinary.  Use ordinary map accessors.
613         (linemap_lookup): Keep the same logic but generalize to allow
614         lookup of both ordinary and macro maps.  Do not crash when called
615         with an empty line table.
616         * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
617         new API of line-map.h.
618         * directives.c (start_directive, do_line, do_linemarker)
619         (do_linemarker): Likewise.
620         * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
621         (make_cpp_dir, cpp_make_system_header): Likewise.
622         * init.c (cpp_read_main_file): Likewise.
623         * internal.h (CPP_INCREMENT_LINE): Likewise.
624         (linemap_enter_macro, linemap_add_macro_token)
625         (linemap_get_expansion_line, linemap_get_expansion_filename): New
626         functions private to libcpp.
627         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
628         (skip_line_comment, skip_whitespace, lex_raw_string)
629         (_cpp_lex_direct): Likewise.
630         * macro.c (_cpp_builtin_macro_text): Likewise.
631         (_cpp_aligned_alloc): Initialize the new name member of the macro.
632         * traditional.c (copy_comment, _cpp_scan_out_logical_line):
633         Likewise.
634         * errors.c (cpp_diagnostic): Adjust to new linemap API.
636 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
638         * line-map.c (linemap_add): Assert that reason must not be
639         LC_RENAME when called for the first time on a "main input file".
641 2011-08-22  Gabriel Charette  <gchare@google.com>
643         * init.c (cpp_create_reader): Inititalize forced_token_location_p.
644         * internal.h (struct cpp_reader): Add field forced_token_location_p.
645         * lex.c (_cpp_lex_direct): Use forced_token_location_p.
646         (cpp_force_token_locations): New.
647         (cpp_stop_forcing_token_locations): New.
649 2011-08-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
651         PR libstdc++/1773
652         * init.c (cpp_init_builtins): Define __cplusplus 19971L.
654 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
656         * include/cpplib.h (struct cpp_options): Fix typo.
658 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
660         * include/cpplib.h (struct cpp_options): Add rliterals.
661         * init.c  (struct lang_flags, lang_defaults): Add rliterals.
662         (cpp_set_lang): Set rliterals option.
663         (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
664         * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
666 2011-08-15  Gabriel Charette  <gchare@google.com>
668         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
669         Update all users to use linemap_position_for_column instead.
671 2011-07-28  Gabriel Charette  <gchare@google.com>
673         * include/line-map.h (struct line_maps):
674         Remove unused field last_listed. Update all users.
676 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
678         * configure.ac: Set need_64bit_hwint to yes for x86 targets.
679         * configure: Regenerated.
681 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
683         * system.h [__cplusplus]: Wrap C function declarations in extern "C".
685 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
686             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
688         PR bootstrap/49794
689         * configure.ac: Test AM_ICONV with CXX.
690         * configure: Regenerate.
691         * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
693 2011-07-15  Dodji Seketeli  <dodji@redhat.com>
695         * directives.c (struct if_stack): Use source_location as type
696         here.
697         * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
698         indent, def_pragma, used_define, used_undef>: Properly use
699         source_location as parameter type, rather than unsigned int.
701 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
703         PR target/39150
704         * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
705         like i[34567]86-*-solaris2.1[0-9]*.
706         * configure: Regenerate.
708 2011-06-16  Jason Merrill  <jason@redhat.com>
710         PR c++/45399
711         * lex.c (lex_raw_string): Don't check for embedded NUL.
713 2011-06-06  Dodji Seketeli  <dodji@redhat.com>
715         PR preprocessor/48532
716         * directives.c (do_pragma): Don't forget the invocation location
717         when parsing the pragma name of a namespaced pragma directive.
719 2011-05-29  John Tytgat  <John.Tytgat@aaug.net>
721         * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
723 2011-05-22  Uros Bizjak  <ubizjak@gmail.com>
725         PR target/49104
726         * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
727         is defined.  Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
729 2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
731         * system.h (ENUM_BITFIELD): Remove.
733 2011-04-24  Jakub Jelinek  <jakub@redhat.com>
735         PR preprocessor/48740
736         * lex.c (lex_raw_string): When raw string ends with
737         ??) followed by raw prefix and ", ensure it is preprocessed
738         with ??) rather than ??].
740 2011-04-20  Jim Meyering  <meyering@redhat.com>
742         * files.c (destroy_cpp_file): Remove useless if-before-free.
743         * init.c (cpp_destroy): Likewise.
744         * macro.c (replace_args): Likewise.
745         * pch.c (cpp_valid_state): Likewise.
747 2011-03-25  Kai Tietz  <ktietz@redhat.com>
749         * files.c (file_hash_eq): Use filename_cmp
750         instead of strcmp.
751         (nonexistent_file_hash_eq): Likewise.
752         (remap_filename): Likewise.
753         Handle absolute DOS-path,
754         (append_file_to_dir): Check for IS_DIR_SEPARATOR
755         instead of slash.
756         (read_name_map): Likewise.
757         * linemap.c (linemap_add): Use filename_cmp
758         instead of strcmp.
759         * mkdeps.c (apply_vpath): Use filename_ncmp
760         instead of strncmp.
761         (deps_restore): Use filename_cmp instead of
762         strcmp.
763         * init.c (read_original_directory): Use
764         IS_DIR_SEPARATOR instead of checking for slash.
766 2011-03-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
768         PR preprocessor/48192
769         * directives.c (do_ifdef): Do not consider conditional macros as
770         being defined.
771         (do_ifndef): Ditto.
772         * expr.c (parse_defined): Ditto.
774 2011-03-18  Richard Henderson  <rth@redhat.com>
776         PR bootstrap/45381
777         * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
779 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
780             Jakub Jelinek  <jakub@redhat.com>
782         PR preprocessor/39213
783         * directives.c (end_directive): Call _cpp_remove_overlay for deferred
784         pragmas as well in traditional mode.
786 2010-11-17  Ian Lance Taylor  <iant@google.com>
788         PR bootstrap/45538
789         * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS.  Remove switch of
790         AC_LANG based on ENABLE_BUILD_WITH_CXX.
792 2010-11-16  Kai Tietz  <kai.tietz@onevision.com>
794         PR preprocessor/17349
795         * lex.c (save_comment): Handle in argument passing c++
796         comments special.
798 2010-11-02  Ian Lance Taylor  <iant@google.com>
800         * configure.ac: Use AC_SYS_LARGEFILE.
801         * configure: Rebuild.
802         * config.in: Rebuild.
804 2010-10-19  Basile Starynkevitch  <basile@starynkevitch.net>
806         * line-map.h (source_location): Remove obsolete comment
807         mentioning location_s.
809 2010-09-29  Kai Tietz  <kai.tietz@onevision.com>
811         PR preprocessor/45362
812         * directives.c (cpp_pop_definition): Make static.
813         (do_pragma_push_macro): Reworked to store text
814         definition.
815         (do_pragma_pop_macro): Add free text definition.
816         (cpp_push_definition): Removed.
817         * include/cpplib.h (cpp_push_definition): Removed.
818         (cpp_pop_definition): Likewise.
819         * internal.h (def_pragma_macro): Remove member 'value'
820         and add new members 'definition', 'line',
821         'syshdr', 'sued' and 'is_undef'.
822         * pch.c (_cpp_restore_pushed_macros): Rework to work
823         on text definition and store additional macro flags.
824         (_cpp_save_pushed_macros): Likewise.
826 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
828         * include/cpplib.h (cpp_options): Rename warn_deprecated,
829         warn_traditional, warn_long_long and pedantic.
830         * directives.c (directive_diagnostics, _cpp_handle_directive):
831         Update names of cpp_options members.
832         * expr.c (cpp_classify_number, eval_token): Update names of
833         cpp_options members.
834         * init.c (cpp_create_reader, post_options): Update names of
835         cpp_options members.
836         * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
837         cpp_options members.
838         * macro.c (parse_params): Update names of cpp_options members.
840 2010-09-15  Ian Lance Taylor  <iant@google.com>
842         * init.c: Fix type name in comment.
844 2010-08-31  Jakub Jelinek  <jakub@redhat.com>
846         PR preprocessor/45457
847         * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
848         needed.
849         * directives.c (do_ifdef, do_ifndef): Likewise.
851 2010-08-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
853         * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
855 2010-08-24  Richard Henderson  <rth@redhat.com>
857         PR bootstrap/45376
858         * configure.ac (HAVE_SSE4): New check.
859         * configure, config.in: Rebuild.
860         * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
862 2010-08-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
864         * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
865         etc. on Solaris 2/x86.
867 2010-08-21  Richard Henderson  <rth@redhat.com>
868             Andi Kleen <ak@linux.intel.com>
869             David S. Miller  <davem@davemloft.net>
871         * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
872         (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
873         (ptrdiff_t): Check via AC_CHECK_TYPE.
874         * config.in, configure: Rebuild.
875         * system.h: Include stdint.h, if available.
876         * lex.c (WORDS_BIGENDIAN): Provide default.
877         (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
878         acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
879         search_line_sse2, search_line_sse42, init_vectorized_lexer,
880         search_line_fast): New.
881         (_cpp_clean_line): Use search_line_fast.  Restructure the fast
882         loop to make it clear when we're leaving the loop.  Stay in the
883         fast loop for non-trigraph '?'.
885 2010-06-11  Jakub Jelinek  <jakub@redhat.com>
887         * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
888         callback.
889         (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
890         (cpp_macro_definition): Remove const qual from second argument.
891         * macro.c (enter_macro_context): Call user_builtin_macro callback for
892         NODE_BUILTIN !NODE_USED macros.
893         (warn_of_redefinition): Likewise.  Remove const qual from second
894         argument.
895         (cpp_macro_definition): Likewise.
896         * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
897         for NODE_BUILTIN !NODE_USED macros.
899 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
901         * include/cpplib.h (struct cpp_options): Remove show_column.
902         * init.c (cpp_create_reader, post_options): Don't set show_column.
904 2010-06-09  Joern Rennecke  <joern.rennecke@embecosm.com>
906         PR bootstrap/44432
907         * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
908         check that C++ compiler works.
909         * configure: Regenerate.
911 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
913         * include/symtab.h (ht_identifier_ptr): New.
915 2010-06-03  Joern Rennecke <joern.rennecke@embecosm.com>
916             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
918         PR bootstrap/42798
919         * configure.ac: Check for declaration of 'basename(char *)'.
920         * configure: Regenerate.
921         * config.in: Regenerate.
923 2010-04-25  Joseph Myers  <joseph@codesourcery.com>
925         * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
926         * init.c (lang_defaults): Add entries for new language variants.
927         (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
928         variants.
930 2010-04-09  Manuel López-Ibáñez <manu@gcc.gnu.org>
932         PR cpp/43195
933         * files.c (report_missing_guard): Test for #pragma once.
935 2010-04-07  Simon Baldwin  <simonb@google.com>
937         * directives.c (do_diagnostic): Add warning reason argument,
938         call appropriate error reporting function for code.
939         (directive_diagnostics): Call specific warning functions with
940         warning reason where appropriate.
941         (do_error, do_warning, do_pragma_dependency): Add warning reason
942         argument to do_diagnostic calls.
943         * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
944         _cpp_create_definition): Call specific warning functions with
945         warning reason where appropriate.
946         * Makefile.in: Add new diagnostic functions to gettext translations.
947         * include/cpplib.h (struct cpp_callbacks): Add warning reason code
948         to error callback.
949         (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
950         CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
951         (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
952         CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
953         CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
954         CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
955         CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
956         CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
957         CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
958         warning reason codes.
959         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
960         cpp_warning_with_line, cpp_pedwarning_with_line,
961         cpp_warning_with_line_syshdr): New specific error reporting functions.
962         * pch.c (cpp_valid_state): Call specific warning functions with
963         warning reason where appropriate.
964         * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
965         diagnostic handlers.
966         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
967         cpp_warning_with_line, cpp_pedwarning_with_line,
968         cpp_warning_with_line_syshdr): New specific error reporting functions.
969         * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
970         specific warning functions with warning reason where appropriate.
971         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
972         warn_about_normalization, lex_identifier_intern, lex_identifier,
973         _cpp_lex_direct): Ditto.
974         * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
975         narrow_str_to_charconst): Ditto.
977 2010-04-06  Jakub Jelinek  <jakub@redhat.com>
979         PR preprocessor/43642
980         * lex.c (lex_raw_string): Change type of TYPE variable to
981         unsigned char.
983 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
985         * aclocal.m4: Regenerate.
987 2010-03-29  Jason Merrill  <jason@redhat.com>
989         More N3077 raw string changes
990         * charset.c (cpp_interpret_string): Don't transform UCNs in raw
991         strings.
992         * lex.c (bufring_append): Split out from...
993         (lex_raw_string): ...here.  Undo trigraph and line splicing
994         transformations.  Do process line notes in multi-line literals.
995         (_cpp_process_line_notes): Ignore notes that were already handled.
997         Some raw string changes from N3077
998         * charset.c (cpp_interpret_string): Change inner delimiters to ().
999         * lex.c (lex_raw_string): Likewise.  Also disallow '\' in delimiter.
1001 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
1003         * init.c (read_original_filename): Don't call read_original_directory
1004         if _cpp_handle_directive returns 0.
1006 2010-01-01  Joseph Myers  <joseph@codesourcery.com>
1008         PR preprocessor/41947
1009         * expr.c (cpp_classify_number): Give error for hexadecimal
1010         floating-point constant with no digits before or after point.
1012 2009-11-20  Arnaud Charlet  <charlet@adacore.com>
1014         * macro.c (enter_macro_context): Call cb.used callback if defined.
1015         * directives.c (do_idef, do_ifndef): Ditto.
1016         * include/cpplib.h (struct cpp_callbacks): Add used callback.
1018 2009-11-11  Kai Tietz  <kai.tietz@onevision.com>
1020         * directives.c (do_pragma_push_macro): New pragma handler.
1021         (do_pragma_pop_macro): Likewise.
1022         (_cpp_init_internal_pragmas): Add push_macro and
1023         pop_macro handler to internal pragmas.
1024         (lex_macro_node_from_str): Removed.
1025         (cpp_push_definition): Replace lex_macro_node_from_str
1026         by _cpp_lex_identifier.
1027         (cpp_pop_definition): Likewise.
1028         * internal.h (_cpp_lex_identifier): New prototype.
1029         (def_pragma_macro): New structure.
1030         (cpp_reader): New member pushed_macros.
1031         * lex.c (_cpp_lex_identifier): New function.
1032         (lex_identifier_intern): New function.
1033         * init.c (cpp_create_reader): Initialize pushed_macros
1034         member.
1035         (cpp_destroy): Free elements in pushed_macros member.
1036         * pch.c (_cpp_save_pushed_macros): New function.
1037         (_cpp_restore_pushed_macros): Likewise.
1038         (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
1039         (cpp_read_state): Use _cpp_restore_pushed_macros.
1041 2009-10-19  Jakub Jelinek  <jakub@redhat.com>
1043         * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
1044         (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
1045         and char32_cset_desc.
1046         (converter_for_type): Handle CPP_UTF8STRING.
1047         (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
1048         * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
1049         (parse_include): Reject raw strings.
1050         * include/cpplib.h (CPP_UTF8STRING): New token type.
1051         * internal.h (struct cpp_reader): Add utf8_cset_desc field.
1052         * lex.c (lex_raw_string): New function.
1053         (lex_string): Handle u8 string literals, call lex_raw_string
1054         for raw string literals.
1055         (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
1056         sequences.
1057         * macro.c (stringify_arg): Handle CPP_UTF8STRING.
1059 2009-10-14  Jakub Jelinek  <jakub@redhat.com>
1061         PR preprocessor/41543
1062         * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
1063         * line-map.c (linemap_init): Initialize highest_location and
1064         highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
1066 2009-10-09  Jason Merrill  <jason@redhat.com>
1068         * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
1070 2009-10-09  Neil Vachharajani <nvachhar@google.com>
1072         * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
1073         sccs.
1075 2009-09-23  Loren J. Rittle  <ljrittle@acm.org>
1077         * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
1078         * configure: Rebuilt.
1080 2009-09-22  Richard Guenther  <rguenther@suse.de>
1082         PR pch/38987
1083         * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
1085 2009-09-18  Chris Demetriou  <cgd@google.com>
1087         PR preprocessor/28435:
1088         * include/cpplib.h (struct cpp_options): Add new member
1089         deps.need_preprocessor_output.
1090         * files.c (open_file_failed): If preprocessor output is needed
1091         always report an error.
1093 2009-09-13  Kai Tietz  <kai.tietz@onevision.com>
1095         * configure.ac: Set for i?86-w64-mingw*
1096         need_64bit_hwint to yes.
1097         * configure: Regenerated.
1099 2009-09-10  Jason Merrill  <jason@redhat.com>
1101         * directives.c (cpp_define): constify.
1103 2009-09-02  Ian Lance Taylor  <iant@google.com>
1105         * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
1107 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1109         * configure.ac (AC_PREREQ): Bump to 2.64.
1111 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1113         * aclocal.m4: Regenerate.
1114         * config.in: Regenerate.
1115         * configure: Regenerate.
1117 2009-08-17  Tom Tromey  <tromey@redhat.com>
1119         PR preprocessor/41067:
1120         * charset.c (convert_escape): Add missing ":" to error text.
1122 2009-07-27  Douglas B Rupp  <rupp@gnat.com>
1124         * include/cpplib.h (INO_T_CPP): New macro.
1125         (struct cpp_dir): Use it.
1127 2009-07-20  Jerry Quinn  <jlquinn@optonline.net>
1129         PR regression/40800
1130         * configure.ac: Use = instead of == for testing
1131         ENABLE_BUILD_WITH_CXX.
1132         * configure: Rebuild.
1134 2009-07-17  Jerry Quinn  <jlquinn@optonline.net>
1136         * directives.c (do_linemarker, do_line): Use CPP_STRING for
1137         ignored enum value.
1138         * files.c (find_file_in_dir): Add cast from void* to char*.
1139         * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
1140         * Makefile.in: (WARN_CFLAGS): Use general and C-specific
1141         warnings.
1142         (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
1143         ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
1144         COMPILER_FLAGS): New.
1145         (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
1146         (COMPILE.base): Use COMPILER instead of CC.  Use COMPILER_FLAGS
1147         instead of ALL_CFLAGS.
1148         * configure.ac: Invoke AC_PROG_CXX.  Separate C-specific warnings
1149         from other warnings.  Add -Wc++-compat to C-specific warnings.
1150         Check for --enable-build-with-cxx.  Set and substitute
1151         ENABLE_BUILD_WITH_CXX.  Invoke ZW_PROG_COMPILER_DEPENDENCIES
1152         according to ENABLE_BUILD_WITH_CXX.  Invoke AC_LANG before
1153         AC_CHECK_HEADERS.
1154         * configure: Rebuild.
1155         * include/cpp-id-data.h: Remove extern "C".
1156         * include/line-map.h: Likewise.
1157         * include/mkdeps.h: Likewise.
1158         * include/symtab.h: Likewise.
1159         * internal.h: Likewise.
1161 2009-06-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1163         * directives.c (parse_include): Add location argument. Update all
1164         calls.
1165         (parse_answer): Likewise.
1166         (do_include_common): Error with exact location.
1167         (parse_assertion): Likewise.
1169 2009-06-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1171         * expr.c (num_div_op): Take explicit location.
1173 2009-06-17  Ian Lance Taylor  <iant@google.com>
1175         * include/cpplib.h (progname): Don't declare.
1177 2009-06-12  Ian Lance Taylor  <iant@google.com>
1179         * include/cpplib.h (struct cpp_options): Add
1180         warn_cxx_operator_names field.
1181         (NODE_WARN_OPERATOR): Define.
1182         (struct cpp_hashnode): Increase flags field to 10 bits, decrease
1183         type to 6 bits.
1184         * init.c (mark_named_operators): Add flags parameter.
1185         (cpp_post_options): Pick flags value to pass to
1186         mark_named_operators.
1187         * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
1188         identifier is an operator name in C++.
1190 2009-06-01  Aldy Hernandez  <aldyh@redhat.com>
1192         * include/line-map.h (LAST_SOURCE_COLUMN): New.
1194 2009-06-01  Ian Lance Taylor  <iant@google.com>
1196         * include/cpp-id-data.h: Add extern "C".
1197         * include/line-map.h: Likewise.
1198         * include/mkdeps.h: Likewise.
1199         * include/symtab.h: Likewise.
1200         * internal.h: Likewise.
1202 2009-05-15  Ian Lance Taylor  <iant@google.com>
1204         * include/cpplib.h (enum cpp_builtin_type): Rename from enum
1205         builtin_type.  Change all uses.
1207 2009-05-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1209         PR cpp/36674
1210         * directives (do_linemarker): Compensate for the increment in
1211         location that occurs when we reach the end of line.
1212         * files (_cpp_stack_include): Mention _cpp_find_file in the
1213         comment.
1215 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
1217         * include/cpplib.h (enum cpp_token_fld_kind): Add
1218         CPP_TOKEN_FLD_TOKEN_NO.
1219         (struct cpp_macro_arg, struct cpp_identifier): Define.
1220         (union cpp_token_u): Use struct cpp_identifier for identifiers.
1221         Use struct cpp_macro_arg for macro arguments.  Add token_no for
1222         CPP_PASTE token numbers.
1223         * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
1224         do_pragma_poison, parse_assertion): Use val.node.node in place of
1225         val.node.
1226         * expr.c (parse_defined, eval_token): Use val.node.node in place
1227         of val.node.
1228         * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
1229         cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
1230         cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
1231         place of val.arg_no.  Use val.node.node in place of val.node.
1232         * macro.c (replace_args, cpp_get_token, parse_params,
1233         lex_expansion_token, create_iso_definition, cpp_macro_definition):
1234         Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
1235         Use val.node.node in place of val.node.
1237 2009-05-03  Joseph Myers  <joseph@codesourcery.com>
1239         * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
1240         UTF-8 sequences.
1242 2009-04-25  Joseph Myers  <joseph@codesourcery.com>
1244         PR preprocessor/39559
1245         * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
1246         constants larger than intmax_t in C99 mode.
1248 2009-04-21  Taras Glek <tglek@mozilla.com>
1250         * include/cpp-id-data.h: Update GTY annotations to new syntax.
1251         * include/cpplib.h: Likewise.
1252         * include/line-map.h: Likewise.
1253         * include/symtab.h: Likewise.
1255 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1257         PR c++/14875
1258         * lex.c (cpp_type2name): Take a flags parameter. Call
1259         cpp_named_operator2name for named operators and cpp_digraph2name
1260         for digraphs.
1261         (cpp_digraph2name): New.
1262         (cpp_spell_token): Use it.
1263         (cpp_output_token): Likewise.
1264         * include/cpplib.h (cpp_type2name): Update declaration.
1265         * init.c (cpp_named_operator2name): New.
1266         * internal.h (cpp_named_operator2name): Declare.
1268 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1270         PR c++/13358
1271         * init.c (cpp_create_reader): Wlong_long is disabled by default.
1272         * expr.c (cpp_classify_number): Give different messages for C and
1273         C++ front-ends.
1275 2009-04-19  Joseph Myers  <joseph@codesourcery.com>
1277         PR preprocessor/20078
1278         * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
1279         field.
1280         * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
1281         (struct cpp_token): Change flags to unsigned short.
1282         * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
1283         (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
1284         (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
1285         tokens.
1286         * macro.c (macro_real_token_count): New.
1287         (enter_macro_context, replace_args): Use macro_real_token_count.
1288         (create_iso_definition): Record whitespace surrounding and digraph
1289         spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
1290         Set extra_tokens and save CPP_PASTE tokens with arg_no set for
1291         multiple consecutive ## tokens.
1292         (_cpp_create_definition): Initialize extra_tokens.
1293         (cpp_macro_definition): Use macro_real_token_count.
1295 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1297         * directives.c (parse_include): Pass true to check_eol.
1299 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1301         PR preprocessor/39646
1302         * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
1303         * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
1304         * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
1305         place of LC_RENAME.
1307 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1309         PR preprocessor/39647
1310         * directives.c (check_eol): Add parameter expand.
1311         (do_undef, parse_include, do_line, do_linemarker, do_ident,
1312         do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
1313         do_else, do_endif, do_assert, do_unassert): All callers changed.
1314         Pass true from do_line, false elsewhere.
1316 2009-04-12  Joseph Myers  <joseph@codesourcery.com>
1318         PR preprocessor/31869
1319         * macro.c (stringify_arg): Handle NULL source token in padding
1320         token where previous padding token did not have source token with
1321         preceding whitespace.
1323 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
1325         * Makefile.in: Change copyright header to refer to version
1326         3 of the GNU General Public License and to point readers at the
1327         COPYING3 file and the FSF's license web page.
1328         * charset.c: Likewise.
1329         * directives-only.c: Likewise.
1330         * directives.c: Likewise.
1331         * errors.c: Likewise.
1332         * expr.c: Likewise.
1333         * files.c: Likewise.
1334         * identifiers.c: Likewise.
1335         * include/cpp-id-data.h: Likewise.
1336         * include/cpplib.h: Likewise.
1337         * include/line-map.h: Likewise.
1338         * include/mkdeps.h: Likewise.
1339         * include/symtab.h: Likewise.
1340         * init.c: Likewise.
1341         * internal.h: Likewise.
1342         * lex.c: Likewise.
1343         * line-map.c: Likewise.
1344         * macro.c: Likewise.
1345         * makeucnid.c: Likewise.
1346         * mkdeps.c: Likewise.
1347         * pch.c: Likewise.
1348         * symtab.c: Likewise.
1349         * system.h: Likewise.
1350         * traditional.c: Likewise.
1351         * ucnid.tab: Likewise.
1352         * ucnid.h: Regenerate.
1354 2009-04-01  Janis Johnson  <janis187@us.ibm.com>
1356         PR c/39027
1357         * include/cpplib.h (CPP_N_DEFAULT): Define.
1358         * expr.c (interpret_float_suffix): Recognize d or D for double,
1359         return new value for default.
1360         (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
1362         PR c/33466
1363         * expr.c (interpret_float_suffix): Reject invalid suffix that uses
1364         letters from decimal float and fixed-point suffixes.
1366 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
1368         PR preprocessor/15638
1369         * files.c (_cpp_find_file): Call open_file_failed after diagnosing
1370         invalid PCH.
1371         (open_file_failed): Make error for missing file fatal.
1372         * include/cpplib.h (CPP_DL_FATAL): Define.
1374 2009-03-30  Sergiy Vyshnevetskiy  <serg@vostok.net>
1376         PR preprocessor/31932:
1377         * internal.h: Don't mention HAVE_ICONV_H.
1378         * configure, config.in: Rebuild.
1379         * configure.ac: Don't check for iconv.h.
1381 2009-03-30  Tom Tromey  <tromey@redhat.com>
1383         PR preprocessor/39512:
1384         * line-map.c (linemap_init): Initialize 'reallocator' field.
1386 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
1388         PR target/39558
1389         * macro.c (cpp_get_token): If macro_to_expand returns NULL
1390         and used some tokens, add CPP_PADDING before next token.
1392 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
1394         PR preprocessor/34695
1395         * makedepend.c: Remove.
1396         * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
1397         (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
1398         * directives.c (cpp_errors): Remove.
1399         * errors.c (print_location, _cpp_begin_message, v_message):
1400         Remove.
1401         (cpp_error, cpp_error_with_line): Always use error callback.
1402         (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
1403         * include/cpplib.h (cpp_options): Remove pedantic_errors,
1404         inhibit_warnings, warn_system_headers, inhibit_errors,
1405         warnings_are_errors, client_diagnostic.
1406         (cpp_callbacks): Add extra arguments to error callback; make it
1407         return bool.
1408         (cpp_finish): Return void.
1409         (cpp_destroy): Remove inaccurate comment about return value.
1410         (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
1411         (CPP_DL_NOTE): Define.
1412         * include/line-map.h (linemap_print_containing_files): Remove.
1413         * init.c (cpp_finish): Do not check for or return number of
1414         errors.
1415         * internal.h (cpp_reader): Remove errors field.
1416         * line-map.c (linemap_print_containing_files): Remove.
1417         * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
1418         about previous definition.  Only emit it if previous diagnostic
1419         was emitted.
1421 2009-03-28  Joseph Myers  <joseph@codesourcery.com>
1423         * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1424         mkinstalldirs.
1426 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
1428         * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1430 2009-02-21  Joseph Myers  <joseph@codesourcery.com>
1432         * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1433         header name.
1434         (_cpp_lex_direct): Handle this.
1436 2009-02-15  Richard Guenther  <rguenther@suse.de>
1438         Revert last change.
1440 2009-02-13  Richard Guenther  <rguenther@suse.de>
1442         * configure.ac: Enable LFS.
1443         * configure: Re-generate.
1444         * config.in: Likewise.
1446 2009-01-05  Ben Elliston  <bje@au.ibm.com>
1448         * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1449         (.po.pox): Likewise.
1450         (po/$(PACKAGE).pot): Likewise.
1452 2008-12-10  Alexandre Oliva  <aoliva@redhat.com>
1454         PR target/37033
1455         * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1456         Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1458 2008-11-29  Joseph Myers  <joseph@codesourcery.com>
1460         * lex.c (cpp_token_len): Use 6 as default length.
1462 2008-10-31  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1464         * expr.c (struct op): Add location.
1465         (_cpp_parse_expr): Propagate locations throught the stack
1466         of expressions.
1467         (reduce): Likewise.
1468         (check_promotion): Use explicit location in errors.
1470 2008-10-05  Matthew Gingell  <gingell@adacore.com>
1471             Arnaud Charlet  <charlet@adacore.com>
1473         * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1474         (cpp_get_comments): New function.
1475         * internal.h (struct cpp_reader): Add comments field.
1476         * init.c (cpp_destroy): Free comments.
1477         * lex.c (store_comment, cpp_get_comments): New functions.
1478         (comments): New struct.
1479         (save_comment): Store comments in comments struct.
1481 2008-09-18  Simon Baldwin  <simonb@google.com>
1483         * include/cpplib.h (struct cpp_options): Add new boolean flag
1484         warn_builtin_macro_redefined.
1485         * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1486         * (struct builtin_operator): Split out from previous struct builtin,
1487         enhance extra const correctness.
1488         * (struct builtin_macro): Split out from previous struct builtin, add
1489         new always_warn_if_redefined flag, enhance const correctness.
1490         * (mark_named_operators): Use struct builtin_operator.
1491         * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1492         to builtins selectively.
1493         * macro.c (warn_of_redefinition): Return false if a builtin macro
1494         is not flagged with NODE_WARN.
1496 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
1498         PR preprocessor/36649
1499         * files.c (struct report_missing_guard_data): New type.
1500         (report_missing_guard): Put paths into an array instead of printing
1501         them right away.  Return 1 rather than 0.
1502         (report_missing_guard_cmp): New function.
1503         (_cpp_report_missing_guards): Sort and print paths gathered by
1504         report_missing_guard callback.
1506 2008-07-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1508         PR 28079
1509         * directives.c (strtolinenum): Handle overflow.
1510         (do_line): Give a warning if line number overflowed.
1511         (do_linemarker): Update call to strtolinenum.
1513 2008-07-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1515         * include/line-map.h (linenum_type): New typedef.
1516         (struct line_map): Use it.
1517         (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1518         (SOURCE_COLUMN): Likewise.
1519         * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1520         source_location values in a variable of type linenum_type.
1521         * directives.c (struct if_stack): Use linenum_type.
1522         (strtoul_for_line): Rename as strtolinenum.
1523         (do_line): Use linenum_type.
1524         (do_linemarker): Use linenum_type and strtolinenum.
1525         (_cpp_do_file_change): Use linenum_t.
1526         * line-map.c (linemap_add): Likewise.
1527         (linemap_line_start): Likewise.
1528         * traditional.c (struct fun_macro): 'line' is a source_location.
1529         * errors.c (print_location): Use linenum_type.
1530         * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1531         * internal.h (CPP_INCREMENT_LINE): Likewise.
1532         * lex.c (_cpp_skip_block_comment): Use source_location.
1533         
1534 2008-07-14  Ben Elliston  <bje@au.ibm.com>
1536         * include/cpplib.h (NODE_CONDITIONAL): New.
1537         (struct cpp_callbacks): New macro_to_expand field.
1538         (struct cpp_hashnode): Adjust size of flags and type fields.
1539         (cpp_peek_token): Prototype.
1540         * lex.c (cpp_peek_token): New function.
1541         (_cpp_temp_token): Protect pre-existing lookaheads.
1542         * macro.c (cpp_get_token): Expand any conditional macros.
1543         (_cpp_backup_tokens_direct): New.
1544         (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1545         (warn_of_redefinition): Silently allow redefined conditional
1546         macros.
1547         (_cpp_create_definition): Remove the conditional flag when a user
1548         defines one of the conditional macros.
1549         * internal.h (_cpp_backup_tokens_direct): New prototype.
1551 2008-06-13  Andrew Haley  <aph@redhat.com>
1553         PR preprocessor/33305
1554         * macro.c (replace_args): Print a warning for empty macro
1555         arguments in C89 and C++.
1557 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1559         * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1560         * configure: Regenerate.
1562 2008-06-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1564         * Makefile.in (datarootdir): New variable.
1566 2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1568         PR preprocessor/36479
1569         * charset.c (cpp_interpret_string_notranslate): Also set
1570         narrow_cset_desc.width.
1572 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
1574         * configure.ac (parisc*64*-*-*): Remove.
1575         * configure: Regenerate.
1577 2008-05-30  Tom Tromey  <tromey@redhat.com>
1579         PR preprocessor/36320:
1580         * internal.h (_cpp_parse_expr): Update.
1581         * expr.c (_cpp_parse_expr): Add 'is_if' argument.  Update error
1582         messages.
1583         * directives.c (do_if): Update.
1584         (do_elif): Require expression if processing group.
1586 2008-05-30  Danny Smith  <dannysmith@users.sourceforge.net>
1588         * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1590 2008-05-21  Tom Tromey  <tromey@redhat.com>
1592         PR preprocessor/27777:
1593         * lex.c (cpp_output_line_to_string): New function.
1594         * internal.h (_cpp_begin_message): Don't declare.
1595         * errors.c (_cpp_begin_message): Now static.
1596         * include/cpplib.h (cpp_output_line_to_string): Declare.
1597         * directives.c (do_diagnostic): Rewrote.  Use
1598         cpp_output_line_to_string.  Don't use _cpp_begin_message.
1600 2008-05-21  Tom Tromey  <tromey@redhat.com>
1602         * include/symtab.h (HT_ALLOCED): Remove.
1603         (ht_purge): Declare.
1604         * symtab.c (DELETED): New define.
1605         (ht_lookup): Update comment.
1606         (ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
1607         code.  Use subobject allocator for strings, if it exists.
1608         (ht_expand): Handle deleted entries.
1609         (ht_forall): Likewise.
1610         (ht_purge): New function.
1611         (ht_dump_statistics): Print deletion statistics.
1613 2008-05-13  Tom Tromey  <tromey@redhat.com>
1615         PR preprocessor/22168:
1616         * include/cpplib.h (struct cpp_options) <objc>: Update
1617         documentation.
1618         * expr.c (eval_token): Warn for use of assertions.
1619         * directives.c (directive_diagnostics): Warn about extensions.
1620         (DEPRECATED): New define.
1621         (DIRECTIVE_TABLE): Use it.
1623 2008-05-06  Tom Tromey  <tromey@redhat.com>
1625         PR preprocessor/35313, PR preprocessor/36088:
1626         * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1627         (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1629 2008-05-04  David S. Miller  <davem@davemloft.net>
1631         * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1632         * configure: Regenerate.
1634 2008-04-22  Daniel Franke  <franke.daniel@gmail.com>
1636         * include/cpplib.h (cpp_define_formatted): New.
1637         * directives.c (cpp_define_formatted): New.
1639 2008-04-21  Tom Tromey  <tromey@redhat.com>
1641         PR libcpp/33415:
1642         * charset.c (_cpp_convert_input): Add buffer_start argument.
1643         Ignore UTF-8 BOM if seen.
1644         * internal.h (_cpp_convert_input): Add argument.
1645         * files.c (struct _cpp_file) <buffer_start>: New field.
1646         (destroy_cpp_file): Free buffer_start, not buffer.
1647         (_cpp_pop_file_buffer): Likewise.
1648         (read_file_guts): Update.
1650 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
1652         * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1653         * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1654         (struct cpp_options): Added uliterals.
1655         (cpp_interpret_string): Update prototype.
1656         (cpp_interpret_string_notranslate): Idem.
1657         * charset.c (init_iconv_desc): New width member in cset_converter.
1658         (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1659         (convert_ucn): Idem.
1660         (emit_numeric_escape): Idem.
1661         (convert_hex): Idem.
1662         (convert_oct): Idem.
1663         (convert_escape): Idem.
1664         (converter_for_type): New function.
1665         (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1666         (cpp_interpret_string_notranslate): Match changed prototype.
1667         (wide_str_to_charconst): Use converter_for_type.
1668         (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1669         * directives.c (linemarker_dir): Macro U changed to UC.
1670         (parse_include): Idem.
1671         (register_pragma_1): Idem.
1672         (restore_registered_pragmas): Idem.
1673         (get__Pragma_string): Support CPP_STRING{16,32}.
1674         * expr.c (eval_token): Support CPP_CHAR{16,32}.
1675         * init.c (struct lang_flags): Added uliterals.
1676         (lang_defaults): Idem.
1677         * internal.h (struct cset_converter) <width>: New field.
1678         (struct cpp_reader) <char16_cset_desc>: Idem.
1679         (struct cpp_reader) <char32_cset_desc>: Idem.
1680         * lex.c (digraph_spellings): Macro U changed to UC.
1681         (OP, TK): Idem.
1682         (lex_string): Add support for u'...', U'...', u"..." and U"...".
1683         (_cpp_lex_direct): Idem.
1684         * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1685         (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1687 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
1689         PR bootstrap/35457
1690         * aclocal.m4: Regenerate.
1691         * configure: Regenerate.
1693 2008-04-17  Tom Tromey  <tromey@redhat.com>
1695         PR libcpp/34866:
1696         * errors.c (cpp_error): Don't reference a token before the start
1697         of the current run.
1699 2008-04-16  Tom Tromey  <tromey@redhat.com>
1701         * Makefile.in (TAGS_SOURCES): New variable.
1702         (TAGS): New target.
1704 2008-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
1706         * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1707         and shbe-*-*.
1708         * configure: Rebuilt.
1710 2008-04-02  Joseph Myers  <joseph@codesourcery.com>
1712         * include/cpplib.h (struct cpp_callbacks): Add used_define,
1713         used_undef and before_define.
1714         (NODE_USED): Define.
1715         * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1716         do_ifndef, cpp_pop_definition): Handle new flag and use new
1717         callbacks.
1718         * expr.c (parse_defined): Handle new flag and use new callbacks.
1719         * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1720         flag and use new callbacks.
1722 2008-04-01  Jakub Jelinek  <jakub@redhat.com>
1724         PR pch/13675
1725         * files.c (struct _cpp_file): Remove pch field.
1726         (pch_open_file): Don't set file->pch, just file->pchname.
1727         (should_stack_file): After pfile->cb.read_pch call
1728         free pchname and clear pchname, don't close file->fd.
1729         Test file->pchname instead of file->pch.  Don't close fd after cb.
1730         (_cpp_stack_include): Test file->pchname instead of file->pch.
1732 2008-03-28  Tom Tromey  <tromey@redhat.com>
1734         * Makefile.in (POSTCOMPILE): New variable.
1735         (.c.o): Use it.
1737 2008-03-13  Tom Tromey  <tromey@redhat.com>
1739         PR libcpp/35322:
1740         * directives.c (destringize_and_run): Set pfile->directive.
1742 2008-03-06  Markus Milleder  <markus.milleder@generali.at>
1744         PR preprocessor/35458
1745         * mkdeps.c (munge): Quote '#' with a '\'.
1747 2008-02-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1749         PR preprocessor/35379
1750         * mkdeps.c (deps_write): Ensure the first target always appears
1751         in the first column, without leading backslash newline.  Avoid
1752         some more extra whitespace.
1754 2008-02-25  Thiemo Seufer <ths@mips.com>
1756         * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
1758 2008-02-19  Tom Tromey  <tromey@redhat.com>
1760         * traditional.c (lex_identifier): Use CPP_HASHNODE.
1761         * lex.c (lex_identifier): Use CPP_HASHNODE.
1762         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
1763         do-while.
1764         * identifiers.c (alloc_node): Change return type.
1765         (_cpp_init_hashtable): Don't cast 'alloc_node'.
1766         (proxy_assertion_broken): New declaration.
1767         (cpp_forall_identifiers): Move comment.
1768         * line-map.c (linemap_add): Comment fix.
1769         (linemap_line_start): Indentation fix.
1771 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
1773         PR preprocessor/34692
1774         * macro.c (collect_args): Add pragma_buff argument.  Push
1775         CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1776         than into arguments.  Reset prevent_expansion and parsing_args
1777         state at CPP_PRAGMA_EOL/CPP_EOF.
1778         (funlike_invocation_p): Add pragma_buff argument, pass it through
1779         to collect_args.
1780         (enter_macro_context): Add result argument.  Adjust
1781         funlike_invocation_p caller.  Emit all deferred pragma tokens
1782         gathered during collect_args before the expansion, add a padding
1783         token.  Return 2 instead of 1 if any pragma tokens were prepended.
1784         (cpp_get_token): If enter_macro_context returns 2, don't return
1785         a padding token, instead cycle to grab CPP_PRAGMA token.
1786         * directives.c (_cpp_handle_directive): If was_parsing_args
1787         in deferred pragma, leave parsing_args and prevent_expansion as is.
1789 2008-01-22  Tom Tromey  <tromey@redhat.com>
1791         PR c++/34859
1792         * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1793         __STDC_CONSTANT_MACROS.
1795 2008-01-07  Fred Fish  <fnf@specifix.com>
1797         PR preprocessor/30363
1798         * traditional.c (replace_args_and_push): Add local variable
1799         cxtquote, calculate the replacement text size assuming a 
1800         worst case of every input character quoted with backslash,
1801         and properly handle output quoting of quote characters in
1802         actual arguments used in function-like macros.
1804 2008-01-03  Tom Tromey  <tromey@redhat.com>
1806         PR preprocessor/34602
1807         * directives.c (do_line): Don't try to spell EOF token.
1808         (do_linemarker): Add comment.
1810 2007-12-11  DJ Delorie  <dj@redhat.com>
1812         * charset.c (convert_using_iconv): Close out any shift states,
1813         returning to the initial state.
1815 2007-12-06  Tom Tromey  <tromey@redhat.com>
1817         PR c/29172
1818         * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1819         type.
1820         <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1821         * files.c (FILE_HASH_POOL_SIZE): New macro.
1822         (struct file_hash_entry_pool): New.
1823         (destroy_all_cpp_files): New function.
1824         (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1825         (new_file_hash_entry): Update.
1826         (free_file_hash_entries): New function.
1827         (_cpp_cleanup_files): Call free_file_hash_entries and
1828         destroy_all_cpp_files.
1829         (cpp_clear_file_cache): New function.
1830         * include/cpplib.h (cpp_clear_file_cache): Declare.
1832 2007-12-03  Tom Tromey  <tromey@redhat.com>
1834         PR preprocessor/34288
1835         * configure.ac, config.in: Rebuilt.
1836         * configure.ac: Check for ssize_t.
1838 2007-11-30  Tom Tromey  <tromey@redhat.com>
1840         PR preprocessor/32868
1841         * macro.c (_cpp_create_definition): Special case
1842         __STDC_FORMAT_MACROS.
1844 2007-11-16  Michael Matz  <matz@suse.de>
1846         * files.c (search_path_head): Fix check for absolute paths.
1848 2007-11-11  Tom Tromey  <tromey@redhat.com>
1850         PR c++/17557
1851         * include/cpplib.h (cpp_included_before): Declare.
1852         * files.c (struct file_hash_entry) <location>: New field.
1853         (_cpp_find_file): Initialize new field.
1854         (make_cpp_dir): Likewise.
1855         (cpp_included_before): New function.
1857 2007-11-01  Tom Tromey  <tromey@redhat.com>
1859         PR preprocessor/30805
1860         * macro.c (paste_tokens): Handle padding token.
1861         (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1863 2007-10-31  Tom Tromey  <tromey@redhat.com>
1865         PR preprocessor/30786
1866         * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1867         * directives.c (_cpp_do__Pragma): Return error status.
1868         * internal.h (_cpp_do__Pragma): Update.
1869         * directives.c (get__Pragma_string): Back up if EOF seen.
1871 2007-09-06  Tom Tromey  <tromey@redhat.com>
1873         * internal.h (struct cpp_reader) <invocation_location>: New
1874         field.
1875         (struct cpp_reader) <set_invocation_location>: Likewise.
1876         * init.c (cpp_set_line_map): New function.
1877         * line-map.c (linemap_add): Use linemap's allocator.
1878         * include/line-map.h (GTY): Define.
1879         (line_map_realloc): New typedef.
1880         (struct line_map): Mark with GTY.
1881         (struct line_maps): Likewise.
1882         (struct line_maps) <maps>: Likewise.
1883         (struct line_maps) <reallocator>: New field.
1884         * include/symtab.h (GTY): Conditionally define.
1885         * include/cpplib.h (cpp_set_line_map): Declare.
1886         (cpp_get_token_with_location): Declare.
1887         * macro.c (cpp_get_token): Set invocation_location on the reader.
1888         (cpp_get_token_with_location): New function.
1890 2007-08-30  Chao-ying Fu  <fu@mips.com>
1892         * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1893         ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1894         (cpp_classify_number): Support decimal fixed-point constants without
1895         exponents.
1896         Warn about fixed-point constants when -pedantic.
1897         * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1898         comments to support fixed-point values.
1899         (CPP_N_FRACT, CPP_N_ACCUM): Define.
1901 2007-08-18  Tom Tromey  <tromey@redhat.com>
1903         PR preprocessor/32974
1904         * directives.c (parse_include): Don't check for EOL when
1905         processing #pragma dependency.
1907 2007-07-30  Ollie Wild  <aaw@google.com>
1909         * directives-only.c: New file.
1910         * internal.h (struct _cpp_dir_only_callbacks): New.
1911         (_cpp_preprocess_dir_only): New function.
1912         * directives.c (_cpp_handle_directive): Check directives_only before
1913         disabling execution of indented directives.
1914         * files.c (_cpp_stack_file): Add directives_only check.
1915         * include/cpplib.h (struct cpp_options): Add directives_only.
1916         (cpp_init_special_builtins): New function.
1917         * init.c (cpp_init_special_builtins): New function.
1918         (cpp_init_builtins): Move builtin_array initialization to
1919         cpp_init_special_builtins.
1920         (post_options): Check directives_only before setting
1921         pfile->state.prevent_expansion = 1.
1922         * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1923         is expanded inside a directive while -fdirectives-only is enabled.
1924         * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1925         (libcpp_a_SOURCES): Add directives-only.c.
1927 2007-07-04  Uros Bizjak  <ubizjak@gmail.com>
1929         * traditional.c (_cpp_scan_out_logical_line): Initialize
1930         fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1931         fmacro.args to prevent 'may be used uninitialized' warning.
1933 2007-07-03  Uros Bizjak  <ubizjak@gmail.com>
1935         * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1936         Add new constants.
1937         * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1938         suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1939         for 'q' or 'Q' suffixes.
1941 2007-06-17  Danny Smith  <dannysmith@users.sourceforge.net
1943         * files.c (open_file): Correct typo.
1945 2007-06-16  Vladimir Prus  <vladimir@codesourcery.com>
1947         * files.c (open_file): Prevent the call
1948         for stat from overwriting errno.
1950 2007-06-09  Vladimir Prus  <vladimir@codesourcery.com>
1952         * files.c (open_file): Account for the
1953         fact that on windows, opening a directory gives
1954         EACCES.
1956 2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
1958         PR preprocessor/23479
1959         * expr.c (cpp_classify_number): Implement 0b-prefixed binary
1960         integer constants.
1961         (append_digit): Likewise.
1962         * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
1963         binary integer constants.
1965 2007-05-31  Dave Korn  <dave.korn@artimi.com>
1967         PR preprocessor/14331
1968         * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
1970 2007-05-24  Ollie Wild  <aaw@google.com>
1972         * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
1973         * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
1974         (cpp_write_pch_state): Save __COUNTER__ state.
1975         (cpp_valid_state): Check valid __COUNTER__ state.
1976         (cpp_read_state): Read new __COUNTER__ state.
1977         * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
1978         * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
1979         * internal.h (struct cpp_reader): Add counter member.
1981 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
1983         PR preprocessor/20077
1984         * macro.c (create_iso_definition): Fixed the method to determine
1985         whether the token-pasting operator appears at the beginning or the end
1986         of a macro.
1988 2007-05-21  Ian Lance Taylor  <iant@google.com>
1990         * internal.h (struct cpp_reader): Add new fields:
1991         nonexistent_file_hash and nonexistent_file_ob.
1992         * files.c: Include "obstack.h".
1993         (find_file_in_dir): Before trying to open the file, look up the
1994         path name in the hash table of nonexistent files.  After failing
1995         to open the file, add the path name to the hash table.
1996         (_cpp_find_file): Cache the results of looking up the file name
1997         starting with the quote and bracket chain heads, if we can.
1998         (nonexistent_file_hash_eq): New static function.
1999         (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
2000         pfile->nonexistent_file_ob.
2001         (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
2002         pfile->nonexistent_file_ob.
2004 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
2006         * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
2008         PR c/31924
2009         * expr.c (interpret_float_suffix): Check for invalid suffix.
2011 2007-05-02  Eric Christopher  <echristo@apple.com>
2013         * expr.c (num_div_op): Don't overflow if the result is
2014         zero.
2016 2007-05-02  Tom Tromey  <tromey@redhat.com>
2018         PR preprocessor/28709
2019         * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
2021 2007-03-30  Michael Meissner  <michael.meissner@amd.com>
2023         * directives.c (lex_macro_node_from_str): Fix alloca call to be
2024         type correct.
2026 2007-03-30  Richard Henderson  <rth@redhat.com>
2028         * directives.c (lex_macro_node_from_str): New.
2029         (cpp_push_definition, cpp_pop_definition): New.
2030         * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
2032 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2034         * Makefile.in: Add dummy install-pdf target.
2036 2007-01-30  Tom Tromey  <tromey@redhat.com>
2038         PR preprocessor/30468
2039         * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
2040         './'.
2042 2007-01-30  Tom Tromey  <tromey@redhat.com>
2044         PR preprocessor/29966
2045         * macro.c (lex_expansion_token): Save and restore cpp_reader's
2046         cur_token.
2047         (_cpp_create_definition): Don't restore cur_token here.
2048         * lex.c (_cpp_lex_token): Added assertion.
2050 2007-01-27  Tom Tromey  <tromey@redhat.com>
2052         * configure: Rebuilt.
2054 2007-01-12  Tom Tromey  <tromey@redhat.com>
2056         PR preprocessor/28227
2057         * directives.c (lex_macro_node): Added 'is_def_or_undef'
2058         argument.
2059         (do_define): Update.
2060         (do_undef): Update.
2061         (do_ifdef): Update.
2062         (do_ifndef): Update.
2064 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
2066         * configure: Regenerate.
2068 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
2070         * configure: Regenerate.
2072 2007-01-04  Tom Tromey  <tromey@redhat.com>
2074         PR preprocessor/28165
2075         * internal.h (cpp_in_primary_file): New function.
2076         * directives.c (do_include_next): Use cpp_in_primary_file.
2077         (do_pragma_once): Likewise.
2078         (do_pragma_system_header): Likewise.
2080 2006-12-29  Ian Lance Taylor  <iant@google.com>
2082         * lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
2083         look backward at the end of the line unless we saw a backslash.
2085 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
2087         PR preprocessor/29612
2088         * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
2089         only when new_sysp is non-zero.
2091 2006-12-28  Tom Tromey  <tromey@redhat.com>
2093         PR preprocessor/30001
2094         * charset.c (_cpp_convert_input): Check that to.len is greater
2095         than zero.
2097 2006-11-20  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
2099         * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
2100         * configure: Rebuilt.
2102 2006-11-01      Douglas Gregor <doug.gregor@gmail.com>
2104         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
2105         for experimental C++0x mode.
2106         * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
2107         adopted the preprocessor changes introduced in C99.
2109 2006-10-29  Joseph Myers  <joseph@codesourcery.com>
2111         * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
2112         depending on --enable-targets=all.
2113         * configure: Regenerate.
2115 2006-10-12  Jakub Jelinek  <jakub@redhat.com>
2117         PR preprocessor/28709
2118         * macro.c (paste_tokens): Do error reporting here, use BUF with the
2119         spelled LHS token as opposed to spelling it again.
2120         (paste_all_tokens): Don't report errors here, just break on failure.
2122 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2124         * Makefile.in: Added empty "pdf" target.
2126 2006-09-22  Geoffrey Keating  <geoffk@apple.com>
2128         * configure.ac: Make need_64_bit_hwint case for x86-darwin
2129         match exactly the glob in gcc/config.gcc.
2130         * configure: Regenerate.
2132 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
2134         PR c/28768
2135         PR preprocessor/14634
2136         * lex.c (lex_string): Pedwarn for unterminated literals.
2138 2006-09-08  Eric Christopher  <echristo@apple.com>
2140         * configure.ac: Add 64-bit HWI support for i?86-darwin.
2142 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
2144         PR c++/28288
2145         PR c++/14556
2146         * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
2147         (CPP_LAST_EQ): Change.
2148         (CPP_LAST_PUNCTUATOR): Change.
2149         * expr.c (cpp_operator): Remove MIN and MAX.
2150         (reduce): Remove CPP_MIN and CPP_MAX.
2151         (num_binary_op): Ditto.
2152         * lex.c (_cpp_lex_direct): Ditto.
2153         (cpp_avoid_paste): Remove ? as legal symbol after > or <.
2155 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
2157         PR preprocessor/27746
2158         * directives.c (do_pragma): Handle pragma with valid namespace
2159         and invalid name coming from macro expansion.
2160         * directives.c (destringize_and_run): Initialize next field in
2161         context.
2163         PR c/27747
2164         PR c++/27748
2165         * directives.c (destringize_and_run): Set NO_EXPAND on the
2166         tokens.
2168         * macro.c (_cpp_backup_tokens): Fix comment typo.
2170 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
2172         * Makefile.in (CATALOGS): Add po/ prefix.
2173         * configure: Regenerated.
2175 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
2177         * Makefile.in: Add install-html target. Add install-html to .PHONY
2179 2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
2181         * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
2182         * files.c (_cpp_get_file_stat): New function.
2183         * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
2184         * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
2185         * internal.h (_cpp_get_file_stat): Prototype.
2186         (struct cpp_buffer): Add timestamp.
2188 2006-01-23  Jakub Jelinek  <jakub@redhat.com>
2190         PR preprocessor/25717
2191         * init.c (cpp_init_builtins): If __STDC__ will not change value
2192         between system headers and other sources, define it as a normal
2193         macro rather than a builtin.
2194         * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
2195         cpp_in_system_header condition.
2197 2006-01-05  Paolo Bonzini  <bonzini@gnu.org>
2199         * Makefile.in: Use -MMD instead of -MD.
2201 2006-01-04  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2202             Richard Henderson  <rth@redhat.com>
2204         Merge from gomp branch:
2205         * directives.c (struct pragma_entry): Add is_deferred.  Add ident
2206         entry to value union.
2207         (end_directive): Don't eat the line if in_deferred_pragma.
2208         (run_directive): Remove pragma hacks.
2209         (insert_pragma_entry): Remove.
2210         (new_pragma_entry): New.
2211         (register_pragma_1): Split out of register_pragma.  Only handle
2212         the lookup tree and return the new entry.
2213         (cpp_register_pragma): Fill in the pragma entry here.
2214         (cpp_register_deferred_pragma): New.
2215         (register_pragma_internal): New.
2216         (_cpp_init_internal_pragmas): Use register_pragma_internal.
2217         (do_pragma): Allow pragma expansion after namespace.  For deferred
2218         pragmas, don't slurp the line into a string.
2219         (destringize_and_run): Save tokens for deferred pragmas.
2220         (cpp_handle_deferred_pragma): Remove.
2221         * macro.c (builtin_macro): Remove pragma token hack.
2222         (_cpp_push_token_context): Rename from push_token_context and export.
2223         * internal.h (struct lexer_state): Add pragma_allow_expansion.
2224         (_cpp_push_token_context): Declare.
2225         * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
2226         a token.  Update the line number correctly if so.
2227         (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
2228         (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
2229         * include/cpplib.h (PRAGMA_EOL): New.
2230         (CPP_TOKEN_FLD_PRAGMA): New.
2231         (struct cpp_token): Add val.pragma.
2232         (struct cpp_options): Remove defer_pragmas.
2233         (cpp_handle_deferred_pragma): Remove.
2234         (cpp_register_deferred_pragma): Declare.
2236 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
2238         PR c++/25294
2239         * directives.c (do_pragma): If pragma line ends with multi-line
2240         block comment, end the saved deferred pragma string before that
2241         comment.  Handle embedded '\0' chars on the pragma line.
2243 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2245         PR c++/23333
2246         * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
2248 2005-12-07  Jon Grimm  <jgrimm2@us.ibm.com>
2249             Ben Elliston  <bje@au.ibm.com>
2251         * include/cpplib.h (CPP_N_DFLOAT): New.
2252         * expr.c (interpret_float_suffix): Identify df, dd, and dl
2253         suffixes as decimal floating point constants.
2254         (cpp_classify_number): Disallow hexadecimal DFP constants.
2256 2005-11-14  Gerald Pfeifer  <gerald@pfeifer.com>
2257             Ian Lance Taylor  <ian@airs.com>
2259         * include/cpplib.h (struct cpp_callbacks): Annotate error with
2260         ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
2262 2005-11-09  Per Bothner  <per@bothner.com>
2263             Uros Bizjak  <uros@kss-loka.si>
2265         PR c/24101
2266         * init.c (read_original_filename): Temporarily set
2267         state.in_directive before calling _cpp_lex_direct for
2268         CPP_HASH tokens.
2270 2005-11-03  James E Wilson  <wilson@specifix.com>
2272         PR preprocessor/24202
2273         * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
2275 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
2277         * include/cpplib.h (struct cpp_callbacks): Make error take
2278         va_list* parameter.
2279         * errors.c (cpp_error): Update call to callback.
2281 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
2283         PR preprocessor/22042
2284         * macro.c (_cpp_builtin_macro_text): Lower the needed max
2285         buffer size.
2286         (cpp_quote_string): Don't octalify non printable
2287         charactors.
2289 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
2291         PR c++/17964
2292         * include/cpplib.h (struct cpp_options): Add client_diagnostic.
2293         (struct cpp_callbacks): Add error.
2294         * errors.c (cpp_error): If client_diagnostic, use error callback.
2295         * charset.c (convert_escape): Don't use %03o in diagnostic.
2297 2005-10-21  James E Wilson  <wilson@specifix.com>
2299         PR preprocessor/15220
2300         * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
2301         callers.  Pass to open_file_failed.
2302         (open_file_failed): New parameter angle_brackets.  Fix all callers.
2303         Use in print_dep assignment.
2304         * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
2305         * internal.h (_cpp_find_file): Add new parm to declaration.
2307 2005-10-08  Kazu Hirata  <kazu@codesourcery.com>
2309         * configure.ac: Require 64-bit int for arm*-*-*eabi*.
2310         * configure: Regenerate.
2312 2005-10-04  Ian Lance Taylor  <ian@airs.com>
2314         PR preprocessor/13726
2315         * directives.c (check_eol_return_comments): New static function.
2316         (parse_include): Add buf parameter.  Change all callers.
2317         (do_include_common): If not discard comments, turn on
2318         save_comments.  Pass collected comments to include callback.
2319         * include/cpplib.h (struct cpp_callbacks): Add new parameter to
2320         include callback: cpp_token list.
2322 2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
2324         * include/cpplib.h (struct cpp_options): Add extended_identifiers.
2325         * init.c (struct lang_flags, lang_defaults): Add
2326         extended_identifiers.
2327         (cpp_set_lang): Use it.
2328         * lex.c (forms_identifier_p): Check extended_identifiers.
2330 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
2332         PR preprocessor/20348
2333         PR preprocessor/20356
2334         * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
2335         2004-06-05 changes.
2337 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2339         * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
2340         -Wmissing-format-attribute.
2342         * configure: Regenerate.
2344 2005-06-29  Kelley Cook  <kcook@gcc.gnu.org>
2346         * all files: Update FSF address in copyright headers.
2347         * makeucnid.c (write_copyright): Update outputted FSF address.
2349 2005-06-13  Zack Weinberg  <zack@codesourcery.com>
2351         * configure.ac: Invoke ZW_CREATE_DEPDIR and
2352         ZW_PROG_COMPILER_DEPENDENCIES.
2353         * aclocal.m4, configure: Regenerate.
2354         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
2355         New variables.
2356         (distclean): Clean up $(DEPDIR) and its contents.
2357         (.c.o): Use $(COMPILE).
2358         Include $(DEPDIR)/*.Po for most object->header dependencies.
2360 2005-05-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2362         * configure.ac: Check declarations for asprintf and vasprintf.
2363         * config.in: Regenerate.
2364         * configure: Likewise.
2366         * charset.c (conversion_loop): Use XRESIZEVEC.
2367         (convert_no_conversion): Likewise.
2368         (convert_using_iconv): Likewise.
2369         (init_iconv_desc): Cast return value of alloca.
2370         (cpp_host_to_exec_charset): Use XNEWVEC.
2371         (emit_numeric_escape): Use XRESIZEVEC.
2372         (cpp_interpret_string): Use XNEWVEC.
2373         (cpp_interpret_string): Use XRESIZEVEC.
2374         (_cpp_interpret_identifier): Cast return value of alloca.
2375         (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
2376         * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
2377         (parse_include): Use XNEWVEC.
2378         (insert_pragma_entry): Rename local variable "new" to
2379         "new_entry".
2380         (save_registered_pragmas): Cast return value of xmemdup.
2381         (destringize_and_run): Same for alloca.
2382         (parse_assertion): Likewise.
2383         (do_assert): Cast allocated storage to proper type.
2384         (cpp_define): Likewise.
2385         (_cpp_define_builtin): Likewise.
2386         (cpp_undef): Likewise.
2387         (handle_assertion): Likewise.
2388         (cpp_push_buffer): Rename local variable "new" to "new_buffer".
2389         * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
2390         (CPP_UMINUS): Likewise.
2391         (struct cpp_operator): Rename from struct operator.
2392         (_cpp_expand_op_stack): Use XRESIZEVEC.
2393         * files.c (pch_open_file): Use XNEWVEC.
2394         (pch_open_file): Use XRESIZEVEC.
2395         (read_file_guts): Use XNEWVEC and XRESIZEVEC.
2396         (dir_name_of_file): Use XNEWVEC.
2397         (make_cpp_file): Use XCNEW.
2398         (make_cpp_dir): Likewise.
2399         (allocate_file_hash_entries): USE XNEWVEC.
2400         (cpp_included): Cast return value of htab_find_with_hash.
2401         (append_file_to_dir): Use XNEWVEC.
2402         (read_filename_string): Likewise. Use XRESIZEVEC too.
2403         (read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
2404         (remap_filename): Use XNEWVEC.
2405         (struct pchf_entry): Move definition out of struct pchf_data.
2406         (_cpp_save_file_entries): Use XCNEWVAR.
2407         (_cpp_read_file_entries): Use XNEWVAR.
2408         * identifiers.c (alloc_node): Use XOBNEW.
2409         * init.c (cpp_create_reader): Use XCNEW.
2410         (cpp_init_builtins): Cast of b->value to enum builtin_type.
2411         (read_original_directory): Cast return value of alloca.
2412         * lex.c (add_line_note): Use XRESIZEVEC.
2413         (warn_about_normalization): Use XNEWVEC.
2414         (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
2415         (new_buff): Use XNEWVEC.
2416         * line-map.c (linemap_add): Use XRESIZEVEC.
2417         * macro.c (builtin_macro): Cast return value of alloca.
2418         (paste_tokens): Likewise.
2419         (expand_arg): Use XNEWVEC and XRESIZEVEC.
2420         (_cpp_save_parameter): Use XRESIZEVEC.
2421         (create_iso_definition): Cast allocated storage to proper type.
2422         (_cpp_create_definition): Likewise.
2423         (cpp_macro_definition): Use XRESIZEVEC.
2424         * makedepend.c (add_clm): Use XNEW.
2425         (add_dir): Likewise.
2426         * mkdeps.c (munge): Use XNEWVEC.
2427         (deps_init): Use XCNEW.
2428         (deps_add_target): Use XRESIZEVEC.
2429         (deps_add_default_target): Cast return value of alloca.
2430         (deps_add_dep): Use XRESIZEVEC.
2431         (deps_add_vpath): Likewise.  Use XNEWVEC too.
2432         (deps_restore): Likewise.
2433         * pch.c (save_idents): Use XNEW and XNEWVEC.
2434         (cpp_save_state): Use XNEW.
2435         (count_defs): Cast return value of htab_find.
2436         (write_defs): Likewise.
2437         (cpp_write_pch_deps): Use XNEWVEC.
2438         (collect_ht_nodes): Use XRESIZEVEC.
2439         (cpp_valid_state): Use XNEWVEC.
2440         (save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
2441         * symtab.c (ht_create): Use XCNEW.
2442         (ht_lookup_with_hash): Cast return value of obstack_copy0.
2443         (ht_expand): Use XCNEWVEC.
2444         * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2445         (bool): Do not define if __cplusplus.
2447 2005-05-12  Zack Weinberg  <zack@codesourcery.com>
2449         * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2450         (do_sccs): Delete function definition, #define to do_ident.
2451         (do_ident): Don't hardwire directive name.
2453 2005-05-12  Ryota Kunisawa  <kunisawa@access.co.jp>
2455         PR bootstrap/21230
2456         * configure: Regenerate.
2458 2005-04-27  Andris Pavenis  <pavenis@latnet.lv>
2460         * files.c: Include io.h for DJGPP to get prototype of setmode.
2462 2005-04-19  Per Bothner  <per@bothner.com>
2464         PR preprocessor/20907
2465         * line-map.c (linemap_line_start): Fix bug when we need to increse
2466         column_bits but can re-use the current line_map.
2468 2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2470         * system.h (fopen, fdopen, freopen): Define these to the unlocked
2471         libiberty functions.
2473 2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2475         * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2476         (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2477         * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2478         fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2479         _unlocked function.
2480         (fwrite_unlocked): Fix prototype.
2482         * configure, config.in: Regenerate.
2484 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2486         PR preprocessor/19475
2487         * macro.c (create_iso_definition): For < ISO C99, don't
2488         pedwarn if there is no whitespace between macro name and its
2489         replacement, but the replacement starts with a basic character
2490         set character.
2492 2005-03-28  Andreas Jaeger  <aj@suse.de>
2494         * lex.c (warn_about_normalization): Cast field width to int to
2495         avoid warning.
2497 2005-03-19  Joseph S. Myers  <joseph@codesourcery.com>
2499         * configure.ac: Consistently use solaris2.1[0-9]* instead of
2500         solaris2.1[0-9].
2501         * configure: Regenerate.
2503 2005-03-15  Geoffrey Keating  <geoffk@apple.com>
2505         * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2506         UCN rather than printing an error.
2508 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
2510         * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2512 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
2514         * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2515         * charset.c: Update for new format of ucnid.h.
2516         (ucn_valid_in_identifier): Update for new format of ucnid.h.
2517         Add NST parameter, and update it; update callers.
2518         (cpp_valid_ucn): Add NST parameter, update callers.  Replace abort
2519         with cpp_error.
2520         (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2521         * internal.h (struct normalize_state): New.
2522         (INITIAL_NORMALIZE_STATE): New.
2523         (NORMALIZE_STATE_RESULT): New.
2524         (NORMALIZE_STATE_UPDATE_IDNUM): New.
2525         (_cpp_valid_ucn): New.
2526         * lex.c (warn_about_normalization): New.
2527         (forms_identifier_p): Add normalize_state parameter, update callers.
2528         (lex_identifier): Add normalize_state parameter, update callers.  Keep
2529         the state current.
2530         (lex_number): Likewise.
2531         (_cpp_lex_direct): Pass normalize_state to subroutines.  Check
2532         it with warn_about_normalization.
2533         * makeucnid.c: New.
2534         * ucnid.h: Replace.
2535         * ucnid.pl: Remove.
2536         * ucnid.tab: Make appropriate for input to makeucnid.c.  Remove
2537         comments about obsolete version of C++.
2538         * include/cpplib.h (enum cpp_normalize_level): New.
2539         (struct cpp_options): Add warn_normalize field.
2541 2005-03-11  Geoffrey Keating  <geoffk@apple.com>
2543         * directives.c (glue_header_name): Update call to cpp_spell_token.
2544         * internal.h (_cpp_interpret_identifier): New.
2545         * charset.c (_cpp_interpret_identifier): New.
2546         (_cpp_valid_ucn): Allow UCN version of '$'.
2547         * lex.c (lex_identifier): Add extra parameter to indicate if initial
2548         character was '$' or '\'.  Support identifiers with UCNs.
2549         (forms_identifier_p): Allow UCNs.
2550         (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2551         (utf8_to_ucn): New.
2552         (cpp_spell_token): Add FORSTRING parameter.  Use it.
2553         (cpp_token_as_text): Update call to cpp_spell_token.
2554         (cpp_output_token): Write UCNs back out.
2555         (stringify_arg): Update call to cpp_spell_token.
2556         (paste_tokens): Likewise.
2557         (cpp_macro_definition): Likewise.
2558         * macro.c (stringify_arg): Likewise.
2559         (paste_tokens): Likewise.
2560         (cpp_macro_definition): Likewise.
2561         * include/cpplib.h: Add parameter to cpp_spell_token.
2563 2005-03-04  Jakub Jelinek  <jakub@redhat.com>
2565         PR bootstrap/20282
2566         PR bootstrap/20305
2567         * macro.c (replace_args, cpp_get_token): Copy whole
2568         cpp_token_u instead of just cpp_string field from it.
2570 2005-02-28  Devang Patel  <dpatel@apple.com>
2572         * directives.c (do_line): Save sysp early before line table is
2573         realloc'ed.
2575 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
2577         PR 18785
2578         * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2579         (cpp_host_to_exec_charset): New function.
2580         * include/cpplib.h: Declare cpp_host_to_exec_charset.
2582 2005-02-19  Devang Patel  <dpatel@apple.com>
2584         * charset.c (_cpp_convert_input): Check '\r' before inserting
2585         '\n' at the end.
2587 2005-02-15  Eric Christopher  <echristo@redhat.com>
2589         PR preprocessor/19077
2590         * macro.c (cpp_macro_definition): Move handling of whitespace
2591         to PREV_WHITE conditional. Remove overloading of len
2592         variable.
2594 2005-02-14  Kazu Hirata  <kazu@cs.umass.edu>
2596         * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2597         traditional.c: Update copyright.
2599 2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
2601         PR bootstrap/19818
2602         * configure.ac: Check for declaration of basename and getopt.
2603         * config.in: Regenerate.
2604         * configure: Regenerate.
2605         * internal.h (ustrcspn): New.
2606         * macro.c (create_iso_definition): Fix allocation of memory.
2607         (padding_token): Add cast to remove const-ness.
2608         * pch.c (cpp_read_state): Use ustrcspn.
2610 2005-02-08  Mike Stump  <mrs@apple.com>
2612         * files.c (pchf_adder): Remove.
2613         (struct pchf_adder_info): Likewise.
2614         (_cpp_save_file_entries): Write out all files so that #import works.
2616 2005-01-23  Joseph S. Myers  <joseph@codesourcery.com>
2618         * configure: Regenerate.
2620 2005-01-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2622         * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2624         * include/cpplib.h: Also update copyright years.
2626 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
2628         * files.c (_cpp_find_file): Add files found by search_path_exhausted
2629         to the list of all files.
2631 2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2633         * internal.h: Update references to Cpp lib filenames.
2634         * directives.c: Likewise.
2635         * init.c: Likewise.
2636         * macro.c: Likewise.
2637         * traditional.c: Likewise.
2639 2004-12-15  Eric Botcazou  <ebotcazou@libertysurf.fr>
2641         PR preprocessor/15167
2642         * files.c (destroy_cpp_file): New function.
2643         (should_stack_file): Make a new file if the
2644         compared file is still stacked.
2646 2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>
2648         PR preprocessor/17610
2649         * directives.c (do_include_common): Error out if an empty filename
2650         is given for #include (or #include_next or #import).
2652 2004-11-27  Roger Sayle  <roger@eyesopen.com>
2653             Zack Weinberg  <zack@codesourcery.com>
2655         * internal.h: Replace all uses of uchar with unsigned char.
2656         * include/cpp-id-data.h: Likewise.  Guard typedef of uchar
2657         with !IN_GCC, so uchar is only defined whilst building libcpp.
2659 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
2661         * aclocal.m4: Regenerate.
2663 2004-11-24  Roger Sayle  <roger@eyesopen.com>
2665         PR preprocessor/15824
2666         * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2667         directly, instead of the non-existant "system.h" and "ansidecl.h".
2668         * configure: Regenerate.
2670 2004-11-23  Daniel Jacobowitz  <dan@codesourcery.com>
2671             Joseph Myers  <joseph@codesourcery.com>
2673         * internal.h (struct lexer_state): Add in_deferred_pragma.
2674         * directives.c (struct pragma_entry): Add allow_expansion.
2675         (insert_pragma_entry): Take allow_expansion flag.
2676         (register_pragma): Likewise.
2677         (cpp_register_pragma): Likewise.
2678         (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2679         (do_pragma): Honor allow_expansion.
2680         (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2681         * include/cpplib.h (cpp_register_pragma): Update prototype.
2683 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
2684             Mark Mitchell  <mark@codesourcery.com>
2686         * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2687         need_64bit_hwint=yes.
2688         * configure: Regenerate.
2690 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2692         * Makefile.in ($(PACKAGE).pot): New rule.  Depend on
2693         po/$(PACKAGE).pot.
2694         (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2695         arguments.  Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2696         Remove local srcdir path from generated file.
2698 2004-11-04  Zack Weinberg  <zack@codesourcery.com>
2699             Gerald Pfeifer  <gerald@pfeifer.com>
2701         * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2702         as well.
2704 2004-10-27  Zack Weinberg  <zack@codesourcery.com>
2706         PR 18075
2707         * directives.c (do_pragma): Do not defer pragmas which are unknown.
2708         (cpp_handle_deferred_pragma): Add cast to silence warning.
2710 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
2712         * errors.c (_cpp_begin_message): Print "error: " for errors.
2714 2004-10-10  Andreas Jaeger  <aj@suse.de>
2716         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2717         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2719 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
2721         * pch.c (cpp_write_pch_state): Remove variable z as it is not
2722         used.
2723         (cpp_read_state): Remove unused variables, m, d and mac_count.
2725 2004-09-29  Per Bothner  <per@bothner.com>
2727         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
2728         cb.line_change.  Otherwise do_pragma will call the line_change
2729         call-back with a meaningless line number.
2731 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
2733         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
2734         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
2735         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2736         * aclocal.m4, configure: Regenerate.
2737         * init.c: Include localedir.h.
2738         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
2739         (DEFS): Delete.
2740         (.c.o): Use $(ALL_CFLAGS).
2741         (localedir.h, localedir.hs): New rules.
2742         (clean): Use rm -rf to remove directories.
2743         (distclean): Also delete localedir.h and localedir.hs.
2744         (init.o): Update dependencies.
2746 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
2748         * Makefile.in (aclocal.m4): Update dependencies.
2749         * configure.ac (AC_CONFIG_MACRO_DIR): New.
2750         * aclocal.m4, configure: Regenerate.
2752 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
2754         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
2755         (_cpp_convert_input, _cpp_default_encoding): Add comments.
2756         Some other comments in this file also tweaked.
2758         * directives.c (do_pragma): Save current buffer position
2759         before lexing the pragma keywords; don't call
2760         _cpp_backup_tokens in the defer_pragmas case.
2762 2004-09-15  Per Bothner  <per@bothner.com>
2764         * include/line-map.h (line_map_start):  Add parameter names so
2765         preceding comment makes sense.
2766         (linemap_add):  Remove from comment mention of non-existing parameter.
2768 2004-09-09  Matt Austern  <austern@apple.com>
2769             Zack Weinberg  <zack@codesourcery.com>
2771         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
2772         prefixes throughout.  Add entry for PRAGMA.  Remove
2773         unnecessary "= 0" from EQ.
2774         (enum cpp_ttype): Adjust OP and TK definitions to restore
2775         prefixes, via token-paste.
2776         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2777         Change from #defines to additional cpp_ttype enumerators.
2778         (struct cpp_options): Add defer_pragmas.
2779         (cpp_handle_deferred_pragma): Prototype new interface.
2781         * internal.h (struct cpp_reader): Add directive_result.
2782         * directives.c (struct pragma_entry): Add is_internal field;
2783         give boolean fields type bool.
2784         (start_directive): Initialize pfile->directive_result.type.
2785         (_cpp_do__Pragma): Likewise.
2786         (run_directive): Do not crash if pfile->buffer->prev is NULL.
2787         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2788         from it.
2789         (register_pragma): New static function, bulk of former
2790         cpp_register_pragma here; add 'internal' argument, pass along
2791         to insert_pragma_entry.
2792         (cpp_register_pragma): Now a wrapper around register_pragma which
2793         always passes false for 'internal' argument.
2794         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2795         true for 'internal'.
2796         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2797         an internal pragma, save text till the end of the line as a CPP_PRAGMA
2798         token instead of executing the pragma.
2799         (cpp_handle_deferred_pragma): New interface.
2800         * lex.c (token_spellings): Adjust OP and TK definitions to
2801         match changes to cpplib.h.
2802         (_cpp_lex_token): Check for a directive-result token and
2803         return it if present.
2804         (cpp_token_val_index): Handle CPP_PRAGMA.
2805         * macro.c (cpp_builtin_macro_text): Correct comment.
2806         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2808 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
2810         PR preprocessor/14699
2811         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2812         from size_t to double.
2814 2004-08-28  Andreas Schwab  <schwab@suse.de>
2815             Andreas Jaeger <aj@suse.de>
2817         * configure.ac: Set PACKAGE correctly.
2818         * configure: Regenerated.
2820 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
2822         * Makefile.in: Add back top_builddir.
2824 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
2826         * configure.ac: Replace Automake macro invocations
2827         with manual Autoconf checks and substitutions.
2828         * configure: Regenerate.
2829         * aclocal.m4: Regenerate.
2830         * config.in: Regenerate.
2831         * Makefile.am: Removed.
2832         * Makefile.in: Heavy simplification and reorganization.
2834 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
2836         * configure.ac (arm*-*-eabi*): New target.
2837         (arm*-*-symbianelf*): Likewise.
2838         * configure: Regenerated.
2840 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
2842         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2843         * directives.c: Use XNEW-family macros from libiberty.
2844         * lex.c: Likewise.
2845         * macro.c: Likewise.
2846         * cpplib.h (cpp_deps_style): Export enum with name.
2848 2004-07-23  Matthias Klose  <doko@debian.org>
2850         * init.c (init_library): Use PACKAGE for the text domain.
2852 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
2854         PR preprocessor/16366
2855         * internal.h (struct cpp_reader): New field dir_hash.
2856         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2857         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2859 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
2861         PR preprocessor/16192
2862         PR preprocessor/15913
2863         PR preprocessor/15572
2864         * expr.c (_cpp_parse_expr): Handle remaining cases where an
2865         expression is missing.
2866         * init.c (post_options): Traditional cpp doesn't do // comments.
2868 2004-06-30  Per Bothner  <per@bothner.com>
2870         * include/line-map.h (fileline):  Remove old typedef.
2871         * internal.h (struct cpp_reader):  Use source_location typedef instead.
2873 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
2875         Partially revert patch of 2004-06-05.
2876         * files.c (search_cache): Remove pfile argument.  Don't check
2877         for file that would be found by "" or <> search here...
2878         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2879         Do not apply directory-of-current-file correction to files
2880         found by this check.  Rearrange code slightly.
2882 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
2884         * files.c (should_stack_file): Correct swapped parameters to call
2885         to cb.read_pch.
2886         * pch.c (cpp_valid_state): Handle -fpreprocessed.
2888 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
2890         * Makefile.in: Regenerate with automake 1.8.5.
2891         * aclocal.m4: Likewise.
2892         * configure: Regenerate.
2894 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
2896         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2897         * configure, config.in: Regenerate.
2898         * system.h: Unconditionally define bool as unsigned char,
2899         BOOL_BITFIELD as unsigned int.
2900         * .cvsignore: New file.
2902 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
2904         * traditional.c (push_replacement_text): Set macro->traditional.
2905         (save_replacement_text): Likewise.
2906         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2907         (struct save_macro_item): Delete.
2908         (struct save_macro_data): Use a character array not the previous
2909         structured format.
2910         (save_macros): Save macro as text not as internal structures.
2911         (cpp_prepare_state): Update for changes to save_macro_data.
2912         (cpp_read_state): Don't read macros defined in PCH.  Restore
2913         -D macros as text.
2914         * macro.c (create_iso_definition): Honour alloc_subobject.
2915         Clear traditional flag.
2916         (_cpp_create_definition): Honour alloc_subobject.
2917         * lex.c (cpp_token_val_index): New.
2918         * internal.h: Include cpp-id-data.h.
2919         (uchar): Move definition to cpp-id-data.h.
2920         (U): Likewise.
2921         (cpp_macro): Likewise.
2922         * directives.c (struct answer): Move to cpp-id-data.h.
2923         (do_assert): Honour alloc_subobject.
2925         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2926         * include/cpplib.h (struct cpp_string): Add GTY marker.
2927         (enum cpp_token_fld_kind): New.
2928         (struct cpp_token): Add GTY markers.
2929         (cpp_token_val_index): Prototype.
2930         (CPP_HASHNODE_VALUE_IDX): New.
2931         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2932         * include/cpp-id-data.h: New file.
2934 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
2936         * Makefile.am (all-local): New.
2937         * Makefile.in: Regenerate.
2939 2004-06-06  Roger Sayle  <roger@eyesopen.com>
2941         * Makefile.am (LIBICONV): Declare.
2942         (makedepend_LDADD): Use LIBICONV.
2943         * Makefile.in: Regenerate.
2945 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
2947         * Makefile.am (LIBINTL): Declare
2948         (makedepend_LDADD): Use LIBINTL.
2949         * Makefile.in: Regenerate.
2951 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
2953         * Makefile.am: Add makedepend.
2954         * Makefile.in, aclocal.m4: Regenerate.
2955         * charset.c: Insert a space to avoid a warning.
2956         * directives.c: Include mkdeps.h.
2957         (_cpp_handle_directive): Reenable macro expander if appropriate.
2958         (undefine_macros): Inline body of _cpp_free_definition for speed.
2959         Do not call undef callback or _cpp_warn_if_unused_macro.
2960         (cpp_get_deps): New interface.
2961         * files.c (search_cache): Add pfile argument.  Check for file
2962         that would be found by "" or <> search here...
2963         (_cpp_find_file): ...not here.  Correct recorded start_dir of
2964         files found by directory-of-current-file search that would be
2965         found by "" or <> search.
2966         * init.c (cpp_add_dependency_target): Delete.
2967         * internal.h (struct lexer_state): Add discarding_output flag.
2968         * lex.c (lex_identifier): Compute hash function while scanning.
2969         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
2970         directives.
2971         * makedepend.c: New file.
2972         * mkdeps.c (struct deps): Add vpath vector.
2973         (apply_vpath, deps_add_vpath): New function.
2974         (deps_free): Free vpath vector.
2975         (deps_add_dep, deps_add_target): Use apply_vpath.
2976         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
2977         (ht_lookup_with_hash): New function.
2978         * cpplib.h, mkdeps.h: Update prototypes.
2979         * symtab.h: Update prototypes.
2980         (HT_HASHSTEP, HT_FINISH): New macros.
2982 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
2984         * symtab.c (ht_create): Set entries_owned.
2985         (ht_destroy): Honour entries_owned.
2986         (ht_expand): Likewise.
2987         (ht_load): New.
2988         * include/symtab.h (struct ht): New field 'entries_owned'
2989         (ht_load): New prototype.
2991 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
2993         PR bootstrap/15651
2994         * configure.ac: Fix m4 quoting when picking
2995         the size of HOST_WIDE_INT.
2996         * configure: Regenerate.
2998 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
3000         * Makefile.am: the correct directory for
3001         gettext include files is given by @INCINTL@.
3002         * Makefile.in: Regenerate.
3004 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
3006         * system.h [!ENABLE_NLS]: dgettext takes two
3007         parameters.
3009 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
3011         Moved libcpp from the gcc subdirectory to the toplevel.
3012         * Makefile.am: New file.
3013         * Makefile.in: Regenerate.
3014         * configure.ac: New file.
3015         * configure: Regenerate.
3016         * config.in: Regenerate.
3017         * charset.c: Moved from gcc/cppcharset.c.  Add note about
3018         brokenness of input charset detection.  Adjust for change
3019         in name of cppucnid.h.
3020         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
3021         * expr.c: Moved from gcc/cppexp.c.
3022         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
3023         Remove #define of O_BINARY, it is in system.h.
3024         * identifiers.c: Moved from gcc/cpphash.c.
3025         * internal.h: Moved from gcc/cpphash.h.  Change header
3026         guard name.  All other files adjusted to match name change.
3027         * init.c: Moved from gcc/cppinit.c.
3028         (init_library) [ENABLE_NLS]: Call bindtextdomain.
3029         * lex.c: Moved from gcc/cpplex.c.
3030         * directives.c: Moved from gcc/cpplib.c.
3031         * macro.c: Moved from gcc/cppmacro.c.
3032         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
3033         * traditional.c: Moved from gcc/cpptrad.c.
3034         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
3035         guard name.
3036         * ucnid.pl: Moved from gcc/cppucnid.pl.
3037         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
3038         guard name.
3039         * symtab.c: Moved from gcc/hashtable.c.
3040         * line-map.c: Moved from gcc.  Do not include intl.h.
3041         * mkdeps.c: Moved from gcc.
3042         * system.h: New file.
3043         * include/cpplib.h: Moved from gcc.  Change header guard name.
3044         * include/line-map.h: Moved from gcc.  Change header guard name.
3045         * include/mkdeps.h: Moved from gcc.  Change header guard name.
3046         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
3047         guard name.