PR libfortran/51828
[official-gcc.git] / libcpp / ChangeLog
blob5e38c4b5dff2939879879db4f642a111c13c7063
1 2013-11-15  Joseph Myers  <joseph@codesourcery.com>
3         * ucnid.tab: Add C11 and C11NOSTART data.
4         * makeucnid.c (digit): Rename enum value to N99.
5         (C11, N11, all_languages): New enum values.
6         (NUM_CODE_POINTS, MAX_CODE_POINT): New macros.
7         (flags, decomp, combining_value): Use NUM_CODE_POINTS as array
8         size.
9         (decomp): Use unsigned int as element type.
10         (all_decomp): New array.
11         (read_ucnid): Handle C11 and C11NOSTART.  Use MAX_CODE_POINT.
12         (read_table): Use MAX_CODE_POINT.  Store all decompositions in
13         all_decomp.
14         (read_derived): Use MAX_CODE_POINT.
15         (write_table): Use NUM_CODE_POINTS.  Print N99, C11 and N11
16         flags.  Print whole array variable declaration rather than just
17         array contents.
18         (char_id_valid, write_context_switch): New functions.
19         (main): Call write_context_switch.
20         * ucnid.h: Regenerate.
21         * include/cpplib.h (struct cpp_options): Add c11_identifiers.
22         * init.c (struct lang_flags): Add c11_identifiers.
23         (cpp_set_lang): Set c11_identifiers option from selected language.
24         * internal.h (struct normalize_state): Document "previous" as
25         previous starter character.
26         (NORMALIZE_STATE_UPDATE_IDNUM): Take character as argument.
27         * charset.c (DIG): Rename enum value to N99.
28         (C11, N11): New enum values.
29         (struct ucnrange): Give name to struct.  Use short for flags and
30         unsigned int for end of range.  Include ucnid.h for whole variable
31         declaration.
32         (ucn_valid_in_identifier): Allow for characters up to 0x10FFFF.
33         Allow for C11 in determining valid characters and valid start
34         characters.  Use check_nfc for non-Hangul context-dependent
35         checks.  Only store starter characters in nst->previous.
36         (_cpp_valid_ucn): Pass new argument to
37         NORMALIZE_STATE_UPDATE_IDNUM.
38         * lex.c (lex_identifier): Pass new argument to
39         NORMALIZE_STATE_UPDATE_IDNUM.  Call NORMALIZE_STATE_UPDATE_IDNUM
40         after initial non-UCN part of identifier.
41         (lex_number): Pass new argument to NORMALIZE_STATE_UPDATE_IDNUM.
43 2013-11-15  Joseph Myers  <joseph@codesourcery.com>
45         * ucnid.tab: Mark C99 digits as [C99DIG].
46         * makeucnid.c (read_ucnid): Handle [C99DIG].
47         (read_table): Don't check for digit characters.
48         * ucnid.h: Regenerate.
50 2013-11-06  Tobias Burnus  <burnus@net-b.de>
52         * macro.c (_cpp_builtin_macro_text): Correct
53         wording of two warnings.
55 2013-11-05  Tobias Burnus  <burnus@net-b.de>
57         * include/cpplib.h (CPP_W_DATE_TIME): Added.
58         (cpp_options): Add warn_date_time.
59         * init.c (cpp_create_reader): Init it.
60         * macro.c (_cpp_builtin_macro_text): Warn when
61         __DATE__/__TIME__/__TIMESTAMP__ is used.
63 2013-10-31  Edward Smith-Rowland  <3dw4rd@verizon.net>
65         Implement C++14 digit separators.
66         * include/cpplib.h (cpp_options): Add digit_separators flag.
67         * internal.h (DIGIT_SEP(c)): New macro.
68         * expr.c (cpp_classify_number): Check improper placement of digit sep;
69         (cpp_interpret_integer): Skip over digit separators.
70         * init.c (lang_flags): Add digit_separators flag; (lang_defaults): Add
71         digit separator flags per language; (cpp_set_lang): Set
72         digit_separators
73         * lex.c (lex_number): Add digits separator to allowable characters for
74         C++14.
76 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
78         * Makefile.in (PICFLAG): New.
79         (ALL_CFLAGS): Add PICFLAG.
80         (ALL_CXXFLAGS): Likewise.
81         * configure.ac: Add --enable-host-shared, setting up new
82         PICFLAG variable.
83         * configure: Regenerate.
85 2013-08-07  Richard Earnshaw  <rearnsha@arm.com>
87         * configure.ac: Set need_64bit_hwint for all arm targets.
88         * configure: Regenerated.
90 2013-07-20  Jakub Jelinek  <jakub@redhat.com>
92         PR preprocessor/57620
93         * lex.c (lex_raw_string): Undo phase1 and phase2 transformations
94         between R" and final " rather than only in between R"del( and )del".
96 2013-07-10  Jakub Jelinek  <jakub@redhat.com>
98         PR preprocessor/57824
99         * lex.c (lex_raw_string): Allow reading new-lines if
100         in_deferred_pragma or if parsing_args and there is still
101         data in the current buffer.
103         * include/cpplib.h (cpp_token_val_index): Change parameter type to
104         const cpp_token *.
105         * lex.c (cpp_token_val_index): Likewise.
107         PR preprocessor/57757
108         * lex.c (cpp_avoid_paste): Avoid pasting CPP_{,W,UTF8}STRING
109         or CPP_STRING{16,32} with CPP_NAME or SPELL_LITERAL token that
110         starts if a-zA-Z_.
112 2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
114         * lex.c (lex_raw_string(), lex_string()): Constrain suffixes treated
115         as concatenated literal and macro to just the patterns found in
116         inttypes.h; (is_macro()): New.
118 2013-06-24  Dehao Chen  <dehao@google.com>
120         * files.c (_cpp_stack_include): Fix the highest_location when header
121         file is guarded by #ifndef and is included twice.
123 2013-04-28  Jakub Jelinek  <jakub@redhat.com>
125         N3472 binary constants
126         * include/cpplib.h (struct cpp_options): Fix a typo in user_literals
127         field comment.  Add binary_constants field.
128         * init.c (struct lang_flags): Add binary_constants field.
129         (lang_defaults): Add bin_cst column to the table.
130         (cpp_set_lang): Initialize CPP_OPTION (pfile, binary_constants).
131         * expr.c (cpp_classify_number): Talk about C++11 instead of C++0x
132         in diagnostics.  Accept binary constants if
133         CPP_OPTION (pfile, binary_constants) even when pedantic.  Adjust
134         pedwarn message.
136 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
138         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Y and CLK_CXX1Y.
139         * init.c (lang_defaults): Add defaults for the latter.
140         (cpp_init_builtins): Define __cplusplus as 201300L for the latter.
141         * lex.c (_cpp_lex_direct): Update.
143 2013-04-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
145         PR target/56771
146         * configure.ac: Require 64-bit int for arm*-*-rtems*.
147         * configure: Regenerate.
149 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
151         PR middle-end/56461
152         * internal.h (struct cpp_buffer): Add to_free field.
153         (_cpp_pop_file_buffer): Add third argument.
154         * files.c (_cpp_stack_file): Set buffer->to_free.
155         (_cpp_pop_file_buffer): Add to_free argument.  Free to_free
156         if non-NULL, and if equal to file->buffer_start, also clear
157         file->buffer{,_start,_valid}.
158         * directives.c (_cpp_pop_buffer): Pass buffer->to_free
159         to _cpp_pop_file_buffer.
161 2013-03-01  Jakub Jelinek  <jakub@redhat.com>
163         PR middle-end/56461
164         * files.c (_cpp_save_file_entries): Free result at the end.
165         * pch.c (cpp_string_free): New function.
166         (cpp_save_state): Use it in htab_create call.
167         (cpp_write_pch_deps): Free ss->defs.  Destroy ss->definedhash.
169 2013-02-28  Jakub Jelinek  <jakub@redhat.com>
171         * files.c (_cpp_find_file): If returning early, before storing
172         something to *hash_slot and *hash_slot is NULL, call htab_clear_slot
173         on it.  Access *hash_slot using void * type rather than
174         struct file_hash_entry * to avoid aliasing issues.
176         * configure.ac: Don't define ENABLE_CHECKING whenever
177         --enable-checking is seen, instead use similar --enable-checking=yes
178         vs. --enable-checking=release default as gcc/ subdir has and
179         define ENABLE_CHECKING if ENABLE_CHECKING is defined in gcc/.
180         Define ENABLE_VALGRIND_CHECKING if requested.
181         * lex.c (new_buff): If ENABLE_VALGRIND_CHECKING, put _cpp_buff
182         struct first in the allocated buffer and result->base after it.
183         (_cpp_free_buff): If ENABLE_VALGRIND_CHECKING, free buff itself
184         instead of buff->base.
185         * config.in: Regenerated.
186         * configure: Regenerated.
188 2013-02-13  Ed Smith-Rowland  <3dw4rd@verizon.net>
190         PR c++/55582
191         * lex.c (lex_raw_string): Allow string literal with suffix
192         beginning with 's' to be parsed as a C++11 user-defined literal.
194 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
196         Update copyright years.
198 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
200         PR c++/54526 (again)
201         * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2.
203 2013-01-03  Marc Glisse  <marc.glisse@inria.fr>
205         PR bootstrap/50177
206         * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type.
207         (new_linemap): Likewise.
208         (linemap_enter_macro): Likewise.
210 2012-12-03  Jakub Jelinek  <jakub@redhat.com>
212         PR bootstrap/55380
213         PR other/54691
214         * files.c (read_file_guts): Allocate extra 16 bytes instead of
215         1 byte at the end of buf.  Pass size + 16 instead of size
216         to _cpp_convert_input.
217         * charset.c (_cpp_convert_input): Reallocate if there aren't
218         at least 16 bytes beyond to.len in the buffer.  Clear 16 bytes
219         at to.text + to.len.
221 2012-11-21  Steve Ellcey  <sellcey@mips.com>
223         PR pch/55399
224         * files.c (pch_open_file): Fix check for implicit_preinclude.
226 2012-11-16  Simon Baldwin  <simonb@google.com>
228         * include/cpplib.h (struct cpp_options): Add canonical_system_headers.
229         * files.c (find_file_in_dir): Call maybe_shorter_path() only if
230         canonical_system_headers is set.
231         * init.c (cpp_create_reader): Initialize canonical_system_headers.
232         * configure.ac: Add new --enable-canonical-system-headers.
233         * configure: Regenerate.
234         * config.in: Regenerate.
236 2012-11-09  Ed Smith-Rowland  <3dw4rd@verizon.net>
238         PR c++/54413
239         * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg.
240         (cpp_interpret_int_suffix): Add cpp_reader* arg.
241         * init.c (cpp_create_reader): Iitialize new flags.
242         * expr.c (interpret_float_suffix): Use new flags.
243         (cpp_interpret_float_suffix): Add cpp_reader* arg.
244         (interpret_int_suffix): Use new flags.
245         (cpp_interpret_int_suffix): Add cpp_reader* arg.
246         (cpp_classify_number): Adjust calls to interpret_x_suffix.
248 2012-10-23  Ian Bolton  <ian.bolton@arm.com>
249             Jim MacArthur  <jim.macarthur@arm.com>
250             Marcus Shawcroft  <marcus.shawcroft@arm.com>
251             Nigel Stephens  <nigel.stephens@arm.com>
252             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
253             Richard Earnshaw  <rearnsha@arm.com>
254             Sofiane Naci  <sofiane.naci@arm.com>
255             Stephen Thomas  <stephen.thomas@arm.com>
256             Tejas Belagod  <tejas.belagod@arm.com>
257             Yufeng Zhang  <yufeng.zhang@arm.com>
259         * configure.ac: Enable AArch64.
260         * configure: Regenerate.
262 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
264         * files.c (struct _cpp_file): Add implicit_preinclude.
265         (pch_open_file): Allow a previously opened implicitly included
266         file.
267         (_cpp_find_file): Add implicit_preinclude argument.  Free file and
268         do not call open_file_failed if implicit_preinclude.  Store
269         implicit_preinclude value.
270         (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date):
271         Update calls to _cpp_find_file.
272         (_cpp_stack_include): Handle IT_DEFAULT.
273         (cpp_push_default_include): New.
274         * include/cpplib.h (cpp_push_default_include): Declare.
275         * init.c (cpp_read_main_file): Update call to _cpp_find_file.
276         * internal.h (enum include_type): Add IT_DEFAULT.
277         (_cpp_find_file): Update prototype.
279 2012-10-15  Tobias Burnus  <burnus@net-b.de>
281         * files.c (read_file_guts, _cpp_save_file_entries): Free memory
282         before returning.
283         * lex.c (warn_about_normalization): Ditto.
284         * mkdeps.c (deps_save): Ditto.
285         * pch.c (cpp_valid_state): Ditto.
287 2012-10-04  Florian Weimer  <fweimer@redhat.com>
289         * directives.c (do_pragma_warning_or_error): New.
290         (do_pragma_warning): New.
291         (do_pragma_error): New.
292         (_cpp_init_internal_pragmas): Register new pragmas.
294 2012-09-25  Dehao Chen  <dehao@google.com>
296         PR middle-end/54704
297         * line-map.c (location_adhoc_data_hash): Fix the hash function.
299 2012-09-25  Dehao Chen  <dehao@google.com>
301         PR middle-end/54645
302         * include/line-map.h (location_adhoc_data): Move location_adhoc_data
303         into GC.
304         (location_adhoc_data_map): Likewise.
305         (line_maps): Likewise.
306         (rebuild_location_adhoc_htab): New Function.
307         * line-map.c (+rebuild_location_adhoc_htab): new Funcion.
308         (get_combined_adhoc_loc): Move location_adhoc_data into GC.
309         (location_adhoc_data_fini): Likewise.
310         (linemap_init): Likewise.
311         (location_adhoc_data_init): Remove Function.
313 2012-09-19  Dehao Chen  <dehao@google.com>
315         * include/line-map.h (MAX_SOURCE_LOCATION): New value.
316         (location_adhoc_data_fini): New.
317         (get_combined_adhoc_loc): New.
318         (get_data_from_adhoc_loc): New.
319         (get_location_from_adhoc_loc): New.
320         (location_adhoc_data_map): New.
321         (COMBINE_LOCATION_DATA): New.
322         (IS_ADHOC_LOC): New.
323         (expanded_location): New field.
324         (line_maps): New field.
325         * line-map.c (location_adhoc_data): New.
326         (location_adhoc_data_hash): New.
327         (location_adhoc_data_eq): New.
328         (location_adhoc_data_update): New.
329         (get_combined_adhoc_loc): New.
330         (get_data_from_adhoc_loc): New.
331         (get_location_from_adhoc_loc): New.
332         (location_adhoc_data_init): New.
333         (location_adhoc_data_fini): New.
334         (linemap_init): Initialize location_adhoc_data.
335         (linemap_lookup): Change to use new location.
336         (linemap_ordinary_map_lookup): Likewise.
337         (linemap_macro_map_lookup): Likewise.
338         (linemap_macro_map_loc_to_def_point): Likewise.
339         (linemap_macro_map_loc_unwind_toward_spel): Likewise.
340         (linemap_get_expansion_line): Likewise.
341         (linemap_get_expansion_filename): Likewise.
342         (linemap_location_in_system_header_p): Likewise.
343         (linemap_location_from_macro_expansion_p): Likewise.
344         (linemap_macro_loc_to_spelling_point): Likewise.
345         (linemap_macro_loc_to_def_point): Likewise.
346         (linemap_macro_loc_to_exp_point): Likewise.
347         (linemap_resolve_location): Likewise.
348         (linemap_unwind_toward_expansion): Likewise.
349         (linemap_unwind_to_first_non_reserved_loc): Likewise.
350         (linemap_expand_location): Likewise.
351         (linemap_dump_location): Likewise.
352         (linemap_line_start): Likewise.
354 2012-05-25  Dodji Seketeli  <dodji@redhat.com>
356         PR preprocessor/53469
357         * directives.c (do_pragma): Use the virtual location for the
358         pragma token, instead of its spelling location.
360 2012-08-14   Diego Novillo  <dnovillo@google.com>
362         Merge from cxx-conversion branch.  Configury.
364         * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
365         * configure.ac: Likewise.
366         * configure: Regenerate.
368 2012-08-14   Lawrence Crowl  <crowl@google.com>
370         Merge from cxx-conversion branch.  New C++ hash table.
372         * include/symtab.h (typedef struct ht hash_table): Change the typedef
373         name to cpp_hash_table.  Update all users of the typedef.
375 2012-07-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
377         * include/line-map.h (line_map_macro): Use the "atomic" GTY option
378         for the macro_locations field.
380 2011-06-19  Uros Bizjak  <ubizjak@gmail.com>
382         * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
383         __builtin_ia32_pcmpestri128 instead of asm.
385 2012-06-04  Dimitrios Apostolou <jimis@gmx.net>
387         * line-map.c (linemap_enter_macro): Don't zero max_column_hint in
388         every macro. This improves performance by reducing the number of
389         reallocations when track-macro-expansion is on.
391 2012-06-04  Dodji Seketeli  <dodji@redhat.com>
393         PR preprocessor/53463
394         * line-map.c (linemap_location_in_system_header_p): For built-in
395         macro tokens, check the first expansion point location that is not
396         for a token coming from a built-in macro.
398 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
400         * directives.c: Fix typos.
401         * include/line-map.h: Fix typos.
402         * line-map.c: Fix typos.
403         * macro.c: Fix typos.
405 2012-05-25  Dodji Seketeli  <dodji@redhat.com>
407         PR bootstrap/53459
408         * lex.c (search_line_fast): Avoid unused local typedefs to simulate
409         a static assertion.
411 2012-05-29  Dodji Seketeli  <dodji@redhat.com>
413         PR preprocessor/53229
414         * internal.h (cpp_reader::set_invocation_location): Remove.
415         (cpp_reader::about_to_expand_macro_p): New member flag.
416         * directives.c (do_pragma):  Remove Kludge as
417         pfile->set_invocation_location is no more.
418         * macro.c (cpp_get_token_1): Do away with the use of
419         cpp_reader::set_invocation_location.  Just collect the macro
420         expansion point when we are about to expand the top-most macro.
421         Do not override cpp_reader::about_to_expand_macro_p.
422         This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
423         properly handle locations of expansion points.
424         (cpp_get_token_with_location): Adjust, as
425         cpp_reader::set_invocation_location is no more.
426         (paste_tokens): Take a virtual location parameter for
427         the LHS of the pasting operator.  Use it in diagnostics.  Update
428         comments.
429         (paste_all_tokens): Tighten the assert.  Propagate the location of
430         the expansion point when no virtual locations are available.
431         Pass the virtual location to paste_tokens.
432         (in_macro_expansion_p): New static function.
433         (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
434         flag until we really start expanding the macro.
436 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
438         PR preprocessor/7263
439         * include/cpplib.h (cpp_classify_number): Take a location
440         parameter.
441         * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
442         macros that take a location parameter.
443         (cpp_classify_number): Take a (virtual) location parameter.  Use
444         it for diagnostics.  Adjust comments.
445         (eval_token): Take a location parameter.  Pass it to
446         cpp_classify_number and to diagnostic routines.
447         (_cpp_parse_expr): Use virtual locations of tokens when parsing
448         expressions.  Pass a virtual location to eval_token and to
449         diagnostic routines.
451 2012-05-10  Tristan Gingold  <gingold@adacore.com>
453         * expr.c (interpret_float_suffix): Add a guard.
455 2012-05-02  Dodji Seketeli  <dodji@redhat.com>
457         Properly initialize cpp_context in destringize_and_run
458         * directives.c (destringize_and_run): Properly initialize the new
459         context.
460         * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
461         the initial base context, which has the same life time as the
462         current instance of cpp_file.
464 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
465             Dodji Seketeli  <dodji@seketeli.org>
467         PR c++/52974
468         * libcpp/files.c (maybe_shorter_path): New.
469         (find_file_in_dir): Use it.
471 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
473         Switch -ftrack-macro-expansion=2 on by default.
474         * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
475         by default.  Add comments.
477         Strip "<built-in>" loc from displayed expansion context
478         * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
479         in comment.
480         (linemap_unwind_to_first_non_reserved_loc): Declare new function.
481         * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
482         new function.
484         Fix expansion point loc for macro-like tokens
485         * macro.c (macro_of_context): New static function.
486         (_cpp_push_token_context, push_extended_tokens_context): If the
487         macro argument is NULL, it means we are continuing the expansion
488         of the current macro, if any.  Update comments.
489         (_cpp_pop_context): Re-enable expansion of the macro only when we
490         are really out of the context of the current expansion.
492         Fix token pasting with -ftrack-macro-expansion
493         * macro.c (paste_all_tokens): Put the token resulting from pasting
494         into an extended token context with -ftrack-macro-location is in
495         effect.
497         Fix cpp_sys_macro_p with -ftrack-macro-expansion
498         * macro.c (cpp_sys_macro_p):  Support -ftrack-macro-expansion.
500 2012-04-29  Dodji Seketeli  <dodji@redhat.com>
502         * lex.c (lex_raw_string): Change C++ style comments into C style
503         comments.
504         (lex_string): Likewise.
506 2012-04-27   Ollie Wild  <aaw@google.com>
508         * include/cpplib.h (struct cpp_options): Add new field,
509         warn_literal_suffix.
510         (CPP_W_LITERAL_SUFFIX): New enum.
511         * init.c (cpp_create_reader): Default initialization of
512         warn_literal_suffix.
513         * lex.c (lex_raw_string): Treat user-defined literals which don't
514         begin with '_' as separate tokens and produce a warning.
515         (lex_string): Ditto.
517 2012-04-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
519         * line-map.c (linemap_resolve_location): Synchronize comments with
520         those in line-map.h.
521         * include/line-map.h (linemap_resolve_location): Fix spelling in
522         comment.
524 2012-03-22  Richard Earnshaw  <rearnsha@arm.com>
526         * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
528 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
530         * lex.c: Remove Solaris 8 reference.
532 2012-02-14  Walter Lee  <walt@tilera.com>
534         * configure.ac: Require 64-bit hwint for tilegx and tilepro.
535         * configure: Regenerate.
537 2012-01-09  Richard Guenther  <rguenther@suse.de>
539         * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
541 2012-01-09  Gary Funck  <gary@intrepid.com>
543         PR preprocessor/33919
544         * files.c (_cpp_get_file_name): New. Implement file name
545         access function.
546         * internal.h (_cpp_get_file_name): New prototype.
547         * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
548         to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
550 2012-01-03  Olivier Hainque  <hainque@adacore.com>
552         * system.h: Prior to #define, #undef fopen and freopen unconditionally.
554 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
556         * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
557         (CLK_STDC1X): Change to CLK_STDC11.
558         * init.c (lang_defaults): Update comments.
559         (cpp_init_builtins): Update language tests.  Use 201112L for C11
560         __STDC_VERSION__.
562 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
564         * configure: Regenerate.
566 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
568         * configure: Regenerate.
570 2011-12-07  Jakub Jelinek  <jakub@redhat.com>
572         PR bootstrap/50237
573         * internal.h (_cpp_init_lexer): New prototype.
574         * init.c (init_library): Call it.
575         * lex.c (init_vectorized_lexer): Remove constructor attribute,
576         add inline keyword.
577         (HAVE_init_vectorized_lexer): Define.
578         (_cpp_init_lexer): New function.
580 2011-12-03  Dodji Seketeli  <dodji@redhat.com>
582         * macro.c (tokens_buff_remove_last_token)
583         (tokens_buff_put_token_to): Add an 'inline' function specifier to
584         the prototype.
586 2011-11-22   Diego Novillo  <dnovillo@google.com>
588         * include/line-map.h (linemap_dump): Declare.
589         (line_table_dump): Declare.
590         * line-map.c (linemap_dump): New.
591         (line_table_dump): New.
593 2011-11-21  Ed Smith-Rowland  <3dw4rd@verizon.net>
595         PR c++/50958
596         * expr.c (cpp_userdef_char_remove_type): Fix typo.
598 2011-11-03  Michael Matz  <matz@suse.de>
600         PR bootstrap/50857
601         * configure.ac: Check for -fno-exceptions -fno-rtti.
602         * configure: Regenerate.
603         * Makefile.in (NOEXCEPTION_FLAGS): New flag.
604         (ALL_CXXFLAGS): Use it.
606 2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
608         * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
610 2011-11-02  Jason Merrill  <jason@redhat.com>
612         PR c++/50810
613         * configure.ac: Add -Wno-narrowing to warning options.
615 2011-10-31  Jason Merrill  <jason@redhat.com>
617         PR libstdc++/1773
618         * init.c (cpp_init_builtins): Set __cplusplus for C++11.
620         PR c++/50920
621         * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
622         CLK_GNUCXX0X to CLK_GNUCXX11.
624 2011-10-26  Ed Smith-Rowland  <3dw4rd@verizon.net>
626         Implement C++11 user-defined literals.
627         * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
628         cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
629         cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
630         cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
631         (cpp_classify_number): Classify unrecognized tokens as user-defined
632         literals.
633         * include/cpplib.h: Add new tokens for user-defined literals.
634         * init.c: Add new preprocessor flag (cxx11).
635         * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
636         including concatenation and promotion with suffixes.
638 2011-10-24  Dodji Seketeli  <dodji@redhat.com>
640         * line-map.c (linemap_macro_map_lookup): Fix logic.
642 2011-10-24  Dodji Seketeli  <dodji@redhat.com>
644         * include/line-map.h (linemap_expand_location): Take a line table
645         parameter.  Update comment.
646         (linemap_resolve_location): Update comment.
647         (linemap_expand_location_full): Remove.
648         * line-map.c (linemap_resolve_location):  Handle reserved
649         locations; return a NULL map in those cases.
650         (linemap_expand_location): If location is reserved, return a
651         zeroed expanded location.  Update comment.  Take a line table to
652         assert that the function takes non-virtual locations only.
653         (linemap_expand_location_full): remove.
654         (linemap_dump_location): Handle the fact that
655         linemap_resolve_location can return NULL line maps when the
656         location resolves to a reserved location.
658         * line-map.c (linemap_macro_map_lookup): Fix logic.
660 2011-10-22  Dodji Seketeli  <dodji@redhat.com>
662         PR bootstrap/50778
663         * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
664         context to act upon.
665         * lex.c (_cpp_remaining_tokens_num_in_context): Likewise.  Update
666         comment.
667         (cpp_token_from_context_at): Likewise.
668         (cpp_peek_token): Use the context to peek tokens from.
670 2011-10-20  Dodji Seketeli  <dodji@redhat.com>
672         PR bootstrap/50801
673         * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
674         number of tokens.
676 2011-10-18  Dodji Seketeli  <dodji@redhat.com>
678         PR bootstrap/50760
679         * include/line-map.h (struct linemap_stats): Change the type of
680         the members from size_t to long.
681         * macro.c (macro_arg_token_iter_init): Unconditionally initialize
682         iter->location_ptr.
684 2011-10-17  Dodji Seketeli  <dodji@redhat.com>
686         * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
687         variable without using it if ENABLE_CHECKING is not defined.  Mark
688         the LOCATION parameter as being unused.
690 2011-10-15  Tom Tromey  <tromey@redhat.com>
691             Dodji Seketeli  <dodji@redhat.com>
693         * include/line-map.h (struct line_maps::alloced_size_for_request):
694         New member.
695         * line-map.c (new_linemap): Use set->alloced_size_for_request to
696         get the actual allocated size of line maps.
698 2011-10-15  Tom Tromey  <tromey@redhat.com>
699             Dodji Seketeli  <dodji@redhat.com>
701         * line-map.h (struct linemap_stats): Declare new struct.
702         (linemap_get_statistics): Declare ...
703         * line-map.c (linemap_get_statistics):  ... new function.
704         * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
705         Declare new counters.
706         (enter_macro_context, replace_args): Update
707         num_macro_tokens_counter.
708         (cpp_get_token_1): Update num_expanded_macros_counter.
710 2011-10-15  Tom Tromey  <tromey@redhat.com>
711             Dodji Seketeli  <dodji@redhat.com>
713         * include/cpplib.h (struct cpp_options)<debug>: New struct member.
714         * include/line-map.h (linemap_dump_location): Declare ...
715         * line-map.c (linemap_dump_location): ... new function.
717 2011-10-15  Tom Tromey  <tromey@redhat.com>
718             Dodji Seketeli  <dodji@redhat.com>
720         * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
721         New option.
722         * internal.h (struct macro_context): New struct.
723         (enum context_tokens_kind): New enum.
724         (struct cpp_context)<tokens_kind>: New member of type enum
725         context_tokens_kind.
726         (struct cpp_context)<macro>: Remove this.  Replace it with an enum
727         of macro and  macro_context.
728         (struct cpp_context)<direct_p>: Remove.
729         (_cpp_remaining_tokens_num_in_context): Declare new function.
730         * directives.c (destringize_and_run): Adjust.
731         * lex.c (_cpp_remaining_tokens_num_in_context)
732         (_cpp_token_from_context_at): Define new functions
733         (cpp_peek_token): Use them.
734         * init.c (cpp_create_reader): Initialize the base context to zero.
735         (_cpp_token_from_context_at): Define new static function.
736         (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
737         _cpp_token_from_context_at.
738         * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
739         members.
740         (enum macro_arg_token_kind): New enum.
741         (struct macro_arg_token_iter): New struct.
742         (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
743         (alloc_expanded_arg_mem, ensure_expanded_arg_room)
744         (delete_macro_args, set_arg_token, get_arg_token_location)
745         (arg_token_ptr_at, macro_arg_token_iter_init)
746         (macro_arg_token_iter_get_token)
747         (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
748         (expanded_token_index, tokens_buff_new, tokens_buff_count)
749         (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
750         (tokens_buff_add_token, tokens_buff_remove_last_token)
751         (reached_end_of_context, consume_next_token_from_context): New
752         static functions.
753         (cpp_get_token_1): New static function. Split and extended from
754         cpp_get_token.  Use reached_end_of_context and
755         consume_next_token_from_context.  Unify its return point.  Move
756         the location tweaking from cpp_get_token_with_location in here.
757         (cpp_get_token): Use cpp_get_token_1
758         (stringify_arg): Use the new arg_token_at.
759         (paste_all_tokens): Support tokens coming from extended tokens
760         contexts.
761         (collect_args): Return the number of collected arguments, by
762         parameter.  Store virtual locations of tokens that constitute the
763         collected args.
764         (funlike_invocation_p): Return the number of collected arguments,
765         by parameter.
766         (enter_macro_context): Add a parameter for macro expansion point.
767         Pass it to replace_args and to the "used" cpp callback.  Get the
768         number of function-like macro arguments from funlike_invocation_p,
769         pass it to the new delete_macro_args to free the memory used by
770         macro args.  When -ftrack-macro-expansion is in effect, for macros
771         that have no arguments, create a macro map for the macro expansion
772         and use it to allocate proper virtual locations for tokens
773         resulting from the expansion.  Push an extended tokens context
774         containing the tokens resulting from macro expansion and their
775         virtual locations.
776         (replace_args): Rename the different variables named 'count' into
777         variables with more meaningful names.  Create a macro map;
778         allocate virtual locations of tokens resulting from this
779         expansion.  Use macro_arg_token_iter to iterate over tokens of a
780         given macro.  Handle the case of the argument of
781         -ftrack-macro-expansion being < 2.  Don't free macro arguments
782         memory resulting from expand_arg here, as these are freed by the
783         caller of replace_arg using delete_macro_args now.  Push extended
784         token context.
785         (next_context, push_ptoken_context, _cpp_push_token_context)
786         (_cpp_push_text_context): Properly initialize the context.
787         (expand_arg): Use the new alloc_expanded_arg_mem,
788         push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
789         (_cpp_pop_context): Really free the memory held by the context.
790         Handle freeing memory used by extended tokens contexts.
791         (cpp_get_token_with_location): Use cpp_get_token_1.
792         (cpp_sys_macro_p): Adjust.
793         (_cpp_backup_tokens): Support the new kinds of token contexts.
794         * traditional.c (recursive_macro): Adjust.
796 2011-10-15  Tom Tromey  <tromey@redhat>
797             Dodji Seketeli  <dodji@redhat.com>
799         * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
800         member.
801         (MAX_SOURCE_LOCATION): New constant.
802         (struct line_map_ordinary, struct line_map_macro): New structs.
803         (struct line_map): Turn this into a union of the two above.  Add
804         comments.
805         (struct maps_info): New struct.
806         (struct line_maps)<info_ordinary, info_macro>: Two new fields.
807         These now carry the map information that was previously scattered
808         in struct line_maps.
809         (struct map_info::allocated): Fix comment.
810         (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
811         (ORDINARY_MAP_STARTING_LINE_NUMBER)
812         (ORDINARY_MAP_INCLUDER_FILE_INDEX)
813         (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
814         (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
815         (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
816         (MACRO_MAP_EXPANSION_POINT_LOCATION)
817         (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
818         (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
819         (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
820         (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
821         (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
822         (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
823         (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
824         (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
825         (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
826         (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
827         (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
828         information.
829         (linemap_check_ordinary, linemap_assert)
830         (linemap_location_before_p): New macros.
831         (linemap_position_for_line_and_column)
832         (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
833         (linemap_macro_expansion_map_p)
834         (linemap_macro_map_loc_to_def_point)
835         (linemap_macro_map_loc_unwind_once)
836         (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
837         (linemap_get_source_line linemap_get_source_column)
838         (linemap_map_get_macro_name, linemap_get_file_path)
839         (linemap_location_in_system_header_p)
840         (linemap_location_from_macro_expansion_p): Declare new functions.
841         (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
842         (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
843         accessors act on ordinary maps only.
844         (INCLUDED_FROM): Return NULL for main files; use the new
845         accessors.
846         (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
847         (struct expanded_location): Move here from gcc/input.h
848         (linemap_resolve_location, linemap_expand_location)
849         (linemap_expand_location_full): Declare new functions.
850         * line-map.c: Include cpplib.h, internal.h
851         (linemap_enter_macro, linemap_add_macro_token)
852         (linemap_get_expansion_line, linemap_get_expansion_filename): New
853         functions that are private to libcpp.
854         (linemap_assert): New macro.
855         (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
856         (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
857         (linemap_macro_map_loc_unwind_toward_spelling)
858         (linemap_macro_map_loc_to_exp_point)
859         (first_map_in_common_1, first_map_in_common): New static
860         functions.
861         (new_linemap): Define new static functions.  Extracted and
862         enhanced from ...
863         (linemap_add): ... here.  Use linemap_assert in lieu of abort
864         previously.
865         (linemap_tracks_macro_expansion_locs_p)
866         (linemap_add_macro_token, linemap_macro_expansion_map_p)
867         (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
868         (linemap_macro_map_loc_to_def_point)
869         (linemap_macro_map_loc_unwind_once)
870         (linemap_step_out_once, linemap_map_get_index)
871         (linemap_get_source_line,linemap_get_source_column)
872         (linemap_get_file_path, linemap_map_get_macro_name)
873         (linemap_location_in_system_header_p)
874         (linemap_location_originated_from_system_header_p)
875         (linemap_location_from_macro_expansion_p)
876         (linemap_tracks_macro_expansion_locs_p)
877         (linemap_resolve_location, linemap_expand_location)
878         (linemap_expand_location_full)
879         (linemap_tracks_macro_expansion_locs_p)
880         (linemap_position_for_line_and_column, linemap_compare_locations):
881         Define new public functions.
882         (linemap_init): Initialize ordinary and macro maps information in
883         the map set.
884         (linemap_check_files_exited): Use the new accessors.
885         (linemap_free): Remove this dead code.
886         (linemap_line_start): Assert this uses an ordinary map.  Adjust to
887         use the new ordinary map accessors and data structures.  Don't
888         overflow past the lowest possible macro token's location.
889         (linemap_position_for_column): Assert the ordinary maps of the map
890         set are really ordinary.  Use ordinary map accessors.
891         (linemap_lookup): Keep the same logic but generalize to allow
892         lookup of both ordinary and macro maps.  Do not crash when called
893         with an empty line table.
894         * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
895         new API of line-map.h.
896         * directives.c (start_directive, do_line, do_linemarker)
897         (do_linemarker): Likewise.
898         * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
899         (make_cpp_dir, cpp_make_system_header): Likewise.
900         * init.c (cpp_read_main_file): Likewise.
901         * internal.h (CPP_INCREMENT_LINE): Likewise.
902         (linemap_enter_macro, linemap_add_macro_token)
903         (linemap_get_expansion_line, linemap_get_expansion_filename): New
904         functions private to libcpp.
905         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
906         (skip_line_comment, skip_whitespace, lex_raw_string)
907         (_cpp_lex_direct): Likewise.
908         * macro.c (_cpp_builtin_macro_text): Likewise.
909         (_cpp_aligned_alloc): Initialize the new name member of the macro.
910         * traditional.c (copy_comment, _cpp_scan_out_logical_line):
911         Likewise.
912         * errors.c (cpp_diagnostic): Adjust to new linemap API.
914 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
916         * line-map.c (linemap_add): Assert that reason must not be
917         LC_RENAME when called for the first time on a "main input file".
919 2011-08-22  Gabriel Charette  <gchare@google.com>
921         * init.c (cpp_create_reader): Inititalize forced_token_location_p.
922         * internal.h (struct cpp_reader): Add field forced_token_location_p.
923         * lex.c (_cpp_lex_direct): Use forced_token_location_p.
924         (cpp_force_token_locations): New.
925         (cpp_stop_forcing_token_locations): New.
927 2011-08-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
929         PR libstdc++/1773
930         * init.c (cpp_init_builtins): Define __cplusplus 19971L.
932 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
934         * include/cpplib.h (struct cpp_options): Fix typo.
936 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
938         * include/cpplib.h (struct cpp_options): Add rliterals.
939         * init.c  (struct lang_flags, lang_defaults): Add rliterals.
940         (cpp_set_lang): Set rliterals option.
941         (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
942         * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
944 2011-08-15  Gabriel Charette  <gchare@google.com>
946         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
947         Update all users to use linemap_position_for_column instead.
949 2011-07-28  Gabriel Charette  <gchare@google.com>
951         * include/line-map.h (struct line_maps):
952         Remove unused field last_listed. Update all users.
954 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
956         * configure.ac: Set need_64bit_hwint to yes for x86 targets.
957         * configure: Regenerated.
959 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
961         * system.h [__cplusplus]: Wrap C function declarations in extern "C".
963 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
964             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
966         PR bootstrap/49794
967         * configure.ac: Test AM_ICONV with CXX.
968         * configure: Regenerate.
969         * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
971 2011-07-15  Dodji Seketeli  <dodji@redhat.com>
973         * directives.c (struct if_stack): Use source_location as type
974         here.
975         * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
976         indent, def_pragma, used_define, used_undef>: Properly use
977         source_location as parameter type, rather than unsigned int.
979 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
981         PR target/39150
982         * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
983         like i[34567]86-*-solaris2.1[0-9]*.
984         * configure: Regenerate.
986 2011-06-16  Jason Merrill  <jason@redhat.com>
988         PR c++/45399
989         * lex.c (lex_raw_string): Don't check for embedded NUL.
991 2011-06-06  Dodji Seketeli  <dodji@redhat.com>
993         PR preprocessor/48532
994         * directives.c (do_pragma): Don't forget the invocation location
995         when parsing the pragma name of a namespaced pragma directive.
997 2011-05-29  John Tytgat  <John.Tytgat@aaug.net>
999         * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
1001 2011-05-22  Uros Bizjak  <ubizjak@gmail.com>
1003         PR target/49104
1004         * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
1005         is defined.  Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
1007 2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
1009         * system.h (ENUM_BITFIELD): Remove.
1011 2011-04-24  Jakub Jelinek  <jakub@redhat.com>
1013         PR preprocessor/48740
1014         * lex.c (lex_raw_string): When raw string ends with
1015         ??) followed by raw prefix and ", ensure it is preprocessed
1016         with ??) rather than ??].
1018 2011-04-20  Jim Meyering  <meyering@redhat.com>
1020         * files.c (destroy_cpp_file): Remove useless if-before-free.
1021         * init.c (cpp_destroy): Likewise.
1022         * macro.c (replace_args): Likewise.
1023         * pch.c (cpp_valid_state): Likewise.
1025 2011-03-25  Kai Tietz  <ktietz@redhat.com>
1027         * files.c (file_hash_eq): Use filename_cmp
1028         instead of strcmp.
1029         (nonexistent_file_hash_eq): Likewise.
1030         (remap_filename): Likewise.
1031         Handle absolute DOS-path,
1032         (append_file_to_dir): Check for IS_DIR_SEPARATOR
1033         instead of slash.
1034         (read_name_map): Likewise.
1035         * linemap.c (linemap_add): Use filename_cmp
1036         instead of strcmp.
1037         * mkdeps.c (apply_vpath): Use filename_ncmp
1038         instead of strncmp.
1039         (deps_restore): Use filename_cmp instead of
1040         strcmp.
1041         * init.c (read_original_directory): Use
1042         IS_DIR_SEPARATOR instead of checking for slash.
1044 2011-03-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
1046         PR preprocessor/48192
1047         * directives.c (do_ifdef): Do not consider conditional macros as
1048         being defined.
1049         (do_ifndef): Ditto.
1050         * expr.c (parse_defined): Ditto.
1052 2011-03-18  Richard Henderson  <rth@redhat.com>
1054         PR bootstrap/45381
1055         * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
1057 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1058             Jakub Jelinek  <jakub@redhat.com>
1060         PR preprocessor/39213
1061         * directives.c (end_directive): Call _cpp_remove_overlay for deferred
1062         pragmas as well in traditional mode.
1064 2010-11-17  Ian Lance Taylor  <iant@google.com>
1066         PR bootstrap/45538
1067         * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS.  Remove switch of
1068         AC_LANG based on ENABLE_BUILD_WITH_CXX.
1070 2010-11-16  Kai Tietz  <kai.tietz@onevision.com>
1072         PR preprocessor/17349
1073         * lex.c (save_comment): Handle in argument passing c++
1074         comments special.
1076 2010-11-02  Ian Lance Taylor  <iant@google.com>
1078         * configure.ac: Use AC_SYS_LARGEFILE.
1079         * configure: Rebuild.
1080         * config.in: Rebuild.
1082 2010-10-19  Basile Starynkevitch  <basile@starynkevitch.net>
1084         * line-map.h (source_location): Remove obsolete comment
1085         mentioning location_s.
1087 2010-09-29  Kai Tietz  <kai.tietz@onevision.com>
1089         PR preprocessor/45362
1090         * directives.c (cpp_pop_definition): Make static.
1091         (do_pragma_push_macro): Reworked to store text
1092         definition.
1093         (do_pragma_pop_macro): Add free text definition.
1094         (cpp_push_definition): Removed.
1095         * include/cpplib.h (cpp_push_definition): Removed.
1096         (cpp_pop_definition): Likewise.
1097         * internal.h (def_pragma_macro): Remove member 'value'
1098         and add new members 'definition', 'line',
1099         'syshdr', 'sued' and 'is_undef'.
1100         * pch.c (_cpp_restore_pushed_macros): Rework to work
1101         on text definition and store additional macro flags.
1102         (_cpp_save_pushed_macros): Likewise.
1104 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
1106         * include/cpplib.h (cpp_options): Rename warn_deprecated,
1107         warn_traditional, warn_long_long and pedantic.
1108         * directives.c (directive_diagnostics, _cpp_handle_directive):
1109         Update names of cpp_options members.
1110         * expr.c (cpp_classify_number, eval_token): Update names of
1111         cpp_options members.
1112         * init.c (cpp_create_reader, post_options): Update names of
1113         cpp_options members.
1114         * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
1115         cpp_options members.
1116         * macro.c (parse_params): Update names of cpp_options members.
1118 2010-09-15  Ian Lance Taylor  <iant@google.com>
1120         * init.c: Fix type name in comment.
1122 2010-08-31  Jakub Jelinek  <jakub@redhat.com>
1124         PR preprocessor/45457
1125         * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
1126         needed.
1127         * directives.c (do_ifdef, do_ifndef): Likewise.
1129 2010-08-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1131         * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
1133 2010-08-24  Richard Henderson  <rth@redhat.com>
1135         PR bootstrap/45376
1136         * configure.ac (HAVE_SSE4): New check.
1137         * configure, config.in: Rebuild.
1138         * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
1140 2010-08-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1142         * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
1143         etc. on Solaris 2/x86.
1145 2010-08-21  Richard Henderson  <rth@redhat.com>
1146             Andi Kleen <ak@linux.intel.com>
1147             David S. Miller  <davem@davemloft.net>
1149         * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
1150         (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
1151         (ptrdiff_t): Check via AC_CHECK_TYPE.
1152         * config.in, configure: Rebuild.
1153         * system.h: Include stdint.h, if available.
1154         * lex.c (WORDS_BIGENDIAN): Provide default.
1155         (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
1156         acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
1157         search_line_sse2, search_line_sse42, init_vectorized_lexer,
1158         search_line_fast): New.
1159         (_cpp_clean_line): Use search_line_fast.  Restructure the fast
1160         loop to make it clear when we're leaving the loop.  Stay in the
1161         fast loop for non-trigraph '?'.
1163 2010-06-11  Jakub Jelinek  <jakub@redhat.com>
1165         * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
1166         callback.
1167         (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
1168         (cpp_macro_definition): Remove const qual from second argument.
1169         * macro.c (enter_macro_context): Call user_builtin_macro callback for
1170         NODE_BUILTIN !NODE_USED macros.
1171         (warn_of_redefinition): Likewise.  Remove const qual from second
1172         argument.
1173         (cpp_macro_definition): Likewise.
1174         * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
1175         for NODE_BUILTIN !NODE_USED macros.
1177 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
1179         * include/cpplib.h (struct cpp_options): Remove show_column.
1180         * init.c (cpp_create_reader, post_options): Don't set show_column.
1182 2010-06-09  Joern Rennecke  <joern.rennecke@embecosm.com>
1184         PR bootstrap/44432
1185         * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
1186         check that C++ compiler works.
1187         * configure: Regenerate.
1189 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1191         * include/symtab.h (ht_identifier_ptr): New.
1193 2010-06-03  Joern Rennecke <joern.rennecke@embecosm.com>
1194             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1196         PR bootstrap/42798
1197         * configure.ac: Check for declaration of 'basename(char *)'.
1198         * configure: Regenerate.
1199         * config.in: Regenerate.
1201 2010-04-25  Joseph Myers  <joseph@codesourcery.com>
1203         * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
1204         * init.c (lang_defaults): Add entries for new language variants.
1205         (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
1206         variants.
1208 2010-04-09  Manuel López-Ibáñez <manu@gcc.gnu.org>
1210         PR cpp/43195
1211         * files.c (report_missing_guard): Test for #pragma once.
1213 2010-04-07  Simon Baldwin  <simonb@google.com>
1215         * directives.c (do_diagnostic): Add warning reason argument,
1216         call appropriate error reporting function for code.
1217         (directive_diagnostics): Call specific warning functions with
1218         warning reason where appropriate.
1219         (do_error, do_warning, do_pragma_dependency): Add warning reason
1220         argument to do_diagnostic calls.
1221         * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
1222         _cpp_create_definition): Call specific warning functions with
1223         warning reason where appropriate.
1224         * Makefile.in: Add new diagnostic functions to gettext translations.
1225         * include/cpplib.h (struct cpp_callbacks): Add warning reason code
1226         to error callback.
1227         (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
1228         CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
1229         (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
1230         CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
1231         CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
1232         CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
1233         CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
1234         CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
1235         CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
1236         warning reason codes.
1237         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
1238         cpp_warning_with_line, cpp_pedwarning_with_line,
1239         cpp_warning_with_line_syshdr): New specific error reporting functions.
1240         * pch.c (cpp_valid_state): Call specific warning functions with
1241         warning reason where appropriate.
1242         * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
1243         diagnostic handlers.
1244         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
1245         cpp_warning_with_line, cpp_pedwarning_with_line,
1246         cpp_warning_with_line_syshdr): New specific error reporting functions.
1247         * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
1248         specific warning functions with warning reason where appropriate.
1249         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
1250         warn_about_normalization, lex_identifier_intern, lex_identifier,
1251         _cpp_lex_direct): Ditto.
1252         * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
1253         narrow_str_to_charconst): Ditto.
1255 2010-04-06  Jakub Jelinek  <jakub@redhat.com>
1257         PR preprocessor/43642
1258         * lex.c (lex_raw_string): Change type of TYPE variable to
1259         unsigned char.
1261 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1263         * aclocal.m4: Regenerate.
1265 2010-03-29  Jason Merrill  <jason@redhat.com>
1267         More N3077 raw string changes
1268         * charset.c (cpp_interpret_string): Don't transform UCNs in raw
1269         strings.
1270         * lex.c (bufring_append): Split out from...
1271         (lex_raw_string): ...here.  Undo trigraph and line splicing
1272         transformations.  Do process line notes in multi-line literals.
1273         (_cpp_process_line_notes): Ignore notes that were already handled.
1275         Some raw string changes from N3077
1276         * charset.c (cpp_interpret_string): Change inner delimiters to ().
1277         * lex.c (lex_raw_string): Likewise.  Also disallow '\' in delimiter.
1279 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
1281         * init.c (read_original_filename): Don't call read_original_directory
1282         if _cpp_handle_directive returns 0.
1284 2010-01-01  Joseph Myers  <joseph@codesourcery.com>
1286         PR preprocessor/41947
1287         * expr.c (cpp_classify_number): Give error for hexadecimal
1288         floating-point constant with no digits before or after point.
1290 2009-11-20  Arnaud Charlet  <charlet@adacore.com>
1292         * macro.c (enter_macro_context): Call cb.used callback if defined.
1293         * directives.c (do_idef, do_ifndef): Ditto.
1294         * include/cpplib.h (struct cpp_callbacks): Add used callback.
1296 2009-11-11  Kai Tietz  <kai.tietz@onevision.com>
1298         * directives.c (do_pragma_push_macro): New pragma handler.
1299         (do_pragma_pop_macro): Likewise.
1300         (_cpp_init_internal_pragmas): Add push_macro and
1301         pop_macro handler to internal pragmas.
1302         (lex_macro_node_from_str): Removed.
1303         (cpp_push_definition): Replace lex_macro_node_from_str
1304         by _cpp_lex_identifier.
1305         (cpp_pop_definition): Likewise.
1306         * internal.h (_cpp_lex_identifier): New prototype.
1307         (def_pragma_macro): New structure.
1308         (cpp_reader): New member pushed_macros.
1309         * lex.c (_cpp_lex_identifier): New function.
1310         (lex_identifier_intern): New function.
1311         * init.c (cpp_create_reader): Initialize pushed_macros
1312         member.
1313         (cpp_destroy): Free elements in pushed_macros member.
1314         * pch.c (_cpp_save_pushed_macros): New function.
1315         (_cpp_restore_pushed_macros): Likewise.
1316         (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
1317         (cpp_read_state): Use _cpp_restore_pushed_macros.
1319 2009-10-19  Jakub Jelinek  <jakub@redhat.com>
1321         * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
1322         (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
1323         and char32_cset_desc.
1324         (converter_for_type): Handle CPP_UTF8STRING.
1325         (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
1326         * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
1327         (parse_include): Reject raw strings.
1328         * include/cpplib.h (CPP_UTF8STRING): New token type.
1329         * internal.h (struct cpp_reader): Add utf8_cset_desc field.
1330         * lex.c (lex_raw_string): New function.
1331         (lex_string): Handle u8 string literals, call lex_raw_string
1332         for raw string literals.
1333         (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
1334         sequences.
1335         * macro.c (stringify_arg): Handle CPP_UTF8STRING.
1337 2009-10-14  Jakub Jelinek  <jakub@redhat.com>
1339         PR preprocessor/41543
1340         * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
1341         * line-map.c (linemap_init): Initialize highest_location and
1342         highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
1344 2009-10-09  Jason Merrill  <jason@redhat.com>
1346         * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
1348 2009-10-09  Neil Vachharajani <nvachhar@google.com>
1350         * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
1351         sccs.
1353 2009-09-23  Loren J. Rittle  <ljrittle@acm.org>
1355         * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
1356         * configure: Rebuilt.
1358 2009-09-22  Richard Guenther  <rguenther@suse.de>
1360         PR pch/38987
1361         * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
1363 2009-09-18  Chris Demetriou  <cgd@google.com>
1365         PR preprocessor/28435:
1366         * include/cpplib.h (struct cpp_options): Add new member
1367         deps.need_preprocessor_output.
1368         * files.c (open_file_failed): If preprocessor output is needed
1369         always report an error.
1371 2009-09-13  Kai Tietz  <kai.tietz@onevision.com>
1373         * configure.ac: Set for i?86-w64-mingw*
1374         need_64bit_hwint to yes.
1375         * configure: Regenerated.
1377 2009-09-10  Jason Merrill  <jason@redhat.com>
1379         * directives.c (cpp_define): constify.
1381 2009-09-02  Ian Lance Taylor  <iant@google.com>
1383         * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
1385 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1387         * configure.ac (AC_PREREQ): Bump to 2.64.
1389 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1391         * aclocal.m4: Regenerate.
1392         * config.in: Regenerate.
1393         * configure: Regenerate.
1395 2009-08-17  Tom Tromey  <tromey@redhat.com>
1397         PR preprocessor/41067:
1398         * charset.c (convert_escape): Add missing ":" to error text.
1400 2009-07-27  Douglas B Rupp  <rupp@gnat.com>
1402         * include/cpplib.h (INO_T_CPP): New macro.
1403         (struct cpp_dir): Use it.
1405 2009-07-20  Jerry Quinn  <jlquinn@optonline.net>
1407         PR regression/40800
1408         * configure.ac: Use = instead of == for testing
1409         ENABLE_BUILD_WITH_CXX.
1410         * configure: Rebuild.
1412 2009-07-17  Jerry Quinn  <jlquinn@optonline.net>
1414         * directives.c (do_linemarker, do_line): Use CPP_STRING for
1415         ignored enum value.
1416         * files.c (find_file_in_dir): Add cast from void* to char*.
1417         * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
1418         * Makefile.in: (WARN_CFLAGS): Use general and C-specific
1419         warnings.
1420         (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
1421         ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
1422         COMPILER_FLAGS): New.
1423         (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
1424         (COMPILE.base): Use COMPILER instead of CC.  Use COMPILER_FLAGS
1425         instead of ALL_CFLAGS.
1426         * configure.ac: Invoke AC_PROG_CXX.  Separate C-specific warnings
1427         from other warnings.  Add -Wc++-compat to C-specific warnings.
1428         Check for --enable-build-with-cxx.  Set and substitute
1429         ENABLE_BUILD_WITH_CXX.  Invoke ZW_PROG_COMPILER_DEPENDENCIES
1430         according to ENABLE_BUILD_WITH_CXX.  Invoke AC_LANG before
1431         AC_CHECK_HEADERS.
1432         * configure: Rebuild.
1433         * include/cpp-id-data.h: Remove extern "C".
1434         * include/line-map.h: Likewise.
1435         * include/mkdeps.h: Likewise.
1436         * include/symtab.h: Likewise.
1437         * internal.h: Likewise.
1439 2009-06-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1441         * directives.c (parse_include): Add location argument. Update all
1442         calls.
1443         (parse_answer): Likewise.
1444         (do_include_common): Error with exact location.
1445         (parse_assertion): Likewise.
1447 2009-06-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1449         * expr.c (num_div_op): Take explicit location.
1451 2009-06-17  Ian Lance Taylor  <iant@google.com>
1453         * include/cpplib.h (progname): Don't declare.
1455 2009-06-12  Ian Lance Taylor  <iant@google.com>
1457         * include/cpplib.h (struct cpp_options): Add
1458         warn_cxx_operator_names field.
1459         (NODE_WARN_OPERATOR): Define.
1460         (struct cpp_hashnode): Increase flags field to 10 bits, decrease
1461         type to 6 bits.
1462         * init.c (mark_named_operators): Add flags parameter.
1463         (cpp_post_options): Pick flags value to pass to
1464         mark_named_operators.
1465         * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
1466         identifier is an operator name in C++.
1468 2009-06-01  Aldy Hernandez  <aldyh@redhat.com>
1470         * include/line-map.h (LAST_SOURCE_COLUMN): New.
1472 2009-06-01  Ian Lance Taylor  <iant@google.com>
1474         * include/cpp-id-data.h: Add extern "C".
1475         * include/line-map.h: Likewise.
1476         * include/mkdeps.h: Likewise.
1477         * include/symtab.h: Likewise.
1478         * internal.h: Likewise.
1480 2009-05-15  Ian Lance Taylor  <iant@google.com>
1482         * include/cpplib.h (enum cpp_builtin_type): Rename from enum
1483         builtin_type.  Change all uses.
1485 2009-05-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1487         PR cpp/36674
1488         * directives (do_linemarker): Compensate for the increment in
1489         location that occurs when we reach the end of line.
1490         * files (_cpp_stack_include): Mention _cpp_find_file in the
1491         comment.
1493 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
1495         * include/cpplib.h (enum cpp_token_fld_kind): Add
1496         CPP_TOKEN_FLD_TOKEN_NO.
1497         (struct cpp_macro_arg, struct cpp_identifier): Define.
1498         (union cpp_token_u): Use struct cpp_identifier for identifiers.
1499         Use struct cpp_macro_arg for macro arguments.  Add token_no for
1500         CPP_PASTE token numbers.
1501         * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
1502         do_pragma_poison, parse_assertion): Use val.node.node in place of
1503         val.node.
1504         * expr.c (parse_defined, eval_token): Use val.node.node in place
1505         of val.node.
1506         * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
1507         cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
1508         cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
1509         place of val.arg_no.  Use val.node.node in place of val.node.
1510         * macro.c (replace_args, cpp_get_token, parse_params,
1511         lex_expansion_token, create_iso_definition, cpp_macro_definition):
1512         Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
1513         Use val.node.node in place of val.node.
1515 2009-05-03  Joseph Myers  <joseph@codesourcery.com>
1517         * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
1518         UTF-8 sequences.
1520 2009-04-25  Joseph Myers  <joseph@codesourcery.com>
1522         PR preprocessor/39559
1523         * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
1524         constants larger than intmax_t in C99 mode.
1526 2009-04-21  Taras Glek <tglek@mozilla.com>
1528         * include/cpp-id-data.h: Update GTY annotations to new syntax.
1529         * include/cpplib.h: Likewise.
1530         * include/line-map.h: Likewise.
1531         * include/symtab.h: Likewise.
1533 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1535         PR c++/14875
1536         * lex.c (cpp_type2name): Take a flags parameter. Call
1537         cpp_named_operator2name for named operators and cpp_digraph2name
1538         for digraphs.
1539         (cpp_digraph2name): New.
1540         (cpp_spell_token): Use it.
1541         (cpp_output_token): Likewise.
1542         * include/cpplib.h (cpp_type2name): Update declaration.
1543         * init.c (cpp_named_operator2name): New.
1544         * internal.h (cpp_named_operator2name): Declare.
1546 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1548         PR c++/13358
1549         * init.c (cpp_create_reader): Wlong_long is disabled by default.
1550         * expr.c (cpp_classify_number): Give different messages for C and
1551         C++ front-ends.
1553 2009-04-19  Joseph Myers  <joseph@codesourcery.com>
1555         PR preprocessor/20078
1556         * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
1557         field.
1558         * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
1559         (struct cpp_token): Change flags to unsigned short.
1560         * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
1561         (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
1562         (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
1563         tokens.
1564         * macro.c (macro_real_token_count): New.
1565         (enter_macro_context, replace_args): Use macro_real_token_count.
1566         (create_iso_definition): Record whitespace surrounding and digraph
1567         spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
1568         Set extra_tokens and save CPP_PASTE tokens with arg_no set for
1569         multiple consecutive ## tokens.
1570         (_cpp_create_definition): Initialize extra_tokens.
1571         (cpp_macro_definition): Use macro_real_token_count.
1573 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1575         * directives.c (parse_include): Pass true to check_eol.
1577 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1579         PR preprocessor/39646
1580         * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
1581         * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
1582         * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
1583         place of LC_RENAME.
1585 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
1587         PR preprocessor/39647
1588         * directives.c (check_eol): Add parameter expand.
1589         (do_undef, parse_include, do_line, do_linemarker, do_ident,
1590         do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
1591         do_else, do_endif, do_assert, do_unassert): All callers changed.
1592         Pass true from do_line, false elsewhere.
1594 2009-04-12  Joseph Myers  <joseph@codesourcery.com>
1596         PR preprocessor/31869
1597         * macro.c (stringify_arg): Handle NULL source token in padding
1598         token where previous padding token did not have source token with
1599         preceding whitespace.
1601 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
1603         * Makefile.in: Change copyright header to refer to version
1604         3 of the GNU General Public License and to point readers at the
1605         COPYING3 file and the FSF's license web page.
1606         * charset.c: Likewise.
1607         * directives-only.c: Likewise.
1608         * directives.c: Likewise.
1609         * errors.c: Likewise.
1610         * expr.c: Likewise.
1611         * files.c: Likewise.
1612         * identifiers.c: Likewise.
1613         * include/cpp-id-data.h: Likewise.
1614         * include/cpplib.h: Likewise.
1615         * include/line-map.h: Likewise.
1616         * include/mkdeps.h: Likewise.
1617         * include/symtab.h: Likewise.
1618         * init.c: Likewise.
1619         * internal.h: Likewise.
1620         * lex.c: Likewise.
1621         * line-map.c: Likewise.
1622         * macro.c: Likewise.
1623         * makeucnid.c: Likewise.
1624         * mkdeps.c: Likewise.
1625         * pch.c: Likewise.
1626         * symtab.c: Likewise.
1627         * system.h: Likewise.
1628         * traditional.c: Likewise.
1629         * ucnid.tab: Likewise.
1630         * ucnid.h: Regenerate.
1632 2009-04-01  Janis Johnson  <janis187@us.ibm.com>
1634         PR c/39027
1635         * include/cpplib.h (CPP_N_DEFAULT): Define.
1636         * expr.c (interpret_float_suffix): Recognize d or D for double,
1637         return new value for default.
1638         (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
1640         PR c/33466
1641         * expr.c (interpret_float_suffix): Reject invalid suffix that uses
1642         letters from decimal float and fixed-point suffixes.
1644 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
1646         PR preprocessor/15638
1647         * files.c (_cpp_find_file): Call open_file_failed after diagnosing
1648         invalid PCH.
1649         (open_file_failed): Make error for missing file fatal.
1650         * include/cpplib.h (CPP_DL_FATAL): Define.
1652 2009-03-30  Sergiy Vyshnevetskiy  <serg@vostok.net>
1654         PR preprocessor/31932:
1655         * internal.h: Don't mention HAVE_ICONV_H.
1656         * configure, config.in: Rebuild.
1657         * configure.ac: Don't check for iconv.h.
1659 2009-03-30  Tom Tromey  <tromey@redhat.com>
1661         PR preprocessor/39512:
1662         * line-map.c (linemap_init): Initialize 'reallocator' field.
1664 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
1666         PR target/39558
1667         * macro.c (cpp_get_token): If macro_to_expand returns NULL
1668         and used some tokens, add CPP_PADDING before next token.
1670 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
1672         PR preprocessor/34695
1673         * makedepend.c: Remove.
1674         * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
1675         (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
1676         * directives.c (cpp_errors): Remove.
1677         * errors.c (print_location, _cpp_begin_message, v_message):
1678         Remove.
1679         (cpp_error, cpp_error_with_line): Always use error callback.
1680         (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
1681         * include/cpplib.h (cpp_options): Remove pedantic_errors,
1682         inhibit_warnings, warn_system_headers, inhibit_errors,
1683         warnings_are_errors, client_diagnostic.
1684         (cpp_callbacks): Add extra arguments to error callback; make it
1685         return bool.
1686         (cpp_finish): Return void.
1687         (cpp_destroy): Remove inaccurate comment about return value.
1688         (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
1689         (CPP_DL_NOTE): Define.
1690         * include/line-map.h (linemap_print_containing_files): Remove.
1691         * init.c (cpp_finish): Do not check for or return number of
1692         errors.
1693         * internal.h (cpp_reader): Remove errors field.
1694         * line-map.c (linemap_print_containing_files): Remove.
1695         * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
1696         about previous definition.  Only emit it if previous diagnostic
1697         was emitted.
1699 2009-03-28  Joseph Myers  <joseph@codesourcery.com>
1701         * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1702         mkinstalldirs.
1704 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
1706         * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1708 2009-02-21  Joseph Myers  <joseph@codesourcery.com>
1710         * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1711         header name.
1712         (_cpp_lex_direct): Handle this.
1714 2009-02-15  Richard Guenther  <rguenther@suse.de>
1716         Revert last change.
1718 2009-02-13  Richard Guenther  <rguenther@suse.de>
1720         * configure.ac: Enable LFS.
1721         * configure: Re-generate.
1722         * config.in: Likewise.
1724 2009-01-05  Ben Elliston  <bje@au.ibm.com>
1726         * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1727         (.po.pox): Likewise.
1728         (po/$(PACKAGE).pot): Likewise.
1730 2008-12-10  Alexandre Oliva  <aoliva@redhat.com>
1732         PR target/37033
1733         * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1734         Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1736 2008-11-29  Joseph Myers  <joseph@codesourcery.com>
1738         * lex.c (cpp_token_len): Use 6 as default length.
1740 2008-10-31  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1742         * expr.c (struct op): Add location.
1743         (_cpp_parse_expr): Propagate locations throught the stack
1744         of expressions.
1745         (reduce): Likewise.
1746         (check_promotion): Use explicit location in errors.
1748 2008-10-05  Matthew Gingell  <gingell@adacore.com>
1749             Arnaud Charlet  <charlet@adacore.com>
1751         * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1752         (cpp_get_comments): New function.
1753         * internal.h (struct cpp_reader): Add comments field.
1754         * init.c (cpp_destroy): Free comments.
1755         * lex.c (store_comment, cpp_get_comments): New functions.
1756         (comments): New struct.
1757         (save_comment): Store comments in comments struct.
1759 2008-09-18  Simon Baldwin  <simonb@google.com>
1761         * include/cpplib.h (struct cpp_options): Add new boolean flag
1762         warn_builtin_macro_redefined.
1763         * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1764         * (struct builtin_operator): Split out from previous struct builtin,
1765         enhance extra const correctness.
1766         * (struct builtin_macro): Split out from previous struct builtin, add
1767         new always_warn_if_redefined flag, enhance const correctness.
1768         * (mark_named_operators): Use struct builtin_operator.
1769         * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1770         to builtins selectively.
1771         * macro.c (warn_of_redefinition): Return false if a builtin macro
1772         is not flagged with NODE_WARN.
1774 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
1776         PR preprocessor/36649
1777         * files.c (struct report_missing_guard_data): New type.
1778         (report_missing_guard): Put paths into an array instead of printing
1779         them right away.  Return 1 rather than 0.
1780         (report_missing_guard_cmp): New function.
1781         (_cpp_report_missing_guards): Sort and print paths gathered by
1782         report_missing_guard callback.
1784 2008-07-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1786         PR 28079
1787         * directives.c (strtolinenum): Handle overflow.
1788         (do_line): Give a warning if line number overflowed.
1789         (do_linemarker): Update call to strtolinenum.
1791 2008-07-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1793         * include/line-map.h (linenum_type): New typedef.
1794         (struct line_map): Use it.
1795         (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1796         (SOURCE_COLUMN): Likewise.
1797         * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1798         source_location values in a variable of type linenum_type.
1799         * directives.c (struct if_stack): Use linenum_type.
1800         (strtoul_for_line): Rename as strtolinenum.
1801         (do_line): Use linenum_type.
1802         (do_linemarker): Use linenum_type and strtolinenum.
1803         (_cpp_do_file_change): Use linenum_t.
1804         * line-map.c (linemap_add): Likewise.
1805         (linemap_line_start): Likewise.
1806         * traditional.c (struct fun_macro): 'line' is a source_location.
1807         * errors.c (print_location): Use linenum_type.
1808         * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1809         * internal.h (CPP_INCREMENT_LINE): Likewise.
1810         * lex.c (_cpp_skip_block_comment): Use source_location.
1811         
1812 2008-07-14  Ben Elliston  <bje@au.ibm.com>
1814         * include/cpplib.h (NODE_CONDITIONAL): New.
1815         (struct cpp_callbacks): New macro_to_expand field.
1816         (struct cpp_hashnode): Adjust size of flags and type fields.
1817         (cpp_peek_token): Prototype.
1818         * lex.c (cpp_peek_token): New function.
1819         (_cpp_temp_token): Protect pre-existing lookaheads.
1820         * macro.c (cpp_get_token): Expand any conditional macros.
1821         (_cpp_backup_tokens_direct): New.
1822         (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1823         (warn_of_redefinition): Silently allow redefined conditional
1824         macros.
1825         (_cpp_create_definition): Remove the conditional flag when a user
1826         defines one of the conditional macros.
1827         * internal.h (_cpp_backup_tokens_direct): New prototype.
1829 2008-06-13  Andrew Haley  <aph@redhat.com>
1831         PR preprocessor/33305
1832         * macro.c (replace_args): Print a warning for empty macro
1833         arguments in C89 and C++.
1835 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1837         * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1838         * configure: Regenerate.
1840 2008-06-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1842         * Makefile.in (datarootdir): New variable.
1844 2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1846         PR preprocessor/36479
1847         * charset.c (cpp_interpret_string_notranslate): Also set
1848         narrow_cset_desc.width.
1850 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
1852         * configure.ac (parisc*64*-*-*): Remove.
1853         * configure: Regenerate.
1855 2008-05-30  Tom Tromey  <tromey@redhat.com>
1857         PR preprocessor/36320:
1858         * internal.h (_cpp_parse_expr): Update.
1859         * expr.c (_cpp_parse_expr): Add 'is_if' argument.  Update error
1860         messages.
1861         * directives.c (do_if): Update.
1862         (do_elif): Require expression if processing group.
1864 2008-05-30  Danny Smith  <dannysmith@users.sourceforge.net>
1866         * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1868 2008-05-21  Tom Tromey  <tromey@redhat.com>
1870         PR preprocessor/27777:
1871         * lex.c (cpp_output_line_to_string): New function.
1872         * internal.h (_cpp_begin_message): Don't declare.
1873         * errors.c (_cpp_begin_message): Now static.
1874         * include/cpplib.h (cpp_output_line_to_string): Declare.
1875         * directives.c (do_diagnostic): Rewrote.  Use
1876         cpp_output_line_to_string.  Don't use _cpp_begin_message.
1878 2008-05-21  Tom Tromey  <tromey@redhat.com>
1880         * include/symtab.h (HT_ALLOCED): Remove.
1881         (ht_purge): Declare.
1882         * symtab.c (DELETED): New define.
1883         (ht_lookup): Update comment.
1884         (ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
1885         code.  Use subobject allocator for strings, if it exists.
1886         (ht_expand): Handle deleted entries.
1887         (ht_forall): Likewise.
1888         (ht_purge): New function.
1889         (ht_dump_statistics): Print deletion statistics.
1891 2008-05-13  Tom Tromey  <tromey@redhat.com>
1893         PR preprocessor/22168:
1894         * include/cpplib.h (struct cpp_options) <objc>: Update
1895         documentation.
1896         * expr.c (eval_token): Warn for use of assertions.
1897         * directives.c (directive_diagnostics): Warn about extensions.
1898         (DEPRECATED): New define.
1899         (DIRECTIVE_TABLE): Use it.
1901 2008-05-06  Tom Tromey  <tromey@redhat.com>
1903         PR preprocessor/35313, PR preprocessor/36088:
1904         * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1905         (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1907 2008-05-04  David S. Miller  <davem@davemloft.net>
1909         * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1910         * configure: Regenerate.
1912 2008-04-22  Daniel Franke  <franke.daniel@gmail.com>
1914         * include/cpplib.h (cpp_define_formatted): New.
1915         * directives.c (cpp_define_formatted): New.
1917 2008-04-21  Tom Tromey  <tromey@redhat.com>
1919         PR libcpp/33415:
1920         * charset.c (_cpp_convert_input): Add buffer_start argument.
1921         Ignore UTF-8 BOM if seen.
1922         * internal.h (_cpp_convert_input): Add argument.
1923         * files.c (struct _cpp_file) <buffer_start>: New field.
1924         (destroy_cpp_file): Free buffer_start, not buffer.
1925         (_cpp_pop_file_buffer): Likewise.
1926         (read_file_guts): Update.
1928 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
1930         * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1931         * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1932         (struct cpp_options): Added uliterals.
1933         (cpp_interpret_string): Update prototype.
1934         (cpp_interpret_string_notranslate): Idem.
1935         * charset.c (init_iconv_desc): New width member in cset_converter.
1936         (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1937         (convert_ucn): Idem.
1938         (emit_numeric_escape): Idem.
1939         (convert_hex): Idem.
1940         (convert_oct): Idem.
1941         (convert_escape): Idem.
1942         (converter_for_type): New function.
1943         (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1944         (cpp_interpret_string_notranslate): Match changed prototype.
1945         (wide_str_to_charconst): Use converter_for_type.
1946         (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1947         * directives.c (linemarker_dir): Macro U changed to UC.
1948         (parse_include): Idem.
1949         (register_pragma_1): Idem.
1950         (restore_registered_pragmas): Idem.
1951         (get__Pragma_string): Support CPP_STRING{16,32}.
1952         * expr.c (eval_token): Support CPP_CHAR{16,32}.
1953         * init.c (struct lang_flags): Added uliterals.
1954         (lang_defaults): Idem.
1955         * internal.h (struct cset_converter) <width>: New field.
1956         (struct cpp_reader) <char16_cset_desc>: Idem.
1957         (struct cpp_reader) <char32_cset_desc>: Idem.
1958         * lex.c (digraph_spellings): Macro U changed to UC.
1959         (OP, TK): Idem.
1960         (lex_string): Add support for u'...', U'...', u"..." and U"...".
1961         (_cpp_lex_direct): Idem.
1962         * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1963         (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1965 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
1967         PR bootstrap/35457
1968         * aclocal.m4: Regenerate.
1969         * configure: Regenerate.
1971 2008-04-17  Tom Tromey  <tromey@redhat.com>
1973         PR libcpp/34866:
1974         * errors.c (cpp_error): Don't reference a token before the start
1975         of the current run.
1977 2008-04-16  Tom Tromey  <tromey@redhat.com>
1979         * Makefile.in (TAGS_SOURCES): New variable.
1980         (TAGS): New target.
1982 2008-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
1984         * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1985         and shbe-*-*.
1986         * configure: Rebuilt.
1988 2008-04-02  Joseph Myers  <joseph@codesourcery.com>
1990         * include/cpplib.h (struct cpp_callbacks): Add used_define,
1991         used_undef and before_define.
1992         (NODE_USED): Define.
1993         * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1994         do_ifndef, cpp_pop_definition): Handle new flag and use new
1995         callbacks.
1996         * expr.c (parse_defined): Handle new flag and use new callbacks.
1997         * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1998         flag and use new callbacks.
2000 2008-04-01  Jakub Jelinek  <jakub@redhat.com>
2002         PR pch/13675
2003         * files.c (struct _cpp_file): Remove pch field.
2004         (pch_open_file): Don't set file->pch, just file->pchname.
2005         (should_stack_file): After pfile->cb.read_pch call
2006         free pchname and clear pchname, don't close file->fd.
2007         Test file->pchname instead of file->pch.  Don't close fd after cb.
2008         (_cpp_stack_include): Test file->pchname instead of file->pch.
2010 2008-03-28  Tom Tromey  <tromey@redhat.com>
2012         * Makefile.in (POSTCOMPILE): New variable.
2013         (.c.o): Use it.
2015 2008-03-13  Tom Tromey  <tromey@redhat.com>
2017         PR libcpp/35322:
2018         * directives.c (destringize_and_run): Set pfile->directive.
2020 2008-03-06  Markus Milleder  <markus.milleder@generali.at>
2022         PR preprocessor/35458
2023         * mkdeps.c (munge): Quote '#' with a '\'.
2025 2008-02-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2027         PR preprocessor/35379
2028         * mkdeps.c (deps_write): Ensure the first target always appears
2029         in the first column, without leading backslash newline.  Avoid
2030         some more extra whitespace.
2032 2008-02-25  Thiemo Seufer <ths@mips.com>
2034         * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
2036 2008-02-19  Tom Tromey  <tromey@redhat.com>
2038         * traditional.c (lex_identifier): Use CPP_HASHNODE.
2039         * lex.c (lex_identifier): Use CPP_HASHNODE.
2040         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
2041         do-while.
2042         * identifiers.c (alloc_node): Change return type.
2043         (_cpp_init_hashtable): Don't cast 'alloc_node'.
2044         (proxy_assertion_broken): New declaration.
2045         (cpp_forall_identifiers): Move comment.
2046         * line-map.c (linemap_add): Comment fix.
2047         (linemap_line_start): Indentation fix.
2049 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
2051         PR preprocessor/34692
2052         * macro.c (collect_args): Add pragma_buff argument.  Push
2053         CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
2054         than into arguments.  Reset prevent_expansion and parsing_args
2055         state at CPP_PRAGMA_EOL/CPP_EOF.
2056         (funlike_invocation_p): Add pragma_buff argument, pass it through
2057         to collect_args.
2058         (enter_macro_context): Add result argument.  Adjust
2059         funlike_invocation_p caller.  Emit all deferred pragma tokens
2060         gathered during collect_args before the expansion, add a padding
2061         token.  Return 2 instead of 1 if any pragma tokens were prepended.
2062         (cpp_get_token): If enter_macro_context returns 2, don't return
2063         a padding token, instead cycle to grab CPP_PRAGMA token.
2064         * directives.c (_cpp_handle_directive): If was_parsing_args
2065         in deferred pragma, leave parsing_args and prevent_expansion as is.
2067 2008-01-22  Tom Tromey  <tromey@redhat.com>
2069         PR c++/34859
2070         * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
2071         __STDC_CONSTANT_MACROS.
2073 2008-01-07  Fred Fish  <fnf@specifix.com>
2075         PR preprocessor/30363
2076         * traditional.c (replace_args_and_push): Add local variable
2077         cxtquote, calculate the replacement text size assuming a 
2078         worst case of every input character quoted with backslash,
2079         and properly handle output quoting of quote characters in
2080         actual arguments used in function-like macros.
2082 2008-01-03  Tom Tromey  <tromey@redhat.com>
2084         PR preprocessor/34602
2085         * directives.c (do_line): Don't try to spell EOF token.
2086         (do_linemarker): Add comment.
2088 2007-12-11  DJ Delorie  <dj@redhat.com>
2090         * charset.c (convert_using_iconv): Close out any shift states,
2091         returning to the initial state.
2093 2007-12-06  Tom Tromey  <tromey@redhat.com>
2095         PR c/29172
2096         * internal.h (struct cpp_reader) <file_hash_entries>: Changed
2097         type.
2098         <file_hash_entries_allocated, file_hash_entries_used>: Removed.
2099         * files.c (FILE_HASH_POOL_SIZE): New macro.
2100         (struct file_hash_entry_pool): New.
2101         (destroy_all_cpp_files): New function.
2102         (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
2103         (new_file_hash_entry): Update.
2104         (free_file_hash_entries): New function.
2105         (_cpp_cleanup_files): Call free_file_hash_entries and
2106         destroy_all_cpp_files.
2107         (cpp_clear_file_cache): New function.
2108         * include/cpplib.h (cpp_clear_file_cache): Declare.
2110 2007-12-03  Tom Tromey  <tromey@redhat.com>
2112         PR preprocessor/34288
2113         * configure.ac, config.in: Rebuilt.
2114         * configure.ac: Check for ssize_t.
2116 2007-11-30  Tom Tromey  <tromey@redhat.com>
2118         PR preprocessor/32868
2119         * macro.c (_cpp_create_definition): Special case
2120         __STDC_FORMAT_MACROS.
2122 2007-11-16  Michael Matz  <matz@suse.de>
2124         * files.c (search_path_head): Fix check for absolute paths.
2126 2007-11-11  Tom Tromey  <tromey@redhat.com>
2128         PR c++/17557
2129         * include/cpplib.h (cpp_included_before): Declare.
2130         * files.c (struct file_hash_entry) <location>: New field.
2131         (_cpp_find_file): Initialize new field.
2132         (make_cpp_dir): Likewise.
2133         (cpp_included_before): New function.
2135 2007-11-01  Tom Tromey  <tromey@redhat.com>
2137         PR preprocessor/30805
2138         * macro.c (paste_tokens): Handle padding token.
2139         (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
2141 2007-10-31  Tom Tromey  <tromey@redhat.com>
2143         PR preprocessor/30786
2144         * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
2145         * directives.c (_cpp_do__Pragma): Return error status.
2146         * internal.h (_cpp_do__Pragma): Update.
2147         * directives.c (get__Pragma_string): Back up if EOF seen.
2149 2007-09-06  Tom Tromey  <tromey@redhat.com>
2151         * internal.h (struct cpp_reader) <invocation_location>: New
2152         field.
2153         (struct cpp_reader) <set_invocation_location>: Likewise.
2154         * init.c (cpp_set_line_map): New function.
2155         * line-map.c (linemap_add): Use linemap's allocator.
2156         * include/line-map.h (GTY): Define.
2157         (line_map_realloc): New typedef.
2158         (struct line_map): Mark with GTY.
2159         (struct line_maps): Likewise.
2160         (struct line_maps) <maps>: Likewise.
2161         (struct line_maps) <reallocator>: New field.
2162         * include/symtab.h (GTY): Conditionally define.
2163         * include/cpplib.h (cpp_set_line_map): Declare.
2164         (cpp_get_token_with_location): Declare.
2165         * macro.c (cpp_get_token): Set invocation_location on the reader.
2166         (cpp_get_token_with_location): New function.
2168 2007-08-30  Chao-ying Fu  <fu@mips.com>
2170         * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
2171         ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
2172         (cpp_classify_number): Support decimal fixed-point constants without
2173         exponents.
2174         Warn about fixed-point constants when -pedantic.
2175         * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
2176         comments to support fixed-point values.
2177         (CPP_N_FRACT, CPP_N_ACCUM): Define.
2179 2007-08-18  Tom Tromey  <tromey@redhat.com>
2181         PR preprocessor/32974
2182         * directives.c (parse_include): Don't check for EOL when
2183         processing #pragma dependency.
2185 2007-07-30  Ollie Wild  <aaw@google.com>
2187         * directives-only.c: New file.
2188         * internal.h (struct _cpp_dir_only_callbacks): New.
2189         (_cpp_preprocess_dir_only): New function.
2190         * directives.c (_cpp_handle_directive): Check directives_only before
2191         disabling execution of indented directives.
2192         * files.c (_cpp_stack_file): Add directives_only check.
2193         * include/cpplib.h (struct cpp_options): Add directives_only.
2194         (cpp_init_special_builtins): New function.
2195         * init.c (cpp_init_special_builtins): New function.
2196         (cpp_init_builtins): Move builtin_array initialization to
2197         cpp_init_special_builtins.
2198         (post_options): Check directives_only before setting
2199         pfile->state.prevent_expansion = 1.
2200         * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
2201         is expanded inside a directive while -fdirectives-only is enabled.
2202         * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
2203         (libcpp_a_SOURCES): Add directives-only.c.
2205 2007-07-04  Uros Bizjak  <ubizjak@gmail.com>
2207         * traditional.c (_cpp_scan_out_logical_line): Initialize
2208         fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
2209         fmacro.args to prevent 'may be used uninitialized' warning.
2211 2007-07-03  Uros Bizjak  <ubizjak@gmail.com>
2213         * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
2214         Add new constants.
2215         * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
2216         suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
2217         for 'q' or 'Q' suffixes.
2219 2007-06-17  Danny Smith  <dannysmith@users.sourceforge.net
2221         * files.c (open_file): Correct typo.
2223 2007-06-16  Vladimir Prus  <vladimir@codesourcery.com>
2225         * files.c (open_file): Prevent the call
2226         for stat from overwriting errno.
2228 2007-06-09  Vladimir Prus  <vladimir@codesourcery.com>
2230         * files.c (open_file): Account for the
2231         fact that on windows, opening a directory gives
2232         EACCES.
2234 2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
2236         PR preprocessor/23479
2237         * expr.c (cpp_classify_number): Implement 0b-prefixed binary
2238         integer constants.
2239         (append_digit): Likewise.
2240         * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
2241         binary integer constants.
2243 2007-05-31  Dave Korn  <dave.korn@artimi.com>
2245         PR preprocessor/14331
2246         * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
2248 2007-05-24  Ollie Wild  <aaw@google.com>
2250         * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
2251         * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
2252         (cpp_write_pch_state): Save __COUNTER__ state.
2253         (cpp_valid_state): Check valid __COUNTER__ state.
2254         (cpp_read_state): Read new __COUNTER__ state.
2255         * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
2256         * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
2257         * internal.h (struct cpp_reader): Add counter member.
2259 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
2261         PR preprocessor/20077
2262         * macro.c (create_iso_definition): Fixed the method to determine
2263         whether the token-pasting operator appears at the beginning or the end
2264         of a macro.
2266 2007-05-21  Ian Lance Taylor  <iant@google.com>
2268         * internal.h (struct cpp_reader): Add new fields:
2269         nonexistent_file_hash and nonexistent_file_ob.
2270         * files.c: Include "obstack.h".
2271         (find_file_in_dir): Before trying to open the file, look up the
2272         path name in the hash table of nonexistent files.  After failing
2273         to open the file, add the path name to the hash table.
2274         (_cpp_find_file): Cache the results of looking up the file name
2275         starting with the quote and bracket chain heads, if we can.
2276         (nonexistent_file_hash_eq): New static function.
2277         (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
2278         pfile->nonexistent_file_ob.
2279         (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
2280         pfile->nonexistent_file_ob.
2282 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
2284         * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
2286         PR c/31924
2287         * expr.c (interpret_float_suffix): Check for invalid suffix.
2289 2007-05-02  Eric Christopher  <echristo@apple.com>
2291         * expr.c (num_div_op): Don't overflow if the result is
2292         zero.
2294 2007-05-02  Tom Tromey  <tromey@redhat.com>
2296         PR preprocessor/28709
2297         * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
2299 2007-03-30  Michael Meissner  <michael.meissner@amd.com>
2301         * directives.c (lex_macro_node_from_str): Fix alloca call to be
2302         type correct.
2304 2007-03-30  Richard Henderson  <rth@redhat.com>
2306         * directives.c (lex_macro_node_from_str): New.
2307         (cpp_push_definition, cpp_pop_definition): New.
2308         * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
2310 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2312         * Makefile.in: Add dummy install-pdf target.
2314 2007-01-30  Tom Tromey  <tromey@redhat.com>
2316         PR preprocessor/30468
2317         * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
2318         './'.
2320 2007-01-30  Tom Tromey  <tromey@redhat.com>
2322         PR preprocessor/29966
2323         * macro.c (lex_expansion_token): Save and restore cpp_reader's
2324         cur_token.
2325         (_cpp_create_definition): Don't restore cur_token here.
2326         * lex.c (_cpp_lex_token): Added assertion.
2328 2007-01-27  Tom Tromey  <tromey@redhat.com>
2330         * configure: Rebuilt.
2332 2007-01-12  Tom Tromey  <tromey@redhat.com>
2334         PR preprocessor/28227
2335         * directives.c (lex_macro_node): Added 'is_def_or_undef'
2336         argument.
2337         (do_define): Update.
2338         (do_undef): Update.
2339         (do_ifdef): Update.
2340         (do_ifndef): Update.
2342 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
2344         * configure: Regenerate.
2346 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
2348         * configure: Regenerate.
2350 2007-01-04  Tom Tromey  <tromey@redhat.com>
2352         PR preprocessor/28165
2353         * internal.h (cpp_in_primary_file): New function.
2354         * directives.c (do_include_next): Use cpp_in_primary_file.
2355         (do_pragma_once): Likewise.
2356         (do_pragma_system_header): Likewise.
2358 2006-12-29  Ian Lance Taylor  <iant@google.com>
2360         * lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
2361         look backward at the end of the line unless we saw a backslash.
2363 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
2365         PR preprocessor/29612
2366         * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
2367         only when new_sysp is non-zero.
2369 2006-12-28  Tom Tromey  <tromey@redhat.com>
2371         PR preprocessor/30001
2372         * charset.c (_cpp_convert_input): Check that to.len is greater
2373         than zero.
2375 2006-11-20  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
2377         * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
2378         * configure: Rebuilt.
2380 2006-11-01      Douglas Gregor <doug.gregor@gmail.com>
2382         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
2383         for experimental C++0x mode.
2384         * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
2385         adopted the preprocessor changes introduced in C99.
2387 2006-10-29  Joseph Myers  <joseph@codesourcery.com>
2389         * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
2390         depending on --enable-targets=all.
2391         * configure: Regenerate.
2393 2006-10-12  Jakub Jelinek  <jakub@redhat.com>
2395         PR preprocessor/28709
2396         * macro.c (paste_tokens): Do error reporting here, use BUF with the
2397         spelled LHS token as opposed to spelling it again.
2398         (paste_all_tokens): Don't report errors here, just break on failure.
2400 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2402         * Makefile.in: Added empty "pdf" target.
2404 2006-09-22  Geoffrey Keating  <geoffk@apple.com>
2406         * configure.ac: Make need_64_bit_hwint case for x86-darwin
2407         match exactly the glob in gcc/config.gcc.
2408         * configure: Regenerate.
2410 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
2412         PR c/28768
2413         PR preprocessor/14634
2414         * lex.c (lex_string): Pedwarn for unterminated literals.
2416 2006-09-08  Eric Christopher  <echristo@apple.com>
2418         * configure.ac: Add 64-bit HWI support for i?86-darwin.
2420 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
2422         PR c++/28288
2423         PR c++/14556
2424         * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
2425         (CPP_LAST_EQ): Change.
2426         (CPP_LAST_PUNCTUATOR): Change.
2427         * expr.c (cpp_operator): Remove MIN and MAX.
2428         (reduce): Remove CPP_MIN and CPP_MAX.
2429         (num_binary_op): Ditto.
2430         * lex.c (_cpp_lex_direct): Ditto.
2431         (cpp_avoid_paste): Remove ? as legal symbol after > or <.
2433 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
2435         PR preprocessor/27746
2436         * directives.c (do_pragma): Handle pragma with valid namespace
2437         and invalid name coming from macro expansion.
2438         * directives.c (destringize_and_run): Initialize next field in
2439         context.
2441         PR c/27747
2442         PR c++/27748
2443         * directives.c (destringize_and_run): Set NO_EXPAND on the
2444         tokens.
2446         * macro.c (_cpp_backup_tokens): Fix comment typo.
2448 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
2450         * Makefile.in (CATALOGS): Add po/ prefix.
2451         * configure: Regenerated.
2453 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
2455         * Makefile.in: Add install-html target. Add install-html to .PHONY
2457 2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
2459         * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
2460         * files.c (_cpp_get_file_stat): New function.
2461         * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
2462         * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
2463         * internal.h (_cpp_get_file_stat): Prototype.
2464         (struct cpp_buffer): Add timestamp.
2466 2006-01-23  Jakub Jelinek  <jakub@redhat.com>
2468         PR preprocessor/25717
2469         * init.c (cpp_init_builtins): If __STDC__ will not change value
2470         between system headers and other sources, define it as a normal
2471         macro rather than a builtin.
2472         * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
2473         cpp_in_system_header condition.
2475 2006-01-05  Paolo Bonzini  <bonzini@gnu.org>
2477         * Makefile.in: Use -MMD instead of -MD.
2479 2006-01-04  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2480             Richard Henderson  <rth@redhat.com>
2482         Merge from gomp branch:
2483         * directives.c (struct pragma_entry): Add is_deferred.  Add ident
2484         entry to value union.
2485         (end_directive): Don't eat the line if in_deferred_pragma.
2486         (run_directive): Remove pragma hacks.
2487         (insert_pragma_entry): Remove.
2488         (new_pragma_entry): New.
2489         (register_pragma_1): Split out of register_pragma.  Only handle
2490         the lookup tree and return the new entry.
2491         (cpp_register_pragma): Fill in the pragma entry here.
2492         (cpp_register_deferred_pragma): New.
2493         (register_pragma_internal): New.
2494         (_cpp_init_internal_pragmas): Use register_pragma_internal.
2495         (do_pragma): Allow pragma expansion after namespace.  For deferred
2496         pragmas, don't slurp the line into a string.
2497         (destringize_and_run): Save tokens for deferred pragmas.
2498         (cpp_handle_deferred_pragma): Remove.
2499         * macro.c (builtin_macro): Remove pragma token hack.
2500         (_cpp_push_token_context): Rename from push_token_context and export.
2501         * internal.h (struct lexer_state): Add pragma_allow_expansion.
2502         (_cpp_push_token_context): Declare.
2503         * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
2504         a token.  Update the line number correctly if so.
2505         (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
2506         (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
2507         * include/cpplib.h (PRAGMA_EOL): New.
2508         (CPP_TOKEN_FLD_PRAGMA): New.
2509         (struct cpp_token): Add val.pragma.
2510         (struct cpp_options): Remove defer_pragmas.
2511         (cpp_handle_deferred_pragma): Remove.
2512         (cpp_register_deferred_pragma): Declare.
2514 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
2516         PR c++/25294
2517         * directives.c (do_pragma): If pragma line ends with multi-line
2518         block comment, end the saved deferred pragma string before that
2519         comment.  Handle embedded '\0' chars on the pragma line.
2521 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2523         PR c++/23333
2524         * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
2526 2005-12-07  Jon Grimm  <jgrimm2@us.ibm.com>
2527             Ben Elliston  <bje@au.ibm.com>
2529         * include/cpplib.h (CPP_N_DFLOAT): New.
2530         * expr.c (interpret_float_suffix): Identify df, dd, and dl
2531         suffixes as decimal floating point constants.
2532         (cpp_classify_number): Disallow hexadecimal DFP constants.
2534 2005-11-14  Gerald Pfeifer  <gerald@pfeifer.com>
2535             Ian Lance Taylor  <ian@airs.com>
2537         * include/cpplib.h (struct cpp_callbacks): Annotate error with
2538         ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
2540 2005-11-09  Per Bothner  <per@bothner.com>
2541             Uros Bizjak  <uros@kss-loka.si>
2543         PR c/24101
2544         * init.c (read_original_filename): Temporarily set
2545         state.in_directive before calling _cpp_lex_direct for
2546         CPP_HASH tokens.
2548 2005-11-03  James E Wilson  <wilson@specifix.com>
2550         PR preprocessor/24202
2551         * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
2553 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
2555         * include/cpplib.h (struct cpp_callbacks): Make error take
2556         va_list* parameter.
2557         * errors.c (cpp_error): Update call to callback.
2559 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
2561         PR preprocessor/22042
2562         * macro.c (_cpp_builtin_macro_text): Lower the needed max
2563         buffer size.
2564         (cpp_quote_string): Don't octalify non printable
2565         charactors.
2567 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
2569         PR c++/17964
2570         * include/cpplib.h (struct cpp_options): Add client_diagnostic.
2571         (struct cpp_callbacks): Add error.
2572         * errors.c (cpp_error): If client_diagnostic, use error callback.
2573         * charset.c (convert_escape): Don't use %03o in diagnostic.
2575 2005-10-21  James E Wilson  <wilson@specifix.com>
2577         PR preprocessor/15220
2578         * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
2579         callers.  Pass to open_file_failed.
2580         (open_file_failed): New parameter angle_brackets.  Fix all callers.
2581         Use in print_dep assignment.
2582         * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
2583         * internal.h (_cpp_find_file): Add new parm to declaration.
2585 2005-10-08  Kazu Hirata  <kazu@codesourcery.com>
2587         * configure.ac: Require 64-bit int for arm*-*-*eabi*.
2588         * configure: Regenerate.
2590 2005-10-04  Ian Lance Taylor  <ian@airs.com>
2592         PR preprocessor/13726
2593         * directives.c (check_eol_return_comments): New static function.
2594         (parse_include): Add buf parameter.  Change all callers.
2595         (do_include_common): If not discard comments, turn on
2596         save_comments.  Pass collected comments to include callback.
2597         * include/cpplib.h (struct cpp_callbacks): Add new parameter to
2598         include callback: cpp_token list.
2600 2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
2602         * include/cpplib.h (struct cpp_options): Add extended_identifiers.
2603         * init.c (struct lang_flags, lang_defaults): Add
2604         extended_identifiers.
2605         (cpp_set_lang): Use it.
2606         * lex.c (forms_identifier_p): Check extended_identifiers.
2608 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
2610         PR preprocessor/20348
2611         PR preprocessor/20356
2612         * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
2613         2004-06-05 changes.
2615 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2617         * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
2618         -Wmissing-format-attribute.
2620         * configure: Regenerate.
2622 2005-06-29  Kelley Cook  <kcook@gcc.gnu.org>
2624         * all files: Update FSF address in copyright headers.
2625         * makeucnid.c (write_copyright): Update outputted FSF address.
2627 2005-06-13  Zack Weinberg  <zack@codesourcery.com>
2629         * configure.ac: Invoke ZW_CREATE_DEPDIR and
2630         ZW_PROG_COMPILER_DEPENDENCIES.
2631         * aclocal.m4, configure: Regenerate.
2632         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
2633         New variables.
2634         (distclean): Clean up $(DEPDIR) and its contents.
2635         (.c.o): Use $(COMPILE).
2636         Include $(DEPDIR)/*.Po for most object->header dependencies.
2638 2005-05-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2640         * configure.ac: Check declarations for asprintf and vasprintf.
2641         * config.in: Regenerate.
2642         * configure: Likewise.
2644         * charset.c (conversion_loop): Use XRESIZEVEC.
2645         (convert_no_conversion): Likewise.
2646         (convert_using_iconv): Likewise.
2647         (init_iconv_desc): Cast return value of alloca.
2648         (cpp_host_to_exec_charset): Use XNEWVEC.
2649         (emit_numeric_escape): Use XRESIZEVEC.
2650         (cpp_interpret_string): Use XNEWVEC.
2651         (cpp_interpret_string): Use XRESIZEVEC.
2652         (_cpp_interpret_identifier): Cast return value of alloca.
2653         (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
2654         * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
2655         (parse_include): Use XNEWVEC.
2656         (insert_pragma_entry): Rename local variable "new" to
2657         "new_entry".
2658         (save_registered_pragmas): Cast return value of xmemdup.
2659         (destringize_and_run): Same for alloca.
2660         (parse_assertion): Likewise.
2661         (do_assert): Cast allocated storage to proper type.
2662         (cpp_define): Likewise.
2663         (_cpp_define_builtin): Likewise.
2664         (cpp_undef): Likewise.
2665         (handle_assertion): Likewise.
2666         (cpp_push_buffer): Rename local variable "new" to "new_buffer".
2667         * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
2668         (CPP_UMINUS): Likewise.
2669         (struct cpp_operator): Rename from struct operator.
2670         (_cpp_expand_op_stack): Use XRESIZEVEC.
2671         * files.c (pch_open_file): Use XNEWVEC.
2672         (pch_open_file): Use XRESIZEVEC.
2673         (read_file_guts): Use XNEWVEC and XRESIZEVEC.
2674         (dir_name_of_file): Use XNEWVEC.
2675         (make_cpp_file): Use XCNEW.
2676         (make_cpp_dir): Likewise.
2677         (allocate_file_hash_entries): USE XNEWVEC.
2678         (cpp_included): Cast return value of htab_find_with_hash.
2679         (append_file_to_dir): Use XNEWVEC.
2680         (read_filename_string): Likewise. Use XRESIZEVEC too.
2681         (read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
2682         (remap_filename): Use XNEWVEC.
2683         (struct pchf_entry): Move definition out of struct pchf_data.
2684         (_cpp_save_file_entries): Use XCNEWVAR.
2685         (_cpp_read_file_entries): Use XNEWVAR.
2686         * identifiers.c (alloc_node): Use XOBNEW.
2687         * init.c (cpp_create_reader): Use XCNEW.
2688         (cpp_init_builtins): Cast of b->value to enum builtin_type.
2689         (read_original_directory): Cast return value of alloca.
2690         * lex.c (add_line_note): Use XRESIZEVEC.
2691         (warn_about_normalization): Use XNEWVEC.
2692         (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
2693         (new_buff): Use XNEWVEC.
2694         * line-map.c (linemap_add): Use XRESIZEVEC.
2695         * macro.c (builtin_macro): Cast return value of alloca.
2696         (paste_tokens): Likewise.
2697         (expand_arg): Use XNEWVEC and XRESIZEVEC.
2698         (_cpp_save_parameter): Use XRESIZEVEC.
2699         (create_iso_definition): Cast allocated storage to proper type.
2700         (_cpp_create_definition): Likewise.
2701         (cpp_macro_definition): Use XRESIZEVEC.
2702         * makedepend.c (add_clm): Use XNEW.
2703         (add_dir): Likewise.
2704         * mkdeps.c (munge): Use XNEWVEC.
2705         (deps_init): Use XCNEW.
2706         (deps_add_target): Use XRESIZEVEC.
2707         (deps_add_default_target): Cast return value of alloca.
2708         (deps_add_dep): Use XRESIZEVEC.
2709         (deps_add_vpath): Likewise.  Use XNEWVEC too.
2710         (deps_restore): Likewise.
2711         * pch.c (save_idents): Use XNEW and XNEWVEC.
2712         (cpp_save_state): Use XNEW.
2713         (count_defs): Cast return value of htab_find.
2714         (write_defs): Likewise.
2715         (cpp_write_pch_deps): Use XNEWVEC.
2716         (collect_ht_nodes): Use XRESIZEVEC.
2717         (cpp_valid_state): Use XNEWVEC.
2718         (save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
2719         * symtab.c (ht_create): Use XCNEW.
2720         (ht_lookup_with_hash): Cast return value of obstack_copy0.
2721         (ht_expand): Use XCNEWVEC.
2722         * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2723         (bool): Do not define if __cplusplus.
2725 2005-05-12  Zack Weinberg  <zack@codesourcery.com>
2727         * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2728         (do_sccs): Delete function definition, #define to do_ident.
2729         (do_ident): Don't hardwire directive name.
2731 2005-05-12  Ryota Kunisawa  <kunisawa@access.co.jp>
2733         PR bootstrap/21230
2734         * configure: Regenerate.
2736 2005-04-27  Andris Pavenis  <pavenis@latnet.lv>
2738         * files.c: Include io.h for DJGPP to get prototype of setmode.
2740 2005-04-19  Per Bothner  <per@bothner.com>
2742         PR preprocessor/20907
2743         * line-map.c (linemap_line_start): Fix bug when we need to increse
2744         column_bits but can re-use the current line_map.
2746 2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2748         * system.h (fopen, fdopen, freopen): Define these to the unlocked
2749         libiberty functions.
2751 2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2753         * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2754         (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2755         * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2756         fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2757         _unlocked function.
2758         (fwrite_unlocked): Fix prototype.
2760         * configure, config.in: Regenerate.
2762 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2764         PR preprocessor/19475
2765         * macro.c (create_iso_definition): For < ISO C99, don't
2766         pedwarn if there is no whitespace between macro name and its
2767         replacement, but the replacement starts with a basic character
2768         set character.
2770 2005-03-28  Andreas Jaeger  <aj@suse.de>
2772         * lex.c (warn_about_normalization): Cast field width to int to
2773         avoid warning.
2775 2005-03-19  Joseph S. Myers  <joseph@codesourcery.com>
2777         * configure.ac: Consistently use solaris2.1[0-9]* instead of
2778         solaris2.1[0-9].
2779         * configure: Regenerate.
2781 2005-03-15  Geoffrey Keating  <geoffk@apple.com>
2783         * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2784         UCN rather than printing an error.
2786 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
2788         * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2790 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
2792         * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2793         * charset.c: Update for new format of ucnid.h.
2794         (ucn_valid_in_identifier): Update for new format of ucnid.h.
2795         Add NST parameter, and update it; update callers.
2796         (cpp_valid_ucn): Add NST parameter, update callers.  Replace abort
2797         with cpp_error.
2798         (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2799         * internal.h (struct normalize_state): New.
2800         (INITIAL_NORMALIZE_STATE): New.
2801         (NORMALIZE_STATE_RESULT): New.
2802         (NORMALIZE_STATE_UPDATE_IDNUM): New.
2803         (_cpp_valid_ucn): New.
2804         * lex.c (warn_about_normalization): New.
2805         (forms_identifier_p): Add normalize_state parameter, update callers.
2806         (lex_identifier): Add normalize_state parameter, update callers.  Keep
2807         the state current.
2808         (lex_number): Likewise.
2809         (_cpp_lex_direct): Pass normalize_state to subroutines.  Check
2810         it with warn_about_normalization.
2811         * makeucnid.c: New.
2812         * ucnid.h: Replace.
2813         * ucnid.pl: Remove.
2814         * ucnid.tab: Make appropriate for input to makeucnid.c.  Remove
2815         comments about obsolete version of C++.
2816         * include/cpplib.h (enum cpp_normalize_level): New.
2817         (struct cpp_options): Add warn_normalize field.
2819 2005-03-11  Geoffrey Keating  <geoffk@apple.com>
2821         * directives.c (glue_header_name): Update call to cpp_spell_token.
2822         * internal.h (_cpp_interpret_identifier): New.
2823         * charset.c (_cpp_interpret_identifier): New.
2824         (_cpp_valid_ucn): Allow UCN version of '$'.
2825         * lex.c (lex_identifier): Add extra parameter to indicate if initial
2826         character was '$' or '\'.  Support identifiers with UCNs.
2827         (forms_identifier_p): Allow UCNs.
2828         (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2829         (utf8_to_ucn): New.
2830         (cpp_spell_token): Add FORSTRING parameter.  Use it.
2831         (cpp_token_as_text): Update call to cpp_spell_token.
2832         (cpp_output_token): Write UCNs back out.
2833         (stringify_arg): Update call to cpp_spell_token.
2834         (paste_tokens): Likewise.
2835         (cpp_macro_definition): Likewise.
2836         * macro.c (stringify_arg): Likewise.
2837         (paste_tokens): Likewise.
2838         (cpp_macro_definition): Likewise.
2839         * include/cpplib.h: Add parameter to cpp_spell_token.
2841 2005-03-04  Jakub Jelinek  <jakub@redhat.com>
2843         PR bootstrap/20282
2844         PR bootstrap/20305
2845         * macro.c (replace_args, cpp_get_token): Copy whole
2846         cpp_token_u instead of just cpp_string field from it.
2848 2005-02-28  Devang Patel  <dpatel@apple.com>
2850         * directives.c (do_line): Save sysp early before line table is
2851         realloc'ed.
2853 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
2855         PR 18785
2856         * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2857         (cpp_host_to_exec_charset): New function.
2858         * include/cpplib.h: Declare cpp_host_to_exec_charset.
2860 2005-02-19  Devang Patel  <dpatel@apple.com>
2862         * charset.c (_cpp_convert_input): Check '\r' before inserting
2863         '\n' at the end.
2865 2005-02-15  Eric Christopher  <echristo@redhat.com>
2867         PR preprocessor/19077
2868         * macro.c (cpp_macro_definition): Move handling of whitespace
2869         to PREV_WHITE conditional. Remove overloading of len
2870         variable.
2872 2005-02-14  Kazu Hirata  <kazu@cs.umass.edu>
2874         * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2875         traditional.c: Update copyright.
2877 2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
2879         PR bootstrap/19818
2880         * configure.ac: Check for declaration of basename and getopt.
2881         * config.in: Regenerate.
2882         * configure: Regenerate.
2883         * internal.h (ustrcspn): New.
2884         * macro.c (create_iso_definition): Fix allocation of memory.
2885         (padding_token): Add cast to remove const-ness.
2886         * pch.c (cpp_read_state): Use ustrcspn.
2888 2005-02-08  Mike Stump  <mrs@apple.com>
2890         * files.c (pchf_adder): Remove.
2891         (struct pchf_adder_info): Likewise.
2892         (_cpp_save_file_entries): Write out all files so that #import works.
2894 2005-01-23  Joseph S. Myers  <joseph@codesourcery.com>
2896         * configure: Regenerate.
2898 2005-01-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2900         * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2902         * include/cpplib.h: Also update copyright years.
2904 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
2906         * files.c (_cpp_find_file): Add files found by search_path_exhausted
2907         to the list of all files.
2909 2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2911         * internal.h: Update references to Cpp lib filenames.
2912         * directives.c: Likewise.
2913         * init.c: Likewise.
2914         * macro.c: Likewise.
2915         * traditional.c: Likewise.
2917 2004-12-15  Eric Botcazou  <ebotcazou@libertysurf.fr>
2919         PR preprocessor/15167
2920         * files.c (destroy_cpp_file): New function.
2921         (should_stack_file): Make a new file if the
2922         compared file is still stacked.
2924 2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>
2926         PR preprocessor/17610
2927         * directives.c (do_include_common): Error out if an empty filename
2928         is given for #include (or #include_next or #import).
2930 2004-11-27  Roger Sayle  <roger@eyesopen.com>
2931             Zack Weinberg  <zack@codesourcery.com>
2933         * internal.h: Replace all uses of uchar with unsigned char.
2934         * include/cpp-id-data.h: Likewise.  Guard typedef of uchar
2935         with !IN_GCC, so uchar is only defined whilst building libcpp.
2937 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
2939         * aclocal.m4: Regenerate.
2941 2004-11-24  Roger Sayle  <roger@eyesopen.com>
2943         PR preprocessor/15824
2944         * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2945         directly, instead of the non-existant "system.h" and "ansidecl.h".
2946         * configure: Regenerate.
2948 2004-11-23  Daniel Jacobowitz  <dan@codesourcery.com>
2949             Joseph Myers  <joseph@codesourcery.com>
2951         * internal.h (struct lexer_state): Add in_deferred_pragma.
2952         * directives.c (struct pragma_entry): Add allow_expansion.
2953         (insert_pragma_entry): Take allow_expansion flag.
2954         (register_pragma): Likewise.
2955         (cpp_register_pragma): Likewise.
2956         (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2957         (do_pragma): Honor allow_expansion.
2958         (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2959         * include/cpplib.h (cpp_register_pragma): Update prototype.
2961 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
2962             Mark Mitchell  <mark@codesourcery.com>
2964         * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2965         need_64bit_hwint=yes.
2966         * configure: Regenerate.
2968 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2970         * Makefile.in ($(PACKAGE).pot): New rule.  Depend on
2971         po/$(PACKAGE).pot.
2972         (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2973         arguments.  Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2974         Remove local srcdir path from generated file.
2976 2004-11-04  Zack Weinberg  <zack@codesourcery.com>
2977             Gerald Pfeifer  <gerald@pfeifer.com>
2979         * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2980         as well.
2982 2004-10-27  Zack Weinberg  <zack@codesourcery.com>
2984         PR 18075
2985         * directives.c (do_pragma): Do not defer pragmas which are unknown.
2986         (cpp_handle_deferred_pragma): Add cast to silence warning.
2988 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
2990         * errors.c (_cpp_begin_message): Print "error: " for errors.
2992 2004-10-10  Andreas Jaeger  <aj@suse.de>
2994         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2995         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2997 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
2999         * pch.c (cpp_write_pch_state): Remove variable z as it is not
3000         used.
3001         (cpp_read_state): Remove unused variables, m, d and mac_count.
3003 2004-09-29  Per Bothner  <per@bothner.com>
3005         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
3006         cb.line_change.  Otherwise do_pragma will call the line_change
3007         call-back with a meaningless line number.
3009 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
3011         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
3012         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
3013         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
3014         * aclocal.m4, configure: Regenerate.
3015         * init.c: Include localedir.h.
3016         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
3017         (DEFS): Delete.
3018         (.c.o): Use $(ALL_CFLAGS).
3019         (localedir.h, localedir.hs): New rules.
3020         (clean): Use rm -rf to remove directories.
3021         (distclean): Also delete localedir.h and localedir.hs.
3022         (init.o): Update dependencies.
3024 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
3026         * Makefile.in (aclocal.m4): Update dependencies.
3027         * configure.ac (AC_CONFIG_MACRO_DIR): New.
3028         * aclocal.m4, configure: Regenerate.
3030 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
3032         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
3033         (_cpp_convert_input, _cpp_default_encoding): Add comments.
3034         Some other comments in this file also tweaked.
3036         * directives.c (do_pragma): Save current buffer position
3037         before lexing the pragma keywords; don't call
3038         _cpp_backup_tokens in the defer_pragmas case.
3040 2004-09-15  Per Bothner  <per@bothner.com>
3042         * include/line-map.h (line_map_start):  Add parameter names so
3043         preceding comment makes sense.
3044         (linemap_add):  Remove from comment mention of non-existing parameter.
3046 2004-09-09  Matt Austern  <austern@apple.com>
3047             Zack Weinberg  <zack@codesourcery.com>
3049         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
3050         prefixes throughout.  Add entry for PRAGMA.  Remove
3051         unnecessary "= 0" from EQ.
3052         (enum cpp_ttype): Adjust OP and TK definitions to restore
3053         prefixes, via token-paste.
3054         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
3055         Change from #defines to additional cpp_ttype enumerators.
3056         (struct cpp_options): Add defer_pragmas.
3057         (cpp_handle_deferred_pragma): Prototype new interface.
3059         * internal.h (struct cpp_reader): Add directive_result.
3060         * directives.c (struct pragma_entry): Add is_internal field;
3061         give boolean fields type bool.
3062         (start_directive): Initialize pfile->directive_result.type.
3063         (_cpp_do__Pragma): Likewise.
3064         (run_directive): Do not crash if pfile->buffer->prev is NULL.
3065         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
3066         from it.
3067         (register_pragma): New static function, bulk of former
3068         cpp_register_pragma here; add 'internal' argument, pass along
3069         to insert_pragma_entry.
3070         (cpp_register_pragma): Now a wrapper around register_pragma which
3071         always passes false for 'internal' argument.
3072         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
3073         true for 'internal'.
3074         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
3075         an internal pragma, save text till the end of the line as a CPP_PRAGMA
3076         token instead of executing the pragma.
3077         (cpp_handle_deferred_pragma): New interface.
3078         * lex.c (token_spellings): Adjust OP and TK definitions to
3079         match changes to cpplib.h.
3080         (_cpp_lex_token): Check for a directive-result token and
3081         return it if present.
3082         (cpp_token_val_index): Handle CPP_PRAGMA.
3083         * macro.c (cpp_builtin_macro_text): Correct comment.
3084         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
3086 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
3088         PR preprocessor/14699
3089         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
3090         from size_t to double.
3092 2004-08-28  Andreas Schwab  <schwab@suse.de>
3093             Andreas Jaeger <aj@suse.de>
3095         * configure.ac: Set PACKAGE correctly.
3096         * configure: Regenerated.
3098 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
3100         * Makefile.in: Add back top_builddir.
3102 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
3104         * configure.ac: Replace Automake macro invocations
3105         with manual Autoconf checks and substitutions.
3106         * configure: Regenerate.
3107         * aclocal.m4: Regenerate.
3108         * config.in: Regenerate.
3109         * Makefile.am: Removed.
3110         * Makefile.in: Heavy simplification and reorganization.
3112 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
3114         * configure.ac (arm*-*-eabi*): New target.
3115         (arm*-*-symbianelf*): Likewise.
3116         * configure: Regenerated.
3118 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
3120         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
3121         * directives.c: Use XNEW-family macros from libiberty.
3122         * lex.c: Likewise.
3123         * macro.c: Likewise.
3124         * cpplib.h (cpp_deps_style): Export enum with name.
3126 2004-07-23  Matthias Klose  <doko@debian.org>
3128         * init.c (init_library): Use PACKAGE for the text domain.
3130 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
3132         PR preprocessor/16366
3133         * internal.h (struct cpp_reader): New field dir_hash.
3134         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
3135         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
3137 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
3139         PR preprocessor/16192
3140         PR preprocessor/15913
3141         PR preprocessor/15572
3142         * expr.c (_cpp_parse_expr): Handle remaining cases where an
3143         expression is missing.
3144         * init.c (post_options): Traditional cpp doesn't do // comments.
3146 2004-06-30  Per Bothner  <per@bothner.com>
3148         * include/line-map.h (fileline):  Remove old typedef.
3149         * internal.h (struct cpp_reader):  Use source_location typedef instead.
3151 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
3153         Partially revert patch of 2004-06-05.
3154         * files.c (search_cache): Remove pfile argument.  Don't check
3155         for file that would be found by "" or <> search here...
3156         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
3157         Do not apply directory-of-current-file correction to files
3158         found by this check.  Rearrange code slightly.
3160 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
3162         * files.c (should_stack_file): Correct swapped parameters to call
3163         to cb.read_pch.
3164         * pch.c (cpp_valid_state): Handle -fpreprocessed.
3166 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
3168         * Makefile.in: Regenerate with automake 1.8.5.
3169         * aclocal.m4: Likewise.
3170         * configure: Regenerate.
3172 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
3174         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
3175         * configure, config.in: Regenerate.
3176         * system.h: Unconditionally define bool as unsigned char,
3177         BOOL_BITFIELD as unsigned int.
3178         * .cvsignore: New file.
3180 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
3182         * traditional.c (push_replacement_text): Set macro->traditional.
3183         (save_replacement_text): Likewise.
3184         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
3185         (struct save_macro_item): Delete.
3186         (struct save_macro_data): Use a character array not the previous
3187         structured format.
3188         (save_macros): Save macro as text not as internal structures.
3189         (cpp_prepare_state): Update for changes to save_macro_data.
3190         (cpp_read_state): Don't read macros defined in PCH.  Restore
3191         -D macros as text.
3192         * macro.c (create_iso_definition): Honour alloc_subobject.
3193         Clear traditional flag.
3194         (_cpp_create_definition): Honour alloc_subobject.
3195         * lex.c (cpp_token_val_index): New.
3196         * internal.h: Include cpp-id-data.h.
3197         (uchar): Move definition to cpp-id-data.h.
3198         (U): Likewise.
3199         (cpp_macro): Likewise.
3200         * directives.c (struct answer): Move to cpp-id-data.h.
3201         (do_assert): Honour alloc_subobject.
3203         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
3204         * include/cpplib.h (struct cpp_string): Add GTY marker.
3205         (enum cpp_token_fld_kind): New.
3206         (struct cpp_token): Add GTY markers.
3207         (cpp_token_val_index): Prototype.
3208         (CPP_HASHNODE_VALUE_IDX): New.
3209         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
3210         * include/cpp-id-data.h: New file.
3212 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
3214         * Makefile.am (all-local): New.
3215         * Makefile.in: Regenerate.
3217 2004-06-06  Roger Sayle  <roger@eyesopen.com>
3219         * Makefile.am (LIBICONV): Declare.
3220         (makedepend_LDADD): Use LIBICONV.
3221         * Makefile.in: Regenerate.
3223 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
3225         * Makefile.am (LIBINTL): Declare
3226         (makedepend_LDADD): Use LIBINTL.
3227         * Makefile.in: Regenerate.
3229 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
3231         * Makefile.am: Add makedepend.
3232         * Makefile.in, aclocal.m4: Regenerate.
3233         * charset.c: Insert a space to avoid a warning.
3234         * directives.c: Include mkdeps.h.
3235         (_cpp_handle_directive): Reenable macro expander if appropriate.
3236         (undefine_macros): Inline body of _cpp_free_definition for speed.
3237         Do not call undef callback or _cpp_warn_if_unused_macro.
3238         (cpp_get_deps): New interface.
3239         * files.c (search_cache): Add pfile argument.  Check for file
3240         that would be found by "" or <> search here...
3241         (_cpp_find_file): ...not here.  Correct recorded start_dir of
3242         files found by directory-of-current-file search that would be
3243         found by "" or <> search.
3244         * init.c (cpp_add_dependency_target): Delete.
3245         * internal.h (struct lexer_state): Add discarding_output flag.
3246         * lex.c (lex_identifier): Compute hash function while scanning.
3247         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
3248         directives.
3249         * makedepend.c: New file.
3250         * mkdeps.c (struct deps): Add vpath vector.
3251         (apply_vpath, deps_add_vpath): New function.
3252         (deps_free): Free vpath vector.
3253         (deps_add_dep, deps_add_target): Use apply_vpath.
3254         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
3255         (ht_lookup_with_hash): New function.
3256         * cpplib.h, mkdeps.h: Update prototypes.
3257         * symtab.h: Update prototypes.
3258         (HT_HASHSTEP, HT_FINISH): New macros.
3260 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
3262         * symtab.c (ht_create): Set entries_owned.
3263         (ht_destroy): Honour entries_owned.
3264         (ht_expand): Likewise.
3265         (ht_load): New.
3266         * include/symtab.h (struct ht): New field 'entries_owned'
3267         (ht_load): New prototype.
3269 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
3271         PR bootstrap/15651
3272         * configure.ac: Fix m4 quoting when picking
3273         the size of HOST_WIDE_INT.
3274         * configure: Regenerate.
3276 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
3278         * Makefile.am: the correct directory for
3279         gettext include files is given by @INCINTL@.
3280         * Makefile.in: Regenerate.
3282 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
3284         * system.h [!ENABLE_NLS]: dgettext takes two
3285         parameters.
3287 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
3289         Moved libcpp from the gcc subdirectory to the toplevel.
3290         * Makefile.am: New file.
3291         * Makefile.in: Regenerate.
3292         * configure.ac: New file.
3293         * configure: Regenerate.
3294         * config.in: Regenerate.
3295         * charset.c: Moved from gcc/cppcharset.c.  Add note about
3296         brokenness of input charset detection.  Adjust for change
3297         in name of cppucnid.h.
3298         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
3299         * expr.c: Moved from gcc/cppexp.c.
3300         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
3301         Remove #define of O_BINARY, it is in system.h.
3302         * identifiers.c: Moved from gcc/cpphash.c.
3303         * internal.h: Moved from gcc/cpphash.h.  Change header
3304         guard name.  All other files adjusted to match name change.
3305         * init.c: Moved from gcc/cppinit.c.
3306         (init_library) [ENABLE_NLS]: Call bindtextdomain.
3307         * lex.c: Moved from gcc/cpplex.c.
3308         * directives.c: Moved from gcc/cpplib.c.
3309         * macro.c: Moved from gcc/cppmacro.c.
3310         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
3311         * traditional.c: Moved from gcc/cpptrad.c.
3312         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
3313         guard name.
3314         * ucnid.pl: Moved from gcc/cppucnid.pl.
3315         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
3316         guard name.
3317         * symtab.c: Moved from gcc/hashtable.c.
3318         * line-map.c: Moved from gcc.  Do not include intl.h.
3319         * mkdeps.c: Moved from gcc.
3320         * system.h: New file.
3321         * include/cpplib.h: Moved from gcc.  Change header guard name.
3322         * include/line-map.h: Moved from gcc.  Change header guard name.
3323         * include/mkdeps.h: Moved from gcc.  Change header guard name.
3324         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
3325         guard name.