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