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