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