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