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