]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
Revert "PR bootstrap/53459 - unused local typedef when building on altivec"
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
828a7f76
DS
12012-05-29 Dodji Seketeli <dodji@redhat.com>
2
3 PR preprocessor/53229
4 * internal.h (cpp_reader::set_invocation_location): Remove.
5 (cpp_reader::about_to_expand_macro_p): New member flag.
6 * directives.c (do_pragma): Remove Kludge as
7 pfile->set_invocation_location is no more.
8 * macro.c (cpp_get_token_1): Do away with the use of
9 cpp_reader::set_invocation_location. Just collect the macro
10 expansion point when we are about to expand the top-most macro.
11 Do not override cpp_reader::about_to_expand_macro_p.
12 This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
13 properly handle locations of expansion points.
14 (cpp_get_token_with_location): Adjust, as
15 cpp_reader::set_invocation_location is no more.
16 (paste_tokens): Take a virtual location parameter for
17 the LHS of the pasting operator. Use it in diagnostics. Update
18 comments.
19 (paste_all_tokens): Tighten the assert. Propagate the location of
20 the expansion point when no virtual locations are available.
21 Pass the virtual location to paste_tokens.
22 (in_macro_expansion_p): New static function.
23 (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
24 flag until we really start expanding the macro.
25
0b2c4be5
DS
262012-05-16 Dodji Seketeli <dodji@redhat.com>
27
28 PR preprocessor/7263
29 * include/cpplib.h (cpp_classify_number): Take a location
30 parameter.
31 * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
32 macros that take a location parameter.
33 (cpp_classify_number): Take a (virtual) location parameter. Use
34 it for diagnostics. Adjust comments.
35 (eval_token): Take a location parameter. Pass it to
36 cpp_classify_number and to diagnostic routines.
37 (_cpp_parse_expr): Use virtual locations of tokens when parsing
38 expressions. Pass a virtual location to eval_token and to
39 diagnostic routines.
40
638d2065
TG
412012-05-10 Tristan Gingold <gingold@adacore.com>
42
43 * expr.c (interpret_float_suffix): Add a guard.
44
3ad64f53
DS
452012-05-02 Dodji Seketeli <dodji@redhat.com>
46
47 Properly initialize cpp_context in destringize_and_run
48 * directives.c (destringize_and_run): Properly initialize the new
49 context.
50 * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
51 the initial base context, which has the same life time as the
52 current instance of cpp_file.
53
b193dfa8
MLI
542012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
55 Dodji Seketeli <dodji@seketeli.org>
56
3efc2959 57 PR c++/52974
b193dfa8
MLI
58 * libcpp/files.c (maybe_shorter_path): New.
59 (find_file_in_dir): Use it.
60
4e65a470
DS
612012-04-30 Dodji Seketeli <dodji@redhat.com>
62
51fce2d3
DS
63 Switch -ftrack-macro-expansion=2 on by default.
64 * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
65 by default. Add comments.
66
c4ca1a09
DS
67 Strip "<built-in>" loc from displayed expansion context
68 * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
69 in comment.
70 (linemap_unwind_to_first_non_reserved_loc): Declare new function.
71 * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
72 new function.
73
3600218c
DS
74 Fix expansion point loc for macro-like tokens
75 * macro.c (macro_of_context): New static function.
76 (_cpp_push_token_context, push_extended_tokens_context): If the
77 macro argument is NULL, it means we are continuing the expansion
78 of the current macro, if any. Update comments.
79 (_cpp_pop_context): Re-enable expansion of the macro only when we
80 are really out of the context of the current expansion.
81
0ff2b8a0
DS
82 Fix token pasting with -ftrack-macro-expansion
83 * macro.c (paste_all_tokens): Put the token resulting from pasting
84 into an extended token context with -ftrack-macro-location is in
85 effect.
86
4e65a470
DS
87 Fix cpp_sys_macro_p with -ftrack-macro-expansion
88 * macro.c (cpp_sys_macro_p): Support -ftrack-macro-expansion.
89
112448b4
DS
902012-04-29 Dodji Seketeli <dodji@redhat.com>
91
92 * lex.c (lex_raw_string): Change C++ style comments into C style
93 comments.
94 (lex_string): Likewise.
95
7f5f5f98
OW
962012-04-27 Ollie Wild <aaw@google.com>
97
98 * include/cpplib.h (struct cpp_options): Add new field,
99 warn_literal_suffix.
100 (CPP_W_LITERAL_SUFFIX): New enum.
101 * init.c (cpp_create_reader): Default initialization of
102 warn_literal_suffix.
103 * lex.c (lex_raw_string): Treat user-defined literals which don't
104 begin with '_' as separate tokens and produce a warning.
105 (lex_string): Ditto.
106
1d72e96f
MLI
1072012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
108
109 * line-map.c (linemap_resolve_location): Synchronize comments with
110 those in line-map.h.
111 * include/line-map.h (linemap_resolve_location): Fix spelling in
112 comment.
113
e75b54a2
RE
1142012-03-22 Richard Earnshaw <rearnsha@arm.com>
115
116 * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
117
7888f266
RO
1182012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
119
120 * lex.c: Remove Solaris 8 reference.
121
dd552284
WL
1222012-02-14 Walter Lee <walt@tilera.com>
123
124 * configure.ac: Require 64-bit hwint for tilegx and tilepro.
125 * configure: Regenerate.
126
2c5cbc31
RG
1272012-01-09 Richard Guenther <rguenther@suse.de>
128
129 * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
130
b492b686
GF
1312012-01-09 Gary Funck <gary@intrepid.com>
132
133 PR preprocessor/33919
134 * files.c (_cpp_get_file_name): New. Implement file name
135 access function.
136 * internal.h (_cpp_get_file_name): New prototype.
137 * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
138 to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
139
75291c57
OH
1402012-01-03 Olivier Hainque <hainque@adacore.com>
141
142 * system.h: Prior to #define, #undef fopen and freopen unconditionally.
143
48b0b196
JM
1442011-12-20 Joseph Myers <joseph@codesourcery.com>
145
146 * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
147 (CLK_STDC1X): Change to CLK_STDC11.
148 * init.c (lang_defaults): Update comments.
149 (cpp_init_builtins): Update language tests. Use 201112L for C11
150 __STDC_VERSION__.
151
4a5e00ca
AS
1522011-12-20 Andreas Schwab <schwab@linux-m68k.org>
153
154 * configure: Regenerate.
155
095af58f
AS
1562011-12-19 Andreas Schwab <schwab@linux-m68k.org>
157
158 * configure: Regenerate.
159
b0c084b7
JJ
1602011-12-07 Jakub Jelinek <jakub@redhat.com>
161
162 PR bootstrap/50237
163 * internal.h (_cpp_init_lexer): New prototype.
164 * init.c (init_library): Call it.
165 * lex.c (init_vectorized_lexer): Remove constructor attribute,
166 add inline keyword.
167 (HAVE_init_vectorized_lexer): Define.
168 (_cpp_init_lexer): New function.
169
9b554be9
DS
1702011-12-03 Dodji Seketeli <dodji@redhat.com>
171
172 * macro.c (tokens_buff_remove_last_token)
173 (tokens_buff_put_token_to): Add an 'inline' function specifier to
174 the prototype.
175
8dcf72a8
DN
1762011-11-22 Diego Novillo <dnovillo@google.com>
177
178 * include/line-map.h (linemap_dump): Declare.
179 (line_table_dump): Declare.
180 * line-map.c (linemap_dump): New.
181 (line_table_dump): New.
182
7e74ce3f
ESR
1832011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
184
185 PR c++/50958
186 * expr.c (cpp_userdef_char_remove_type): Fix typo.
187
e9411247
MM
1882011-11-03 Michael Matz <matz@suse.de>
189
190 PR bootstrap/50857
191 * configure.ac: Check for -fno-exceptions -fno-rtti.
192 * configure: Regenerate.
193 * Makefile.in (NOEXCEPTION_FLAGS): New flag.
194 (ALL_CXXFLAGS): Use it.
195
0c1dace3
PC
1962011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
197
198 * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
199
25339f10
JM
2002011-11-02 Jason Merrill <jason@redhat.com>
201
202 PR c++/50810
203 * configure.ac: Add -Wno-narrowing to warning options.
204
97e3ad20
JM
2052011-10-31 Jason Merrill <jason@redhat.com>
206
1fb80b0c
JM
207 PR libstdc++/1773
208 * init.c (cpp_init_builtins): Set __cplusplus for C++11.
209
97e3ad20
JM
210 PR c++/50920
211 * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
212 CLK_GNUCXX0X to CLK_GNUCXX11.
213
3ce4f9e4
ESR
2142011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
215
216 Implement C++11 user-defined literals.
217 * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
218 cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
219 cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
220 cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
221 (cpp_classify_number): Classify unrecognized tokens as user-defined
222 literals.
223 * include/cpplib.h: Add new tokens for user-defined literals.
224 * init.c: Add new preprocessor flag (cxx11).
225 * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
226 including concatenation and promotion with suffixes.
227
3bb0c8db
DS
2282011-10-24 Dodji Seketeli <dodji@redhat.com>
229
230 * line-map.c (linemap_macro_map_lookup): Fix logic.
231
84756fd4
DS
2322011-10-24 Dodji Seketeli <dodji@redhat.com>
233
234 * include/line-map.h (linemap_expand_location): Take a line table
235 parameter. Update comment.
236 (linemap_resolve_location): Update comment.
237 (linemap_expand_location_full): Remove.
238 * line-map.c (linemap_resolve_location): Handle reserved
239 locations; return a NULL map in those cases.
240 (linemap_expand_location): If location is reserved, return a
241 zeroed expanded location. Update comment. Take a line table to
242 assert that the function takes non-virtual locations only.
243 (linemap_expand_location_full): remove.
244 (linemap_dump_location): Handle the fact that
245 linemap_resolve_location can return NULL line maps when the
246 location resolves to a reserved location.
247
248 * line-map.c (linemap_macro_map_lookup): Fix logic.
249
ad2305ad
DS
2502011-10-22 Dodji Seketeli <dodji@redhat.com>
251
252 PR bootstrap/50778
253 * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
254 context to act upon.
255 * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update
256 comment.
257 (cpp_token_from_context_at): Likewise.
258 (cpp_peek_token): Use the context to peek tokens from.
259
cbbcf655
DS
2602011-10-20 Dodji Seketeli <dodji@redhat.com>
261
262 PR bootstrap/50801
263 * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
264 number of tokens.
265
d17687f6
DS
2662011-10-18 Dodji Seketeli <dodji@redhat.com>
267
268 PR bootstrap/50760
269 * include/line-map.h (struct linemap_stats): Change the type of
270 the members from size_t to long.
271 * macro.c (macro_arg_token_iter_init): Unconditionally initialize
272 iter->location_ptr.
273
411f92de
DS
2742011-10-17 Dodji Seketeli <dodji@redhat.com>
275
276 * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
277 variable without using it if ENABLE_CHECKING is not defined. Mark
278 the LOCATION parameter as being unused.
279
b9bd6f74
TT
2802011-10-15 Tom Tromey <tromey@redhat.com>
281 Dodji Seketeli <dodji@redhat.com>
282
283 * include/line-map.h (struct line_maps::alloced_size_for_request):
284 New member.
285 * line-map.c (new_linemap): Use set->alloced_size_for_request to
286 get the actual allocated size of line maps.
287
64a1a422
TT
2882011-10-15 Tom Tromey <tromey@redhat.com>
289 Dodji Seketeli <dodji@redhat.com>
290
291 * line-map.h (struct linemap_stats): Declare new struct.
292 (linemap_get_statistics): Declare ...
293 * line-map.c (linemap_get_statistics): ... new function.
294 * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
295 Declare new counters.
296 (enter_macro_context, replace_args): Update
297 num_macro_tokens_counter.
298 (cpp_get_token_1): Update num_expanded_macros_counter.
299
847e697a
TT
3002011-10-15 Tom Tromey <tromey@redhat.com>
301 Dodji Seketeli <dodji@redhat.com>
302
303 * include/cpplib.h (struct cpp_options)<debug>: New struct member.
304 * include/line-map.h (linemap_dump_location): Declare ...
305 * line-map.c (linemap_dump_location): ... new function.
306
92582b75
TT
3072011-10-15 Tom Tromey <tromey@redhat.com>
308 Dodji Seketeli <dodji@redhat.com>
309
310 * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
311 New option.
312 * internal.h (struct macro_context): New struct.
313 (enum context_tokens_kind): New enum.
314 (struct cpp_context)<tokens_kind>: New member of type enum
315 context_tokens_kind.
316 (struct cpp_context)<macro>: Remove this. Replace it with an enum
317 of macro and macro_context.
318 (struct cpp_context)<direct_p>: Remove.
319 (_cpp_remaining_tokens_num_in_context): Declare new function.
320 * directives.c (destringize_and_run): Adjust.
321 * lex.c (_cpp_remaining_tokens_num_in_context)
322 (_cpp_token_from_context_at): Define new functions
323 (cpp_peek_token): Use them.
324 * init.c (cpp_create_reader): Initialize the base context to zero.
325 (_cpp_token_from_context_at): Define new static function.
326 (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
327 _cpp_token_from_context_at.
328 * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
329 members.
330 (enum macro_arg_token_kind): New enum.
331 (struct macro_arg_token_iter): New struct.
332 (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
333 (alloc_expanded_arg_mem, ensure_expanded_arg_room)
334 (delete_macro_args, set_arg_token, get_arg_token_location)
335 (arg_token_ptr_at, macro_arg_token_iter_init)
336 (macro_arg_token_iter_get_token)
337 (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
338 (expanded_token_index, tokens_buff_new, tokens_buff_count)
339 (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
340 (tokens_buff_add_token, tokens_buff_remove_last_token)
341 (reached_end_of_context, consume_next_token_from_context): New
342 static functions.
343 (cpp_get_token_1): New static function. Split and extended from
344 cpp_get_token. Use reached_end_of_context and
345 consume_next_token_from_context. Unify its return point. Move
346 the location tweaking from cpp_get_token_with_location in here.
347 (cpp_get_token): Use cpp_get_token_1
348 (stringify_arg): Use the new arg_token_at.
349 (paste_all_tokens): Support tokens coming from extended tokens
350 contexts.
351 (collect_args): Return the number of collected arguments, by
352 parameter. Store virtual locations of tokens that constitute the
353 collected args.
354 (funlike_invocation_p): Return the number of collected arguments,
355 by parameter.
356 (enter_macro_context): Add a parameter for macro expansion point.
357 Pass it to replace_args and to the "used" cpp callback. Get the
358 number of function-like macro arguments from funlike_invocation_p,
359 pass it to the new delete_macro_args to free the memory used by
360 macro args. When -ftrack-macro-expansion is in effect, for macros
361 that have no arguments, create a macro map for the macro expansion
362 and use it to allocate proper virtual locations for tokens
363 resulting from the expansion. Push an extended tokens context
364 containing the tokens resulting from macro expansion and their
365 virtual locations.
366 (replace_args): Rename the different variables named 'count' into
367 variables with more meaningful names. Create a macro map;
368 allocate virtual locations of tokens resulting from this
369 expansion. Use macro_arg_token_iter to iterate over tokens of a
370 given macro. Handle the case of the argument of
371 -ftrack-macro-expansion being < 2. Don't free macro arguments
372 memory resulting from expand_arg here, as these are freed by the
373 caller of replace_arg using delete_macro_args now. Push extended
374 token context.
375 (next_context, push_ptoken_context, _cpp_push_token_context)
376 (_cpp_push_text_context): Properly initialize the context.
377 (expand_arg): Use the new alloc_expanded_arg_mem,
378 push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
379 (_cpp_pop_context): Really free the memory held by the context.
380 Handle freeing memory used by extended tokens contexts.
381 (cpp_get_token_with_location): Use cpp_get_token_1.
382 (cpp_sys_macro_p): Adjust.
383 (_cpp_backup_tokens): Support the new kinds of token contexts.
384 * traditional.c (recursive_macro): Adjust.
385
46427374
TT
3862011-10-15 Tom Tromey <tromey@redhat>
387 Dodji Seketeli <dodji@redhat.com>
388
389 * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
390 member.
391 (MAX_SOURCE_LOCATION): New constant.
392 (struct line_map_ordinary, struct line_map_macro): New structs.
393 (struct line_map): Turn this into a union of the two above. Add
394 comments.
395 (struct maps_info): New struct.
396 (struct line_maps)<info_ordinary, info_macro>: Two new fields.
397 These now carry the map information that was previously scattered
398 in struct line_maps.
399 (struct map_info::allocated): Fix comment.
400 (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
401 (ORDINARY_MAP_STARTING_LINE_NUMBER)
402 (ORDINARY_MAP_INCLUDER_FILE_INDEX)
403 (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
404 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
405 (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
406 (MACRO_MAP_EXPANSION_POINT_LOCATION)
407 (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
408 (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
409 (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
410 (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
411 (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
412 (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
413 (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
414 (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
415 (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
416 (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
417 (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
418 information.
419 (linemap_check_ordinary, linemap_assert)
420 (linemap_location_before_p): New macros.
421 (linemap_position_for_line_and_column)
422 (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
423 (linemap_macro_expansion_map_p)
424 (linemap_macro_map_loc_to_def_point)
425 (linemap_macro_map_loc_unwind_once)
426 (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
427 (linemap_get_source_line linemap_get_source_column)
428 (linemap_map_get_macro_name, linemap_get_file_path)
429 (linemap_location_in_system_header_p)
430 (linemap_location_from_macro_expansion_p): Declare new functions.
431 (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
432 (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
433 accessors act on ordinary maps only.
434 (INCLUDED_FROM): Return NULL for main files; use the new
435 accessors.
436 (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
437 (struct expanded_location): Move here from gcc/input.h
438 (linemap_resolve_location, linemap_expand_location)
439 (linemap_expand_location_full): Declare new functions.
440 * line-map.c: Include cpplib.h, internal.h
441 (linemap_enter_macro, linemap_add_macro_token)
442 (linemap_get_expansion_line, linemap_get_expansion_filename): New
443 functions that are private to libcpp.
444 (linemap_assert): New macro.
445 (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
446 (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
447 (linemap_macro_map_loc_unwind_toward_spelling)
448 (linemap_macro_map_loc_to_exp_point)
449 (first_map_in_common_1, first_map_in_common): New static
450 functions.
451 (new_linemap): Define new static functions. Extracted and
452 enhanced from ...
453 (linemap_add): ... here. Use linemap_assert in lieu of abort
454 previously.
455 (linemap_tracks_macro_expansion_locs_p)
456 (linemap_add_macro_token, linemap_macro_expansion_map_p)
457 (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
458 (linemap_macro_map_loc_to_def_point)
459 (linemap_macro_map_loc_unwind_once)
460 (linemap_step_out_once, linemap_map_get_index)
461 (linemap_get_source_line,linemap_get_source_column)
462 (linemap_get_file_path, linemap_map_get_macro_name)
463 (linemap_location_in_system_header_p)
464 (linemap_location_originated_from_system_header_p)
465 (linemap_location_from_macro_expansion_p)
466 (linemap_tracks_macro_expansion_locs_p)
467 (linemap_resolve_location, linemap_expand_location)
468 (linemap_expand_location_full)
469 (linemap_tracks_macro_expansion_locs_p)
470 (linemap_position_for_line_and_column, linemap_compare_locations):
471 Define new public functions.
472 (linemap_init): Initialize ordinary and macro maps information in
473 the map set.
474 (linemap_check_files_exited): Use the new accessors.
475 (linemap_free): Remove this dead code.
476 (linemap_line_start): Assert this uses an ordinary map. Adjust to
477 use the new ordinary map accessors and data structures. Don't
478 overflow past the lowest possible macro token's location.
479 (linemap_position_for_column): Assert the ordinary maps of the map
480 set are really ordinary. Use ordinary map accessors.
481 (linemap_lookup): Keep the same logic but generalize to allow
482 lookup of both ordinary and macro maps. Do not crash when called
483 with an empty line table.
484 * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
485 new API of line-map.h.
486 * directives.c (start_directive, do_line, do_linemarker)
487 (do_linemarker): Likewise.
488 * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
489 (make_cpp_dir, cpp_make_system_header): Likewise.
490 * init.c (cpp_read_main_file): Likewise.
491 * internal.h (CPP_INCREMENT_LINE): Likewise.
492 (linemap_enter_macro, linemap_add_macro_token)
493 (linemap_get_expansion_line, linemap_get_expansion_filename): New
494 functions private to libcpp.
495 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
496 (skip_line_comment, skip_whitespace, lex_raw_string)
497 (_cpp_lex_direct): Likewise.
498 * macro.c (_cpp_builtin_macro_text): Likewise.
499 (_cpp_aligned_alloc): Initialize the new name member of the macro.
500 * traditional.c (copy_comment, _cpp_scan_out_logical_line):
501 Likewise.
502 * errors.c (cpp_diagnostic): Adjust to new linemap API.
503
892a371f
DS
5042011-08-28 Dodji Seketeli <dodji@redhat.com>
505
506 * line-map.c (linemap_add): Assert that reason must not be
507 LC_RENAME when called for the first time on a "main input file".
508
e3dfef44
GC
5092011-08-22 Gabriel Charette <gchare@google.com>
510
511 * init.c (cpp_create_reader): Inititalize forced_token_location_p.
512 * internal.h (struct cpp_reader): Add field forced_token_location_p.
513 * lex.c (_cpp_lex_direct): Use forced_token_location_p.
514 (cpp_force_token_locations): New.
515 (cpp_stop_forcing_token_locations): New.
516
32fe396e
RO
5172011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
518
519 PR libstdc++/1773
520 * init.c (cpp_init_builtins): Define __cplusplus 19971L.
521
7c1ffff9
JM
5222011-08-18 Joseph Myers <joseph@codesourcery.com>
523
524 * include/cpplib.h (struct cpp_options): Fix typo.
525
a48e3dd1
JM
5262011-08-18 Joseph Myers <joseph@codesourcery.com>
527
528 * include/cpplib.h (struct cpp_options): Add rliterals.
529 * init.c (struct lang_flags, lang_defaults): Add rliterals.
530 (cpp_set_lang): Set rliterals option.
531 (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
532 * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
533
3f6ced10
GC
5342011-08-15 Gabriel Charette <gchare@google.com>
535
536 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
537 Update all users to use linemap_position_for_column instead.
538
0681d04c
GC
5392011-07-28 Gabriel Charette <gchare@google.com>
540
541 * include/line-map.h (struct line_maps):
542 Remove unused field last_listed. Update all users.
543
5e9627ca
L
5442011-07-28 H.J. Lu <hongjiu.lu@intel.com>
545
546 * configure.ac: Set need_64bit_hwint to yes for x86 targets.
547 * configure: Regenerated.
548
a024b70f
RO
5492011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
550
551 * system.h [__cplusplus]: Wrap C function declarations in extern "C".
552
5b6d595b
RO
5532011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
554 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
555
556 PR bootstrap/49794
557 * configure.ac: Test AM_ICONV with CXX.
558 * configure: Regenerate.
559 * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
560
d0a9fbe1
DS
5612011-07-15 Dodji Seketeli <dodji@redhat.com>
562
563 * directives.c (struct if_stack): Use source_location as type
564 here.
565 * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
566 indent, def_pragma, used_define, used_undef>: Properly use
567 source_location as parameter type, rather than unsigned int.
568
fbdd5d87
RO
5692011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
570
571 PR target/39150
572 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
573 like i[34567]86-*-solaris2.1[0-9]*.
574 * configure: Regenerate.
575
8787a05a
JM
5762011-06-16 Jason Merrill <jason@redhat.com>
577
578 PR c++/45399
579 * lex.c (lex_raw_string): Don't check for embedded NUL.
580
38fbfaf6
DS
5812011-06-06 Dodji Seketeli <dodji@redhat.com>
582
583 PR preprocessor/48532
584 * directives.c (do_pragma): Don't forget the invocation location
585 when parsing the pragma name of a namespaced pragma directive.
586
fc0993ac
JT
5872011-05-29 John Tytgat <John.Tytgat@aaug.net>
588
589 * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
590
ef230b38
UB
5912011-05-22 Uros Bizjak <ubizjak@gmail.com>
592
593 PR target/49104
594 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
595 is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
596
e5b0dad8
JK
5972011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com>
598
599 * system.h (ENUM_BITFIELD): Remove.
600
6cfae070
JJ
6012011-04-24 Jakub Jelinek <jakub@redhat.com>
602
603 PR preprocessor/48740
604 * lex.c (lex_raw_string): When raw string ends with
605 ??) followed by raw prefix and ", ensure it is preprocessed
606 with ??) rather than ??].
607
04695783
JM
6082011-04-20 Jim Meyering <meyering@redhat.com>
609
610 * files.c (destroy_cpp_file): Remove useless if-before-free.
611 * init.c (cpp_destroy): Likewise.
612 * macro.c (replace_args): Likewise.
613 * pch.c (cpp_valid_state): Likewise.
614
4489800d
KT
6152011-03-25 Kai Tietz <ktietz@redhat.com>
616
617 * files.c (file_hash_eq): Use filename_cmp
618 instead of strcmp.
619 (nonexistent_file_hash_eq): Likewise.
620 (remap_filename): Likewise.
621 Handle absolute DOS-path,
622 (append_file_to_dir): Check for IS_DIR_SEPARATOR
623 instead of slash.
624 (read_name_map): Likewise.
625 * linemap.c (linemap_add): Use filename_cmp
626 instead of strcmp.
627 * mkdeps.c (apply_vpath): Use filename_ncmp
628 instead of strncmp.
629 (deps_restore): Use filename_cmp instead of
630 strcmp.
631 * init.c (read_original_directory): Use
632 IS_DIR_SEPARATOR instead of checking for slash.
633
f3c33d9d
MM
6342011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
635
636 PR preprocessor/48192
637 * directives.c (do_ifdef): Do not consider conditional macros as
638 being defined.
639 (do_ifndef): Ditto.
640 * expr.c (parse_defined): Ditto.
641
01956319
RH
6422011-03-18 Richard Henderson <rth@redhat.com>
643
644 PR bootstrap/45381
645 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
646
c5a62c6f
EB
6472011-11-04 Eric Botcazou <ebotcazou@adacore.com>
648 Jakub Jelinek <jakub@redhat.com>
649
650 PR preprocessor/39213
651 * directives.c (end_directive): Call _cpp_remove_overlay for deferred
652 pragmas as well in traditional mode.
653
0e1a989c
ILT
6542010-11-17 Ian Lance Taylor <iant@google.com>
655
656 PR bootstrap/45538
657 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of
658 AC_LANG based on ENABLE_BUILD_WITH_CXX.
659
651a20b5
KT
6602010-11-16 Kai Tietz <kai.tietz@onevision.com>
661
662 PR preprocessor/17349
663 * lex.c (save_comment): Handle in argument passing c++
664 comments special.
665
480767a9
ILT
6662010-11-02 Ian Lance Taylor <iant@google.com>
667
668 * configure.ac: Use AC_SYS_LARGEFILE.
669 * configure: Rebuild.
670 * config.in: Rebuild.
671
078419c9 6722010-10-19 Basile Starynkevitch <basile@starynkevitch.net>
480767a9 673
078419c9
BS
674 * line-map.h (source_location): Remove obsolete comment
675 mentioning location_s.
676
d6874138
KT
6772010-09-29 Kai Tietz <kai.tietz@onevision.com>
678
679 PR preprocessor/45362
680 * directives.c (cpp_pop_definition): Make static.
681 (do_pragma_push_macro): Reworked to store text
682 definition.
683 (do_pragma_pop_macro): Add free text definition.
684 (cpp_push_definition): Removed.
685 * include/cpplib.h (cpp_push_definition): Removed.
686 (cpp_pop_definition): Likewise.
687 * internal.h (def_pragma_macro): Remove member 'value'
688 and add new members 'definition', 'line',
689 'syshdr', 'sued' and 'is_undef'.
690 * pch.c (_cpp_restore_pushed_macros): Rework to work
691 on text definition and store additional macro flags.
692 (_cpp_save_pushed_macros): Likewise.
693
e3339d0f
JM
6942010-09-29 Joseph Myers <joseph@codesourcery.com>
695
696 * include/cpplib.h (cpp_options): Rename warn_deprecated,
697 warn_traditional, warn_long_long and pedantic.
698 * directives.c (directive_diagnostics, _cpp_handle_directive):
699 Update names of cpp_options members.
700 * expr.c (cpp_classify_number, eval_token): Update names of
701 cpp_options members.
702 * init.c (cpp_create_reader, post_options): Update names of
703 cpp_options members.
704 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
705 cpp_options members.
706 * macro.c (parse_params): Update names of cpp_options members.
707
128465e6
ILT
7082010-09-15 Ian Lance Taylor <iant@google.com>
709
710 * init.c: Fix type name in comment.
711
a69d2520
JJ
7122010-08-31 Jakub Jelinek <jakub@redhat.com>
713
714 PR preprocessor/45457
715 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
716 needed.
717 * directives.c (do_ifdef, do_ifndef): Likewise.
718
707bcb7a
RO
7192010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
720
721 * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
722
6f173e52
RH
7232010-08-24 Richard Henderson <rth@redhat.com>
724
725 PR bootstrap/45376
726 * configure.ac (HAVE_SSE4): New check.
727 * configure, config.in: Rebuild.
728 * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
729
789d73cb
RO
7302010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
731
732 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
733 etc. on Solaris 2/x86.
734
246a2fcb
RH
7352010-08-21 Richard Henderson <rth@redhat.com>
736 Andi Kleen <ak@linux.intel.com>
737 David S. Miller <davem@davemloft.net>
738
739 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
740 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
741 (ptrdiff_t): Check via AC_CHECK_TYPE.
742 * config.in, configure: Rebuild.
743 * system.h: Include stdint.h, if available.
744 * lex.c (WORDS_BIGENDIAN): Provide default.
745 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
746 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
747 search_line_sse2, search_line_sse42, init_vectorized_lexer,
748 search_line_fast): New.
749 (_cpp_clean_line): Use search_line_fast. Restructure the fast
750 loop to make it clear when we're leaving the loop. Stay in the
751 fast loop for non-trigraph '?'.
752
8e680db5
JJ
7532010-06-11 Jakub Jelinek <jakub@redhat.com>
754
755 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
756 callback.
757 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
758 (cpp_macro_definition): Remove const qual from second argument.
759 * macro.c (enter_macro_context): Call user_builtin_macro callback for
760 NODE_BUILTIN !NODE_USED macros.
761 (warn_of_redefinition): Likewise. Remove const qual from second
762 argument.
763 (cpp_macro_definition): Likewise.
764 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
765 for NODE_BUILTIN !NODE_USED macros.
766
1cb42611
JM
7672010-06-10 Joseph Myers <joseph@codesourcery.com>
768
769 * include/cpplib.h (struct cpp_options): Remove show_column.
770 * init.c (cpp_create_reader, post_options): Don't set show_column.
771
ff5dfc48
JR
7722010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
773
774 PR bootstrap/44432
775 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
776 check that C++ compiler works.
777 * configure: Regenerate.
778
a9429e29
LB
7792010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
780
781 * include/symtab.h (ht_identifier_ptr): New.
782
c3f247f4
RW
7832010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
784 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
785
786 PR bootstrap/42798
787 * configure.ac: Check for declaration of 'basename(char *)'.
788 * configure: Regenerate.
789 * config.in: Regenerate.
790
2778d766
JM
7912010-04-25 Joseph Myers <joseph@codesourcery.com>
792
793 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
794 * init.c (lang_defaults): Add entries for new language variants.
795 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
796 variants.
797
d8a12e84
MLI
7982010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
799
800 PR cpp/43195
801 * files.c (report_missing_guard): Test for #pragma once.
802
87cf0651
SB
8032010-04-07 Simon Baldwin <simonb@google.com>
804
805 * directives.c (do_diagnostic): Add warning reason argument,
806 call appropriate error reporting function for code.
807 (directive_diagnostics): Call specific warning functions with
808 warning reason where appropriate.
809 (do_error, do_warning, do_pragma_dependency): Add warning reason
810 argument to do_diagnostic calls.
811 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
812 _cpp_create_definition): Call specific warning functions with
813 warning reason where appropriate.
814 * Makefile.in: Add new diagnostic functions to gettext translations.
815 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
816 to error callback.
817 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
818 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
819 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
820 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
821 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
822 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
823 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
824 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
825 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
826 warning reason codes.
827 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
828 cpp_warning_with_line, cpp_pedwarning_with_line,
829 cpp_warning_with_line_syshdr): New specific error reporting functions.
830 * pch.c (cpp_valid_state): Call specific warning functions with
831 warning reason where appropriate.
832 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
833 diagnostic handlers.
834 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
835 cpp_warning_with_line, cpp_pedwarning_with_line,
836 cpp_warning_with_line_syshdr): New specific error reporting functions.
837 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
838 specific warning functions with warning reason where appropriate.
839 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
840 warn_about_normalization, lex_identifier_intern, lex_identifier,
841 _cpp_lex_direct): Ditto.
842 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
843 narrow_str_to_charconst): Ditto.
844
d947ada0
JJ
8452010-04-06 Jakub Jelinek <jakub@redhat.com>
846
847 PR preprocessor/43642
848 * lex.c (lex_raw_string): Change type of TYPE variable to
849 unsigned char.
850
4d9e8446
RW
8512010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
852
853 * aclocal.m4: Regenerate.
854
52150625
JM
8552010-03-29 Jason Merrill <jason@redhat.com>
856
00a81b8b
JM
857 More N3077 raw string changes
858 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
859 strings.
860 * lex.c (bufring_append): Split out from...
861 (lex_raw_string): ...here. Undo trigraph and line splicing
862 transformations. Do process line notes in multi-line literals.
863 (_cpp_process_line_notes): Ignore notes that were already handled.
864
52150625
JM
865 Some raw string changes from N3077
866 * charset.c (cpp_interpret_string): Change inner delimiters to ().
867 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
868
709d7160
JJ
8692010-02-11 Jakub Jelinek <jakub@redhat.com>
870
871 * init.c (read_original_filename): Don't call read_original_directory
872 if _cpp_handle_directive returns 0.
873
dadab4fd
JM
8742010-01-01 Joseph Myers <joseph@codesourcery.com>
875
876 PR preprocessor/41947
877 * expr.c (cpp_classify_number): Give error for hexadecimal
878 floating-point constant with no digits before or after point.
879
3de8a540
AC
8802009-11-20 Arnaud Charlet <charlet@adacore.com>
881
882 * macro.c (enter_macro_context): Call cb.used callback if defined.
883 * directives.c (do_idef, do_ifndef): Ditto.
884 * include/cpplib.h (struct cpp_callbacks): Add used callback.
885
17e7cb85
KT
8862009-11-11 Kai Tietz <kai.tietz@onevision.com>
887
888 * directives.c (do_pragma_push_macro): New pragma handler.
889 (do_pragma_pop_macro): Likewise.
890 (_cpp_init_internal_pragmas): Add push_macro and
891 pop_macro handler to internal pragmas.
892 (lex_macro_node_from_str): Removed.
893 (cpp_push_definition): Replace lex_macro_node_from_str
894 by _cpp_lex_identifier.
895 (cpp_pop_definition): Likewise.
896 * internal.h (_cpp_lex_identifier): New prototype.
897 (def_pragma_macro): New structure.
898 (cpp_reader): New member pushed_macros.
899 * lex.c (_cpp_lex_identifier): New function.
900 (lex_identifier_intern): New function.
901 * init.c (cpp_create_reader): Initialize pushed_macros
902 member.
903 (cpp_destroy): Free elements in pushed_macros member.
904 * pch.c (_cpp_save_pushed_macros): New function.
905 (_cpp_restore_pushed_macros): Likewise.
906 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
907 (cpp_read_state): Use _cpp_restore_pushed_macros.
908
2c6e3f55
JJ
9092009-10-19 Jakub Jelinek <jakub@redhat.com>
910
911 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
912 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
913 and char32_cset_desc.
914 (converter_for_type): Handle CPP_UTF8STRING.
915 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
916 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
917 (parse_include): Reject raw strings.
918 * include/cpplib.h (CPP_UTF8STRING): New token type.
919 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
920 * lex.c (lex_raw_string): New function.
921 (lex_string): Handle u8 string literals, call lex_raw_string
922 for raw string literals.
923 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
924 sequences.
925 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
926
96c169e1
JJ
9272009-10-14 Jakub Jelinek <jakub@redhat.com>
928
929 PR preprocessor/41543
930 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
931 * line-map.c (linemap_init): Initialize highest_location and
932 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
933
30c99a9e
JM
9342009-10-09 Jason Merrill <jason@redhat.com>
935
936 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
937
2214382c
NV
9382009-10-09 Neil Vachharajani <nvachhar@google.com>
939
940 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
941 sccs.
942
e02222d2
LR
9432009-09-23 Loren J. Rittle <ljrittle@acm.org>
944
945 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
946 * configure: Rebuilt.
947
9a8a2b7a
RG
9482009-09-22 Richard Guenther <rguenther@suse.de>
949
950 PR pch/38987
951 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
952
74dc6a11
CD
9532009-09-18 Chris Demetriou <cgd@google.com>
954
955 PR preprocessor/28435:
956 * include/cpplib.h (struct cpp_options): Add new member
957 deps.need_preprocessor_output.
958 * files.c (open_file_failed): If preprocessor output is needed
959 always report an error.
960
933608b7
KT
9612009-09-13 Kai Tietz <kai.tietz@onevision.com>
962
963 * configure.ac: Set for i?86-w64-mingw*
964 need_64bit_hwint to yes.
965 * configure: Regenerated.
966
86373e7e
JM
9672009-09-10 Jason Merrill <jason@redhat.com>
968
969 * directives.c (cpp_define): constify.
970
fd2ab214
ILT
9712009-09-02 Ian Lance Taylor <iant@google.com>
972
973 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
974
df58e648
RW
9752009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
976
977 * configure.ac (AC_PREREQ): Bump to 2.64.
978
5213506e
RW
9792009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
980
981 * aclocal.m4: Regenerate.
982 * config.in: Regenerate.
983 * configure: Regenerate.
984
709a22df
TT
9852009-08-17 Tom Tromey <tromey@redhat.com>
986
987 PR preprocessor/41067:
988 * charset.c (convert_escape): Add missing ":" to error text.
989
0c539b47
DR
9902009-07-27 Douglas B Rupp <rupp@gnat.com>
991
992 * include/cpplib.h (INO_T_CPP): New macro.
993 (struct cpp_dir): Use it.
994
2b69c841
JQ
9952009-07-20 Jerry Quinn <jlquinn@optonline.net>
996
997 PR regression/40800
998 * configure.ac: Use = instead of == for testing
999 ENABLE_BUILD_WITH_CXX.
1000 * configure: Rebuild.
1001
f1bf410c
JQ
10022009-07-17 Jerry Quinn <jlquinn@optonline.net>
1003
1004 * directives.c (do_linemarker, do_line): Use CPP_STRING for
1005 ignored enum value.
1006 * files.c (find_file_in_dir): Add cast from void* to char*.
1007 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
1008 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
1009 warnings.
1010 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
1011 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
1012 COMPILER_FLAGS): New.
1013 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
1014 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
1015 instead of ALL_CFLAGS.
1016 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
1017 from other warnings. Add -Wc++-compat to C-specific warnings.
1018 Check for --enable-build-with-cxx. Set and substitute
1019 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
1020 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
1021 AC_CHECK_HEADERS.
1022 * configure: Rebuild.
1023 * include/cpp-id-data.h: Remove extern "C".
1024 * include/line-map.h: Likewise.
1025 * include/mkdeps.h: Likewise.
1026 * include/symtab.h: Likewise.
1027 * internal.h: Likewise.
1028
a28fbdba
MLI
10292009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1030
1031 * directives.c (parse_include): Add location argument. Update all
1032 calls.
1033 (parse_answer): Likewise.
1034 (do_include_common): Error with exact location.
1035 (parse_assertion): Likewise.
1036
b506a5a2
MLI
10372009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1038
1039 * expr.c (num_div_op): Take explicit location.
1040
7d8847a4
ILT
10412009-06-17 Ian Lance Taylor <iant@google.com>
1042
1043 * include/cpplib.h (progname): Don't declare.
1044
3d8b2a98
ILT
10452009-06-12 Ian Lance Taylor <iant@google.com>
1046
1047 * include/cpplib.h (struct cpp_options): Add
1048 warn_cxx_operator_names field.
1049 (NODE_WARN_OPERATOR): Define.
1050 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
1051 type to 6 bits.
1052 * init.c (mark_named_operators): Add flags parameter.
1053 (cpp_post_options): Pick flags value to pass to
1054 mark_named_operators.
1055 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
1056 identifier is an operator name in C++.
1057
e74fe492
AH
10582009-06-01 Aldy Hernandez <aldyh@redhat.com>
1059
1060 * include/line-map.h (LAST_SOURCE_COLUMN): New.
1061
4851089f
ILT
10622009-06-01 Ian Lance Taylor <iant@google.com>
1063
1064 * include/cpp-id-data.h: Add extern "C".
1065 * include/line-map.h: Likewise.
1066 * include/mkdeps.h: Likewise.
1067 * include/symtab.h: Likewise.
1068 * internal.h: Likewise.
1069
7e5487a2
ILT
10702009-05-15 Ian Lance Taylor <iant@google.com>
1071
1072 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
1073 builtin_type. Change all uses.
1074
00b0c19b
MLI
10752009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1076
1077 PR cpp/36674
1078 * directives (do_linemarker): Compensate for the increment in
1079 location that occurs when we reach the end of line.
1080 * files (_cpp_stack_include): Mention _cpp_find_file in the
1081 comment.
1082
9a0c6187
JM
10832009-05-10 Joseph Myers <joseph@codesourcery.com>
1084
1085 * include/cpplib.h (enum cpp_token_fld_kind): Add
1086 CPP_TOKEN_FLD_TOKEN_NO.
1087 (struct cpp_macro_arg, struct cpp_identifier): Define.
1088 (union cpp_token_u): Use struct cpp_identifier for identifiers.
1089 Use struct cpp_macro_arg for macro arguments. Add token_no for
1090 CPP_PASTE token numbers.
1091 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
1092 do_pragma_poison, parse_assertion): Use val.node.node in place of
1093 val.node.
1094 * expr.c (parse_defined, eval_token): Use val.node.node in place
1095 of val.node.
1096 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
1097 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
1098 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
1099 place of val.arg_no. Use val.node.node in place of val.node.
1100 * macro.c (replace_args, cpp_get_token, parse_params,
1101 lex_expansion_token, create_iso_definition, cpp_macro_definition):
1102 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
1103 Use val.node.node in place of val.node.
1104
9e322bc1
JM
11052009-05-03 Joseph Myers <joseph@codesourcery.com>
1106
1107 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
1108 UTF-8 sequences.
1109
f88d0772
JM
11102009-04-25 Joseph Myers <joseph@codesourcery.com>
1111
1112 PR preprocessor/39559
1113 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
1114 constants larger than intmax_t in C99 mode.
1115
d1b38208
TG
11162009-04-21 Taras Glek <tglek@mozilla.com>
1117
1118 * include/cpp-id-data.h: Update GTY annotations to new syntax.
1119 * include/cpplib.h: Likewise.
1120 * include/line-map.h: Likewise.
1121 * include/symtab.h: Likewise.
1122
cfc93532
MLI
11232009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1124
1125 PR c++/14875
1126 * lex.c (cpp_type2name): Take a flags parameter. Call
1127 cpp_named_operator2name for named operators and cpp_digraph2name
1128 for digraphs.
1129 (cpp_digraph2name): New.
1130 (cpp_spell_token): Use it.
1131 (cpp_output_token): Likewise.
1132 * include/cpplib.h (cpp_type2name): Update declaration.
1133 * init.c (cpp_named_operator2name): New.
1134 * internal.h (cpp_named_operator2name): Declare.
1135
9c650d90
MLI
11362009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1137
1138 PR c++/13358
1139 * init.c (cpp_create_reader): Wlong_long is disabled by default.
1140 * expr.c (cpp_classify_number): Give different messages for C and
1141 C++ front-ends.
1142
aa508502
JM
11432009-04-19 Joseph Myers <joseph@codesourcery.com>
1144
1145 PR preprocessor/20078
1146 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
1147 field.
1148 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
1149 (struct cpp_token): Change flags to unsigned short.
1150 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
1151 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
1152 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
1153 tokens.
1154 * macro.c (macro_real_token_count): New.
1155 (enter_macro_context, replace_args): Use macro_real_token_count.
1156 (create_iso_definition): Record whitespace surrounding and digraph
1157 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
1158 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
1159 multiple consecutive ## tokens.
1160 (_cpp_create_definition): Initialize extra_tokens.
1161 (cpp_macro_definition): Use macro_real_token_count.
1162
61cc8223
JM
11632009-04-18 Joseph Myers <joseph@codesourcery.com>
1164
1165 * directives.c (parse_include): Pass true to check_eol.
1166
c7f9c0b9
JM
11672009-04-18 Joseph Myers <joseph@codesourcery.com>
1168
1169 PR preprocessor/39646
1170 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
1171 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
1172 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
1173 place of LC_RENAME.
1174
a5cb563b
JM
11752009-04-18 Joseph Myers <joseph@codesourcery.com>
1176
1177 PR preprocessor/39647
1178 * directives.c (check_eol): Add parameter expand.
1179 (do_undef, parse_include, do_line, do_linemarker, do_ident,
1180 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
1181 do_else, do_endif, do_assert, do_unassert): All callers changed.
1182 Pass true from do_line, false elsewhere.
1183
18f41a1b
JM
11842009-04-12 Joseph Myers <joseph@codesourcery.com>
1185
1186 PR preprocessor/31869
1187 * macro.c (stringify_arg): Handle NULL source token in padding
1188 token where previous padding token did not have source token with
1189 preceding whitespace.
1190
748086b7
JJ
11912009-04-09 Jakub Jelinek <jakub@redhat.com>
1192
1193 * Makefile.in: Change copyright header to refer to version
1194 3 of the GNU General Public License and to point readers at the
1195 COPYING3 file and the FSF's license web page.
1196 * charset.c: Likewise.
1197 * directives-only.c: Likewise.
1198 * directives.c: Likewise.
1199 * errors.c: Likewise.
1200 * expr.c: Likewise.
1201 * files.c: Likewise.
1202 * identifiers.c: Likewise.
1203 * include/cpp-id-data.h: Likewise.
1204 * include/cpplib.h: Likewise.
1205 * include/line-map.h: Likewise.
1206 * include/mkdeps.h: Likewise.
1207 * include/symtab.h: Likewise.
1208 * init.c: Likewise.
1209 * internal.h: Likewise.
1210 * lex.c: Likewise.
1211 * line-map.c: Likewise.
1212 * macro.c: Likewise.
1213 * makeucnid.c: Likewise.
1214 * mkdeps.c: Likewise.
1215 * pch.c: Likewise.
1216 * symtab.c: Likewise.
1217 * system.h: Likewise.
1218 * traditional.c: Likewise.
1219 * ucnid.tab: Likewise.
1220 * ucnid.h: Regenerate.
1221
eec49116
JJ
12222009-04-01 Janis Johnson <janis187@us.ibm.com>
1223
839a3b8a
JJ
1224 PR c/39027
1225 * include/cpplib.h (CPP_N_DEFAULT): Define.
1226 * expr.c (interpret_float_suffix): Recognize d or D for double,
1227 return new value for default.
1228 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
1229
eec49116
JJ
1230 PR c/33466
1231 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
1232 letters from decimal float and fixed-point suffixes.
1233
47580d22
JM
12342009-03-31 Joseph Myers <joseph@codesourcery.com>
1235
1236 PR preprocessor/15638
1237 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
1238 invalid PCH.
1239 (open_file_failed): Make error for missing file fatal.
1240 * include/cpplib.h (CPP_DL_FATAL): Define.
1241
5a2df0fa
SV
12422009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
1243
1244 PR preprocessor/31932:
1245 * internal.h: Don't mention HAVE_ICONV_H.
1246 * configure, config.in: Rebuild.
1247 * configure.ac: Don't check for iconv.h.
1248
c1a8a3c6
TT
12492009-03-30 Tom Tromey <tromey@redhat.com>
1250
1251 PR preprocessor/39512:
1252 * line-map.c (linemap_init): Initialize 'reallocator' field.
1253
a37a7b8a
JJ
12542009-03-30 Jakub Jelinek <jakub@redhat.com>
1255
1256 PR target/39558
1257 * macro.c (cpp_get_token): If macro_to_expand returns NULL
1258 and used some tokens, add CPP_PADDING before next token.
1259
148e4216
JM
12602009-03-29 Joseph Myers <joseph@codesourcery.com>
1261
1262 PR preprocessor/34695
1263 * makedepend.c: Remove.
1264 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
1265 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
1266 * directives.c (cpp_errors): Remove.
1267 * errors.c (print_location, _cpp_begin_message, v_message):
1268 Remove.
1269 (cpp_error, cpp_error_with_line): Always use error callback.
1270 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
1271 * include/cpplib.h (cpp_options): Remove pedantic_errors,
1272 inhibit_warnings, warn_system_headers, inhibit_errors,
1273 warnings_are_errors, client_diagnostic.
1274 (cpp_callbacks): Add extra arguments to error callback; make it
1275 return bool.
1276 (cpp_finish): Return void.
1277 (cpp_destroy): Remove inaccurate comment about return value.
1278 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
1279 (CPP_DL_NOTE): Define.
1280 * include/line-map.h (linemap_print_containing_files): Remove.
1281 * init.c (cpp_finish): Do not check for or return number of
1282 errors.
1283 * internal.h (cpp_reader): Remove errors field.
1284 * line-map.c (linemap_print_containing_files): Remove.
1285 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
1286 about previous definition. Only emit it if previous diagnostic
1287 was emitted.
1288
f1450211
JM
12892009-03-28 Joseph Myers <joseph@codesourcery.com>
1290
1291 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1292 mkinstalldirs.
1293
8f5929e1
JJ
12942009-03-18 Jakub Jelinek <jakub@redhat.com>
1295
1296 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1297
4bb09c26
JM
12982009-02-21 Joseph Myers <joseph@codesourcery.com>
1299
1300 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1301 header name.
1302 (_cpp_lex_direct): Handle this.
1303
68c9ab45
RG
13042009-02-15 Richard Guenther <rguenther@suse.de>
1305
1306 Revert last change.
1307
601b3e1a
RG
13082009-02-13 Richard Guenther <rguenther@suse.de>
1309
1310 * configure.ac: Enable LFS.
1311 * configure: Re-generate.
1312 * config.in: Likewise.
1313
fc0cd180
BE
13142009-01-05 Ben Elliston <bje@au.ibm.com>
1315
1316 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1317 (.po.pox): Likewise.
1318 (po/$(PACKAGE).pot): Likewise.
1319
db89a3be
AO
13202008-12-10 Alexandre Oliva <aoliva@redhat.com>
1321
1322 PR target/37033
1323 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1324 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1325
cc955282
JM
13262008-11-29 Joseph Myers <joseph@codesourcery.com>
1327
1328 * lex.c (cpp_token_len): Use 6 as default length.
1329
47960aaf
MLI
13302008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
1331
1332 * expr.c (struct op): Add location.
1333 (_cpp_parse_expr): Propagate locations throught the stack
1334 of expressions.
1335 (reduce): Likewise.
1336 (check_promotion): Use explicit location in errors.
1337
631d0d36
MG
13382008-10-05 Matthew Gingell <gingell@adacore.com>
1339 Arnaud Charlet <charlet@adacore.com>
1340
1341 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1342 (cpp_get_comments): New function.
1343 * internal.h (struct cpp_reader): Add comments field.
1344 * init.c (cpp_destroy): Free comments.
1345 * lex.c (store_comment, cpp_get_comments): New functions.
1346 (comments): New struct.
1347 (save_comment): Store comments in comments struct.
1348
c047ce93
SB
13492008-09-18 Simon Baldwin <simonb@google.com>
1350
1351 * include/cpplib.h (struct cpp_options): Add new boolean flag
1352 warn_builtin_macro_redefined.
1353 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1354 * (struct builtin_operator): Split out from previous struct builtin,
1355 enhance extra const correctness.
1356 * (struct builtin_macro): Split out from previous struct builtin, add
1357 new always_warn_if_redefined flag, enhance const correctness.
1358 * (mark_named_operators): Use struct builtin_operator.
1359 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1360 to builtins selectively.
1361 * macro.c (warn_of_redefinition): Return false if a builtin macro
1362 is not flagged with NODE_WARN.
1363
affa55c6
JJ
13642008-07-31 Jakub Jelinek <jakub@redhat.com>
1365
1366 PR preprocessor/36649
1367 * files.c (struct report_missing_guard_data): New type.
1368 (report_missing_guard): Put paths into an array instead of printing
1369 them right away. Return 1 rather than 0.
1370 (report_missing_guard_cmp): New function.
1371 (_cpp_report_missing_guards): Sort and print paths gathered by
1372 report_missing_guard callback.
1373
3b8f20a1
MLI
13742008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1375
1376 PR 28079
1377 * directives.c (strtolinenum): Handle overflow.
1378 (do_line): Give a warning if line number overflowed.
1379 (do_linemarker): Update call to strtolinenum.
1380
1bb64668
MLI
13812008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1382
1383 * include/line-map.h (linenum_type): New typedef.
1384 (struct line_map): Use it.
1385 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1386 (SOURCE_COLUMN): Likewise.
1387 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1388 source_location values in a variable of type linenum_type.
1389 * directives.c (struct if_stack): Use linenum_type.
1390 (strtoul_for_line): Rename as strtolinenum.
1391 (do_line): Use linenum_type.
1392 (do_linemarker): Use linenum_type and strtolinenum.
1393 (_cpp_do_file_change): Use linenum_t.
1394 * line-map.c (linemap_add): Likewise.
1395 (linemap_line_start): Likewise.
1396 * traditional.c (struct fun_macro): 'line' is a source_location.
1397 * errors.c (print_location): Use linenum_type.
1398 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1399 * internal.h (CPP_INCREMENT_LINE): Likewise.
1400 * lex.c (_cpp_skip_block_comment): Use source_location.
1401
5950c3c9
BE
14022008-07-14 Ben Elliston <bje@au.ibm.com>
1403
1404 * include/cpplib.h (NODE_CONDITIONAL): New.
1405 (struct cpp_callbacks): New macro_to_expand field.
1406 (struct cpp_hashnode): Adjust size of flags and type fields.
1407 (cpp_peek_token): Prototype.
1408 * lex.c (cpp_peek_token): New function.
1409 (_cpp_temp_token): Protect pre-existing lookaheads.
1410 * macro.c (cpp_get_token): Expand any conditional macros.
1411 (_cpp_backup_tokens_direct): New.
1412 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1413 (warn_of_redefinition): Silently allow redefined conditional
1414 macros.
1415 (_cpp_create_definition): Remove the conditional flag when a user
1416 defines one of the conditional macros.
1417 * internal.h (_cpp_backup_tokens_direct): New prototype.
1418
e85edc9e
AH
14192008-06-13 Andrew Haley <aph@redhat.com>
1420
1421 PR preprocessor/33305
1422 * macro.c (replace_args): Print a warning for empty macro
1423 arguments in C89 and C++.
1424
18c04407
RW
14252008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1426
1427 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1428 * configure: Regenerate.
1429
2d09b640
RW
14302008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1431
1432 * Makefile.in (datarootdir): New variable.
1433
0b7c73cc
L
14342008-06-12 H.J. Lu <hongjiu.lu@intel.com>
1435
1436 PR preprocessor/36479
1437 * charset.c (cpp_interpret_string_notranslate): Also set
1438 narrow_cset_desc.width.
1439
cd985f66
JM
14402008-06-07 Joseph Myers <joseph@codesourcery.com>
1441
1442 * configure.ac (parisc*64*-*-*): Remove.
1443 * configure: Regenerate.
1444
d750887f
TT
14452008-05-30 Tom Tromey <tromey@redhat.com>
1446
1447 PR preprocessor/36320:
1448 * internal.h (_cpp_parse_expr): Update.
1449 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
1450 messages.
1451 * directives.c (do_if): Update.
1452 (do_elif): Require expression if processing group.
1453
c100de59
DS
14542008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
1455
1456 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1457
5d6342eb
TT
14582008-05-21 Tom Tromey <tromey@redhat.com>
1459
1460 PR preprocessor/27777:
1461 * lex.c (cpp_output_line_to_string): New function.
1462 * internal.h (_cpp_begin_message): Don't declare.
1463 * errors.c (_cpp_begin_message): Now static.
1464 * include/cpplib.h (cpp_output_line_to_string): Declare.
1465 * directives.c (do_diagnostic): Rewrote. Use
1466 cpp_output_line_to_string. Don't use _cpp_begin_message.
1467
dae4174e
TT
14682008-05-21 Tom Tromey <tromey@redhat.com>
1469
1470 * include/symtab.h (HT_ALLOCED): Remove.
1471 (ht_purge): Declare.
1472 * symtab.c (DELETED): New define.
1473 (ht_lookup): Update comment.
1474 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
1475 code. Use subobject allocator for strings, if it exists.
1476 (ht_expand): Handle deleted entries.
1477 (ht_forall): Likewise.
1478 (ht_purge): New function.
1479 (ht_dump_statistics): Print deletion statistics.
1480
899015a0
TT
14812008-05-13 Tom Tromey <tromey@redhat.com>
1482
1483 PR preprocessor/22168:
1484 * include/cpplib.h (struct cpp_options) <objc>: Update
1485 documentation.
1486 * expr.c (eval_token): Warn for use of assertions.
1487 * directives.c (directive_diagnostics): Warn about extensions.
1488 (DEPRECATED): New define.
1489 (DIRECTIVE_TABLE): Use it.
1490
71c10038
TT
14912008-05-06 Tom Tromey <tromey@redhat.com>
1492
1493 PR preprocessor/35313, PR preprocessor/36088:
1494 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1495 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1496
2bd0fe3d
DM
14972008-05-04 David S. Miller <davem@davemloft.net>
1498
1499 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1500 * configure: Regenerate.
1501
28f68625
DF
15022008-04-22 Daniel Franke <franke.daniel@gmail.com>
1503
1504 * include/cpplib.h (cpp_define_formatted): New.
1505 * directives.c (cpp_define_formatted): New.
1506
688e7a53
TT
15072008-04-21 Tom Tromey <tromey@redhat.com>
1508
1509 PR libcpp/33415:
1510 * charset.c (_cpp_convert_input): Add buffer_start argument.
1511 Ignore UTF-8 BOM if seen.
1512 * internal.h (_cpp_convert_input): Add argument.
1513 * files.c (struct _cpp_file) <buffer_start>: New field.
1514 (destroy_cpp_file): Free buffer_start, not buffer.
1515 (_cpp_pop_file_buffer): Likewise.
1516 (read_file_guts): Update.
1517
b6baa67d
KVH
15182008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1519
1520 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1521 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1522 (struct cpp_options): Added uliterals.
1523 (cpp_interpret_string): Update prototype.
1524 (cpp_interpret_string_notranslate): Idem.
1525 * charset.c (init_iconv_desc): New width member in cset_converter.
1526 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1527 (convert_ucn): Idem.
1528 (emit_numeric_escape): Idem.
1529 (convert_hex): Idem.
1530 (convert_oct): Idem.
1531 (convert_escape): Idem.
1532 (converter_for_type): New function.
1533 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1534 (cpp_interpret_string_notranslate): Match changed prototype.
1535 (wide_str_to_charconst): Use converter_for_type.
1536 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1537 * directives.c (linemarker_dir): Macro U changed to UC.
1538 (parse_include): Idem.
1539 (register_pragma_1): Idem.
1540 (restore_registered_pragmas): Idem.
1541 (get__Pragma_string): Support CPP_STRING{16,32}.
1542 * expr.c (eval_token): Support CPP_CHAR{16,32}.
1543 * init.c (struct lang_flags): Added uliterals.
1544 (lang_defaults): Idem.
1545 * internal.h (struct cset_converter) <width>: New field.
1546 (struct cpp_reader) <char16_cset_desc>: Idem.
1547 (struct cpp_reader) <char32_cset_desc>: Idem.
1548 * lex.c (digraph_spellings): Macro U changed to UC.
1549 (OP, TK): Idem.
1550 (lex_string): Add support for u'...', U'...', u"..." and U"...".
1551 (_cpp_lex_direct): Idem.
1552 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1553 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1554
deb984e6
PB
15552008-04-18 Paolo Bonzini <bonzini@gnu.org>
1556
1557 PR bootstrap/35457
1558 * aclocal.m4: Regenerate.
1559 * configure: Regenerate.
1560
bf048bea
TT
15612008-04-17 Tom Tromey <tromey@redhat.com>
1562
1563 PR libcpp/34866:
1564 * errors.c (cpp_error): Don't reference a token before the start
1565 of the current run.
1566
7f27b0f8
TT
15672008-04-16 Tom Tromey <tromey@redhat.com>
1568
1569 * Makefile.in (TAGS_SOURCES): New variable.
1570 (TAGS): New target.
1571
a1fcb9a1
KK
15722008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
1573
1574 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1575 and shbe-*-*.
1576 * configure: Rebuilt.
1577
93d45d9e
JM
15782008-04-02 Joseph Myers <joseph@codesourcery.com>
1579
1580 * include/cpplib.h (struct cpp_callbacks): Add used_define,
1581 used_undef and before_define.
1582 (NODE_USED): Define.
1583 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1584 do_ifndef, cpp_pop_definition): Handle new flag and use new
1585 callbacks.
1586 * expr.c (parse_defined): Handle new flag and use new callbacks.
1587 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1588 flag and use new callbacks.
1589
d4c32e1d
JJ
15902008-04-01 Jakub Jelinek <jakub@redhat.com>
1591
1592 PR pch/13675
1593 * files.c (struct _cpp_file): Remove pch field.
1594 (pch_open_file): Don't set file->pch, just file->pchname.
1595 (should_stack_file): After pfile->cb.read_pch call
1596 free pchname and clear pchname, don't close file->fd.
1597 Test file->pchname instead of file->pch. Don't close fd after cb.
1598 (_cpp_stack_include): Test file->pchname instead of file->pch.
1599
161031e3
TT
16002008-03-28 Tom Tromey <tromey@redhat.com>
1601
1602 * Makefile.in (POSTCOMPILE): New variable.
1603 (.c.o): Use it.
1604
14ccf800
TT
16052008-03-13 Tom Tromey <tromey@redhat.com>
1606
1607 PR libcpp/35322:
1608 * directives.c (destringize_and_run): Set pfile->directive.
1609
830465c6
MM
16102008-03-06 Markus Milleder <markus.milleder@generali.at>
1611
1612 PR preprocessor/35458
1613 * mkdeps.c (munge): Quote '#' with a '\'.
1614
d482a073
RW
16152008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1616
1617 PR preprocessor/35379
1618 * mkdeps.c (deps_write): Ensure the first target always appears
1619 in the first column, without leading backslash newline. Avoid
1620 some more extra whitespace.
1621
185a6cc1
TS
16222008-02-25 Thiemo Seufer <ths@mips.com>
1623
d482a073 1624 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 1625
2bf41bf0
TT
16262008-02-19 Tom Tromey <tromey@redhat.com>
1627
1628 * traditional.c (lex_identifier): Use CPP_HASHNODE.
1629 * lex.c (lex_identifier): Use CPP_HASHNODE.
1630 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
1631 do-while.
1632 * identifiers.c (alloc_node): Change return type.
1633 (_cpp_init_hashtable): Don't cast 'alloc_node'.
1634 (proxy_assertion_broken): New declaration.
1635 (cpp_forall_identifiers): Move comment.
1636 * line-map.c (linemap_add): Comment fix.
1637 (linemap_line_start): Indentation fix.
1638
765d600a
JJ
16392008-01-25 Jakub Jelinek <jakub@redhat.com>
1640
1641 PR preprocessor/34692
1642 * macro.c (collect_args): Add pragma_buff argument. Push
1643 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1644 than into arguments. Reset prevent_expansion and parsing_args
1645 state at CPP_PRAGMA_EOL/CPP_EOF.
1646 (funlike_invocation_p): Add pragma_buff argument, pass it through
1647 to collect_args.
1648 (enter_macro_context): Add result argument. Adjust
1649 funlike_invocation_p caller. Emit all deferred pragma tokens
1650 gathered during collect_args before the expansion, add a padding
1651 token. Return 2 instead of 1 if any pragma tokens were prepended.
1652 (cpp_get_token): If enter_macro_context returns 2, don't return
1653 a padding token, instead cycle to grab CPP_PRAGMA token.
1654 * directives.c (_cpp_handle_directive): If was_parsing_args
1655 in deferred pragma, leave parsing_args and prevent_expansion as is.
1656
ec46053b
TT
16572008-01-22 Tom Tromey <tromey@redhat.com>
1658
765d600a 1659 PR c++/34859
ec46053b
TT
1660 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1661 __STDC_CONSTANT_MACROS.
1662
681c6ab0
FF
16632008-01-07 Fred Fish <fnf@specifix.com>
1664
765d600a 1665 PR preprocessor/30363
681c6ab0
FF
1666 * traditional.c (replace_args_and_push): Add local variable
1667 cxtquote, calculate the replacement text size assuming a
1668 worst case of every input character quoted with backslash,
1669 and properly handle output quoting of quote characters in
1670 actual arguments used in function-like macros.
1671
33ae4837
TT
16722008-01-03 Tom Tromey <tromey@redhat.com>
1673
765d600a 1674 PR preprocessor/34602
33ae4837
TT
1675 * directives.c (do_line): Don't try to spell EOF token.
1676 (do_linemarker): Add comment.
1677
675575f5
DD
16782007-12-11 DJ Delorie <dj@redhat.com>
1679
1680 * charset.c (convert_using_iconv): Close out any shift states,
1681 returning to the initial state.
1682
97f6bd40
TT
16832007-12-06 Tom Tromey <tromey@redhat.com>
1684
765d600a 1685 PR c/29172
97f6bd40
TT
1686 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1687 type.
1688 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1689 * files.c (FILE_HASH_POOL_SIZE): New macro.
1690 (struct file_hash_entry_pool): New.
1691 (destroy_all_cpp_files): New function.
1692 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1693 (new_file_hash_entry): Update.
1694 (free_file_hash_entries): New function.
1695 (_cpp_cleanup_files): Call free_file_hash_entries and
1696 destroy_all_cpp_files.
1697 (cpp_clear_file_cache): New function.
1698 * include/cpplib.h (cpp_clear_file_cache): Declare.
1699
d56a25e1
TT
17002007-12-03 Tom Tromey <tromey@redhat.com>
1701
765d600a 1702 PR preprocessor/34288
d56a25e1
TT
1703 * configure.ac, config.in: Rebuilt.
1704 * configure.ac: Check for ssize_t.
1705
607f74e9
TT
17062007-11-30 Tom Tromey <tromey@redhat.com>
1707
765d600a 1708 PR preprocessor/32868
607f74e9
TT
1709 * macro.c (_cpp_create_definition): Special case
1710 __STDC_FORMAT_MACROS.
1711
b0f4807f
MM
17122007-11-16 Michael Matz <matz@suse.de>
1713
1714 * files.c (search_path_head): Fix check for absolute paths.
1715
f1e20710
TT
17162007-11-11 Tom Tromey <tromey@redhat.com>
1717
765d600a 1718 PR c++/17557
f1e20710
TT
1719 * include/cpplib.h (cpp_included_before): Declare.
1720 * files.c (struct file_hash_entry) <location>: New field.
1721 (_cpp_find_file): Initialize new field.
1722 (make_cpp_dir): Likewise.
1723 (cpp_included_before): New function.
1724
f373b44d
TT
17252007-11-01 Tom Tromey <tromey@redhat.com>
1726
765d600a 1727 PR preprocessor/30805
f373b44d
TT
1728 * macro.c (paste_tokens): Handle padding token.
1729 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1730
5b9a40df
TT
17312007-10-31 Tom Tromey <tromey@redhat.com>
1732
765d600a 1733 PR preprocessor/30786
5b9a40df
TT
1734 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1735 * directives.c (_cpp_do__Pragma): Return error status.
1736 * internal.h (_cpp_do__Pragma): Update.
1737 * directives.c (get__Pragma_string): Back up if EOF seen.
1738
5ffeb913
TT
17392007-09-06 Tom Tromey <tromey@redhat.com>
1740
1741 * internal.h (struct cpp_reader) <invocation_location>: New
1742 field.
1743 (struct cpp_reader) <set_invocation_location>: Likewise.
1744 * init.c (cpp_set_line_map): New function.
1745 * line-map.c (linemap_add): Use linemap's allocator.
1746 * include/line-map.h (GTY): Define.
1747 (line_map_realloc): New typedef.
1748 (struct line_map): Mark with GTY.
1749 (struct line_maps): Likewise.
1750 (struct line_maps) <maps>: Likewise.
1751 (struct line_maps) <reallocator>: New field.
1752 * include/symtab.h (GTY): Conditionally define.
1753 * include/cpplib.h (cpp_set_line_map): Declare.
1754 (cpp_get_token_with_location): Declare.
1755 * macro.c (cpp_get_token): Set invocation_location on the reader.
1756 (cpp_get_token_with_location): New function.
1757
ac6b1c67
CF
17582007-08-30 Chao-ying Fu <fu@mips.com>
1759
1760 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1761 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1762 (cpp_classify_number): Support decimal fixed-point constants without
1763 exponents.
1764 Warn about fixed-point constants when -pedantic.
1765 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1766 comments to support fixed-point values.
1767 (CPP_N_FRACT, CPP_N_ACCUM): Define.
1768
cda5e672
TT
17692007-08-18 Tom Tromey <tromey@redhat.com>
1770
765d600a 1771 PR preprocessor/32974
cda5e672
TT
1772 * directives.c (parse_include): Don't check for EOL when
1773 processing #pragma dependency.
1774
ccfc4c91
OW
17752007-07-30 Ollie Wild <aaw@google.com>
1776
1777 * directives-only.c: New file.
1778 * internal.h (struct _cpp_dir_only_callbacks): New.
1779 (_cpp_preprocess_dir_only): New function.
1780 * directives.c (_cpp_handle_directive): Check directives_only before
1781 disabling execution of indented directives.
1782 * files.c (_cpp_stack_file): Add directives_only check.
1783 * include/cpplib.h (struct cpp_options): Add directives_only.
1784 (cpp_init_special_builtins): New function.
1785 * init.c (cpp_init_special_builtins): New function.
1786 (cpp_init_builtins): Move builtin_array initialization to
1787 cpp_init_special_builtins.
1788 (post_options): Check directives_only before setting
1789 pfile->state.prevent_expansion = 1.
1790 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1791 is expanded inside a directive while -fdirectives-only is enabled.
1792 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1793 (libcpp_a_SOURCES): Add directives-only.c.
1794
a206413a
UB
17952007-07-04 Uros Bizjak <ubizjak@gmail.com>
1796
1797 * traditional.c (_cpp_scan_out_logical_line): Initialize
1798 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1799 fmacro.args to prevent 'may be used uninitialized' warning.
1800
c77cd3d1
UB
18012007-07-03 Uros Bizjak <ubizjak@gmail.com>
1802
1803 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1804 Add new constants.
1805 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1806 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1807 for 'q' or 'Q' suffixes.
1808
66938a1d
DS
18092007-06-17 Danny Smith <dannysmith@users.sourceforge.net
1810
e1311401 1811 * files.c (open_file): Correct typo.
66938a1d 1812
71995ede
VP
18132007-06-16 Vladimir Prus <vladimir@codesourcery.com>
1814
e1311401 1815 * files.c (open_file): Prevent the call
71995ede
VP
1816 for stat from overwriting errno.
1817
84152c25
VP
18182007-06-09 Vladimir Prus <vladimir@codesourcery.com>
1819
e1311401 1820 * files.c (open_file): Account for the
84152c25
VP
1821 fact that on windows, opening a directory gives
1822 EACCES.
1823
f7fd775f
JW
18242007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
1825
1826 PR preprocessor/23479
1827 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
1828 integer constants.
1829 (append_digit): Likewise.
1830 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
1831 binary integer constants.
1832
ed0e74e0
DK
18332007-05-31 Dave Korn <dave.korn@artimi.com>
1834
1835 PR preprocessor/14331
1836 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
1837
a702045a
OW
18382007-05-24 Ollie Wild <aaw@google.com>
1839
1840 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
1841 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
1842 (cpp_write_pch_state): Save __COUNTER__ state.
1843 (cpp_valid_state): Check valid __COUNTER__ state.
1844 (cpp_read_state): Read new __COUNTER__ state.
1845 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
1846 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
1847 * internal.h (struct cpp_reader): Add counter member.
1848
126e073b
SM
18492007-05-23 Simon Martin <simartin@users.sourceforge.net>
1850
1851 PR preprocessor/20077
1852 * macro.c (create_iso_definition): Fixed the method to determine
1853 whether the token-pasting operator appears at the beginning or the end
1854 of a macro.
1855
0b4cafec
ILT
18562007-05-21 Ian Lance Taylor <iant@google.com>
1857
1858 * internal.h (struct cpp_reader): Add new fields:
1859 nonexistent_file_hash and nonexistent_file_ob.
1860 * files.c: Include "obstack.h".
1861 (find_file_in_dir): Before trying to open the file, look up the
1862 path name in the hash table of nonexistent files. After failing
1863 to open the file, add the path name to the hash table.
1864 (_cpp_find_file): Cache the results of looking up the file name
1865 starting with the quote and bracket chain heads, if we can.
1866 (nonexistent_file_hash_eq): New static function.
1867 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
1868 pfile->nonexistent_file_ob.
1869 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
1870 pfile->nonexistent_file_ob.
1871
30e04921
JJ
18722007-05-14 Janis Johnson <janis187@us.ibm.com>
1873
5a6bb57e
JJ
1874 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
1875
30e04921
JJ
1876 PR c/31924
1877 * expr.c (interpret_float_suffix): Check for invalid suffix.
1878
22a8a52d
EC
18792007-05-02 Eric Christopher <echristo@apple.com>
1880
1881 * expr.c (num_div_op): Don't overflow if the result is
1882 zero.
1883
fca35e1b
TT
18842007-05-02 Tom Tromey <tromey@redhat.com>
1885
765d600a 1886 PR preprocessor/28709
fca35e1b
TT
1887 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
1888
4cd97075
MM
18892007-03-30 Michael Meissner <michael.meissner@amd.com>
1890
1891 * directives.c (lex_macro_node_from_str): Fix alloca call to be
1892 type correct.
1893
121de39f
RH
18942007-03-30 Richard Henderson <rth@redhat.com>
1895
1896 * directives.c (lex_macro_node_from_str): New.
1897 (cpp_push_definition, cpp_pop_definition): New.
1898 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
1899
4fcb360b
BM
19002007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1901
1902 * Makefile.in: Add dummy install-pdf target.
1903
67e64439
TT
19042007-01-30 Tom Tromey <tromey@redhat.com>
1905
765d600a 1906 PR preprocessor/30468
67e64439
TT
1907 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
1908 './'.
1909
ee380365
TT
19102007-01-30 Tom Tromey <tromey@redhat.com>
1911
765d600a 1912 PR preprocessor/29966
ee380365
TT
1913 * macro.c (lex_expansion_token): Save and restore cpp_reader's
1914 cur_token.
1915 (_cpp_create_definition): Don't restore cur_token here.
1916 * lex.c (_cpp_lex_token): Added assertion.
1917
024abeb3
TT
19182007-01-27 Tom Tromey <tromey@redhat.com>
1919
1920 * configure: Rebuilt.
1921
ee1c2a10
TT
19222007-01-12 Tom Tromey <tromey@redhat.com>
1923
765d600a 1924 PR preprocessor/28227
ee1c2a10
TT
1925 * directives.c (lex_macro_node): Added 'is_def_or_undef'
1926 argument.
1927 (do_define): Update.
1928 (do_undef): Update.
1929 (do_ifdef): Update.
1930 (do_ifndef): Update.
1931
67214c16
PB
19322007-01-11 Paolo Bonzini <bonzini@gnu.org>
1933
1934 * configure: Regenerate.
1935
1aa6ca40
PB
19362007-01-11 Paolo Bonzini <bonzini@gnu.org>
1937
1938 * configure: Regenerate.
1939
705e2d28
TT
19402007-01-04 Tom Tromey <tromey@redhat.com>
1941
765d600a 1942 PR preprocessor/28165
705e2d28
TT
1943 * internal.h (cpp_in_primary_file): New function.
1944 * directives.c (do_include_next): Use cpp_in_primary_file.
1945 (do_pragma_once): Likewise.
1946 (do_pragma_system_header): Likewise.
1947
7af45bd4
ILT
19482006-12-29 Ian Lance Taylor <iant@google.com>
1949
1950 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
1951 look backward at the end of the line unless we saw a backslash.
1952
9d30f270
JJ
19532006-12-29 Jakub Jelinek <jakub@redhat.com>
1954
1955 PR preprocessor/29612
1956 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
1957 only when new_sysp is non-zero.
1958
30b0edc0
TT
19592006-12-28 Tom Tromey <tromey@redhat.com>
1960
765d600a 1961 PR preprocessor/30001
30b0edc0
TT
1962 * charset.c (_cpp_convert_input): Check that to.len is greater
1963 than zero.
1964
85d9c13c
TS
19652006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1966
1967 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 1968 * configure: Rebuilt.
85d9c13c 1969
dfafdaa6
DG
19702006-11-01 Douglas Gregor <doug.gregor@gmail.com>
1971
1972 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
1973 for experimental C++0x mode.
1974 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
1975 adopted the preprocessor changes introduced in C99.
1976
0f45f0f5
JM
19772006-10-29 Joseph Myers <joseph@codesourcery.com>
1978
1979 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
1980 depending on --enable-targets=all.
1981 * configure: Regenerate.
1982
de000d22
JJ
19832006-10-12 Jakub Jelinek <jakub@redhat.com>
1984
1985 PR preprocessor/28709
1986 * macro.c (paste_tokens): Do error reporting here, use BUF with the
1987 spelled LHS token as opposed to spelling it again.
1988 (paste_all_tokens): Don't report errors here, just break on failure.
1989
b5422ad7
BM
19902006-10-10 Brooks Moses <bmoses@stanford.edu>
1991
1992 * Makefile.in: Added empty "pdf" target.
1993
aaf50ff2
GK
19942006-09-22 Geoffrey Keating <geoffk@apple.com>
1995
1996 * configure.ac: Make need_64_bit_hwint case for x86-darwin
1997 match exactly the glob in gcc/config.gcc.
1998 * configure: Regenerate.
1999
c663e301
JM
20002006-09-13 Joseph S. Myers <joseph@codesourcery.com>
2001
2002 PR c/28768
2003 PR preprocessor/14634
2004 * lex.c (lex_string): Pedwarn for unterminated literals.
2005
f7288899
EC
20062006-09-08 Eric Christopher <echristo@apple.com>
2007
2008 * configure.ac: Add 64-bit HWI support for i?86-darwin.
2009
b52dbbf8
SE
20102006-08-14 Steve Ellcey <sje@cup.hp.com>
2011
2012 PR c++/28288
2013 PR c++/14556
2014 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
2015 (CPP_LAST_EQ): Change.
2016 (CPP_LAST_PUNCTUATOR): Change.
2017 * expr.c (cpp_operator): Remove MIN and MAX.
2018 (reduce): Remove CPP_MIN and CPP_MAX.
2019 (num_binary_op): Ditto.
2020 * lex.c (_cpp_lex_direct): Ditto.
2021 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
2022
1c90c6f9
JJ
20232006-06-09 Jakub Jelinek <jakub@redhat.com>
2024
2025 PR preprocessor/27746
2026 * directives.c (do_pragma): Handle pragma with valid namespace
2027 and invalid name coming from macro expansion.
2028 * directives.c (destringize_and_run): Initialize next field in
2029 context.
2030
2031 PR c/27747
2032 PR c++/27748
2033 * directives.c (destringize_and_run): Set NO_EXPAND on the
2034 tokens.
2035
2036 * macro.c (_cpp_backup_tokens): Fix comment typo.
2037
5c3c3683
DJ
20382006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
2039
2040 * Makefile.in (CATALOGS): Add po/ prefix.
2041 * configure: Regenerated.
2042
b2bd74bc
CD
20432006-05-23 Carlos O'Donell <carlos@codesourcery.com>
2044
2045 * Makefile.in: Add install-html target. Add install-html to .PHONY
2046
be8ac3e2
GZ
20472006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
2048
2049 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
2050 * files.c (_cpp_get_file_stat): New function.
2051 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
2052 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
2053 * internal.h (_cpp_get_file_stat): Prototype.
2054 (struct cpp_buffer): Add timestamp.
2055
83900997
JJ
20562006-01-23 Jakub Jelinek <jakub@redhat.com>
2057
2058 PR preprocessor/25717
2059 * init.c (cpp_init_builtins): If __STDC__ will not change value
2060 between system headers and other sources, define it as a normal
2061 macro rather than a builtin.
2062 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
2063 cpp_in_system_header condition.
2064
20652006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
2066
2067 * Makefile.in: Use -MMD instead of -MD.
2068
bc4071dd
RH
20692006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2070 Richard Henderson <rth@redhat.com>
2071
2072 Merge from gomp branch:
2073 * directives.c (struct pragma_entry): Add is_deferred. Add ident
2074 entry to value union.
2075 (end_directive): Don't eat the line if in_deferred_pragma.
2076 (run_directive): Remove pragma hacks.
2077 (insert_pragma_entry): Remove.
2078 (new_pragma_entry): New.
2079 (register_pragma_1): Split out of register_pragma. Only handle
2080 the lookup tree and return the new entry.
2081 (cpp_register_pragma): Fill in the pragma entry here.
2082 (cpp_register_deferred_pragma): New.
2083 (register_pragma_internal): New.
2084 (_cpp_init_internal_pragmas): Use register_pragma_internal.
2085 (do_pragma): Allow pragma expansion after namespace. For deferred
2086 pragmas, don't slurp the line into a string.
2087 (destringize_and_run): Save tokens for deferred pragmas.
2088 (cpp_handle_deferred_pragma): Remove.
2089 * macro.c (builtin_macro): Remove pragma token hack.
2090 (_cpp_push_token_context): Rename from push_token_context and export.
2091 * internal.h (struct lexer_state): Add pragma_allow_expansion.
2092 (_cpp_push_token_context): Declare.
2093 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
2094 a token. Update the line number correctly if so.
2095 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
2096 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
2097 * include/cpplib.h (PRAGMA_EOL): New.
2098 (CPP_TOKEN_FLD_PRAGMA): New.
2099 (struct cpp_token): Add val.pragma.
2100 (struct cpp_options): Remove defer_pragmas.
2101 (cpp_handle_deferred_pragma): Remove.
2102 (cpp_register_deferred_pragma): Declare.
2103
d09e893f
JJ
21042006-01-01 Jakub Jelinek <jakub@redhat.com>
2105
2106 PR c++/25294
2107 * directives.c (do_pragma): If pragma line ends with multi-line
2108 block comment, end the saved deferred pragma string before that
2109 comment. Handle embedded '\0' chars on the pragma line.
2110
ab84748a
VR
21112005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2112
2113 PR c++/23333
2114 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
2115
ad6ed77e
JG
21162005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
2117 Ben Elliston <bje@au.ibm.com>
2118
2119 * include/cpplib.h (CPP_N_DFLOAT): New.
2120 * expr.c (interpret_float_suffix): Identify df, dd, and dl
2121 suffixes as decimal floating point constants.
2122 (cpp_classify_number): Disallow hexadecimal DFP constants.
2123
ba096620 21242005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 2125 Ian Lance Taylor <ian@airs.com>
ba096620
GP
2126
2127 * include/cpplib.h (struct cpp_callbacks): Annotate error with
2128 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
2129
456b8ce5
UB
21302005-11-09 Per Bothner <per@bothner.com>
2131 Uros Bizjak <uros@kss-loka.si>
f7288899 2132
456b8ce5
UB
2133 PR c/24101
2134 * init.c (read_original_filename): Temporarily set
2135 state.in_directive before calling _cpp_lex_direct for
2136 CPP_HASH tokens.
2137
5571f74f
JW
21382005-11-03 James E Wilson <wilson@specifix.com>
2139
2140 PR preprocessor/24202
2141 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
2142
a63607ed
JM
21432005-11-04 Joseph S. Myers <joseph@codesourcery.com>
2144
2145 * include/cpplib.h (struct cpp_callbacks): Make error take
2146 va_list* parameter.
2147 * errors.c (cpp_error): Update call to callback.
2148
651ed942
AP
21492005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
2150
2151 PR preprocessor/22042
2152 * macro.c (_cpp_builtin_macro_text): Lower the needed max
2153 buffer size.
2154 (cpp_quote_string): Don't octalify non printable
2155 charactors.
2156
178b58b5
JM
21572005-11-03 Joseph S. Myers <joseph@codesourcery.com>
2158
2159 PR c++/17964
2160 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
2161 (struct cpp_callbacks): Add error.
2162 * errors.c (cpp_error): If client_diagnostic, use error callback.
2163 * charset.c (convert_escape): Don't use %03o in diagnostic.
2164
3ee5ed11 21652005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
2166
2167 PR preprocessor/15220
2168 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
2169 callers. Pass to open_file_failed.
2170 (open_file_failed): New parameter angle_brackets. Fix all callers.
2171 Use in print_dep assignment.
2172 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
2173 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 2174
077fc835
KH
21752005-10-08 Kazu Hirata <kazu@codesourcery.com>
2176
2177 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
2178 * configure: Regenerate.
2179
cbc43ae0
ILT
21802005-10-04 Ian Lance Taylor <ian@airs.com>
2181
2182 PR preprocessor/13726
2183 * directives.c (check_eol_return_comments): New static function.
2184 (parse_include): Add buf parameter. Change all callers.
2185 (do_include_common): If not discard comments, turn on
2186 save_comments. Pass collected comments to include callback.
2187 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
2188 include callback: cpp_token list.
2189
af15a2fe
JM
21902005-09-20 Joseph S. Myers <joseph@codesourcery.com>
2191
2192 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
2193 * init.c (struct lang_flags, lang_defaults): Add
2194 extended_identifiers.
2195 (cpp_set_lang): Use it.
2196 * lex.c (forms_identifier_p): Check extended_identifiers.
2197
f5eab47e
JJ
21982005-08-30 Jakub Jelinek <jakub@redhat.com>
2199
2200 PR preprocessor/20348
2201 PR preprocessor/20356
2202 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
2203 2004-06-05 changes.
2204
467129e6
KG
22052005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2206
2207 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
2208 -Wmissing-format-attribute.
2209
2210 * configure: Regenerate.
2211
200031d1
KC
22122005-06-29 Kelley Cook <kcook@gcc.gnu.org>
2213
2214 * all files: Update FSF address in copyright headers.
2215 * makeucnid.c (write_copyright): Update outputted FSF address.
2216
f610dd5f
ZW
22172005-06-13 Zack Weinberg <zack@codesourcery.com>
2218
2219 * configure.ac: Invoke ZW_CREATE_DEPDIR and
2220 ZW_PROG_COMPILER_DEPENDENCIES.
2221 * aclocal.m4, configure: Regenerate.
2222 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
2223 New variables.
2224 (distclean): Clean up $(DEPDIR) and its contents.
2225 (.c.o): Use $(COMPILE).
2226 Include $(DEPDIR)/*.Po for most object->header dependencies.
2227
c3f829c1
GDR
22282005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2229
2230 * configure.ac: Check declarations for asprintf and vasprintf.
2231 * config.in: Regenerate.
2232 * configure: Likewise.
2233
2234 * charset.c (conversion_loop): Use XRESIZEVEC.
2235 (convert_no_conversion): Likewise.
2236 (convert_using_iconv): Likewise.
2237 (init_iconv_desc): Cast return value of alloca.
2238 (cpp_host_to_exec_charset): Use XNEWVEC.
2239 (emit_numeric_escape): Use XRESIZEVEC.
2240 (cpp_interpret_string): Use XNEWVEC.
2241 (cpp_interpret_string): Use XRESIZEVEC.
2242 (_cpp_interpret_identifier): Cast return value of alloca.
2243 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
2244 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
2245 (parse_include): Use XNEWVEC.
2246 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 2247 "new_entry".
c3f829c1
GDR
2248 (save_registered_pragmas): Cast return value of xmemdup.
2249 (destringize_and_run): Same for alloca.
2250 (parse_assertion): Likewise.
2251 (do_assert): Cast allocated storage to proper type.
2252 (cpp_define): Likewise.
2253 (_cpp_define_builtin): Likewise.
2254 (cpp_undef): Likewise.
2255 (handle_assertion): Likewise.
2256 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
2257 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
2258 (CPP_UMINUS): Likewise.
2259 (struct cpp_operator): Rename from struct operator.
2260 (_cpp_expand_op_stack): Use XRESIZEVEC.
2261 * files.c (pch_open_file): Use XNEWVEC.
2262 (pch_open_file): Use XRESIZEVEC.
2263 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
2264 (dir_name_of_file): Use XNEWVEC.
2265 (make_cpp_file): Use XCNEW.
2266 (make_cpp_dir): Likewise.
2267 (allocate_file_hash_entries): USE XNEWVEC.
2268 (cpp_included): Cast return value of htab_find_with_hash.
2269 (append_file_to_dir): Use XNEWVEC.
2270 (read_filename_string): Likewise. Use XRESIZEVEC too.
2271 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
2272 (remap_filename): Use XNEWVEC.
2273 (struct pchf_entry): Move definition out of struct pchf_data.
2274 (_cpp_save_file_entries): Use XCNEWVAR.
2275 (_cpp_read_file_entries): Use XNEWVAR.
2276 * identifiers.c (alloc_node): Use XOBNEW.
2277 * init.c (cpp_create_reader): Use XCNEW.
2278 (cpp_init_builtins): Cast of b->value to enum builtin_type.
2279 (read_original_directory): Cast return value of alloca.
2280 * lex.c (add_line_note): Use XRESIZEVEC.
2281 (warn_about_normalization): Use XNEWVEC.
2282 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
2283 (new_buff): Use XNEWVEC.
2284 * line-map.c (linemap_add): Use XRESIZEVEC.
2285 * macro.c (builtin_macro): Cast return value of alloca.
2286 (paste_tokens): Likewise.
2287 (expand_arg): Use XNEWVEC and XRESIZEVEC.
2288 (_cpp_save_parameter): Use XRESIZEVEC.
2289 (create_iso_definition): Cast allocated storage to proper type.
2290 (_cpp_create_definition): Likewise.
2291 (cpp_macro_definition): Use XRESIZEVEC.
2292 * makedepend.c (add_clm): Use XNEW.
2293 (add_dir): Likewise.
2294 * mkdeps.c (munge): Use XNEWVEC.
2295 (deps_init): Use XCNEW.
2296 (deps_add_target): Use XRESIZEVEC.
2297 (deps_add_default_target): Cast return value of alloca.
2298 (deps_add_dep): Use XRESIZEVEC.
2299 (deps_add_vpath): Likewise. Use XNEWVEC too.
2300 (deps_restore): Likewise.
2301 * pch.c (save_idents): Use XNEW and XNEWVEC.
2302 (cpp_save_state): Use XNEW.
2303 (count_defs): Cast return value of htab_find.
2304 (write_defs): Likewise.
2305 (cpp_write_pch_deps): Use XNEWVEC.
2306 (collect_ht_nodes): Use XRESIZEVEC.
2307 (cpp_valid_state): Use XNEWVEC.
2308 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
2309 * symtab.c (ht_create): Use XCNEW.
2310 (ht_lookup_with_hash): Cast return value of obstack_copy0.
2311 (ht_expand): Use XCNEWVEC.
2312 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2313 (bool): Do not define if __cplusplus.
2314
1ed17cd5
ZW
23152005-05-12 Zack Weinberg <zack@codesourcery.com>
2316
2317 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2318 (do_sccs): Delete function definition, #define to do_ident.
2319 (do_ident): Don't hardwire directive name.
2320
5a8c20ce
RK
23212005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
2322
2323 PR bootstrap/21230
2324 * configure: Regenerate.
2325
473c5bc9
AP
23262005-04-27 Andris Pavenis <pavenis@latnet.lv>
2327
2328 * files.c: Include io.h for DJGPP to get prototype of setmode.
2329
c1fc5047
PB
23302005-04-19 Per Bothner <per@bothner.com>
2331
2332 PR preprocessor/20907
2333 * line-map.c (linemap_line_start): Fix bug when we need to increse
2334 column_bits but can re-use the current line_map.
2335
042630ad
KG
23362005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2337
2338 * system.h (fopen, fdopen, freopen): Define these to the unlocked
2339 libiberty functions.
2340
0d667716
KG
23412005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2342
2343 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2344 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2345 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2346 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2347 _unlocked function.
2348 (fwrite_unlocked): Fix prototype.
1ed17cd5 2349
0d667716
KG
2350 * configure, config.in: Regenerate.
2351
cae064e7
JJ
23522005-04-05 Jakub Jelinek <jakub@redhat.com>
2353
2354 PR preprocessor/19475
2355 * macro.c (create_iso_definition): For < ISO C99, don't
2356 pedwarn if there is no whitespace between macro name and its
2357 replacement, but the replacement starts with a basic character
2358 set character.
2359
cbada204
AJ
23602005-03-28 Andreas Jaeger <aj@suse.de>
2361
2362 * lex.c (warn_about_normalization): Cast field width to int to
2363 avoid warning.
2364
f42eccdb
JM
23652005-03-19 Joseph S. Myers <joseph@codesourcery.com>
2366
2367 * configure.ac: Consistently use solaris2.1[0-9]* instead of
2368 solaris2.1[0-9].
2369 * configure: Regenerate.
2370
c79e602b
GK
23712005-03-15 Geoffrey Keating <geoffk@apple.com>
2372
2373 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2374 UCN rather than printing an error.
2375
50668cf6
GK
23762005-03-14 Geoffrey Keating <geoffk@apple.com>
2377
6baba9bb
GK
2378 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2379
23802005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 2381
50668cf6
GK
2382 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2383 * charset.c: Update for new format of ucnid.h.
2384 (ucn_valid_in_identifier): Update for new format of ucnid.h.
2385 Add NST parameter, and update it; update callers.
2386 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
2387 with cpp_error.
2388 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2389 * internal.h (struct normalize_state): New.
2390 (INITIAL_NORMALIZE_STATE): New.
2391 (NORMALIZE_STATE_RESULT): New.
2392 (NORMALIZE_STATE_UPDATE_IDNUM): New.
2393 (_cpp_valid_ucn): New.
2394 * lex.c (warn_about_normalization): New.
2395 (forms_identifier_p): Add normalize_state parameter, update callers.
2396 (lex_identifier): Add normalize_state parameter, update callers. Keep
2397 the state current.
2398 (lex_number): Likewise.
2399 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
2400 it with warn_about_normalization.
2401 * makeucnid.c: New.
2402 * ucnid.h: Replace.
2403 * ucnid.pl: Remove.
2404 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
2405 comments about obsolete version of C++.
2406 * include/cpplib.h (enum cpp_normalize_level): New.
2407 (struct cpp_options): Add warn_normalize field.
2408
47e20491
GK
24092005-03-11 Geoffrey Keating <geoffk@apple.com>
2410
2411 * directives.c (glue_header_name): Update call to cpp_spell_token.
2412 * internal.h (_cpp_interpret_identifier): New.
2413 * charset.c (_cpp_interpret_identifier): New.
2414 (_cpp_valid_ucn): Allow UCN version of '$'.
2415 * lex.c (lex_identifier): Add extra parameter to indicate if initial
2416 character was '$' or '\'. Support identifiers with UCNs.
2417 (forms_identifier_p): Allow UCNs.
2418 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2419 (utf8_to_ucn): New.
2420 (cpp_spell_token): Add FORSTRING parameter. Use it.
2421 (cpp_token_as_text): Update call to cpp_spell_token.
2422 (cpp_output_token): Write UCNs back out.
2423 (stringify_arg): Update call to cpp_spell_token.
2424 (paste_tokens): Likewise.
2425 (cpp_macro_definition): Likewise.
2426 * macro.c (stringify_arg): Likewise.
2427 (paste_tokens): Likewise.
2428 (cpp_macro_definition): Likewise.
2429 * include/cpplib.h: Add parameter to cpp_spell_token.
2430
73096711
JJ
24312005-03-04 Jakub Jelinek <jakub@redhat.com>
2432
2433 PR bootstrap/20282
2434 PR bootstrap/20305
2435 * macro.c (replace_args, cpp_get_token): Copy whole
2436 cpp_token_u instead of just cpp_string field from it.
2437
2203a881
DP
24382005-02-28 Devang Patel <dpatel@apple.com>
2439
2440 * directives.c (do_line): Save sysp early before line table is
2441 realloc'ed.
1ed17cd5 2442
c5ff069d
ZW
24432005-02-20 Zack Weinberg <zack@codesourcery.com>
2444
2445 PR 18785
2446 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2447 (cpp_host_to_exec_charset): New function.
2448 * include/cpplib.h: Declare cpp_host_to_exec_charset.
2449
04c90eea
DP
24502005-02-19 Devang Patel <dpatel@apple.com>
2451
2452 * charset.c (_cpp_convert_input): Check '\r' before inserting
2453 '\n' at the end.
c5ff069d 2454
6da55c00
EC
24552005-02-15 Eric Christopher <echristo@redhat.com>
2456
2457 PR preprocessor/19077
2458 * macro.c (cpp_macro_definition): Move handling of whitespace
2459 to PREV_WHITE conditional. Remove overloading of len
2460 variable.
2461
31c3e631
KH
24622005-02-14 Kazu Hirata <kazu@cs.umass.edu>
2463
2464 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2465 traditional.c: Update copyright.
2466
be0f1e54
PB
24672005-02-14 Paolo Bonzini <bonzini@gnu.org>
2468
2469 PR bootstrap/19818
2470 * configure.ac: Check for declaration of basename and getopt.
2471 * config.in: Regenerate.
2472 * configure: Regenerate.
2473 * internal.h (ustrcspn): New.
2474 * macro.c (create_iso_definition): Fix allocation of memory.
2475 (padding_token): Add cast to remove const-ness.
2476 * pch.c (cpp_read_state): Use ustrcspn.
2477
ecddfb39
MS
24782005-02-08 Mike Stump <mrs@apple.com>
2479
2480 * files.c (pchf_adder): Remove.
2481 (struct pchf_adder_info): Likewise.
2482 (_cpp_save_file_entries): Write out all files so that #import works.
2483
9fcdd891
JM
24842005-01-23 Joseph S. Myers <joseph@codesourcery.com>
2485
2486 * configure: Regenerate.
2487
ecfd72e7
TS
24882005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2489
2490 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2491
6c25a4f7 2492 * include/cpplib.h: Also update copyright years.
c5ff069d 2493
942926ad
GK
24942005-01-03 Geoffrey Keating <geoffk@apple.com>
2495
2496 * files.c (_cpp_find_file): Add files found by search_path_exhausted
2497 to the list of all files.
2498
a2566ae9
GDR
24992005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2500
2501 * internal.h: Update references to Cpp lib filenames.
2502 * directives.c: Likewise.
2503 * init.c: Likewise.
2504 * macro.c: Likewise.
2505 * traditional.c: Likewise.
2506
1b449375
EB
25072004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
2508
2509 PR preprocessor/15167
2510 * files.c (destroy_cpp_file): New function.
2511 (should_stack_file): Make a new file if the
2512 compared file is still stacked.
2513
28303828
NN
25142004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
2515
c5ff069d 2516 PR preprocessor/17610
28303828
NN
2517 * directives.c (do_include_common): Error out if an empty filename
2518 is given for #include (or #include_next or #import).
2519
c812785a
RS
25202004-11-27 Roger Sayle <roger@eyesopen.com>
2521 Zack Weinberg <zack@codesourcery.com>
2522
2523 * internal.h: Replace all uses of uchar with unsigned char.
2524 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
2525 with !IN_GCC, so uchar is only defined whilst building libcpp.
2526
f91eaa01
KC
25272004-11-24 Kelley Cook <kcook@gcc.gnu.org>
2528
2529 * aclocal.m4: Regenerate.
2530
f78ce0c2
RS
25312004-11-24 Roger Sayle <roger@eyesopen.com>
2532
2533 PR preprocessor/15824
2534 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2535 directly, instead of the non-existant "system.h" and "ansidecl.h".
2536 * configure: Regenerate.
2537
b5b3e36a 25382004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 2539 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
2540
2541 * internal.h (struct lexer_state): Add in_deferred_pragma.
2542 * directives.c (struct pragma_entry): Add allow_expansion.
2543 (insert_pragma_entry): Take allow_expansion flag.
2544 (register_pragma): Likewise.
2545 (cpp_register_pragma): Likewise.
2546 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2547 (do_pragma): Honor allow_expansion.
2548 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2549 * include/cpplib.h (cpp_register_pragma): Update prototype.
2550
a8e68029 25512004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 2552 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
2553
2554 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2555 need_64bit_hwint=yes.
2556 * configure: Regenerate.
2557
50f47ee0
JM
25582004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2559
2560 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
2561 po/$(PACKAGE).pot.
2562 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2563 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2564 Remove local srcdir path from generated file.
2565
968e08d6 25662004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 2567 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
2568
2569 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2570 as well.
2571
3da3d587
ZW
25722004-10-27 Zack Weinberg <zack@codesourcery.com>
2573
2574 PR 18075
2575 * directives.c (do_pragma): Do not defer pragmas which are unknown.
2576 (cpp_handle_deferred_pragma): Add cast to silence warning.
2577
ac24fc25
JM
25782004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
2579
2580 * errors.c (_cpp_begin_message): Print "error: " for errors.
2581
7731405b
AJ
25822004-10-10 Andreas Jaeger <aj@suse.de>
2583
2584 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2585 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2586
646544e3
AP
25872004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2588
2589 * pch.c (cpp_write_pch_state): Remove variable z as it is not
2590 used.
2591 (cpp_read_state): Remove unused variables, m, d and mac_count.
2592
67a74146
PB
25932004-09-29 Per Bothner <per@bothner.com>
2594
2595 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
2596 cb.line_change. Otherwise do_pragma will call the line_change
2597 call-back with a meaningless line number.
2598
018a4785
ZW
25992004-09-24 Zack Weinberg <zack@codesourcery.com>
2600
2601 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
2602 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
2603 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2604 * aclocal.m4, configure: Regenerate.
2605 * init.c: Include localedir.h.
2606 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
2607 (DEFS): Delete.
2608 (.c.o): Use $(ALL_CFLAGS).
2609 (localedir.h, localedir.hs): New rules.
2610 (clean): Use rm -rf to remove directories.
2611 (distclean): Also delete localedir.h and localedir.hs.
2612 (init.o): Update dependencies.
2613
88fa57d7
KC
26142004-09-22 Kelley Cook <kcook@gcc.gnu.org>
2615
2616 * Makefile.in (aclocal.m4): Update dependencies.
2617 * configure.ac (AC_CONFIG_MACRO_DIR): New.
2618 * aclocal.m4, configure: Regenerate.
2619
8f8e9aa5
ZW
26202004-09-17 Zack Weinberg <zack@codesourcery.com>
2621
a29f62d9
ZW
2622 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
2623 (_cpp_convert_input, _cpp_default_encoding): Add comments.
2624 Some other comments in this file also tweaked.
2625
8f8e9aa5
ZW
2626 * directives.c (do_pragma): Save current buffer position
2627 before lexing the pragma keywords; don't call
2628 _cpp_backup_tokens in the defer_pragmas case.
2629
a2981930
PB
26302004-09-15 Per Bothner <per@bothner.com>
2631
2632 * include/line-map.h (line_map_start): Add parameter names so
2633 preceding comment makes sense.
2634 (linemap_add): Remove from comment mention of non-existing parameter.
2635
21b11495
ZW
26362004-09-09 Matt Austern <austern@apple.com>
2637 Zack Weinberg <zack@codesourcery.com>
2638
2639 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
2640 prefixes throughout. Add entry for PRAGMA. Remove
2641 unnecessary "= 0" from EQ.
2642 (enum cpp_ttype): Adjust OP and TK definitions to restore
2643 prefixes, via token-paste.
2644 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2645 Change from #defines to additional cpp_ttype enumerators.
2646 (struct cpp_options): Add defer_pragmas.
2647 (cpp_handle_deferred_pragma): Prototype new interface.
2648
2649 * internal.h (struct cpp_reader): Add directive_result.
2650 * directives.c (struct pragma_entry): Add is_internal field;
2651 give boolean fields type bool.
2652 (start_directive): Initialize pfile->directive_result.type.
2653 (_cpp_do__Pragma): Likewise.
2654 (run_directive): Do not crash if pfile->buffer->prev is NULL.
2655 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2656 from it.
2657 (register_pragma): New static function, bulk of former
2658 cpp_register_pragma here; add 'internal' argument, pass along
2659 to insert_pragma_entry.
2660 (cpp_register_pragma): Now a wrapper around register_pragma which
2661 always passes false for 'internal' argument.
2662 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2663 true for 'internal'.
2664 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2665 an internal pragma, save text till the end of the line as a CPP_PRAGMA
2666 token instead of executing the pragma.
2667 (cpp_handle_deferred_pragma): New interface.
2668 * lex.c (token_spellings): Adjust OP and TK definitions to
2669 match changes to cpplib.h.
2670 (_cpp_lex_token): Check for a directive-result token and
2671 return it if present.
2672 (cpp_token_val_index): Handle CPP_PRAGMA.
2673 * macro.c (cpp_builtin_macro_text): Correct comment.
2674 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2675
0fd9e8dd
SB
26762004-09-06 Serge Belyshev <belyshev@lubercy.com>
2677
2678 PR preprocessor/14699
2679 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2680 from size_t to double.
2681
39b8ce7f
AS
26822004-08-28 Andreas Schwab <schwab@suse.de>
2683 Andreas Jaeger <aj@suse.de>
2684
2685 * configure.ac: Set PACKAGE correctly.
2686 * configure: Regenerated.
2687
5d1f4b27
PB
26882004-08-25 Paolo Bonzini <bonzini@gnu.org>
2689
2690 * Makefile.in: Add back top_builddir.
2691
078e3ffe
PB
26922004-08-25 Paolo Bonzini <bonzini@gnu.org>
2693
2694 * configure.ac: Replace Automake macro invocations
2695 with manual Autoconf checks and substitutions.
2696 * configure: Regenerate.
2697 * aclocal.m4: Regenerate.
2698 * config.in: Regenerate.
2699 * Makefile.am: Removed.
2700 * Makefile.in: Heavy simplification and reorganization.
2701
b3f8d95d
MM
27022004-08-09 Mark Mitchell <mark@codesourcery.com>
2703
2704 * configure.ac (arm*-*-eabi*): New target.
2705 (arm*-*-symbianelf*): Likewise.
2706 * configure: Regenerated.
2707
72bb2c39
BI
27082004-07-24 Bernardo Innocenti <bernie@develer.com>
2709
2710 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2711 * directives.c: Use XNEW-family macros from libiberty.
2712 * lex.c: Likewise.
2713 * macro.c: Likewise.
2714 * cpplib.h (cpp_deps_style): Export enum with name.
2715
21b11495 27162004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 2717
21b11495 2718 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 2719
a23ee064
AP
27202004-07-16 Andris Pavenis <pavenis@latnet.lv>
2721
2722 PR preprocessor/16366
2723 * internal.h (struct cpp_reader): New field dir_hash.
2724 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2725 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2726
a09d4744
NB
27272004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
2728
2729 PR preprocessor/16192
2730 PR preprocessor/15913
2731 PR preprocessor/15572
2732 * expr.c (_cpp_parse_expr): Handle remaining cases where an
2733 expression is missing.
2734 * init.c (post_options): Traditional cpp doesn't do // comments.
2735
f58f7def
PB
27362004-06-30 Per Bothner <per@bothner.com>
2737
2738 * include/line-map.h (fileline): Remove old typedef.
2739 * internal.h (struct cpp_reader): Use source_location typedef instead.
2740
e83d8d43
ZW
27412004-06-26 Zack Weinberg <zack@codesourcery.com>
2742
2743 Partially revert patch of 2004-06-05.
2744 * files.c (search_cache): Remove pfile argument. Don't check
2745 for file that would be found by "" or <> search here...
2746 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2747 Do not apply directory-of-current-file correction to files
2748 found by this check. Rearrange code slightly.
2749
c0d578e6
GK
27502004-06-21 Geoffrey Keating <geoffk@apple.com>
2751
2752 * files.c (should_stack_file): Correct swapped parameters to call
2753 to cb.read_pch.
2754 * pch.c (cpp_valid_state): Handle -fpreprocessed.
2755
159d5224
PB
27562004-06-15 Paolo Bonzini <bonzini@gnu.org>
2757
2758 * Makefile.in: Regenerate with automake 1.8.5.
2759 * aclocal.m4: Likewise.
2760 * configure: Regenerate.
2761
2fac9c01
ZW
27622004-06-11 Zack Weinberg <zack@codesourcery.com>
2763
2764 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2765 * configure, config.in: Regenerate.
2766 * system.h: Unconditionally define bool as unsigned char,
2767 BOOL_BITFIELD as unsigned int.
2768 * .cvsignore: New file.
2769
d8044160
GK
27702004-06-09 Geoffrey Keating <geoffk@apple.com>
2771
2772 * traditional.c (push_replacement_text): Set macro->traditional.
2773 (save_replacement_text): Likewise.
2774 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2775 (struct save_macro_item): Delete.
2776 (struct save_macro_data): Use a character array not the previous
2777 structured format.
2778 (save_macros): Save macro as text not as internal structures.
2779 (cpp_prepare_state): Update for changes to save_macro_data.
2780 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 2781 -D macros as text.
d8044160
GK
2782 * macro.c (create_iso_definition): Honour alloc_subobject.
2783 Clear traditional flag.
2784 (_cpp_create_definition): Honour alloc_subobject.
2785 * lex.c (cpp_token_val_index): New.
2786 * internal.h: Include cpp-id-data.h.
2787 (uchar): Move definition to cpp-id-data.h.
2788 (U): Likewise.
2789 (cpp_macro): Likewise.
2790 * directives.c (struct answer): Move to cpp-id-data.h.
2791 (do_assert): Honour alloc_subobject.
2cf22451
ZW
2792
2793 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2794 * include/cpplib.h (struct cpp_string): Add GTY marker.
2795 (enum cpp_token_fld_kind): New.
2796 (struct cpp_token): Add GTY markers.
2797 (cpp_token_val_index): Prototype.
2798 (CPP_HASHNODE_VALUE_IDX): New.
2799 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2800 * include/cpp-id-data.h: New file.
d8044160 2801
0ca8e815
PB
28022004-06-09 Paolo Bonzini <bonzini@gnu.org>
2803
2804 * Makefile.am (all-local): New.
2805 * Makefile.in: Regenerate.
2806
b51fa00f
RS
28072004-06-06 Roger Sayle <roger@eyesopen.com>
2808
2809 * Makefile.am (LIBICONV): Declare.
2810 (makedepend_LDADD): Use LIBICONV.
2811 * Makefile.in: Regenerate.
2812
5e2f3f39
AP
28132004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
2814
2815 * Makefile.am (LIBINTL): Declare
2816 (makedepend_LDADD): Use LIBINTL.
2817 * Makefile.in: Regenerate.
2818
c6e83800
ZW
28192004-06-05 Zack Weinberg <zack@codesourcery.com>
2820
2821 * Makefile.am: Add makedepend.
2822 * Makefile.in, aclocal.m4: Regenerate.
2823 * charset.c: Insert a space to avoid a warning.
2824 * directives.c: Include mkdeps.h.
2825 (_cpp_handle_directive): Reenable macro expander if appropriate.
2826 (undefine_macros): Inline body of _cpp_free_definition for speed.
2827 Do not call undef callback or _cpp_warn_if_unused_macro.
2828 (cpp_get_deps): New interface.
2829 * files.c (search_cache): Add pfile argument. Check for file
2830 that would be found by "" or <> search here...
2831 (_cpp_find_file): ...not here. Correct recorded start_dir of
2832 files found by directory-of-current-file search that would be
2833 found by "" or <> search.
2834 * init.c (cpp_add_dependency_target): Delete.
2835 * internal.h (struct lexer_state): Add discarding_output flag.
2836 * lex.c (lex_identifier): Compute hash function while scanning.
2837 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
2838 directives.
2839 * makedepend.c: New file.
2840 * mkdeps.c (struct deps): Add vpath vector.
2841 (apply_vpath, deps_add_vpath): New function.
2842 (deps_free): Free vpath vector.
2843 (deps_add_dep, deps_add_target): Use apply_vpath.
2844 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
2845 (ht_lookup_with_hash): New function.
2846 * cpplib.h, mkdeps.h: Update prototypes.
2847 * symtab.h: Update prototypes.
2848 (HT_HASHSTEP, HT_FINISH): New macros.
2849
b453c95f
GK
28502004-05-29 Geoffrey Keating <geoffk@apple.com>
2851
2852 * symtab.c (ht_create): Set entries_owned.
2853 (ht_destroy): Honour entries_owned.
2854 (ht_expand): Likewise.
2855 (ht_load): New.
2cf22451
ZW
2856 * include/symtab.h (struct ht): New field 'entries_owned'
2857 (ht_load): New prototype.
b453c95f 2858
963e23c5
PB
28592004-05-26 Paolo Bonzini <bonzini@gnu.org>
2860
2861 PR bootstrap/15651
2862 * configure.ac: Fix m4 quoting when picking
2863 the size of HOST_WIDE_INT.
2864 * configure: Regenerate.
2865
0429bc77
PB
28662004-05-25 Paolo Bonzini <bonzini@gnu.org>
2867
2868 * Makefile.am: the correct directory for
2869 gettext include files is given by @INCINTL@.
2870 * Makefile.in: Regenerate.
2871
c86dd7db
PB
28722004-05-24 Paolo Bonzini <bonzini@gnu.org>
2873
2874 * system.h [!ENABLE_NLS]: dgettext takes two
2875 parameters.
2876
4f4e53dd
PB
28772004-05-23 Paolo Bonzini <bonzini@gnu.org>
2878
2879 Moved libcpp from the gcc subdirectory to the toplevel.
2880 * Makefile.am: New file.
2881 * Makefile.in: Regenerate.
2882 * configure.ac: New file.
2883 * configure: Regenerate.
2884 * config.in: Regenerate.
2885 * charset.c: Moved from gcc/cppcharset.c. Add note about
2886 brokenness of input charset detection. Adjust for change
2887 in name of cppucnid.h.
2888 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
2889 * expr.c: Moved from gcc/cppexp.c.
2890 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
2891 Remove #define of O_BINARY, it is in system.h.
2892 * identifiers.c: Moved from gcc/cpphash.c.
2893 * internal.h: Moved from gcc/cpphash.h. Change header
2894 guard name. All other files adjusted to match name change.
2895 * init.c: Moved from gcc/cppinit.c.
2896 (init_library) [ENABLE_NLS]: Call bindtextdomain.
2897 * lex.c: Moved from gcc/cpplex.c.
2898 * directives.c: Moved from gcc/cpplib.c.
2899 * macro.c: Moved from gcc/cppmacro.c.
2900 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
2901 * traditional.c: Moved from gcc/cpptrad.c.
2902 * ucnid.h: Moved from gcc/cppucnid.h. Change header
2903 guard name.
2904 * ucnid.pl: Moved from gcc/cppucnid.pl.
2905 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
2906 guard name.
2907 * symtab.c: Moved from gcc/hashtable.c.
2908 * line-map.c: Moved from gcc. Do not include intl.h.
2909 * mkdeps.c: Moved from gcc.
2910 * system.h: New file.
2cf22451
ZW
2911 * include/cpplib.h: Moved from gcc. Change header guard name.
2912 * include/line-map.h: Moved from gcc. Change header guard name.
2913 * include/mkdeps.h: Moved from gcc. Change header guard name.
2914 * include/symtab.h: Moved from gcc/hashtable.h. Change header
2915 guard name.