]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
* gcc.target/cris/torture/trap-1.c,
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
dd605e8a 12012-05-24 Dodji Seketeli <dodji@redhat.com>
2
3 PR bootstrap/53459
4 * lex.c (search_line_fast): Remove unused typedef check_count.
5
a60f3e81 62012-05-16 Dodji Seketeli <dodji@redhat.com>
7
8 PR preprocessor/7263
9 * include/cpplib.h (cpp_classify_number): Take a location
10 parameter.
11 * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
12 macros that take a location parameter.
13 (cpp_classify_number): Take a (virtual) location parameter. Use
14 it for diagnostics. Adjust comments.
15 (eval_token): Take a location parameter. Pass it to
16 cpp_classify_number and to diagnostic routines.
17 (_cpp_parse_expr): Use virtual locations of tokens when parsing
18 expressions. Pass a virtual location to eval_token and to
19 diagnostic routines.
20
3069d7f8 212012-05-10 Tristan Gingold <gingold@adacore.com>
22
23 * expr.c (interpret_float_suffix): Add a guard.
24
6cfa7465 252012-05-02 Dodji Seketeli <dodji@redhat.com>
26
27 Properly initialize cpp_context in destringize_and_run
28 * directives.c (destringize_and_run): Properly initialize the new
29 context.
30 * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
31 the initial base context, which has the same life time as the
32 current instance of cpp_file.
33
47b6a3fe 342012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
35 Dodji Seketeli <dodji@seketeli.org>
36
ffca20e9 37 PR c++/52974
47b6a3fe 38 * libcpp/files.c (maybe_shorter_path): New.
39 (find_file_in_dir): Use it.
40
d16f4f47 412012-04-30 Dodji Seketeli <dodji@redhat.com>
42
611f1003 43 Switch -ftrack-macro-expansion=2 on by default.
44 * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
45 by default. Add comments.
46
bd172d61 47 Strip "<built-in>" loc from displayed expansion context
48 * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
49 in comment.
50 (linemap_unwind_to_first_non_reserved_loc): Declare new function.
51 * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
52 new function.
53
00abfdc0 54 Fix expansion point loc for macro-like tokens
55 * macro.c (macro_of_context): New static function.
56 (_cpp_push_token_context, push_extended_tokens_context): If the
57 macro argument is NULL, it means we are continuing the expansion
58 of the current macro, if any. Update comments.
59 (_cpp_pop_context): Re-enable expansion of the macro only when we
60 are really out of the context of the current expansion.
61
c55700de 62 Fix token pasting with -ftrack-macro-expansion
63 * macro.c (paste_all_tokens): Put the token resulting from pasting
64 into an extended token context with -ftrack-macro-location is in
65 effect.
66
d16f4f47 67 Fix cpp_sys_macro_p with -ftrack-macro-expansion
68 * macro.c (cpp_sys_macro_p): Support -ftrack-macro-expansion.
69
86c82b61 702012-04-29 Dodji Seketeli <dodji@redhat.com>
71
72 * lex.c (lex_raw_string): Change C++ style comments into C style
73 comments.
74 (lex_string): Likewise.
75
76d340ac 762012-04-27 Ollie Wild <aaw@google.com>
77
78 * include/cpplib.h (struct cpp_options): Add new field,
79 warn_literal_suffix.
80 (CPP_W_LITERAL_SUFFIX): New enum.
81 * init.c (cpp_create_reader): Default initialization of
82 warn_literal_suffix.
83 * lex.c (lex_raw_string): Treat user-defined literals which don't
84 begin with '_' as separate tokens and produce a warning.
85 (lex_string): Ditto.
86
3f898bd2 872012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
88
89 * line-map.c (linemap_resolve_location): Synchronize comments with
90 those in line-map.h.
91 * include/line-map.h (linemap_resolve_location): Fix spelling in
92 comment.
93
c434932e 942012-03-22 Richard Earnshaw <rearnsha@arm.com>
95
96 * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
97
264a5d11 982012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
99
100 * lex.c: Remove Solaris 8 reference.
101
7ce78e23 1022012-02-14 Walter Lee <walt@tilera.com>
103
104 * configure.ac: Require 64-bit hwint for tilegx and tilepro.
105 * configure: Regenerate.
106
d6fb6576 1072012-01-09 Richard Guenther <rguenther@suse.de>
108
109 * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
110
5e791406 1112012-01-09 Gary Funck <gary@intrepid.com>
112
113 PR preprocessor/33919
114 * files.c (_cpp_get_file_name): New. Implement file name
115 access function.
116 * internal.h (_cpp_get_file_name): New prototype.
117 * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
118 to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
119
131e69c7 1202012-01-03 Olivier Hainque <hainque@adacore.com>
121
122 * system.h: Prior to #define, #undef fopen and freopen unconditionally.
123
32074525 1242011-12-20 Joseph Myers <joseph@codesourcery.com>
125
126 * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
127 (CLK_STDC1X): Change to CLK_STDC11.
128 * init.c (lang_defaults): Update comments.
129 (cpp_init_builtins): Update language tests. Use 201112L for C11
130 __STDC_VERSION__.
131
80cfebdb 1322011-12-20 Andreas Schwab <schwab@linux-m68k.org>
133
134 * configure: Regenerate.
135
705de1ef 1362011-12-19 Andreas Schwab <schwab@linux-m68k.org>
137
138 * configure: Regenerate.
139
b735cc56 1402011-12-07 Jakub Jelinek <jakub@redhat.com>
141
142 PR bootstrap/50237
143 * internal.h (_cpp_init_lexer): New prototype.
144 * init.c (init_library): Call it.
145 * lex.c (init_vectorized_lexer): Remove constructor attribute,
146 add inline keyword.
147 (HAVE_init_vectorized_lexer): Define.
148 (_cpp_init_lexer): New function.
149
80e34234 1502011-12-03 Dodji Seketeli <dodji@redhat.com>
151
152 * macro.c (tokens_buff_remove_last_token)
153 (tokens_buff_put_token_to): Add an 'inline' function specifier to
154 the prototype.
155
b082215e 1562011-11-22 Diego Novillo <dnovillo@google.com>
157
158 * include/line-map.h (linemap_dump): Declare.
159 (line_table_dump): Declare.
160 * line-map.c (linemap_dump): New.
161 (line_table_dump): New.
162
b06c89b6 1632011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
164
165 PR c++/50958
166 * expr.c (cpp_userdef_char_remove_type): Fix typo.
167
7c801b60 1682011-11-03 Michael Matz <matz@suse.de>
169
170 PR bootstrap/50857
171 * configure.ac: Check for -fno-exceptions -fno-rtti.
172 * configure: Regenerate.
173 * Makefile.in (NOEXCEPTION_FLAGS): New flag.
174 (ALL_CXXFLAGS): Use it.
175
d8954404 1762011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
177
178 * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
179
7e783eb3 1802011-11-02 Jason Merrill <jason@redhat.com>
181
182 PR c++/50810
183 * configure.ac: Add -Wno-narrowing to warning options.
184
0d84dc2d 1852011-10-31 Jason Merrill <jason@redhat.com>
186
de803ff2 187 PR libstdc++/1773
188 * init.c (cpp_init_builtins): Set __cplusplus for C++11.
189
0d84dc2d 190 PR c++/50920
191 * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
192 CLK_GNUCXX0X to CLK_GNUCXX11.
193
244db24d 1942011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
195
196 Implement C++11 user-defined literals.
197 * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
198 cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
199 cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
200 cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
201 (cpp_classify_number): Classify unrecognized tokens as user-defined
202 literals.
203 * include/cpplib.h: Add new tokens for user-defined literals.
204 * init.c: Add new preprocessor flag (cxx11).
205 * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
206 including concatenation and promotion with suffixes.
207
68928989 2082011-10-24 Dodji Seketeli <dodji@redhat.com>
209
210 * line-map.c (linemap_macro_map_lookup): Fix logic.
211
5ebe2143 2122011-10-24 Dodji Seketeli <dodji@redhat.com>
213
214 * include/line-map.h (linemap_expand_location): Take a line table
215 parameter. Update comment.
216 (linemap_resolve_location): Update comment.
217 (linemap_expand_location_full): Remove.
218 * line-map.c (linemap_resolve_location): Handle reserved
219 locations; return a NULL map in those cases.
220 (linemap_expand_location): If location is reserved, return a
221 zeroed expanded location. Update comment. Take a line table to
222 assert that the function takes non-virtual locations only.
223 (linemap_expand_location_full): remove.
224 (linemap_dump_location): Handle the fact that
225 linemap_resolve_location can return NULL line maps when the
226 location resolves to a reserved location.
227
228 * line-map.c (linemap_macro_map_lookup): Fix logic.
229
a2eb22f0 2302011-10-22 Dodji Seketeli <dodji@redhat.com>
231
232 PR bootstrap/50778
233 * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
234 context to act upon.
235 * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update
236 comment.
237 (cpp_token_from_context_at): Likewise.
238 (cpp_peek_token): Use the context to peek tokens from.
239
ac6130e2 2402011-10-20 Dodji Seketeli <dodji@redhat.com>
241
242 PR bootstrap/50801
243 * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
244 number of tokens.
245
2a688977 2462011-10-18 Dodji Seketeli <dodji@redhat.com>
247
248 PR bootstrap/50760
249 * include/line-map.h (struct linemap_stats): Change the type of
250 the members from size_t to long.
251 * macro.c (macro_arg_token_iter_init): Unconditionally initialize
252 iter->location_ptr.
253
a67520a9 2542011-10-17 Dodji Seketeli <dodji@redhat.com>
255
256 * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
257 variable without using it if ENABLE_CHECKING is not defined. Mark
258 the LOCATION parameter as being unused.
259
1ae3520e 2602011-10-15 Tom Tromey <tromey@redhat.com>
261 Dodji Seketeli <dodji@redhat.com>
262
263 * include/line-map.h (struct line_maps::alloced_size_for_request):
264 New member.
265 * line-map.c (new_linemap): Use set->alloced_size_for_request to
266 get the actual allocated size of line maps.
267
e77b8253 2682011-10-15 Tom Tromey <tromey@redhat.com>
269 Dodji Seketeli <dodji@redhat.com>
270
271 * line-map.h (struct linemap_stats): Declare new struct.
272 (linemap_get_statistics): Declare ...
273 * line-map.c (linemap_get_statistics): ... new function.
274 * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
275 Declare new counters.
276 (enter_macro_context, replace_args): Update
277 num_macro_tokens_counter.
278 (cpp_get_token_1): Update num_expanded_macros_counter.
279
62db153a 2802011-10-15 Tom Tromey <tromey@redhat.com>
281 Dodji Seketeli <dodji@redhat.com>
282
283 * include/cpplib.h (struct cpp_options)<debug>: New struct member.
284 * include/line-map.h (linemap_dump_location): Declare ...
285 * line-map.c (linemap_dump_location): ... new function.
286
ce70f433 2872011-10-15 Tom Tromey <tromey@redhat.com>
288 Dodji Seketeli <dodji@redhat.com>
289
290 * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
291 New option.
292 * internal.h (struct macro_context): New struct.
293 (enum context_tokens_kind): New enum.
294 (struct cpp_context)<tokens_kind>: New member of type enum
295 context_tokens_kind.
296 (struct cpp_context)<macro>: Remove this. Replace it with an enum
297 of macro and macro_context.
298 (struct cpp_context)<direct_p>: Remove.
299 (_cpp_remaining_tokens_num_in_context): Declare new function.
300 * directives.c (destringize_and_run): Adjust.
301 * lex.c (_cpp_remaining_tokens_num_in_context)
302 (_cpp_token_from_context_at): Define new functions
303 (cpp_peek_token): Use them.
304 * init.c (cpp_create_reader): Initialize the base context to zero.
305 (_cpp_token_from_context_at): Define new static function.
306 (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
307 _cpp_token_from_context_at.
308 * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
309 members.
310 (enum macro_arg_token_kind): New enum.
311 (struct macro_arg_token_iter): New struct.
312 (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
313 (alloc_expanded_arg_mem, ensure_expanded_arg_room)
314 (delete_macro_args, set_arg_token, get_arg_token_location)
315 (arg_token_ptr_at, macro_arg_token_iter_init)
316 (macro_arg_token_iter_get_token)
317 (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
318 (expanded_token_index, tokens_buff_new, tokens_buff_count)
319 (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
320 (tokens_buff_add_token, tokens_buff_remove_last_token)
321 (reached_end_of_context, consume_next_token_from_context): New
322 static functions.
323 (cpp_get_token_1): New static function. Split and extended from
324 cpp_get_token. Use reached_end_of_context and
325 consume_next_token_from_context. Unify its return point. Move
326 the location tweaking from cpp_get_token_with_location in here.
327 (cpp_get_token): Use cpp_get_token_1
328 (stringify_arg): Use the new arg_token_at.
329 (paste_all_tokens): Support tokens coming from extended tokens
330 contexts.
331 (collect_args): Return the number of collected arguments, by
332 parameter. Store virtual locations of tokens that constitute the
333 collected args.
334 (funlike_invocation_p): Return the number of collected arguments,
335 by parameter.
336 (enter_macro_context): Add a parameter for macro expansion point.
337 Pass it to replace_args and to the "used" cpp callback. Get the
338 number of function-like macro arguments from funlike_invocation_p,
339 pass it to the new delete_macro_args to free the memory used by
340 macro args. When -ftrack-macro-expansion is in effect, for macros
341 that have no arguments, create a macro map for the macro expansion
342 and use it to allocate proper virtual locations for tokens
343 resulting from the expansion. Push an extended tokens context
344 containing the tokens resulting from macro expansion and their
345 virtual locations.
346 (replace_args): Rename the different variables named 'count' into
347 variables with more meaningful names. Create a macro map;
348 allocate virtual locations of tokens resulting from this
349 expansion. Use macro_arg_token_iter to iterate over tokens of a
350 given macro. Handle the case of the argument of
351 -ftrack-macro-expansion being < 2. Don't free macro arguments
352 memory resulting from expand_arg here, as these are freed by the
353 caller of replace_arg using delete_macro_args now. Push extended
354 token context.
355 (next_context, push_ptoken_context, _cpp_push_token_context)
356 (_cpp_push_text_context): Properly initialize the context.
357 (expand_arg): Use the new alloc_expanded_arg_mem,
358 push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
359 (_cpp_pop_context): Really free the memory held by the context.
360 Handle freeing memory used by extended tokens contexts.
361 (cpp_get_token_with_location): Use cpp_get_token_1.
362 (cpp_sys_macro_p): Adjust.
363 (_cpp_backup_tokens): Support the new kinds of token contexts.
364 * traditional.c (recursive_macro): Adjust.
365
97bfb9ef 3662011-10-15 Tom Tromey <tromey@redhat>
367 Dodji Seketeli <dodji@redhat.com>
368
369 * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
370 member.
371 (MAX_SOURCE_LOCATION): New constant.
372 (struct line_map_ordinary, struct line_map_macro): New structs.
373 (struct line_map): Turn this into a union of the two above. Add
374 comments.
375 (struct maps_info): New struct.
376 (struct line_maps)<info_ordinary, info_macro>: Two new fields.
377 These now carry the map information that was previously scattered
378 in struct line_maps.
379 (struct map_info::allocated): Fix comment.
380 (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
381 (ORDINARY_MAP_STARTING_LINE_NUMBER)
382 (ORDINARY_MAP_INCLUDER_FILE_INDEX)
383 (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
384 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
385 (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
386 (MACRO_MAP_EXPANSION_POINT_LOCATION)
387 (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
388 (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
389 (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
390 (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
391 (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
392 (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
393 (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
394 (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
395 (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
396 (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
397 (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
398 information.
399 (linemap_check_ordinary, linemap_assert)
400 (linemap_location_before_p): New macros.
401 (linemap_position_for_line_and_column)
402 (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
403 (linemap_macro_expansion_map_p)
404 (linemap_macro_map_loc_to_def_point)
405 (linemap_macro_map_loc_unwind_once)
406 (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
407 (linemap_get_source_line linemap_get_source_column)
408 (linemap_map_get_macro_name, linemap_get_file_path)
409 (linemap_location_in_system_header_p)
410 (linemap_location_from_macro_expansion_p): Declare new functions.
411 (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
412 (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
413 accessors act on ordinary maps only.
414 (INCLUDED_FROM): Return NULL for main files; use the new
415 accessors.
416 (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
417 (struct expanded_location): Move here from gcc/input.h
418 (linemap_resolve_location, linemap_expand_location)
419 (linemap_expand_location_full): Declare new functions.
420 * line-map.c: Include cpplib.h, internal.h
421 (linemap_enter_macro, linemap_add_macro_token)
422 (linemap_get_expansion_line, linemap_get_expansion_filename): New
423 functions that are private to libcpp.
424 (linemap_assert): New macro.
425 (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
426 (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
427 (linemap_macro_map_loc_unwind_toward_spelling)
428 (linemap_macro_map_loc_to_exp_point)
429 (first_map_in_common_1, first_map_in_common): New static
430 functions.
431 (new_linemap): Define new static functions. Extracted and
432 enhanced from ...
433 (linemap_add): ... here. Use linemap_assert in lieu of abort
434 previously.
435 (linemap_tracks_macro_expansion_locs_p)
436 (linemap_add_macro_token, linemap_macro_expansion_map_p)
437 (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
438 (linemap_macro_map_loc_to_def_point)
439 (linemap_macro_map_loc_unwind_once)
440 (linemap_step_out_once, linemap_map_get_index)
441 (linemap_get_source_line,linemap_get_source_column)
442 (linemap_get_file_path, linemap_map_get_macro_name)
443 (linemap_location_in_system_header_p)
444 (linemap_location_originated_from_system_header_p)
445 (linemap_location_from_macro_expansion_p)
446 (linemap_tracks_macro_expansion_locs_p)
447 (linemap_resolve_location, linemap_expand_location)
448 (linemap_expand_location_full)
449 (linemap_tracks_macro_expansion_locs_p)
450 (linemap_position_for_line_and_column, linemap_compare_locations):
451 Define new public functions.
452 (linemap_init): Initialize ordinary and macro maps information in
453 the map set.
454 (linemap_check_files_exited): Use the new accessors.
455 (linemap_free): Remove this dead code.
456 (linemap_line_start): Assert this uses an ordinary map. Adjust to
457 use the new ordinary map accessors and data structures. Don't
458 overflow past the lowest possible macro token's location.
459 (linemap_position_for_column): Assert the ordinary maps of the map
460 set are really ordinary. Use ordinary map accessors.
461 (linemap_lookup): Keep the same logic but generalize to allow
462 lookup of both ordinary and macro maps. Do not crash when called
463 with an empty line table.
464 * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
465 new API of line-map.h.
466 * directives.c (start_directive, do_line, do_linemarker)
467 (do_linemarker): Likewise.
468 * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
469 (make_cpp_dir, cpp_make_system_header): Likewise.
470 * init.c (cpp_read_main_file): Likewise.
471 * internal.h (CPP_INCREMENT_LINE): Likewise.
472 (linemap_enter_macro, linemap_add_macro_token)
473 (linemap_get_expansion_line, linemap_get_expansion_filename): New
474 functions private to libcpp.
475 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
476 (skip_line_comment, skip_whitespace, lex_raw_string)
477 (_cpp_lex_direct): Likewise.
478 * macro.c (_cpp_builtin_macro_text): Likewise.
479 (_cpp_aligned_alloc): Initialize the new name member of the macro.
480 * traditional.c (copy_comment, _cpp_scan_out_logical_line):
481 Likewise.
482 * errors.c (cpp_diagnostic): Adjust to new linemap API.
483
1dc92c59 4842011-08-28 Dodji Seketeli <dodji@redhat.com>
485
486 * line-map.c (linemap_add): Assert that reason must not be
487 LC_RENAME when called for the first time on a "main input file".
488
6ea2c7a3 4892011-08-22 Gabriel Charette <gchare@google.com>
490
491 * init.c (cpp_create_reader): Inititalize forced_token_location_p.
492 * internal.h (struct cpp_reader): Add field forced_token_location_p.
493 * lex.c (_cpp_lex_direct): Use forced_token_location_p.
494 (cpp_force_token_locations): New.
495 (cpp_stop_forcing_token_locations): New.
496
985e7f10 4972011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
498
499 PR libstdc++/1773
500 * init.c (cpp_init_builtins): Define __cplusplus 19971L.
501
094a55ba 5022011-08-18 Joseph Myers <joseph@codesourcery.com>
503
504 * include/cpplib.h (struct cpp_options): Fix typo.
505
6f6f3dd7 5062011-08-18 Joseph Myers <joseph@codesourcery.com>
507
508 * include/cpplib.h (struct cpp_options): Add rliterals.
509 * init.c (struct lang_flags, lang_defaults): Add rliterals.
510 (cpp_set_lang): Set rliterals option.
511 (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
512 * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
513
80ea6373 5142011-08-15 Gabriel Charette <gchare@google.com>
515
516 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
517 Update all users to use linemap_position_for_column instead.
518
d44dc666 5192011-07-28 Gabriel Charette <gchare@google.com>
520
521 * include/line-map.h (struct line_maps):
522 Remove unused field last_listed. Update all users.
523
6b4db1bd 5242011-07-28 H.J. Lu <hongjiu.lu@intel.com>
525
526 * configure.ac: Set need_64bit_hwint to yes for x86 targets.
527 * configure: Regenerated.
528
80e4662c 5292011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
530
531 * system.h [__cplusplus]: Wrap C function declarations in extern "C".
532
6678cb4e 5332011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
534 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
535
536 PR bootstrap/49794
537 * configure.ac: Test AM_ICONV with CXX.
538 * configure: Regenerate.
539 * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
540
c219ee5c 5412011-07-15 Dodji Seketeli <dodji@redhat.com>
542
543 * directives.c (struct if_stack): Use source_location as type
544 here.
545 * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
546 indent, def_pragma, used_define, used_undef>: Properly use
547 source_location as parameter type, rather than unsigned int.
548
14f27bc6 5492011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
550
551 PR target/39150
552 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
553 like i[34567]86-*-solaris2.1[0-9]*.
554 * configure: Regenerate.
555
414663ef 5562011-06-16 Jason Merrill <jason@redhat.com>
557
558 PR c++/45399
559 * lex.c (lex_raw_string): Don't check for embedded NUL.
560
2c694d44 5612011-06-06 Dodji Seketeli <dodji@redhat.com>
562
563 PR preprocessor/48532
564 * directives.c (do_pragma): Don't forget the invocation location
565 when parsing the pragma name of a namespaced pragma directive.
566
9793dd8e 5672011-05-29 John Tytgat <John.Tytgat@aaug.net>
568
569 * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
570
cef70b8a 5712011-05-22 Uros Bizjak <ubizjak@gmail.com>
572
573 PR target/49104
574 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
575 is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
576
cdd0bb4b 5772011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com>
578
579 * system.h (ENUM_BITFIELD): Remove.
580
0ff0cd04 5812011-04-24 Jakub Jelinek <jakub@redhat.com>
582
583 PR preprocessor/48740
584 * lex.c (lex_raw_string): When raw string ends with
585 ??) followed by raw prefix and ", ensure it is preprocessed
586 with ??) rather than ??].
587
dd045aee 5882011-04-20 Jim Meyering <meyering@redhat.com>
589
590 * files.c (destroy_cpp_file): Remove useless if-before-free.
591 * init.c (cpp_destroy): Likewise.
592 * macro.c (replace_args): Likewise.
593 * pch.c (cpp_valid_state): Likewise.
594
bb7824b5 5952011-03-25 Kai Tietz <ktietz@redhat.com>
596
597 * files.c (file_hash_eq): Use filename_cmp
598 instead of strcmp.
599 (nonexistent_file_hash_eq): Likewise.
600 (remap_filename): Likewise.
601 Handle absolute DOS-path,
602 (append_file_to_dir): Check for IS_DIR_SEPARATOR
603 instead of slash.
604 (read_name_map): Likewise.
605 * linemap.c (linemap_add): Use filename_cmp
606 instead of strcmp.
607 * mkdeps.c (apply_vpath): Use filename_ncmp
608 instead of strncmp.
609 (deps_restore): Use filename_cmp instead of
610 strcmp.
611 * init.c (read_original_directory): Use
612 IS_DIR_SEPARATOR instead of checking for slash.
613
00e59df9 6142011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
615
616 PR preprocessor/48192
617 * directives.c (do_ifdef): Do not consider conditional macros as
618 being defined.
619 (do_ifndef): Ditto.
620 * expr.c (parse_defined): Ditto.
621
70ebee13 6222011-03-18 Richard Henderson <rth@redhat.com>
623
624 PR bootstrap/45381
625 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
626
65861c3e 6272011-11-04 Eric Botcazou <ebotcazou@adacore.com>
628 Jakub Jelinek <jakub@redhat.com>
629
630 PR preprocessor/39213
631 * directives.c (end_directive): Call _cpp_remove_overlay for deferred
632 pragmas as well in traditional mode.
633
be04fdf9 6342010-11-17 Ian Lance Taylor <iant@google.com>
635
636 PR bootstrap/45538
637 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of
638 AC_LANG based on ENABLE_BUILD_WITH_CXX.
639
560ab0b2 6402010-11-16 Kai Tietz <kai.tietz@onevision.com>
641
642 PR preprocessor/17349
643 * lex.c (save_comment): Handle in argument passing c++
644 comments special.
645
075f1161 6462010-11-02 Ian Lance Taylor <iant@google.com>
647
648 * configure.ac: Use AC_SYS_LARGEFILE.
649 * configure: Rebuild.
650 * config.in: Rebuild.
651
bc3d3e89 6522010-10-19 Basile Starynkevitch <basile@starynkevitch.net>
075f1161 653
bc3d3e89 654 * line-map.h (source_location): Remove obsolete comment
655 mentioning location_s.
656
0d601ff4 6572010-09-29 Kai Tietz <kai.tietz@onevision.com>
658
659 PR preprocessor/45362
660 * directives.c (cpp_pop_definition): Make static.
661 (do_pragma_push_macro): Reworked to store text
662 definition.
663 (do_pragma_pop_macro): Add free text definition.
664 (cpp_push_definition): Removed.
665 * include/cpplib.h (cpp_push_definition): Removed.
666 (cpp_pop_definition): Likewise.
667 * internal.h (def_pragma_macro): Remove member 'value'
668 and add new members 'definition', 'line',
669 'syshdr', 'sued' and 'is_undef'.
670 * pch.c (_cpp_restore_pushed_macros): Rework to work
671 on text definition and store additional macro flags.
672 (_cpp_save_pushed_macros): Likewise.
673
5ae82d58 6742010-09-29 Joseph Myers <joseph@codesourcery.com>
675
676 * include/cpplib.h (cpp_options): Rename warn_deprecated,
677 warn_traditional, warn_long_long and pedantic.
678 * directives.c (directive_diagnostics, _cpp_handle_directive):
679 Update names of cpp_options members.
680 * expr.c (cpp_classify_number, eval_token): Update names of
681 cpp_options members.
682 * init.c (cpp_create_reader, post_options): Update names of
683 cpp_options members.
684 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
685 cpp_options members.
686 * macro.c (parse_params): Update names of cpp_options members.
687
ced52ffd 6882010-09-15 Ian Lance Taylor <iant@google.com>
689
690 * init.c: Fix type name in comment.
691
df863d33 6922010-08-31 Jakub Jelinek <jakub@redhat.com>
693
694 PR preprocessor/45457
695 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
696 needed.
697 * directives.c (do_ifdef, do_ifndef): Likewise.
698
9e76b586 6992010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
700
701 * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
702
b315ae35 7032010-08-24 Richard Henderson <rth@redhat.com>
704
705 PR bootstrap/45376
706 * configure.ac (HAVE_SSE4): New check.
707 * configure, config.in: Rebuild.
708 * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
709
8ab29ece 7102010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
711
712 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
713 etc. on Solaris 2/x86.
714
2431e8ba 7152010-08-21 Richard Henderson <rth@redhat.com>
716 Andi Kleen <ak@linux.intel.com>
717 David S. Miller <davem@davemloft.net>
718
719 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
720 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
721 (ptrdiff_t): Check via AC_CHECK_TYPE.
722 * config.in, configure: Rebuild.
723 * system.h: Include stdint.h, if available.
724 * lex.c (WORDS_BIGENDIAN): Provide default.
725 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
726 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
727 search_line_sse2, search_line_sse42, init_vectorized_lexer,
728 search_line_fast): New.
729 (_cpp_clean_line): Use search_line_fast. Restructure the fast
730 loop to make it clear when we're leaving the loop. Stay in the
731 fast loop for non-trigraph '?'.
732
25692381 7332010-06-11 Jakub Jelinek <jakub@redhat.com>
734
735 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
736 callback.
737 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
738 (cpp_macro_definition): Remove const qual from second argument.
739 * macro.c (enter_macro_context): Call user_builtin_macro callback for
740 NODE_BUILTIN !NODE_USED macros.
741 (warn_of_redefinition): Likewise. Remove const qual from second
742 argument.
743 (cpp_macro_definition): Likewise.
744 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
745 for NODE_BUILTIN !NODE_USED macros.
746
abf6a617 7472010-06-10 Joseph Myers <joseph@codesourcery.com>
748
749 * include/cpplib.h (struct cpp_options): Remove show_column.
750 * init.c (cpp_create_reader, post_options): Don't set show_column.
751
9d135bb6 7522010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
753
754 PR bootstrap/44432
755 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
756 check that C++ compiler works.
757 * configure: Regenerate.
758
ba72912a 7592010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
760
761 * include/symtab.h (ht_identifier_ptr): New.
762
050318d9 7632010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
764 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
765
766 PR bootstrap/42798
767 * configure.ac: Check for declaration of 'basename(char *)'.
768 * configure: Regenerate.
769 * config.in: Regenerate.
770
39012afb 7712010-04-25 Joseph Myers <joseph@codesourcery.com>
772
773 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
774 * init.c (lang_defaults): Add entries for new language variants.
775 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
776 variants.
777
721e9705 7782010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
779
780 PR cpp/43195
781 * files.c (report_missing_guard): Test for #pragma once.
782
3a79f5da 7832010-04-07 Simon Baldwin <simonb@google.com>
784
785 * directives.c (do_diagnostic): Add warning reason argument,
786 call appropriate error reporting function for code.
787 (directive_diagnostics): Call specific warning functions with
788 warning reason where appropriate.
789 (do_error, do_warning, do_pragma_dependency): Add warning reason
790 argument to do_diagnostic calls.
791 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
792 _cpp_create_definition): Call specific warning functions with
793 warning reason where appropriate.
794 * Makefile.in: Add new diagnostic functions to gettext translations.
795 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
796 to error callback.
797 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
798 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
799 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
800 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
801 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
802 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
803 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
804 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
805 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
806 warning reason codes.
807 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
808 cpp_warning_with_line, cpp_pedwarning_with_line,
809 cpp_warning_with_line_syshdr): New specific error reporting functions.
810 * pch.c (cpp_valid_state): Call specific warning functions with
811 warning reason where appropriate.
812 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
813 diagnostic handlers.
814 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
815 cpp_warning_with_line, cpp_pedwarning_with_line,
816 cpp_warning_with_line_syshdr): New specific error reporting functions.
817 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
818 specific warning functions with warning reason where appropriate.
819 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
820 warn_about_normalization, lex_identifier_intern, lex_identifier,
821 _cpp_lex_direct): Ditto.
822 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
823 narrow_str_to_charconst): Ditto.
824
56e2ce2d 8252010-04-06 Jakub Jelinek <jakub@redhat.com>
826
827 PR preprocessor/43642
828 * lex.c (lex_raw_string): Change type of TYPE variable to
829 unsigned char.
830
e0934084 8312010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
832
833 * aclocal.m4: Regenerate.
834
7fe0ef3a 8352010-03-29 Jason Merrill <jason@redhat.com>
836
3a45011c 837 More N3077 raw string changes
838 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
839 strings.
840 * lex.c (bufring_append): Split out from...
841 (lex_raw_string): ...here. Undo trigraph and line splicing
842 transformations. Do process line notes in multi-line literals.
843 (_cpp_process_line_notes): Ignore notes that were already handled.
844
7fe0ef3a 845 Some raw string changes from N3077
846 * charset.c (cpp_interpret_string): Change inner delimiters to ().
847 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
848
65f40615 8492010-02-11 Jakub Jelinek <jakub@redhat.com>
850
851 * init.c (read_original_filename): Don't call read_original_directory
852 if _cpp_handle_directive returns 0.
853
0074cd57 8542010-01-01 Joseph Myers <joseph@codesourcery.com>
855
856 PR preprocessor/41947
857 * expr.c (cpp_classify_number): Give error for hexadecimal
858 floating-point constant with no digits before or after point.
859
116f0a5f 8602009-11-20 Arnaud Charlet <charlet@adacore.com>
861
862 * macro.c (enter_macro_context): Call cb.used callback if defined.
863 * directives.c (do_idef, do_ifndef): Ditto.
864 * include/cpplib.h (struct cpp_callbacks): Add used callback.
865
038c21f1 8662009-11-11 Kai Tietz <kai.tietz@onevision.com>
867
868 * directives.c (do_pragma_push_macro): New pragma handler.
869 (do_pragma_pop_macro): Likewise.
870 (_cpp_init_internal_pragmas): Add push_macro and
871 pop_macro handler to internal pragmas.
872 (lex_macro_node_from_str): Removed.
873 (cpp_push_definition): Replace lex_macro_node_from_str
874 by _cpp_lex_identifier.
875 (cpp_pop_definition): Likewise.
876 * internal.h (_cpp_lex_identifier): New prototype.
877 (def_pragma_macro): New structure.
878 (cpp_reader): New member pushed_macros.
879 * lex.c (_cpp_lex_identifier): New function.
880 (lex_identifier_intern): New function.
881 * init.c (cpp_create_reader): Initialize pushed_macros
882 member.
883 (cpp_destroy): Free elements in pushed_macros member.
884 * pch.c (_cpp_save_pushed_macros): New function.
885 (_cpp_restore_pushed_macros): Likewise.
886 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
887 (cpp_read_state): Use _cpp_restore_pushed_macros.
888
538ba11a 8892009-10-19 Jakub Jelinek <jakub@redhat.com>
890
891 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
892 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
893 and char32_cset_desc.
894 (converter_for_type): Handle CPP_UTF8STRING.
895 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
896 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
897 (parse_include): Reject raw strings.
898 * include/cpplib.h (CPP_UTF8STRING): New token type.
899 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
900 * lex.c (lex_raw_string): New function.
901 (lex_string): Handle u8 string literals, call lex_raw_string
902 for raw string literals.
903 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
904 sequences.
905 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
906
af4d2883 9072009-10-14 Jakub Jelinek <jakub@redhat.com>
908
909 PR preprocessor/41543
910 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
911 * line-map.c (linemap_init): Initialize highest_location and
912 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
913
8e83a065 9142009-10-09 Jason Merrill <jason@redhat.com>
915
916 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
917
8f2ff12e 9182009-10-09 Neil Vachharajani <nvachhar@google.com>
919
920 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
921 sccs.
922
fc25a827 9232009-09-23 Loren J. Rittle <ljrittle@acm.org>
924
925 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
926 * configure: Rebuilt.
927
fa12a6a5 9282009-09-22 Richard Guenther <rguenther@suse.de>
929
930 PR pch/38987
931 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
932
c25f2689 9332009-09-18 Chris Demetriou <cgd@google.com>
934
935 PR preprocessor/28435:
936 * include/cpplib.h (struct cpp_options): Add new member
937 deps.need_preprocessor_output.
938 * files.c (open_file_failed): If preprocessor output is needed
939 always report an error.
940
a4f7c8f7 9412009-09-13 Kai Tietz <kai.tietz@onevision.com>
942
943 * configure.ac: Set for i?86-w64-mingw*
944 need_64bit_hwint to yes.
945 * configure: Regenerated.
946
3f24af9b 9472009-09-10 Jason Merrill <jason@redhat.com>
948
949 * directives.c (cpp_define): constify.
950
2a50bfcf 9512009-09-02 Ian Lance Taylor <iant@google.com>
952
953 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
954
81a71e2b 9552009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
956
957 * configure.ac (AC_PREREQ): Bump to 2.64.
958
cd9a469c 9592009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
960
961 * aclocal.m4: Regenerate.
962 * config.in: Regenerate.
963 * configure: Regenerate.
964
ed184982 9652009-08-17 Tom Tromey <tromey@redhat.com>
966
967 PR preprocessor/41067:
968 * charset.c (convert_escape): Add missing ":" to error text.
969
7ad75c55 9702009-07-27 Douglas B Rupp <rupp@gnat.com>
971
972 * include/cpplib.h (INO_T_CPP): New macro.
973 (struct cpp_dir): Use it.
974
80b97ef3 9752009-07-20 Jerry Quinn <jlquinn@optonline.net>
976
977 PR regression/40800
978 * configure.ac: Use = instead of == for testing
979 ENABLE_BUILD_WITH_CXX.
980 * configure: Rebuild.
981
723ebaea 9822009-07-17 Jerry Quinn <jlquinn@optonline.net>
983
984 * directives.c (do_linemarker, do_line): Use CPP_STRING for
985 ignored enum value.
986 * files.c (find_file_in_dir): Add cast from void* to char*.
987 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
988 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
989 warnings.
990 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
991 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
992 COMPILER_FLAGS): New.
993 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
994 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
995 instead of ALL_CFLAGS.
996 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
997 from other warnings. Add -Wc++-compat to C-specific warnings.
998 Check for --enable-build-with-cxx. Set and substitute
999 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
1000 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
1001 AC_CHECK_HEADERS.
1002 * configure: Rebuild.
1003 * include/cpp-id-data.h: Remove extern "C".
1004 * include/line-map.h: Likewise.
1005 * include/mkdeps.h: Likewise.
1006 * include/symtab.h: Likewise.
1007 * internal.h: Likewise.
1008
78ed8e3d 10092009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1010
1011 * directives.c (parse_include): Add location argument. Update all
1012 calls.
1013 (parse_answer): Likewise.
1014 (do_include_common): Error with exact location.
1015 (parse_assertion): Likewise.
1016
46821594 10172009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1018
1019 * expr.c (num_div_op): Take explicit location.
1020
52b290f1 10212009-06-17 Ian Lance Taylor <iant@google.com>
1022
1023 * include/cpplib.h (progname): Don't declare.
1024
2a6a6991 10252009-06-12 Ian Lance Taylor <iant@google.com>
1026
1027 * include/cpplib.h (struct cpp_options): Add
1028 warn_cxx_operator_names field.
1029 (NODE_WARN_OPERATOR): Define.
1030 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
1031 type to 6 bits.
1032 * init.c (mark_named_operators): Add flags parameter.
1033 (cpp_post_options): Pick flags value to pass to
1034 mark_named_operators.
1035 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
1036 identifier is an operator name in C++.
1037
b559b9e2 10382009-06-01 Aldy Hernandez <aldyh@redhat.com>
1039
1040 * include/line-map.h (LAST_SOURCE_COLUMN): New.
1041
e61157d7 10422009-06-01 Ian Lance Taylor <iant@google.com>
1043
1044 * include/cpp-id-data.h: Add extern "C".
1045 * include/line-map.h: Likewise.
1046 * include/mkdeps.h: Likewise.
1047 * include/symtab.h: Likewise.
1048 * internal.h: Likewise.
1049
26dbec0a 10502009-05-15 Ian Lance Taylor <iant@google.com>
1051
1052 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
1053 builtin_type. Change all uses.
1054
5b500807 10552009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1056
1057 PR cpp/36674
1058 * directives (do_linemarker): Compensate for the increment in
1059 location that occurs when we reach the end of line.
1060 * files (_cpp_stack_include): Mention _cpp_find_file in the
1061 comment.
1062
2ee04baa 10632009-05-10 Joseph Myers <joseph@codesourcery.com>
1064
1065 * include/cpplib.h (enum cpp_token_fld_kind): Add
1066 CPP_TOKEN_FLD_TOKEN_NO.
1067 (struct cpp_macro_arg, struct cpp_identifier): Define.
1068 (union cpp_token_u): Use struct cpp_identifier for identifiers.
1069 Use struct cpp_macro_arg for macro arguments. Add token_no for
1070 CPP_PASTE token numbers.
1071 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
1072 do_pragma_poison, parse_assertion): Use val.node.node in place of
1073 val.node.
1074 * expr.c (parse_defined, eval_token): Use val.node.node in place
1075 of val.node.
1076 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
1077 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
1078 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
1079 place of val.arg_no. Use val.node.node in place of val.node.
1080 * macro.c (replace_args, cpp_get_token, parse_params,
1081 lex_expansion_token, create_iso_definition, cpp_macro_definition):
1082 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
1083 Use val.node.node in place of val.node.
1084
49a657d9 10852009-05-03 Joseph Myers <joseph@codesourcery.com>
1086
1087 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
1088 UTF-8 sequences.
1089
9c6183dd 10902009-04-25 Joseph Myers <joseph@codesourcery.com>
1091
1092 PR preprocessor/39559
1093 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
1094 constants larger than intmax_t in C99 mode.
1095
fb1e4f4a 10962009-04-21 Taras Glek <tglek@mozilla.com>
1097
1098 * include/cpp-id-data.h: Update GTY annotations to new syntax.
1099 * include/cpplib.h: Likewise.
1100 * include/line-map.h: Likewise.
1101 * include/symtab.h: Likewise.
1102
ba99525e 11032009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1104
1105 PR c++/14875
1106 * lex.c (cpp_type2name): Take a flags parameter. Call
1107 cpp_named_operator2name for named operators and cpp_digraph2name
1108 for digraphs.
1109 (cpp_digraph2name): New.
1110 (cpp_spell_token): Use it.
1111 (cpp_output_token): Likewise.
1112 * include/cpplib.h (cpp_type2name): Update declaration.
1113 * init.c (cpp_named_operator2name): New.
1114 * internal.h (cpp_named_operator2name): Declare.
1115
9ab71c6b 11162009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1117
1118 PR c++/13358
1119 * init.c (cpp_create_reader): Wlong_long is disabled by default.
1120 * expr.c (cpp_classify_number): Give different messages for C and
1121 C++ front-ends.
1122
941f2388 11232009-04-19 Joseph Myers <joseph@codesourcery.com>
1124
1125 PR preprocessor/20078
1126 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
1127 field.
1128 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
1129 (struct cpp_token): Change flags to unsigned short.
1130 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
1131 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
1132 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
1133 tokens.
1134 * macro.c (macro_real_token_count): New.
1135 (enter_macro_context, replace_args): Use macro_real_token_count.
1136 (create_iso_definition): Record whitespace surrounding and digraph
1137 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
1138 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
1139 multiple consecutive ## tokens.
1140 (_cpp_create_definition): Initialize extra_tokens.
1141 (cpp_macro_definition): Use macro_real_token_count.
1142
3e52c418 11432009-04-18 Joseph Myers <joseph@codesourcery.com>
1144
1145 * directives.c (parse_include): Pass true to check_eol.
1146
1eecdb28 11472009-04-18 Joseph Myers <joseph@codesourcery.com>
1148
1149 PR preprocessor/39646
1150 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
1151 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
1152 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
1153 place of LC_RENAME.
1154
6cda323a 11552009-04-18 Joseph Myers <joseph@codesourcery.com>
1156
1157 PR preprocessor/39647
1158 * directives.c (check_eol): Add parameter expand.
1159 (do_undef, parse_include, do_line, do_linemarker, do_ident,
1160 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
1161 do_else, do_endif, do_assert, do_unassert): All callers changed.
1162 Pass true from do_line, false elsewhere.
1163
e21164ef 11642009-04-12 Joseph Myers <joseph@codesourcery.com>
1165
1166 PR preprocessor/31869
1167 * macro.c (stringify_arg): Handle NULL source token in padding
1168 token where previous padding token did not have source token with
1169 preceding whitespace.
1170
6bc9506f 11712009-04-09 Jakub Jelinek <jakub@redhat.com>
1172
1173 * Makefile.in: Change copyright header to refer to version
1174 3 of the GNU General Public License and to point readers at the
1175 COPYING3 file and the FSF's license web page.
1176 * charset.c: Likewise.
1177 * directives-only.c: Likewise.
1178 * directives.c: Likewise.
1179 * errors.c: Likewise.
1180 * expr.c: Likewise.
1181 * files.c: Likewise.
1182 * identifiers.c: Likewise.
1183 * include/cpp-id-data.h: Likewise.
1184 * include/cpplib.h: Likewise.
1185 * include/line-map.h: Likewise.
1186 * include/mkdeps.h: Likewise.
1187 * include/symtab.h: Likewise.
1188 * init.c: Likewise.
1189 * internal.h: Likewise.
1190 * lex.c: Likewise.
1191 * line-map.c: Likewise.
1192 * macro.c: Likewise.
1193 * makeucnid.c: Likewise.
1194 * mkdeps.c: Likewise.
1195 * pch.c: Likewise.
1196 * symtab.c: Likewise.
1197 * system.h: Likewise.
1198 * traditional.c: Likewise.
1199 * ucnid.tab: Likewise.
1200 * ucnid.h: Regenerate.
1201
5840fdcf 12022009-04-01 Janis Johnson <janis187@us.ibm.com>
1203
f8ed6d41 1204 PR c/39027
1205 * include/cpplib.h (CPP_N_DEFAULT): Define.
1206 * expr.c (interpret_float_suffix): Recognize d or D for double,
1207 return new value for default.
1208 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
1209
5840fdcf 1210 PR c/33466
1211 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
1212 letters from decimal float and fixed-point suffixes.
1213
ff903809 12142009-03-31 Joseph Myers <joseph@codesourcery.com>
1215
1216 PR preprocessor/15638
1217 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
1218 invalid PCH.
1219 (open_file_failed): Make error for missing file fatal.
1220 * include/cpplib.h (CPP_DL_FATAL): Define.
1221
bfba65a4 12222009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
1223
1224 PR preprocessor/31932:
1225 * internal.h: Don't mention HAVE_ICONV_H.
1226 * configure, config.in: Rebuild.
1227 * configure.ac: Don't check for iconv.h.
1228
102a7306 12292009-03-30 Tom Tromey <tromey@redhat.com>
1230
1231 PR preprocessor/39512:
1232 * line-map.c (linemap_init): Initialize 'reallocator' field.
1233
4514949a 12342009-03-30 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR target/39558
1237 * macro.c (cpp_get_token): If macro_to_expand returns NULL
1238 and used some tokens, add CPP_PADDING before next token.
1239
7f5f3953 12402009-03-29 Joseph Myers <joseph@codesourcery.com>
1241
1242 PR preprocessor/34695
1243 * makedepend.c: Remove.
1244 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
1245 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
1246 * directives.c (cpp_errors): Remove.
1247 * errors.c (print_location, _cpp_begin_message, v_message):
1248 Remove.
1249 (cpp_error, cpp_error_with_line): Always use error callback.
1250 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
1251 * include/cpplib.h (cpp_options): Remove pedantic_errors,
1252 inhibit_warnings, warn_system_headers, inhibit_errors,
1253 warnings_are_errors, client_diagnostic.
1254 (cpp_callbacks): Add extra arguments to error callback; make it
1255 return bool.
1256 (cpp_finish): Return void.
1257 (cpp_destroy): Remove inaccurate comment about return value.
1258 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
1259 (CPP_DL_NOTE): Define.
1260 * include/line-map.h (linemap_print_containing_files): Remove.
1261 * init.c (cpp_finish): Do not check for or return number of
1262 errors.
1263 * internal.h (cpp_reader): Remove errors field.
1264 * line-map.c (linemap_print_containing_files): Remove.
1265 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
1266 about previous definition. Only emit it if previous diagnostic
1267 was emitted.
1268
d5a78dd0 12692009-03-28 Joseph Myers <joseph@codesourcery.com>
1270
1271 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1272 mkinstalldirs.
1273
0ac758f7 12742009-03-18 Jakub Jelinek <jakub@redhat.com>
1275
1276 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1277
7811eab5 12782009-02-21 Joseph Myers <joseph@codesourcery.com>
1279
1280 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1281 header name.
1282 (_cpp_lex_direct): Handle this.
1283
b5c49426 12842009-02-15 Richard Guenther <rguenther@suse.de>
1285
1286 Revert last change.
1287
76549266 12882009-02-13 Richard Guenther <rguenther@suse.de>
1289
1290 * configure.ac: Enable LFS.
1291 * configure: Re-generate.
1292 * config.in: Likewise.
1293
e7ae053d 12942009-01-05 Ben Elliston <bje@au.ibm.com>
1295
1296 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1297 (.po.pox): Likewise.
1298 (po/$(PACKAGE).pot): Likewise.
1299
c1203b1c 13002008-12-10 Alexandre Oliva <aoliva@redhat.com>
1301
1302 PR target/37033
1303 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1304 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1305
cd740bd5 13062008-11-29 Joseph Myers <joseph@codesourcery.com>
1307
1308 * lex.c (cpp_token_len): Use 6 as default length.
1309
ae5c166d 13102008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
1311
1312 * expr.c (struct op): Add location.
1313 (_cpp_parse_expr): Propagate locations throught the stack
1314 of expressions.
1315 (reduce): Likewise.
1316 (check_promotion): Use explicit location in errors.
1317
956c6108 13182008-10-05 Matthew Gingell <gingell@adacore.com>
1319 Arnaud Charlet <charlet@adacore.com>
1320
1321 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1322 (cpp_get_comments): New function.
1323 * internal.h (struct cpp_reader): Add comments field.
1324 * init.c (cpp_destroy): Free comments.
1325 * lex.c (store_comment, cpp_get_comments): New functions.
1326 (comments): New struct.
1327 (save_comment): Store comments in comments struct.
1328
2ad0b097 13292008-09-18 Simon Baldwin <simonb@google.com>
1330
1331 * include/cpplib.h (struct cpp_options): Add new boolean flag
1332 warn_builtin_macro_redefined.
1333 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1334 * (struct builtin_operator): Split out from previous struct builtin,
1335 enhance extra const correctness.
1336 * (struct builtin_macro): Split out from previous struct builtin, add
1337 new always_warn_if_redefined flag, enhance const correctness.
1338 * (mark_named_operators): Use struct builtin_operator.
1339 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1340 to builtins selectively.
1341 * macro.c (warn_of_redefinition): Return false if a builtin macro
1342 is not flagged with NODE_WARN.
1343
408c2285 13442008-07-31 Jakub Jelinek <jakub@redhat.com>
1345
1346 PR preprocessor/36649
1347 * files.c (struct report_missing_guard_data): New type.
1348 (report_missing_guard): Put paths into an array instead of printing
1349 them right away. Return 1 rather than 0.
1350 (report_missing_guard_cmp): New function.
1351 (_cpp_report_missing_guards): Sort and print paths gathered by
1352 report_missing_guard callback.
1353
98e29890 13542008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1355
1356 PR 28079
1357 * directives.c (strtolinenum): Handle overflow.
1358 (do_line): Give a warning if line number overflowed.
1359 (do_linemarker): Update call to strtolinenum.
1360
4999c35b 13612008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1362
1363 * include/line-map.h (linenum_type): New typedef.
1364 (struct line_map): Use it.
1365 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1366 (SOURCE_COLUMN): Likewise.
1367 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1368 source_location values in a variable of type linenum_type.
1369 * directives.c (struct if_stack): Use linenum_type.
1370 (strtoul_for_line): Rename as strtolinenum.
1371 (do_line): Use linenum_type.
1372 (do_linemarker): Use linenum_type and strtolinenum.
1373 (_cpp_do_file_change): Use linenum_t.
1374 * line-map.c (linemap_add): Likewise.
1375 (linemap_line_start): Likewise.
1376 * traditional.c (struct fun_macro): 'line' is a source_location.
1377 * errors.c (print_location): Use linenum_type.
1378 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1379 * internal.h (CPP_INCREMENT_LINE): Likewise.
1380 * lex.c (_cpp_skip_block_comment): Use source_location.
1381
89768577 13822008-07-14 Ben Elliston <bje@au.ibm.com>
1383
1384 * include/cpplib.h (NODE_CONDITIONAL): New.
1385 (struct cpp_callbacks): New macro_to_expand field.
1386 (struct cpp_hashnode): Adjust size of flags and type fields.
1387 (cpp_peek_token): Prototype.
1388 * lex.c (cpp_peek_token): New function.
1389 (_cpp_temp_token): Protect pre-existing lookaheads.
1390 * macro.c (cpp_get_token): Expand any conditional macros.
1391 (_cpp_backup_tokens_direct): New.
1392 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1393 (warn_of_redefinition): Silently allow redefined conditional
1394 macros.
1395 (_cpp_create_definition): Remove the conditional flag when a user
1396 defines one of the conditional macros.
1397 * internal.h (_cpp_backup_tokens_direct): New prototype.
1398
403c2b12 13992008-06-13 Andrew Haley <aph@redhat.com>
1400
1401 PR preprocessor/33305
1402 * macro.c (replace_args): Print a warning for empty macro
1403 arguments in C89 and C++.
1404
5b2c7553 14052008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1406
1407 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1408 * configure: Regenerate.
1409
b9de6413 14102008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1411
1412 * Makefile.in (datarootdir): New variable.
1413
bfa57d81 14142008-06-12 H.J. Lu <hongjiu.lu@intel.com>
1415
1416 PR preprocessor/36479
1417 * charset.c (cpp_interpret_string_notranslate): Also set
1418 narrow_cset_desc.width.
1419
6af9f7ea 14202008-06-07 Joseph Myers <joseph@codesourcery.com>
1421
1422 * configure.ac (parisc*64*-*-*): Remove.
1423 * configure: Regenerate.
1424
536a48ee 14252008-05-30 Tom Tromey <tromey@redhat.com>
1426
1427 PR preprocessor/36320:
1428 * internal.h (_cpp_parse_expr): Update.
1429 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
1430 messages.
1431 * directives.c (do_if): Update.
1432 (do_elif): Require expression if processing group.
1433
f4d02485 14342008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
1435
1436 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1437
c0770282 14382008-05-21 Tom Tromey <tromey@redhat.com>
1439
1440 PR preprocessor/27777:
1441 * lex.c (cpp_output_line_to_string): New function.
1442 * internal.h (_cpp_begin_message): Don't declare.
1443 * errors.c (_cpp_begin_message): Now static.
1444 * include/cpplib.h (cpp_output_line_to_string): Declare.
1445 * directives.c (do_diagnostic): Rewrote. Use
1446 cpp_output_line_to_string. Don't use _cpp_begin_message.
1447
dfecde36 14482008-05-21 Tom Tromey <tromey@redhat.com>
1449
1450 * include/symtab.h (HT_ALLOCED): Remove.
1451 (ht_purge): Declare.
1452 * symtab.c (DELETED): New define.
1453 (ht_lookup): Update comment.
1454 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
1455 code. Use subobject allocator for strings, if it exists.
1456 (ht_expand): Handle deleted entries.
1457 (ht_forall): Likewise.
1458 (ht_purge): New function.
1459 (ht_dump_statistics): Print deletion statistics.
1460
fb9753dc 14612008-05-13 Tom Tromey <tromey@redhat.com>
1462
1463 PR preprocessor/22168:
1464 * include/cpplib.h (struct cpp_options) <objc>: Update
1465 documentation.
1466 * expr.c (eval_token): Warn for use of assertions.
1467 * directives.c (directive_diagnostics): Warn about extensions.
1468 (DEPRECATED): New define.
1469 (DIRECTIVE_TABLE): Use it.
1470
151e90cc 14712008-05-06 Tom Tromey <tromey@redhat.com>
1472
1473 PR preprocessor/35313, PR preprocessor/36088:
1474 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1475 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1476
2cd62354 14772008-05-04 David S. Miller <davem@davemloft.net>
1478
1479 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1480 * configure: Regenerate.
1481
85e51d59 14822008-04-22 Daniel Franke <franke.daniel@gmail.com>
1483
1484 * include/cpplib.h (cpp_define_formatted): New.
1485 * directives.c (cpp_define_formatted): New.
1486
d656d07a 14872008-04-21 Tom Tromey <tromey@redhat.com>
1488
1489 PR libcpp/33415:
1490 * charset.c (_cpp_convert_input): Add buffer_start argument.
1491 Ignore UTF-8 BOM if seen.
1492 * internal.h (_cpp_convert_input): Add argument.
1493 * files.c (struct _cpp_file) <buffer_start>: New field.
1494 (destroy_cpp_file): Free buffer_start, not buffer.
1495 (_cpp_pop_file_buffer): Likewise.
1496 (read_file_guts): Update.
1497
924bbf02 14982008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1499
1500 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1501 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1502 (struct cpp_options): Added uliterals.
1503 (cpp_interpret_string): Update prototype.
1504 (cpp_interpret_string_notranslate): Idem.
1505 * charset.c (init_iconv_desc): New width member in cset_converter.
1506 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1507 (convert_ucn): Idem.
1508 (emit_numeric_escape): Idem.
1509 (convert_hex): Idem.
1510 (convert_oct): Idem.
1511 (convert_escape): Idem.
1512 (converter_for_type): New function.
1513 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1514 (cpp_interpret_string_notranslate): Match changed prototype.
1515 (wide_str_to_charconst): Use converter_for_type.
1516 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1517 * directives.c (linemarker_dir): Macro U changed to UC.
1518 (parse_include): Idem.
1519 (register_pragma_1): Idem.
1520 (restore_registered_pragmas): Idem.
1521 (get__Pragma_string): Support CPP_STRING{16,32}.
1522 * expr.c (eval_token): Support CPP_CHAR{16,32}.
1523 * init.c (struct lang_flags): Added uliterals.
1524 (lang_defaults): Idem.
1525 * internal.h (struct cset_converter) <width>: New field.
1526 (struct cpp_reader) <char16_cset_desc>: Idem.
1527 (struct cpp_reader) <char32_cset_desc>: Idem.
1528 * lex.c (digraph_spellings): Macro U changed to UC.
1529 (OP, TK): Idem.
1530 (lex_string): Add support for u'...', U'...', u"..." and U"...".
1531 (_cpp_lex_direct): Idem.
1532 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1533 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1534
6a88da51 15352008-04-18 Paolo Bonzini <bonzini@gnu.org>
1536
1537 PR bootstrap/35457
1538 * aclocal.m4: Regenerate.
1539 * configure: Regenerate.
1540
6e6d82ef 15412008-04-17 Tom Tromey <tromey@redhat.com>
1542
1543 PR libcpp/34866:
1544 * errors.c (cpp_error): Don't reference a token before the start
1545 of the current run.
1546
f521616b 15472008-04-16 Tom Tromey <tromey@redhat.com>
1548
1549 * Makefile.in (TAGS_SOURCES): New variable.
1550 (TAGS): New target.
1551
fc7383ad 15522008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
1553
1554 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1555 and shbe-*-*.
1556 * configure: Rebuilt.
1557
34c3de48 15582008-04-02 Joseph Myers <joseph@codesourcery.com>
1559
1560 * include/cpplib.h (struct cpp_callbacks): Add used_define,
1561 used_undef and before_define.
1562 (NODE_USED): Define.
1563 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1564 do_ifndef, cpp_pop_definition): Handle new flag and use new
1565 callbacks.
1566 * expr.c (parse_defined): Handle new flag and use new callbacks.
1567 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1568 flag and use new callbacks.
1569
f2225b1a 15702008-04-01 Jakub Jelinek <jakub@redhat.com>
1571
1572 PR pch/13675
1573 * files.c (struct _cpp_file): Remove pch field.
1574 (pch_open_file): Don't set file->pch, just file->pchname.
1575 (should_stack_file): After pfile->cb.read_pch call
1576 free pchname and clear pchname, don't close file->fd.
1577 Test file->pchname instead of file->pch. Don't close fd after cb.
1578 (_cpp_stack_include): Test file->pchname instead of file->pch.
1579
5a959782 15802008-03-28 Tom Tromey <tromey@redhat.com>
1581
1582 * Makefile.in (POSTCOMPILE): New variable.
1583 (.c.o): Use it.
1584
8302ff7f 15852008-03-13 Tom Tromey <tromey@redhat.com>
1586
1587 PR libcpp/35322:
1588 * directives.c (destringize_and_run): Set pfile->directive.
1589
8bd452d9 15902008-03-06 Markus Milleder <markus.milleder@generali.at>
1591
1592 PR preprocessor/35458
1593 * mkdeps.c (munge): Quote '#' with a '\'.
1594
0c62b06e 15952008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1596
1597 PR preprocessor/35379
1598 * mkdeps.c (deps_write): Ensure the first target always appears
1599 in the first column, without leading backslash newline. Avoid
1600 some more extra whitespace.
1601
6b0c1373 16022008-02-25 Thiemo Seufer <ths@mips.com>
1603
0c62b06e 1604 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
6b0c1373 1605
e297899b 16062008-02-19 Tom Tromey <tromey@redhat.com>
1607
1608 * traditional.c (lex_identifier): Use CPP_HASHNODE.
1609 * lex.c (lex_identifier): Use CPP_HASHNODE.
1610 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
1611 do-while.
1612 * identifiers.c (alloc_node): Change return type.
1613 (_cpp_init_hashtable): Don't cast 'alloc_node'.
1614 (proxy_assertion_broken): New declaration.
1615 (cpp_forall_identifiers): Move comment.
1616 * line-map.c (linemap_add): Comment fix.
1617 (linemap_line_start): Indentation fix.
1618
45f9f140 16192008-01-25 Jakub Jelinek <jakub@redhat.com>
1620
1621 PR preprocessor/34692
1622 * macro.c (collect_args): Add pragma_buff argument. Push
1623 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1624 than into arguments. Reset prevent_expansion and parsing_args
1625 state at CPP_PRAGMA_EOL/CPP_EOF.
1626 (funlike_invocation_p): Add pragma_buff argument, pass it through
1627 to collect_args.
1628 (enter_macro_context): Add result argument. Adjust
1629 funlike_invocation_p caller. Emit all deferred pragma tokens
1630 gathered during collect_args before the expansion, add a padding
1631 token. Return 2 instead of 1 if any pragma tokens were prepended.
1632 (cpp_get_token): If enter_macro_context returns 2, don't return
1633 a padding token, instead cycle to grab CPP_PRAGMA token.
1634 * directives.c (_cpp_handle_directive): If was_parsing_args
1635 in deferred pragma, leave parsing_args and prevent_expansion as is.
1636
a56d0856 16372008-01-22 Tom Tromey <tromey@redhat.com>
1638
45f9f140 1639 PR c++/34859
a56d0856 1640 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1641 __STDC_CONSTANT_MACROS.
1642
7a1a608c 16432008-01-07 Fred Fish <fnf@specifix.com>
1644
45f9f140 1645 PR preprocessor/30363
7a1a608c 1646 * traditional.c (replace_args_and_push): Add local variable
1647 cxtquote, calculate the replacement text size assuming a
1648 worst case of every input character quoted with backslash,
1649 and properly handle output quoting of quote characters in
1650 actual arguments used in function-like macros.
1651
cde59b72 16522008-01-03 Tom Tromey <tromey@redhat.com>
1653
45f9f140 1654 PR preprocessor/34602
cde59b72 1655 * directives.c (do_line): Don't try to spell EOF token.
1656 (do_linemarker): Add comment.
1657
2d1f9589 16582007-12-11 DJ Delorie <dj@redhat.com>
1659
1660 * charset.c (convert_using_iconv): Close out any shift states,
1661 returning to the initial state.
1662
64cb8c90 16632007-12-06 Tom Tromey <tromey@redhat.com>
1664
45f9f140 1665 PR c/29172
64cb8c90 1666 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1667 type.
1668 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1669 * files.c (FILE_HASH_POOL_SIZE): New macro.
1670 (struct file_hash_entry_pool): New.
1671 (destroy_all_cpp_files): New function.
1672 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1673 (new_file_hash_entry): Update.
1674 (free_file_hash_entries): New function.
1675 (_cpp_cleanup_files): Call free_file_hash_entries and
1676 destroy_all_cpp_files.
1677 (cpp_clear_file_cache): New function.
1678 * include/cpplib.h (cpp_clear_file_cache): Declare.
1679
d08a0ab3 16802007-12-03 Tom Tromey <tromey@redhat.com>
1681
45f9f140 1682 PR preprocessor/34288
d08a0ab3 1683 * configure.ac, config.in: Rebuilt.
1684 * configure.ac: Check for ssize_t.
1685
5eb3761c 16862007-11-30 Tom Tromey <tromey@redhat.com>
1687
45f9f140 1688 PR preprocessor/32868
5eb3761c 1689 * macro.c (_cpp_create_definition): Special case
1690 __STDC_FORMAT_MACROS.
1691
bce619a6 16922007-11-16 Michael Matz <matz@suse.de>
1693
1694 * files.c (search_path_head): Fix check for absolute paths.
1695
67015c73 16962007-11-11 Tom Tromey <tromey@redhat.com>
1697
45f9f140 1698 PR c++/17557
67015c73 1699 * include/cpplib.h (cpp_included_before): Declare.
1700 * files.c (struct file_hash_entry) <location>: New field.
1701 (_cpp_find_file): Initialize new field.
1702 (make_cpp_dir): Likewise.
1703 (cpp_included_before): New function.
1704
1991d8eb 17052007-11-01 Tom Tromey <tromey@redhat.com>
1706
45f9f140 1707 PR preprocessor/30805
1991d8eb 1708 * macro.c (paste_tokens): Handle padding token.
1709 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1710
2d507e67 17112007-10-31 Tom Tromey <tromey@redhat.com>
1712
45f9f140 1713 PR preprocessor/30786
2d507e67 1714 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1715 * directives.c (_cpp_do__Pragma): Return error status.
1716 * internal.h (_cpp_do__Pragma): Update.
1717 * directives.c (get__Pragma_string): Back up if EOF seen.
1718
931b0a0f 17192007-09-06 Tom Tromey <tromey@redhat.com>
1720
1721 * internal.h (struct cpp_reader) <invocation_location>: New
1722 field.
1723 (struct cpp_reader) <set_invocation_location>: Likewise.
1724 * init.c (cpp_set_line_map): New function.
1725 * line-map.c (linemap_add): Use linemap's allocator.
1726 * include/line-map.h (GTY): Define.
1727 (line_map_realloc): New typedef.
1728 (struct line_map): Mark with GTY.
1729 (struct line_maps): Likewise.
1730 (struct line_maps) <maps>: Likewise.
1731 (struct line_maps) <reallocator>: New field.
1732 * include/symtab.h (GTY): Conditionally define.
1733 * include/cpplib.h (cpp_set_line_map): Declare.
1734 (cpp_get_token_with_location): Declare.
1735 * macro.c (cpp_get_token): Set invocation_location on the reader.
1736 (cpp_get_token_with_location): New function.
1737
84373723 17382007-08-30 Chao-ying Fu <fu@mips.com>
1739
1740 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1741 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1742 (cpp_classify_number): Support decimal fixed-point constants without
1743 exponents.
1744 Warn about fixed-point constants when -pedantic.
1745 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1746 comments to support fixed-point values.
1747 (CPP_N_FRACT, CPP_N_ACCUM): Define.
1748
36ec4203 17492007-08-18 Tom Tromey <tromey@redhat.com>
1750
45f9f140 1751 PR preprocessor/32974
36ec4203 1752 * directives.c (parse_include): Don't check for EOL when
1753 processing #pragma dependency.
1754
fcde64dc 17552007-07-30 Ollie Wild <aaw@google.com>
1756
1757 * directives-only.c: New file.
1758 * internal.h (struct _cpp_dir_only_callbacks): New.
1759 (_cpp_preprocess_dir_only): New function.
1760 * directives.c (_cpp_handle_directive): Check directives_only before
1761 disabling execution of indented directives.
1762 * files.c (_cpp_stack_file): Add directives_only check.
1763 * include/cpplib.h (struct cpp_options): Add directives_only.
1764 (cpp_init_special_builtins): New function.
1765 * init.c (cpp_init_special_builtins): New function.
1766 (cpp_init_builtins): Move builtin_array initialization to
1767 cpp_init_special_builtins.
1768 (post_options): Check directives_only before setting
1769 pfile->state.prevent_expansion = 1.
1770 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1771 is expanded inside a directive while -fdirectives-only is enabled.
1772 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1773 (libcpp_a_SOURCES): Add directives-only.c.
1774
ddedd1e1 17752007-07-04 Uros Bizjak <ubizjak@gmail.com>
1776
1777 * traditional.c (_cpp_scan_out_logical_line): Initialize
1778 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1779 fmacro.args to prevent 'may be used uninitialized' warning.
1780
430be8e2 17812007-07-03 Uros Bizjak <ubizjak@gmail.com>
1782
1783 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1784 Add new constants.
1785 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1786 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1787 for 'q' or 'Q' suffixes.
1788
909dc303 17892007-06-17 Danny Smith <dannysmith@users.sourceforge.net
1790
857d7d5e 1791 * files.c (open_file): Correct typo.
909dc303 1792
7d6f49d6 17932007-06-16 Vladimir Prus <vladimir@codesourcery.com>
1794
857d7d5e 1795 * files.c (open_file): Prevent the call
7d6f49d6 1796 for stat from overwriting errno.
1797
be21d64c 17982007-06-09 Vladimir Prus <vladimir@codesourcery.com>
1799
857d7d5e 1800 * files.c (open_file): Account for the
be21d64c 1801 fact that on windows, opening a directory gives
1802 EACCES.
1803
d7282a2b 18042007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
1805
1806 PR preprocessor/23479
1807 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
1808 integer constants.
1809 (append_digit): Likewise.
1810 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
1811 binary integer constants.
1812
0448520c 18132007-05-31 Dave Korn <dave.korn@artimi.com>
1814
1815 PR preprocessor/14331
1816 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
1817
ce079f70 18182007-05-24 Ollie Wild <aaw@google.com>
1819
1820 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
1821 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
1822 (cpp_write_pch_state): Save __COUNTER__ state.
1823 (cpp_valid_state): Check valid __COUNTER__ state.
1824 (cpp_read_state): Read new __COUNTER__ state.
1825 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
1826 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
1827 * internal.h (struct cpp_reader): Add counter member.
1828
3b6c638e 18292007-05-23 Simon Martin <simartin@users.sourceforge.net>
1830
1831 PR preprocessor/20077
1832 * macro.c (create_iso_definition): Fixed the method to determine
1833 whether the token-pasting operator appears at the beginning or the end
1834 of a macro.
1835
248dfc42 18362007-05-21 Ian Lance Taylor <iant@google.com>
1837
1838 * internal.h (struct cpp_reader): Add new fields:
1839 nonexistent_file_hash and nonexistent_file_ob.
1840 * files.c: Include "obstack.h".
1841 (find_file_in_dir): Before trying to open the file, look up the
1842 path name in the hash table of nonexistent files. After failing
1843 to open the file, add the path name to the hash table.
1844 (_cpp_find_file): Cache the results of looking up the file name
1845 starting with the quote and bracket chain heads, if we can.
1846 (nonexistent_file_hash_eq): New static function.
1847 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
1848 pfile->nonexistent_file_ob.
1849 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
1850 pfile->nonexistent_file_ob.
1851
c55e2f1b 18522007-05-14 Janis Johnson <janis187@us.ibm.com>
1853
5c00409a 1854 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
1855
c55e2f1b 1856 PR c/31924
1857 * expr.c (interpret_float_suffix): Check for invalid suffix.
1858
dd97b5e4 18592007-05-02 Eric Christopher <echristo@apple.com>
1860
1861 * expr.c (num_div_op): Don't overflow if the result is
1862 zero.
1863
3127c357 18642007-05-02 Tom Tromey <tromey@redhat.com>
1865
45f9f140 1866 PR preprocessor/28709
3127c357 1867 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
1868
f23c2abe 18692007-03-30 Michael Meissner <michael.meissner@amd.com>
1870
1871 * directives.c (lex_macro_node_from_str): Fix alloca call to be
1872 type correct.
1873
3fa3949d 18742007-03-30 Richard Henderson <rth@redhat.com>
1875
1876 * directives.c (lex_macro_node_from_str): New.
1877 (cpp_push_definition, cpp_pop_definition): New.
1878 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
1879
7262ccd6 18802007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1881
1882 * Makefile.in: Add dummy install-pdf target.
1883
09edb0e9 18842007-01-30 Tom Tromey <tromey@redhat.com>
1885
45f9f140 1886 PR preprocessor/30468
09edb0e9 1887 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
1888 './'.
1889
e0ff7935 18902007-01-30 Tom Tromey <tromey@redhat.com>
1891
45f9f140 1892 PR preprocessor/29966
e0ff7935 1893 * macro.c (lex_expansion_token): Save and restore cpp_reader's
1894 cur_token.
1895 (_cpp_create_definition): Don't restore cur_token here.
1896 * lex.c (_cpp_lex_token): Added assertion.
1897
87d210c3 18982007-01-27 Tom Tromey <tromey@redhat.com>
1899
1900 * configure: Rebuilt.
1901
3e2a04b5 19022007-01-12 Tom Tromey <tromey@redhat.com>
1903
45f9f140 1904 PR preprocessor/28227
3e2a04b5 1905 * directives.c (lex_macro_node): Added 'is_def_or_undef'
1906 argument.
1907 (do_define): Update.
1908 (do_undef): Update.
1909 (do_ifdef): Update.
1910 (do_ifndef): Update.
1911
6a6e7e2f 19122007-01-11 Paolo Bonzini <bonzini@gnu.org>
1913
1914 * configure: Regenerate.
1915
77258a2e 19162007-01-11 Paolo Bonzini <bonzini@gnu.org>
1917
1918 * configure: Regenerate.
1919
927b511f 19202007-01-04 Tom Tromey <tromey@redhat.com>
1921
45f9f140 1922 PR preprocessor/28165
927b511f 1923 * internal.h (cpp_in_primary_file): New function.
1924 * directives.c (do_include_next): Use cpp_in_primary_file.
1925 (do_pragma_once): Likewise.
1926 (do_pragma_system_header): Likewise.
1927
5008f5c5 19282006-12-29 Ian Lance Taylor <iant@google.com>
1929
1930 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
1931 look backward at the end of the line unless we saw a backslash.
1932
5d70627e 19332006-12-29 Jakub Jelinek <jakub@redhat.com>
1934
1935 PR preprocessor/29612
1936 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
1937 only when new_sysp is non-zero.
1938
854f075e 19392006-12-28 Tom Tromey <tromey@redhat.com>
1940
45f9f140 1941 PR preprocessor/30001
854f075e 1942 * charset.c (_cpp_convert_input): Check that to.len is greater
1943 than zero.
1944
644459d0 19452006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1946
1947 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
db375b8e 1948 * configure: Rebuilt.
644459d0 1949
093aec7c 19502006-11-01 Douglas Gregor <doug.gregor@gmail.com>
1951
1952 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
1953 for experimental C++0x mode.
1954 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
1955 adopted the preprocessor changes introduced in C99.
1956
54bb64fb 19572006-10-29 Joseph Myers <joseph@codesourcery.com>
1958
1959 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
1960 depending on --enable-targets=all.
1961 * configure: Regenerate.
1962
46139d3f 19632006-10-12 Jakub Jelinek <jakub@redhat.com>
1964
1965 PR preprocessor/28709
1966 * macro.c (paste_tokens): Do error reporting here, use BUF with the
1967 spelled LHS token as opposed to spelling it again.
1968 (paste_all_tokens): Don't report errors here, just break on failure.
1969
51f93521 19702006-10-10 Brooks Moses <bmoses@stanford.edu>
1971
1972 * Makefile.in: Added empty "pdf" target.
1973
32bca58b 19742006-09-22 Geoffrey Keating <geoffk@apple.com>
1975
1976 * configure.ac: Make need_64_bit_hwint case for x86-darwin
1977 match exactly the glob in gcc/config.gcc.
1978 * configure: Regenerate.
1979
0b67f687 19802006-09-13 Joseph S. Myers <joseph@codesourcery.com>
1981
1982 PR c/28768
1983 PR preprocessor/14634
1984 * lex.c (lex_string): Pedwarn for unterminated literals.
1985
3ebc7dec 19862006-09-08 Eric Christopher <echristo@apple.com>
1987
1988 * configure.ac: Add 64-bit HWI support for i?86-darwin.
1989
e58c07f7 19902006-08-14 Steve Ellcey <sje@cup.hp.com>
1991
1992 PR c++/28288
1993 PR c++/14556
1994 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
1995 (CPP_LAST_EQ): Change.
1996 (CPP_LAST_PUNCTUATOR): Change.
1997 * expr.c (cpp_operator): Remove MIN and MAX.
1998 (reduce): Remove CPP_MIN and CPP_MAX.
1999 (num_binary_op): Ditto.
2000 * lex.c (_cpp_lex_direct): Ditto.
2001 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
2002
add258d7 20032006-06-09 Jakub Jelinek <jakub@redhat.com>
2004
2005 PR preprocessor/27746
2006 * directives.c (do_pragma): Handle pragma with valid namespace
2007 and invalid name coming from macro expansion.
2008 * directives.c (destringize_and_run): Initialize next field in
2009 context.
2010
2011 PR c/27747
2012 PR c++/27748
2013 * directives.c (destringize_and_run): Set NO_EXPAND on the
2014 tokens.
2015
2016 * macro.c (_cpp_backup_tokens): Fix comment typo.
2017
49688a56 20182006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
2019
2020 * Makefile.in (CATALOGS): Add po/ prefix.
2021 * configure: Regenerated.
2022
8f597c12 20232006-05-23 Carlos O'Donell <carlos@codesourcery.com>
2024
2025 * Makefile.in: Add install-html target. Add install-html to .PHONY
2026
cca5dddc 20272006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
2028
2029 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
2030 * files.c (_cpp_get_file_stat): New function.
2031 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
2032 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
2033 * internal.h (_cpp_get_file_stat): Prototype.
2034 (struct cpp_buffer): Add timestamp.
2035
31614f7c 20362006-01-23 Jakub Jelinek <jakub@redhat.com>
2037
2038 PR preprocessor/25717
2039 * init.c (cpp_init_builtins): If __STDC__ will not change value
2040 between system headers and other sources, define it as a normal
2041 macro rather than a builtin.
2042 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
2043 cpp_in_system_header condition.
2044
20452006-01-05 Paolo Bonzini <bonzini@gnu.org>
3c77e017 2046
2047 * Makefile.in: Use -MMD instead of -MD.
2048
b75b98aa 20492006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2050 Richard Henderson <rth@redhat.com>
2051
2052 Merge from gomp branch:
2053 * directives.c (struct pragma_entry): Add is_deferred. Add ident
2054 entry to value union.
2055 (end_directive): Don't eat the line if in_deferred_pragma.
2056 (run_directive): Remove pragma hacks.
2057 (insert_pragma_entry): Remove.
2058 (new_pragma_entry): New.
2059 (register_pragma_1): Split out of register_pragma. Only handle
2060 the lookup tree and return the new entry.
2061 (cpp_register_pragma): Fill in the pragma entry here.
2062 (cpp_register_deferred_pragma): New.
2063 (register_pragma_internal): New.
2064 (_cpp_init_internal_pragmas): Use register_pragma_internal.
2065 (do_pragma): Allow pragma expansion after namespace. For deferred
2066 pragmas, don't slurp the line into a string.
2067 (destringize_and_run): Save tokens for deferred pragmas.
2068 (cpp_handle_deferred_pragma): Remove.
2069 * macro.c (builtin_macro): Remove pragma token hack.
2070 (_cpp_push_token_context): Rename from push_token_context and export.
2071 * internal.h (struct lexer_state): Add pragma_allow_expansion.
2072 (_cpp_push_token_context): Declare.
2073 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
2074 a token. Update the line number correctly if so.
2075 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
2076 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
2077 * include/cpplib.h (PRAGMA_EOL): New.
2078 (CPP_TOKEN_FLD_PRAGMA): New.
2079 (struct cpp_token): Add val.pragma.
2080 (struct cpp_options): Remove defer_pragmas.
2081 (cpp_handle_deferred_pragma): Remove.
2082 (cpp_register_deferred_pragma): Declare.
2083
986ca356 20842006-01-01 Jakub Jelinek <jakub@redhat.com>
2085
2086 PR c++/25294
2087 * directives.c (do_pragma): If pragma line ends with multi-line
2088 block comment, end the saved deferred pragma string before that
2089 comment. Handle embedded '\0' chars on the pragma line.
2090
8dba02f7 20912005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2092
2093 PR c++/23333
2094 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
2095
6db045b0 20962005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
2097 Ben Elliston <bje@au.ibm.com>
2098
2099 * include/cpplib.h (CPP_N_DFLOAT): New.
2100 * expr.c (interpret_float_suffix): Identify df, dd, and dl
2101 suffixes as decimal floating point constants.
2102 (cpp_classify_number): Disallow hexadecimal DFP constants.
2103
9a7c76f9 21042005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
b75b98aa 2105 Ian Lance Taylor <ian@airs.com>
9a7c76f9 2106
2107 * include/cpplib.h (struct cpp_callbacks): Annotate error with
2108 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
2109
0c5e3a3d 21102005-11-09 Per Bothner <per@bothner.com>
2111 Uros Bizjak <uros@kss-loka.si>
3ebc7dec 2112
0c5e3a3d 2113 PR c/24101
2114 * init.c (read_original_filename): Temporarily set
2115 state.in_directive before calling _cpp_lex_direct for
2116 CPP_HASH tokens.
2117
3c2359db 21182005-11-03 James E Wilson <wilson@specifix.com>
2119
2120 PR preprocessor/24202
2121 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
2122
d65b3a40 21232005-11-04 Joseph S. Myers <joseph@codesourcery.com>
2124
2125 * include/cpplib.h (struct cpp_callbacks): Make error take
2126 va_list* parameter.
2127 * errors.c (cpp_error): Update call to callback.
2128
cc9012f7 21292005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
2130
2131 PR preprocessor/22042
2132 * macro.c (_cpp_builtin_macro_text): Lower the needed max
2133 buffer size.
2134 (cpp_quote_string): Don't octalify non printable
2135 charactors.
2136
eb0d20b7 21372005-11-03 Joseph S. Myers <joseph@codesourcery.com>
2138
2139 PR c++/17964
2140 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
2141 (struct cpp_callbacks): Add error.
2142 * errors.c (cpp_error): If client_diagnostic, use error callback.
2143 * charset.c (convert_escape): Don't use %03o in diagnostic.
2144
de4aacc0 21452005-10-21 James E Wilson <wilson@specifix.com>
04c0bfd0 2146
2147 PR preprocessor/15220
2148 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
2149 callers. Pass to open_file_failed.
2150 (open_file_failed): New parameter angle_brackets. Fix all callers.
2151 Use in print_dep assignment.
2152 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
2153 * internal.h (_cpp_find_file): Add new parm to declaration.
3ebc7dec 2154
6783d878 21552005-10-08 Kazu Hirata <kazu@codesourcery.com>
2156
2157 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
2158 * configure: Regenerate.
2159
f789fe3e 21602005-10-04 Ian Lance Taylor <ian@airs.com>
2161
2162 PR preprocessor/13726
2163 * directives.c (check_eol_return_comments): New static function.
2164 (parse_include): Add buf parameter. Change all callers.
2165 (do_include_common): If not discard comments, turn on
2166 save_comments. Pass collected comments to include callback.
2167 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
2168 include callback: cpp_token list.
2169
865c4e44 21702005-09-20 Joseph S. Myers <joseph@codesourcery.com>
2171
2172 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
2173 * init.c (struct lang_flags, lang_defaults): Add
2174 extended_identifiers.
2175 (cpp_set_lang): Use it.
2176 * lex.c (forms_identifier_p): Check extended_identifiers.
2177
56845aa6 21782005-08-30 Jakub Jelinek <jakub@redhat.com>
2179
2180 PR preprocessor/20348
2181 PR preprocessor/20356
2182 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
2183 2004-06-05 changes.
2184
72ee8ff9 21852005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2186
2187 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
2188 -Wmissing-format-attribute.
2189
2190 * configure: Regenerate.
2191
2656917a 21922005-06-29 Kelley Cook <kcook@gcc.gnu.org>
2193
2194 * all files: Update FSF address in copyright headers.
2195 * makeucnid.c (write_copyright): Update outputted FSF address.
2196
cbaa9876 21972005-06-13 Zack Weinberg <zack@codesourcery.com>
2198
2199 * configure.ac: Invoke ZW_CREATE_DEPDIR and
2200 ZW_PROG_COMPILER_DEPENDENCIES.
2201 * aclocal.m4, configure: Regenerate.
2202 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
2203 New variables.
2204 (distclean): Clean up $(DEPDIR) and its contents.
2205 (.c.o): Use $(COMPILE).
2206 Include $(DEPDIR)/*.Po for most object->header dependencies.
2207
720aca92 22082005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2209
2210 * configure.ac: Check declarations for asprintf and vasprintf.
2211 * config.in: Regenerate.
2212 * configure: Likewise.
2213
2214 * charset.c (conversion_loop): Use XRESIZEVEC.
2215 (convert_no_conversion): Likewise.
2216 (convert_using_iconv): Likewise.
2217 (init_iconv_desc): Cast return value of alloca.
2218 (cpp_host_to_exec_charset): Use XNEWVEC.
2219 (emit_numeric_escape): Use XRESIZEVEC.
2220 (cpp_interpret_string): Use XNEWVEC.
2221 (cpp_interpret_string): Use XRESIZEVEC.
2222 (_cpp_interpret_identifier): Cast return value of alloca.
2223 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
2224 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
2225 (parse_include): Use XNEWVEC.
2226 (insert_pragma_entry): Rename local variable "new" to
cbaa9876 2227 "new_entry".
720aca92 2228 (save_registered_pragmas): Cast return value of xmemdup.
2229 (destringize_and_run): Same for alloca.
2230 (parse_assertion): Likewise.
2231 (do_assert): Cast allocated storage to proper type.
2232 (cpp_define): Likewise.
2233 (_cpp_define_builtin): Likewise.
2234 (cpp_undef): Likewise.
2235 (handle_assertion): Likewise.
2236 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
2237 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
2238 (CPP_UMINUS): Likewise.
2239 (struct cpp_operator): Rename from struct operator.
2240 (_cpp_expand_op_stack): Use XRESIZEVEC.
2241 * files.c (pch_open_file): Use XNEWVEC.
2242 (pch_open_file): Use XRESIZEVEC.
2243 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
2244 (dir_name_of_file): Use XNEWVEC.
2245 (make_cpp_file): Use XCNEW.
2246 (make_cpp_dir): Likewise.
2247 (allocate_file_hash_entries): USE XNEWVEC.
2248 (cpp_included): Cast return value of htab_find_with_hash.
2249 (append_file_to_dir): Use XNEWVEC.
2250 (read_filename_string): Likewise. Use XRESIZEVEC too.
2251 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
2252 (remap_filename): Use XNEWVEC.
2253 (struct pchf_entry): Move definition out of struct pchf_data.
2254 (_cpp_save_file_entries): Use XCNEWVAR.
2255 (_cpp_read_file_entries): Use XNEWVAR.
2256 * identifiers.c (alloc_node): Use XOBNEW.
2257 * init.c (cpp_create_reader): Use XCNEW.
2258 (cpp_init_builtins): Cast of b->value to enum builtin_type.
2259 (read_original_directory): Cast return value of alloca.
2260 * lex.c (add_line_note): Use XRESIZEVEC.
2261 (warn_about_normalization): Use XNEWVEC.
2262 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
2263 (new_buff): Use XNEWVEC.
2264 * line-map.c (linemap_add): Use XRESIZEVEC.
2265 * macro.c (builtin_macro): Cast return value of alloca.
2266 (paste_tokens): Likewise.
2267 (expand_arg): Use XNEWVEC and XRESIZEVEC.
2268 (_cpp_save_parameter): Use XRESIZEVEC.
2269 (create_iso_definition): Cast allocated storage to proper type.
2270 (_cpp_create_definition): Likewise.
2271 (cpp_macro_definition): Use XRESIZEVEC.
2272 * makedepend.c (add_clm): Use XNEW.
2273 (add_dir): Likewise.
2274 * mkdeps.c (munge): Use XNEWVEC.
2275 (deps_init): Use XCNEW.
2276 (deps_add_target): Use XRESIZEVEC.
2277 (deps_add_default_target): Cast return value of alloca.
2278 (deps_add_dep): Use XRESIZEVEC.
2279 (deps_add_vpath): Likewise. Use XNEWVEC too.
2280 (deps_restore): Likewise.
2281 * pch.c (save_idents): Use XNEW and XNEWVEC.
2282 (cpp_save_state): Use XNEW.
2283 (count_defs): Cast return value of htab_find.
2284 (write_defs): Likewise.
2285 (cpp_write_pch_deps): Use XNEWVEC.
2286 (collect_ht_nodes): Use XRESIZEVEC.
2287 (cpp_valid_state): Use XNEWVEC.
2288 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
2289 * symtab.c (ht_create): Use XCNEW.
2290 (ht_lookup_with_hash): Cast return value of obstack_copy0.
2291 (ht_expand): Use XCNEWVEC.
2292 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2293 (bool): Do not define if __cplusplus.
2294
81e19b31 22952005-05-12 Zack Weinberg <zack@codesourcery.com>
2296
2297 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2298 (do_sccs): Delete function definition, #define to do_ident.
2299 (do_ident): Don't hardwire directive name.
2300
18f11b84 23012005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
2302
2303 PR bootstrap/21230
2304 * configure: Regenerate.
2305
2dc04f36 23062005-04-27 Andris Pavenis <pavenis@latnet.lv>
2307
2308 * files.c: Include io.h for DJGPP to get prototype of setmode.
2309
0b7f838f 23102005-04-19 Per Bothner <per@bothner.com>
2311
2312 PR preprocessor/20907
2313 * line-map.c (linemap_line_start): Fix bug when we need to increse
2314 column_bits but can re-use the current line_map.
2315
2224c90b 23162005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2317
2318 * system.h (fopen, fdopen, freopen): Define these to the unlocked
2319 libiberty functions.
2320
077a3c99 23212005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2322
2323 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2324 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2325 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2326 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2327 _unlocked function.
2328 (fwrite_unlocked): Fix prototype.
81e19b31 2329
077a3c99 2330 * configure, config.in: Regenerate.
2331
99617355 23322005-04-05 Jakub Jelinek <jakub@redhat.com>
2333
2334 PR preprocessor/19475
2335 * macro.c (create_iso_definition): For < ISO C99, don't
2336 pedwarn if there is no whitespace between macro name and its
2337 replacement, but the replacement starts with a basic character
2338 set character.
2339
3827dee5 23402005-03-28 Andreas Jaeger <aj@suse.de>
2341
2342 * lex.c (warn_about_normalization): Cast field width to int to
2343 avoid warning.
2344
b8273627 23452005-03-19 Joseph S. Myers <joseph@codesourcery.com>
2346
2347 * configure.ac: Consistently use solaris2.1[0-9]* instead of
2348 solaris2.1[0-9].
2349 * configure: Regenerate.
2350
bc65f24f 23512005-03-15 Geoffrey Keating <geoffk@apple.com>
2352
2353 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2354 UCN rather than printing an error.
2355
bce47149 23562005-03-14 Geoffrey Keating <geoffk@apple.com>
2357
4e9d1e6d 2358 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2359
23602005-03-14 Geoffrey Keating <geoffk@apple.com>
81e19b31 2361
bce47149 2362 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2363 * charset.c: Update for new format of ucnid.h.
2364 (ucn_valid_in_identifier): Update for new format of ucnid.h.
2365 Add NST parameter, and update it; update callers.
2366 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
2367 with cpp_error.
2368 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2369 * internal.h (struct normalize_state): New.
2370 (INITIAL_NORMALIZE_STATE): New.
2371 (NORMALIZE_STATE_RESULT): New.
2372 (NORMALIZE_STATE_UPDATE_IDNUM): New.
2373 (_cpp_valid_ucn): New.
2374 * lex.c (warn_about_normalization): New.
2375 (forms_identifier_p): Add normalize_state parameter, update callers.
2376 (lex_identifier): Add normalize_state parameter, update callers. Keep
2377 the state current.
2378 (lex_number): Likewise.
2379 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
2380 it with warn_about_normalization.
2381 * makeucnid.c: New.
2382 * ucnid.h: Replace.
2383 * ucnid.pl: Remove.
2384 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
2385 comments about obsolete version of C++.
2386 * include/cpplib.h (enum cpp_normalize_level): New.
2387 (struct cpp_options): Add warn_normalize field.
2388
bb1fa6bb 23892005-03-11 Geoffrey Keating <geoffk@apple.com>
2390
2391 * directives.c (glue_header_name): Update call to cpp_spell_token.
2392 * internal.h (_cpp_interpret_identifier): New.
2393 * charset.c (_cpp_interpret_identifier): New.
2394 (_cpp_valid_ucn): Allow UCN version of '$'.
2395 * lex.c (lex_identifier): Add extra parameter to indicate if initial
2396 character was '$' or '\'. Support identifiers with UCNs.
2397 (forms_identifier_p): Allow UCNs.
2398 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2399 (utf8_to_ucn): New.
2400 (cpp_spell_token): Add FORSTRING parameter. Use it.
2401 (cpp_token_as_text): Update call to cpp_spell_token.
2402 (cpp_output_token): Write UCNs back out.
2403 (stringify_arg): Update call to cpp_spell_token.
2404 (paste_tokens): Likewise.
2405 (cpp_macro_definition): Likewise.
2406 * macro.c (stringify_arg): Likewise.
2407 (paste_tokens): Likewise.
2408 (cpp_macro_definition): Likewise.
2409 * include/cpplib.h: Add parameter to cpp_spell_token.
2410
960391da 24112005-03-04 Jakub Jelinek <jakub@redhat.com>
2412
2413 PR bootstrap/20282
2414 PR bootstrap/20305
2415 * macro.c (replace_args, cpp_get_token): Copy whole
2416 cpp_token_u instead of just cpp_string field from it.
2417
b0d0794d 24182005-02-28 Devang Patel <dpatel@apple.com>
2419
2420 * directives.c (do_line): Save sysp early before line table is
2421 realloc'ed.
81e19b31 2422
624d37a6 24232005-02-20 Zack Weinberg <zack@codesourcery.com>
2424
2425 PR 18785
2426 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2427 (cpp_host_to_exec_charset): New function.
2428 * include/cpplib.h: Declare cpp_host_to_exec_charset.
2429
f86986bc 24302005-02-19 Devang Patel <dpatel@apple.com>
2431
2432 * charset.c (_cpp_convert_input): Check '\r' before inserting
2433 '\n' at the end.
624d37a6 2434
9936e07d 24352005-02-15 Eric Christopher <echristo@redhat.com>
2436
2437 PR preprocessor/19077
2438 * macro.c (cpp_macro_definition): Move handling of whitespace
2439 to PREV_WHITE conditional. Remove overloading of len
2440 variable.
2441
129a1540 24422005-02-14 Kazu Hirata <kazu@cs.umass.edu>
2443
2444 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2445 traditional.c: Update copyright.
2446
bb30d1f4 24472005-02-14 Paolo Bonzini <bonzini@gnu.org>
2448
2449 PR bootstrap/19818
2450 * configure.ac: Check for declaration of basename and getopt.
2451 * config.in: Regenerate.
2452 * configure: Regenerate.
2453 * internal.h (ustrcspn): New.
2454 * macro.c (create_iso_definition): Fix allocation of memory.
2455 (padding_token): Add cast to remove const-ness.
2456 * pch.c (cpp_read_state): Use ustrcspn.
2457
26ec4f15 24582005-02-08 Mike Stump <mrs@apple.com>
2459
2460 * files.c (pchf_adder): Remove.
2461 (struct pchf_adder_info): Likewise.
2462 (_cpp_save_file_entries): Write out all files so that #import works.
2463
0cb78cbd 24642005-01-23 Joseph S. Myers <joseph@codesourcery.com>
2465
2466 * configure: Regenerate.
2467
d862067c 24682005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2469
2470 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2471
457e71e4 2472 * include/cpplib.h: Also update copyright years.
624d37a6 2473
ba841ef8 24742005-01-03 Geoffrey Keating <geoffk@apple.com>
2475
2476 * files.c (_cpp_find_file): Add files found by search_path_exhausted
2477 to the list of all files.
2478
f03668bd 24792005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2480
2481 * internal.h: Update references to Cpp lib filenames.
2482 * directives.c: Likewise.
2483 * init.c: Likewise.
2484 * macro.c: Likewise.
2485 * traditional.c: Likewise.
2486
461ea98d 24872004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
2488
2489 PR preprocessor/15167
2490 * files.c (destroy_cpp_file): New function.
2491 (should_stack_file): Make a new file if the
2492 compared file is still stacked.
2493
bd9e37a6 24942004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
2495
624d37a6 2496 PR preprocessor/17610
bd9e37a6 2497 * directives.c (do_include_common): Error out if an empty filename
2498 is given for #include (or #include_next or #import).
2499
fe4dcd90 25002004-11-27 Roger Sayle <roger@eyesopen.com>
2501 Zack Weinberg <zack@codesourcery.com>
2502
2503 * internal.h: Replace all uses of uchar with unsigned char.
2504 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
2505 with !IN_GCC, so uchar is only defined whilst building libcpp.
2506
ac7cc2f4 25072004-11-24 Kelley Cook <kcook@gcc.gnu.org>
2508
2509 * aclocal.m4: Regenerate.
2510
6e11b263 25112004-11-24 Roger Sayle <roger@eyesopen.com>
2512
2513 PR preprocessor/15824
2514 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2515 directly, instead of the non-existant "system.h" and "ansidecl.h".
2516 * configure: Regenerate.
2517
68bf2ad9 25182004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
624d37a6 2519 Joseph Myers <joseph@codesourcery.com>
68bf2ad9 2520
2521 * internal.h (struct lexer_state): Add in_deferred_pragma.
2522 * directives.c (struct pragma_entry): Add allow_expansion.
2523 (insert_pragma_entry): Take allow_expansion flag.
2524 (register_pragma): Likewise.
2525 (cpp_register_pragma): Likewise.
2526 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2527 (do_pragma): Honor allow_expansion.
2528 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2529 * include/cpplib.h (cpp_register_pragma): Update prototype.
2530
27559c4e 25312004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
624d37a6 2532 Mark Mitchell <mark@codesourcery.com>
27559c4e 2533
2534 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2535 need_64bit_hwint=yes.
2536 * configure: Regenerate.
2537
34ae664d 25382004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2539
2540 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
2541 po/$(PACKAGE).pot.
2542 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2543 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2544 Remove local srcdir path from generated file.
2545
39b83bdb 25462004-11-04 Zack Weinberg <zack@codesourcery.com>
624d37a6 2547 Gerald Pfeifer <gerald@pfeifer.com>
39b83bdb 2548
2549 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2550 as well.
2551
a095c1b5 25522004-10-27 Zack Weinberg <zack@codesourcery.com>
2553
2554 PR 18075
2555 * directives.c (do_pragma): Do not defer pragmas which are unknown.
2556 (cpp_handle_deferred_pragma): Add cast to silence warning.
2557
700b0d81 25582004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
2559
2560 * errors.c (_cpp_begin_message): Print "error: " for errors.
2561
fbe83ac1 25622004-10-10 Andreas Jaeger <aj@suse.de>
2563
2564 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2565 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2566
09f10c94 25672004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2568
2569 * pch.c (cpp_write_pch_state): Remove variable z as it is not
2570 used.
2571 (cpp_read_state): Remove unused variables, m, d and mac_count.
2572
a8b2a8d5 25732004-09-29 Per Bothner <per@bothner.com>
2574
2575 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
2576 cb.line_change. Otherwise do_pragma will call the line_change
2577 call-back with a meaningless line number.
2578
21164c01 25792004-09-24 Zack Weinberg <zack@codesourcery.com>
2580
2581 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
2582 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
2583 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2584 * aclocal.m4, configure: Regenerate.
2585 * init.c: Include localedir.h.
2586 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
2587 (DEFS): Delete.
2588 (.c.o): Use $(ALL_CFLAGS).
2589 (localedir.h, localedir.hs): New rules.
2590 (clean): Use rm -rf to remove directories.
2591 (distclean): Also delete localedir.h and localedir.hs.
2592 (init.o): Update dependencies.
2593
986086aa 25942004-09-22 Kelley Cook <kcook@gcc.gnu.org>
2595
2596 * Makefile.in (aclocal.m4): Update dependencies.
2597 * configure.ac (AC_CONFIG_MACRO_DIR): New.
2598 * aclocal.m4, configure: Regenerate.
2599
e9cc3617 26002004-09-17 Zack Weinberg <zack@codesourcery.com>
2601
0097f6a2 2602 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
2603 (_cpp_convert_input, _cpp_default_encoding): Add comments.
2604 Some other comments in this file also tweaked.
2605
e9cc3617 2606 * directives.c (do_pragma): Save current buffer position
2607 before lexing the pragma keywords; don't call
2608 _cpp_backup_tokens in the defer_pragmas case.
2609
9832c977 26102004-09-15 Per Bothner <per@bothner.com>
2611
2612 * include/line-map.h (line_map_start): Add parameter names so
2613 preceding comment makes sense.
2614 (linemap_add): Remove from comment mention of non-existing parameter.
2615
d6d3c909 26162004-09-09 Matt Austern <austern@apple.com>
2617 Zack Weinberg <zack@codesourcery.com>
2618
2619 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
2620 prefixes throughout. Add entry for PRAGMA. Remove
2621 unnecessary "= 0" from EQ.
2622 (enum cpp_ttype): Adjust OP and TK definitions to restore
2623 prefixes, via token-paste.
2624 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2625 Change from #defines to additional cpp_ttype enumerators.
2626 (struct cpp_options): Add defer_pragmas.
2627 (cpp_handle_deferred_pragma): Prototype new interface.
2628
2629 * internal.h (struct cpp_reader): Add directive_result.
2630 * directives.c (struct pragma_entry): Add is_internal field;
2631 give boolean fields type bool.
2632 (start_directive): Initialize pfile->directive_result.type.
2633 (_cpp_do__Pragma): Likewise.
2634 (run_directive): Do not crash if pfile->buffer->prev is NULL.
2635 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2636 from it.
2637 (register_pragma): New static function, bulk of former
2638 cpp_register_pragma here; add 'internal' argument, pass along
2639 to insert_pragma_entry.
2640 (cpp_register_pragma): Now a wrapper around register_pragma which
2641 always passes false for 'internal' argument.
2642 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2643 true for 'internal'.
2644 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2645 an internal pragma, save text till the end of the line as a CPP_PRAGMA
2646 token instead of executing the pragma.
2647 (cpp_handle_deferred_pragma): New interface.
2648 * lex.c (token_spellings): Adjust OP and TK definitions to
2649 match changes to cpplib.h.
2650 (_cpp_lex_token): Check for a directive-result token and
2651 return it if present.
2652 (cpp_token_val_index): Handle CPP_PRAGMA.
2653 * macro.c (cpp_builtin_macro_text): Correct comment.
2654 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2655
735a9bc4 26562004-09-06 Serge Belyshev <belyshev@lubercy.com>
2657
2658 PR preprocessor/14699
2659 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2660 from size_t to double.
2661
25696d3f 26622004-08-28 Andreas Schwab <schwab@suse.de>
2663 Andreas Jaeger <aj@suse.de>
2664
2665 * configure.ac: Set PACKAGE correctly.
2666 * configure: Regenerated.
2667
99439f5b 26682004-08-25 Paolo Bonzini <bonzini@gnu.org>
2669
2670 * Makefile.in: Add back top_builddir.
2671
a668be26 26722004-08-25 Paolo Bonzini <bonzini@gnu.org>
2673
2674 * configure.ac: Replace Automake macro invocations
2675 with manual Autoconf checks and substitutions.
2676 * configure: Regenerate.
2677 * aclocal.m4: Regenerate.
2678 * config.in: Regenerate.
2679 * Makefile.am: Removed.
2680 * Makefile.in: Heavy simplification and reorganization.
2681
30e9913f 26822004-08-09 Mark Mitchell <mark@codesourcery.com>
2683
2684 * configure.ac (arm*-*-eabi*): New target.
2685 (arm*-*-symbianelf*): Likewise.
2686 * configure: Regenerated.
2687
3b298764 26882004-07-24 Bernardo Innocenti <bernie@develer.com>
2689
2690 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2691 * directives.c: Use XNEW-family macros from libiberty.
2692 * lex.c: Likewise.
2693 * macro.c: Likewise.
2694 * cpplib.h (cpp_deps_style): Export enum with name.
2695
d6d3c909 26962004-07-23 Matthias Klose <doko@debian.org>
3b298764 2697
d6d3c909 2698 * init.c (init_library): Use PACKAGE for the text domain.
1ed7d058 2699
821fa045 27002004-07-16 Andris Pavenis <pavenis@latnet.lv>
2701
2702 PR preprocessor/16366
2703 * internal.h (struct cpp_reader): New field dir_hash.
2704 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2705 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2706
d80efa72 27072004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
2708
2709 PR preprocessor/16192
2710 PR preprocessor/15913
2711 PR preprocessor/15572
2712 * expr.c (_cpp_parse_expr): Handle remaining cases where an
2713 expression is missing.
2714 * init.c (post_options): Traditional cpp doesn't do // comments.
2715
ed000086 27162004-06-30 Per Bothner <per@bothner.com>
2717
2718 * include/line-map.h (fileline): Remove old typedef.
2719 * internal.h (struct cpp_reader): Use source_location typedef instead.
2720
dcb9d064 27212004-06-26 Zack Weinberg <zack@codesourcery.com>
2722
2723 Partially revert patch of 2004-06-05.
2724 * files.c (search_cache): Remove pfile argument. Don't check
2725 for file that would be found by "" or <> search here...
2726 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2727 Do not apply directory-of-current-file correction to files
2728 found by this check. Rearrange code slightly.
2729
d718b525 27302004-06-21 Geoffrey Keating <geoffk@apple.com>
2731
2732 * files.c (should_stack_file): Correct swapped parameters to call
2733 to cb.read_pch.
2734 * pch.c (cpp_valid_state): Handle -fpreprocessed.
2735
79b68529 27362004-06-15 Paolo Bonzini <bonzini@gnu.org>
2737
2738 * Makefile.in: Regenerate with automake 1.8.5.
2739 * aclocal.m4: Likewise.
2740 * configure: Regenerate.
2741
151899c5 27422004-06-11 Zack Weinberg <zack@codesourcery.com>
2743
2744 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2745 * configure, config.in: Regenerate.
2746 * system.h: Unconditionally define bool as unsigned char,
2747 BOOL_BITFIELD as unsigned int.
2748 * .cvsignore: New file.
2749
c39ed964 27502004-06-09 Geoffrey Keating <geoffk@apple.com>
2751
2752 * traditional.c (push_replacement_text): Set macro->traditional.
2753 (save_replacement_text): Likewise.
2754 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2755 (struct save_macro_item): Delete.
2756 (struct save_macro_data): Use a character array not the previous
2757 structured format.
2758 (save_macros): Save macro as text not as internal structures.
2759 (cpp_prepare_state): Update for changes to save_macro_data.
2760 (cpp_read_state): Don't read macros defined in PCH. Restore
c84ca916 2761 -D macros as text.
c39ed964 2762 * macro.c (create_iso_definition): Honour alloc_subobject.
2763 Clear traditional flag.
2764 (_cpp_create_definition): Honour alloc_subobject.
2765 * lex.c (cpp_token_val_index): New.
2766 * internal.h: Include cpp-id-data.h.
2767 (uchar): Move definition to cpp-id-data.h.
2768 (U): Likewise.
2769 (cpp_macro): Likewise.
2770 * directives.c (struct answer): Move to cpp-id-data.h.
2771 (do_assert): Honour alloc_subobject.
c84ca916 2772
2773 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2774 * include/cpplib.h (struct cpp_string): Add GTY marker.
2775 (enum cpp_token_fld_kind): New.
2776 (struct cpp_token): Add GTY markers.
2777 (cpp_token_val_index): Prototype.
2778 (CPP_HASHNODE_VALUE_IDX): New.
2779 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2780 * include/cpp-id-data.h: New file.
c39ed964 2781
dd6e5561 27822004-06-09 Paolo Bonzini <bonzini@gnu.org>
2783
2784 * Makefile.am (all-local): New.
2785 * Makefile.in: Regenerate.
2786
8af0c78d 27872004-06-06 Roger Sayle <roger@eyesopen.com>
2788
2789 * Makefile.am (LIBICONV): Declare.
2790 (makedepend_LDADD): Use LIBICONV.
2791 * Makefile.in: Regenerate.
2792
30302733 27932004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
2794
2795 * Makefile.am (LIBINTL): Declare
2796 (makedepend_LDADD): Use LIBINTL.
2797 * Makefile.in: Regenerate.
2798
3eb3f293 27992004-06-05 Zack Weinberg <zack@codesourcery.com>
2800
2801 * Makefile.am: Add makedepend.
2802 * Makefile.in, aclocal.m4: Regenerate.
2803 * charset.c: Insert a space to avoid a warning.
2804 * directives.c: Include mkdeps.h.
2805 (_cpp_handle_directive): Reenable macro expander if appropriate.
2806 (undefine_macros): Inline body of _cpp_free_definition for speed.
2807 Do not call undef callback or _cpp_warn_if_unused_macro.
2808 (cpp_get_deps): New interface.
2809 * files.c (search_cache): Add pfile argument. Check for file
2810 that would be found by "" or <> search here...
2811 (_cpp_find_file): ...not here. Correct recorded start_dir of
2812 files found by directory-of-current-file search that would be
2813 found by "" or <> search.
2814 * init.c (cpp_add_dependency_target): Delete.
2815 * internal.h (struct lexer_state): Add discarding_output flag.
2816 * lex.c (lex_identifier): Compute hash function while scanning.
2817 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
2818 directives.
2819 * makedepend.c: New file.
2820 * mkdeps.c (struct deps): Add vpath vector.
2821 (apply_vpath, deps_add_vpath): New function.
2822 (deps_free): Free vpath vector.
2823 (deps_add_dep, deps_add_target): Use apply_vpath.
2824 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
2825 (ht_lookup_with_hash): New function.
2826 * cpplib.h, mkdeps.h: Update prototypes.
2827 * symtab.h: Update prototypes.
2828 (HT_HASHSTEP, HT_FINISH): New macros.
2829
8ed01400 28302004-05-29 Geoffrey Keating <geoffk@apple.com>
2831
2832 * symtab.c (ht_create): Set entries_owned.
2833 (ht_destroy): Honour entries_owned.
2834 (ht_expand): Likewise.
2835 (ht_load): New.
c84ca916 2836 * include/symtab.h (struct ht): New field 'entries_owned'
2837 (ht_load): New prototype.
8ed01400 2838
347a3ab5 28392004-05-26 Paolo Bonzini <bonzini@gnu.org>
2840
2841 PR bootstrap/15651
2842 * configure.ac: Fix m4 quoting when picking
2843 the size of HOST_WIDE_INT.
2844 * configure: Regenerate.
2845
fc231f28 28462004-05-25 Paolo Bonzini <bonzini@gnu.org>
2847
2848 * Makefile.am: the correct directory for
2849 gettext include files is given by @INCINTL@.
2850 * Makefile.in: Regenerate.
2851
babfbd63 28522004-05-24 Paolo Bonzini <bonzini@gnu.org>
2853
2854 * system.h [!ENABLE_NLS]: dgettext takes two
2855 parameters.
2856
d856c8a6 28572004-05-23 Paolo Bonzini <bonzini@gnu.org>
2858
2859 Moved libcpp from the gcc subdirectory to the toplevel.
2860 * Makefile.am: New file.
2861 * Makefile.in: Regenerate.
2862 * configure.ac: New file.
2863 * configure: Regenerate.
2864 * config.in: Regenerate.
2865 * charset.c: Moved from gcc/cppcharset.c. Add note about
2866 brokenness of input charset detection. Adjust for change
2867 in name of cppucnid.h.
2868 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
2869 * expr.c: Moved from gcc/cppexp.c.
2870 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
2871 Remove #define of O_BINARY, it is in system.h.
2872 * identifiers.c: Moved from gcc/cpphash.c.
2873 * internal.h: Moved from gcc/cpphash.h. Change header
2874 guard name. All other files adjusted to match name change.
2875 * init.c: Moved from gcc/cppinit.c.
2876 (init_library) [ENABLE_NLS]: Call bindtextdomain.
2877 * lex.c: Moved from gcc/cpplex.c.
2878 * directives.c: Moved from gcc/cpplib.c.
2879 * macro.c: Moved from gcc/cppmacro.c.
2880 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
2881 * traditional.c: Moved from gcc/cpptrad.c.
2882 * ucnid.h: Moved from gcc/cppucnid.h. Change header
2883 guard name.
2884 * ucnid.pl: Moved from gcc/cppucnid.pl.
2885 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
2886 guard name.
2887 * symtab.c: Moved from gcc/hashtable.c.
2888 * line-map.c: Moved from gcc. Do not include intl.h.
2889 * mkdeps.c: Moved from gcc.
2890 * system.h: New file.
c84ca916 2891 * include/cpplib.h: Moved from gcc. Change header guard name.
2892 * include/line-map.h: Moved from gcc. Change header guard name.
2893 * include/mkdeps.h: Moved from gcc. Change header guard name.
2894 * include/symtab.h: Moved from gcc/hashtable.h. Change header
2895 guard name.