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