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