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