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