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