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