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