]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
re PR target/54089 ([SH] Refactor shift patterns)
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
52187008
DC
12012-09-25 Dehao Chen <dehao@google.com>
2
3 PR middle-end/54645
4 * include/line-map.h (location_adhoc_data): Move location_adhoc_data
5 into GC.
6 (location_adhoc_data_map): Likewise.
7 (line_maps): Likewise.
8 (rebuild_location_adhoc_htab): New Function.
9 * line-map.c (+rebuild_location_adhoc_htab): new Funcion.
10 (get_combined_adhoc_loc): Move location_adhoc_data into GC.
11 (location_adhoc_data_fini): Likewise.
12 (linemap_init): Likewise.
13 (location_adhoc_data_init): Remove Function.
14
5368224f
DC
152012-09-19 Dehao Chen <dehao@google.com>
16
17 * include/line-map.h (MAX_SOURCE_LOCATION): New value.
18 (location_adhoc_data_fini): New.
19 (get_combined_adhoc_loc): New.
20 (get_data_from_adhoc_loc): New.
21 (get_location_from_adhoc_loc): New.
22 (location_adhoc_data_map): New.
23 (COMBINE_LOCATION_DATA): New.
24 (IS_ADHOC_LOC): New.
25 (expanded_location): New field.
26 (line_maps): New field.
27 * line-map.c (location_adhoc_data): New.
28 (location_adhoc_data_hash): New.
29 (location_adhoc_data_eq): New.
30 (location_adhoc_data_update): New.
31 (get_combined_adhoc_loc): New.
32 (get_data_from_adhoc_loc): New.
33 (get_location_from_adhoc_loc): New.
34 (location_adhoc_data_init): New.
35 (location_adhoc_data_fini): New.
36 (linemap_init): Initialize location_adhoc_data.
37 (linemap_lookup): Change to use new location.
38 (linemap_ordinary_map_lookup): Likewise.
39 (linemap_macro_map_lookup): Likewise.
40 (linemap_macro_map_loc_to_def_point): Likewise.
41 (linemap_macro_map_loc_unwind_toward_spel): Likewise.
42 (linemap_get_expansion_line): Likewise.
43 (linemap_get_expansion_filename): Likewise.
44 (linemap_location_in_system_header_p): Likewise.
45 (linemap_location_from_macro_expansion_p): Likewise.
46 (linemap_macro_loc_to_spelling_point): Likewise.
47 (linemap_macro_loc_to_def_point): Likewise.
48 (linemap_macro_loc_to_exp_point): Likewise.
49 (linemap_resolve_location): Likewise.
50 (linemap_unwind_toward_expansion): Likewise.
51 (linemap_unwind_to_first_non_reserved_loc): Likewise.
52 (linemap_expand_location): Likewise.
53 (linemap_dump_location): Likewise.
54 (linemap_line_start): Likewise.
55
f3d25c65
DS
562012-05-25 Dodji Seketeli <dodji@redhat.com>
57
58 PR preprocessor/53469
59 * directives.c (do_pragma): Use the virtual location for the
60 pragma token, instead of its spelling location.
61
0823efed
DN
622012-08-14 Diego Novillo <dnovillo@google.com>
63
64 Merge from cxx-conversion branch. Configury.
65
66 * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
67 * configure.ac: Likewise.
68 * configure: Regenerate.
69
702012-08-14 Lawrence Crowl <crowl@google.com>
71
72 Merge from cxx-conversion branch. New C++ hash table.
73
74 * include/symtab.h (typedef struct ht hash_table): Change the typedef
75 name to cpp_hash_table. Update all users of the typedef.
76
c0fd3497
LB
772012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
78
79 * include/line-map.h (line_map_macro): Use the "atomic" GTY option
80 for the macro_locations field.
81
d35d1c0f
UB
822011-06-19 Uros Bizjak <ubizjak@gmail.com>
83
84 * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
85 __builtin_ia32_pcmpestri128 instead of asm.
86
d86d2119
DA
872012-06-04 Dimitrios Apostolou <jimis@gmx.net>
88
89 * line-map.c (linemap_enter_macro): Don't zero max_column_hint in
90 every macro. This improves performance by reducing the number of
91 reallocations when track-macro-expansion is on.
92
7ca643e1
DS
932012-06-04 Dodji Seketeli <dodji@redhat.com>
94
95 PR preprocessor/53463
96 * line-map.c (linemap_location_in_system_header_p): For built-in
97 macro tokens, check the first expansion point location that is not
98 for a token coming from a built-in macro.
99
7d9641cc
JM
1002012-05-29 Joseph Myers <joseph@codesourcery.com>
101
102 * directives.c: Fix typos.
103 * include/line-map.h: Fix typos.
104 * line-map.c: Fix typos.
105 * macro.c: Fix typos.
106
53a103d3
DS
1072012-05-25 Dodji Seketeli <dodji@redhat.com>
108
109 PR bootstrap/53459
110 * lex.c (search_line_fast): Avoid unused local typedefs to simulate
111 a static assertion.
112
828a7f76
DS
1132012-05-29 Dodji Seketeli <dodji@redhat.com>
114
115 PR preprocessor/53229
116 * internal.h (cpp_reader::set_invocation_location): Remove.
117 (cpp_reader::about_to_expand_macro_p): New member flag.
118 * directives.c (do_pragma): Remove Kludge as
119 pfile->set_invocation_location is no more.
120 * macro.c (cpp_get_token_1): Do away with the use of
121 cpp_reader::set_invocation_location. Just collect the macro
122 expansion point when we are about to expand the top-most macro.
123 Do not override cpp_reader::about_to_expand_macro_p.
124 This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
125 properly handle locations of expansion points.
126 (cpp_get_token_with_location): Adjust, as
127 cpp_reader::set_invocation_location is no more.
128 (paste_tokens): Take a virtual location parameter for
129 the LHS of the pasting operator. Use it in diagnostics. Update
130 comments.
131 (paste_all_tokens): Tighten the assert. Propagate the location of
132 the expansion point when no virtual locations are available.
133 Pass the virtual location to paste_tokens.
134 (in_macro_expansion_p): New static function.
135 (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
136 flag until we really start expanding the macro.
137
0b2c4be5
DS
1382012-05-16 Dodji Seketeli <dodji@redhat.com>
139
140 PR preprocessor/7263
141 * include/cpplib.h (cpp_classify_number): Take a location
142 parameter.
143 * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
144 macros that take a location parameter.
145 (cpp_classify_number): Take a (virtual) location parameter. Use
146 it for diagnostics. Adjust comments.
147 (eval_token): Take a location parameter. Pass it to
148 cpp_classify_number and to diagnostic routines.
149 (_cpp_parse_expr): Use virtual locations of tokens when parsing
150 expressions. Pass a virtual location to eval_token and to
151 diagnostic routines.
152
638d2065
TG
1532012-05-10 Tristan Gingold <gingold@adacore.com>
154
155 * expr.c (interpret_float_suffix): Add a guard.
156
3ad64f53
DS
1572012-05-02 Dodji Seketeli <dodji@redhat.com>
158
159 Properly initialize cpp_context in destringize_and_run
160 * directives.c (destringize_and_run): Properly initialize the new
161 context.
162 * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
163 the initial base context, which has the same life time as the
164 current instance of cpp_file.
165
b193dfa8
MLI
1662012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
167 Dodji Seketeli <dodji@seketeli.org>
168
3efc2959 169 PR c++/52974
b193dfa8
MLI
170 * libcpp/files.c (maybe_shorter_path): New.
171 (find_file_in_dir): Use it.
172
4e65a470
DS
1732012-04-30 Dodji Seketeli <dodji@redhat.com>
174
51fce2d3
DS
175 Switch -ftrack-macro-expansion=2 on by default.
176 * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
177 by default. Add comments.
178
c4ca1a09
DS
179 Strip "<built-in>" loc from displayed expansion context
180 * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
181 in comment.
182 (linemap_unwind_to_first_non_reserved_loc): Declare new function.
183 * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
184 new function.
185
3600218c
DS
186 Fix expansion point loc for macro-like tokens
187 * macro.c (macro_of_context): New static function.
188 (_cpp_push_token_context, push_extended_tokens_context): If the
189 macro argument is NULL, it means we are continuing the expansion
190 of the current macro, if any. Update comments.
191 (_cpp_pop_context): Re-enable expansion of the macro only when we
192 are really out of the context of the current expansion.
193
0ff2b8a0
DS
194 Fix token pasting with -ftrack-macro-expansion
195 * macro.c (paste_all_tokens): Put the token resulting from pasting
196 into an extended token context with -ftrack-macro-location is in
197 effect.
198
4e65a470
DS
199 Fix cpp_sys_macro_p with -ftrack-macro-expansion
200 * macro.c (cpp_sys_macro_p): Support -ftrack-macro-expansion.
201
112448b4
DS
2022012-04-29 Dodji Seketeli <dodji@redhat.com>
203
204 * lex.c (lex_raw_string): Change C++ style comments into C style
205 comments.
206 (lex_string): Likewise.
207
7f5f5f98
OW
2082012-04-27 Ollie Wild <aaw@google.com>
209
210 * include/cpplib.h (struct cpp_options): Add new field,
211 warn_literal_suffix.
212 (CPP_W_LITERAL_SUFFIX): New enum.
213 * init.c (cpp_create_reader): Default initialization of
214 warn_literal_suffix.
215 * lex.c (lex_raw_string): Treat user-defined literals which don't
216 begin with '_' as separate tokens and produce a warning.
217 (lex_string): Ditto.
218
1d72e96f
MLI
2192012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
220
221 * line-map.c (linemap_resolve_location): Synchronize comments with
222 those in line-map.h.
223 * include/line-map.h (linemap_resolve_location): Fix spelling in
224 comment.
225
e75b54a2
RE
2262012-03-22 Richard Earnshaw <rearnsha@arm.com>
227
228 * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
229
7888f266
RO
2302012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
231
232 * lex.c: Remove Solaris 8 reference.
233
dd552284
WL
2342012-02-14 Walter Lee <walt@tilera.com>
235
236 * configure.ac: Require 64-bit hwint for tilegx and tilepro.
237 * configure: Regenerate.
238
2c5cbc31
RG
2392012-01-09 Richard Guenther <rguenther@suse.de>
240
241 * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
242
b492b686
GF
2432012-01-09 Gary Funck <gary@intrepid.com>
244
245 PR preprocessor/33919
246 * files.c (_cpp_get_file_name): New. Implement file name
247 access function.
248 * internal.h (_cpp_get_file_name): New prototype.
249 * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
250 to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
251
75291c57
OH
2522012-01-03 Olivier Hainque <hainque@adacore.com>
253
254 * system.h: Prior to #define, #undef fopen and freopen unconditionally.
255
48b0b196
JM
2562011-12-20 Joseph Myers <joseph@codesourcery.com>
257
258 * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
259 (CLK_STDC1X): Change to CLK_STDC11.
260 * init.c (lang_defaults): Update comments.
261 (cpp_init_builtins): Update language tests. Use 201112L for C11
262 __STDC_VERSION__.
263
4a5e00ca
AS
2642011-12-20 Andreas Schwab <schwab@linux-m68k.org>
265
266 * configure: Regenerate.
267
095af58f
AS
2682011-12-19 Andreas Schwab <schwab@linux-m68k.org>
269
270 * configure: Regenerate.
271
b0c084b7
JJ
2722011-12-07 Jakub Jelinek <jakub@redhat.com>
273
274 PR bootstrap/50237
275 * internal.h (_cpp_init_lexer): New prototype.
276 * init.c (init_library): Call it.
277 * lex.c (init_vectorized_lexer): Remove constructor attribute,
278 add inline keyword.
279 (HAVE_init_vectorized_lexer): Define.
280 (_cpp_init_lexer): New function.
281
9b554be9
DS
2822011-12-03 Dodji Seketeli <dodji@redhat.com>
283
284 * macro.c (tokens_buff_remove_last_token)
285 (tokens_buff_put_token_to): Add an 'inline' function specifier to
286 the prototype.
287
8dcf72a8
DN
2882011-11-22 Diego Novillo <dnovillo@google.com>
289
290 * include/line-map.h (linemap_dump): Declare.
291 (line_table_dump): Declare.
292 * line-map.c (linemap_dump): New.
293 (line_table_dump): New.
294
7e74ce3f
ESR
2952011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
296
297 PR c++/50958
298 * expr.c (cpp_userdef_char_remove_type): Fix typo.
299
e9411247
MM
3002011-11-03 Michael Matz <matz@suse.de>
301
302 PR bootstrap/50857
303 * configure.ac: Check for -fno-exceptions -fno-rtti.
304 * configure: Regenerate.
305 * Makefile.in (NOEXCEPTION_FLAGS): New flag.
306 (ALL_CXXFLAGS): Use it.
307
0c1dace3
PC
3082011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
309
310 * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
311
25339f10
JM
3122011-11-02 Jason Merrill <jason@redhat.com>
313
314 PR c++/50810
315 * configure.ac: Add -Wno-narrowing to warning options.
316
97e3ad20
JM
3172011-10-31 Jason Merrill <jason@redhat.com>
318
1fb80b0c
JM
319 PR libstdc++/1773
320 * init.c (cpp_init_builtins): Set __cplusplus for C++11.
321
97e3ad20
JM
322 PR c++/50920
323 * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
324 CLK_GNUCXX0X to CLK_GNUCXX11.
325
3ce4f9e4
ESR
3262011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
327
328 Implement C++11 user-defined literals.
329 * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
330 cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
331 cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
332 cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
333 (cpp_classify_number): Classify unrecognized tokens as user-defined
334 literals.
335 * include/cpplib.h: Add new tokens for user-defined literals.
336 * init.c: Add new preprocessor flag (cxx11).
337 * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
338 including concatenation and promotion with suffixes.
339
3bb0c8db
DS
3402011-10-24 Dodji Seketeli <dodji@redhat.com>
341
342 * line-map.c (linemap_macro_map_lookup): Fix logic.
343
84756fd4
DS
3442011-10-24 Dodji Seketeli <dodji@redhat.com>
345
346 * include/line-map.h (linemap_expand_location): Take a line table
347 parameter. Update comment.
348 (linemap_resolve_location): Update comment.
349 (linemap_expand_location_full): Remove.
350 * line-map.c (linemap_resolve_location): Handle reserved
351 locations; return a NULL map in those cases.
352 (linemap_expand_location): If location is reserved, return a
353 zeroed expanded location. Update comment. Take a line table to
354 assert that the function takes non-virtual locations only.
355 (linemap_expand_location_full): remove.
356 (linemap_dump_location): Handle the fact that
357 linemap_resolve_location can return NULL line maps when the
358 location resolves to a reserved location.
359
360 * line-map.c (linemap_macro_map_lookup): Fix logic.
361
ad2305ad
DS
3622011-10-22 Dodji Seketeli <dodji@redhat.com>
363
364 PR bootstrap/50778
365 * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
366 context to act upon.
367 * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update
368 comment.
369 (cpp_token_from_context_at): Likewise.
370 (cpp_peek_token): Use the context to peek tokens from.
371
cbbcf655
DS
3722011-10-20 Dodji Seketeli <dodji@redhat.com>
373
374 PR bootstrap/50801
375 * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
376 number of tokens.
377
d17687f6
DS
3782011-10-18 Dodji Seketeli <dodji@redhat.com>
379
380 PR bootstrap/50760
381 * include/line-map.h (struct linemap_stats): Change the type of
382 the members from size_t to long.
383 * macro.c (macro_arg_token_iter_init): Unconditionally initialize
384 iter->location_ptr.
385
411f92de
DS
3862011-10-17 Dodji Seketeli <dodji@redhat.com>
387
388 * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
389 variable without using it if ENABLE_CHECKING is not defined. Mark
390 the LOCATION parameter as being unused.
391
b9bd6f74
TT
3922011-10-15 Tom Tromey <tromey@redhat.com>
393 Dodji Seketeli <dodji@redhat.com>
394
395 * include/line-map.h (struct line_maps::alloced_size_for_request):
396 New member.
397 * line-map.c (new_linemap): Use set->alloced_size_for_request to
398 get the actual allocated size of line maps.
399
64a1a422
TT
4002011-10-15 Tom Tromey <tromey@redhat.com>
401 Dodji Seketeli <dodji@redhat.com>
402
403 * line-map.h (struct linemap_stats): Declare new struct.
404 (linemap_get_statistics): Declare ...
405 * line-map.c (linemap_get_statistics): ... new function.
406 * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
407 Declare new counters.
408 (enter_macro_context, replace_args): Update
409 num_macro_tokens_counter.
410 (cpp_get_token_1): Update num_expanded_macros_counter.
411
847e697a
TT
4122011-10-15 Tom Tromey <tromey@redhat.com>
413 Dodji Seketeli <dodji@redhat.com>
414
415 * include/cpplib.h (struct cpp_options)<debug>: New struct member.
416 * include/line-map.h (linemap_dump_location): Declare ...
417 * line-map.c (linemap_dump_location): ... new function.
418
92582b75
TT
4192011-10-15 Tom Tromey <tromey@redhat.com>
420 Dodji Seketeli <dodji@redhat.com>
421
422 * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
423 New option.
424 * internal.h (struct macro_context): New struct.
425 (enum context_tokens_kind): New enum.
426 (struct cpp_context)<tokens_kind>: New member of type enum
427 context_tokens_kind.
428 (struct cpp_context)<macro>: Remove this. Replace it with an enum
429 of macro and macro_context.
430 (struct cpp_context)<direct_p>: Remove.
431 (_cpp_remaining_tokens_num_in_context): Declare new function.
432 * directives.c (destringize_and_run): Adjust.
433 * lex.c (_cpp_remaining_tokens_num_in_context)
434 (_cpp_token_from_context_at): Define new functions
435 (cpp_peek_token): Use them.
436 * init.c (cpp_create_reader): Initialize the base context to zero.
437 (_cpp_token_from_context_at): Define new static function.
438 (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
439 _cpp_token_from_context_at.
440 * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
441 members.
442 (enum macro_arg_token_kind): New enum.
443 (struct macro_arg_token_iter): New struct.
444 (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
445 (alloc_expanded_arg_mem, ensure_expanded_arg_room)
446 (delete_macro_args, set_arg_token, get_arg_token_location)
447 (arg_token_ptr_at, macro_arg_token_iter_init)
448 (macro_arg_token_iter_get_token)
449 (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
450 (expanded_token_index, tokens_buff_new, tokens_buff_count)
451 (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
452 (tokens_buff_add_token, tokens_buff_remove_last_token)
453 (reached_end_of_context, consume_next_token_from_context): New
454 static functions.
455 (cpp_get_token_1): New static function. Split and extended from
456 cpp_get_token. Use reached_end_of_context and
457 consume_next_token_from_context. Unify its return point. Move
458 the location tweaking from cpp_get_token_with_location in here.
459 (cpp_get_token): Use cpp_get_token_1
460 (stringify_arg): Use the new arg_token_at.
461 (paste_all_tokens): Support tokens coming from extended tokens
462 contexts.
463 (collect_args): Return the number of collected arguments, by
464 parameter. Store virtual locations of tokens that constitute the
465 collected args.
466 (funlike_invocation_p): Return the number of collected arguments,
467 by parameter.
468 (enter_macro_context): Add a parameter for macro expansion point.
469 Pass it to replace_args and to the "used" cpp callback. Get the
470 number of function-like macro arguments from funlike_invocation_p,
471 pass it to the new delete_macro_args to free the memory used by
472 macro args. When -ftrack-macro-expansion is in effect, for macros
473 that have no arguments, create a macro map for the macro expansion
474 and use it to allocate proper virtual locations for tokens
475 resulting from the expansion. Push an extended tokens context
476 containing the tokens resulting from macro expansion and their
477 virtual locations.
478 (replace_args): Rename the different variables named 'count' into
479 variables with more meaningful names. Create a macro map;
480 allocate virtual locations of tokens resulting from this
481 expansion. Use macro_arg_token_iter to iterate over tokens of a
482 given macro. Handle the case of the argument of
483 -ftrack-macro-expansion being < 2. Don't free macro arguments
484 memory resulting from expand_arg here, as these are freed by the
485 caller of replace_arg using delete_macro_args now. Push extended
486 token context.
487 (next_context, push_ptoken_context, _cpp_push_token_context)
488 (_cpp_push_text_context): Properly initialize the context.
489 (expand_arg): Use the new alloc_expanded_arg_mem,
490 push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
491 (_cpp_pop_context): Really free the memory held by the context.
492 Handle freeing memory used by extended tokens contexts.
493 (cpp_get_token_with_location): Use cpp_get_token_1.
494 (cpp_sys_macro_p): Adjust.
495 (_cpp_backup_tokens): Support the new kinds of token contexts.
496 * traditional.c (recursive_macro): Adjust.
497
46427374
TT
4982011-10-15 Tom Tromey <tromey@redhat>
499 Dodji Seketeli <dodji@redhat.com>
500
501 * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
502 member.
503 (MAX_SOURCE_LOCATION): New constant.
504 (struct line_map_ordinary, struct line_map_macro): New structs.
505 (struct line_map): Turn this into a union of the two above. Add
506 comments.
507 (struct maps_info): New struct.
508 (struct line_maps)<info_ordinary, info_macro>: Two new fields.
509 These now carry the map information that was previously scattered
510 in struct line_maps.
511 (struct map_info::allocated): Fix comment.
512 (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
513 (ORDINARY_MAP_STARTING_LINE_NUMBER)
514 (ORDINARY_MAP_INCLUDER_FILE_INDEX)
515 (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
516 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
517 (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
518 (MACRO_MAP_EXPANSION_POINT_LOCATION)
519 (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
520 (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
521 (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
522 (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
523 (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
524 (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
525 (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
526 (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
527 (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
528 (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
529 (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
530 information.
531 (linemap_check_ordinary, linemap_assert)
532 (linemap_location_before_p): New macros.
533 (linemap_position_for_line_and_column)
534 (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
535 (linemap_macro_expansion_map_p)
536 (linemap_macro_map_loc_to_def_point)
537 (linemap_macro_map_loc_unwind_once)
538 (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
539 (linemap_get_source_line linemap_get_source_column)
540 (linemap_map_get_macro_name, linemap_get_file_path)
541 (linemap_location_in_system_header_p)
542 (linemap_location_from_macro_expansion_p): Declare new functions.
543 (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
544 (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
545 accessors act on ordinary maps only.
546 (INCLUDED_FROM): Return NULL for main files; use the new
547 accessors.
548 (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
549 (struct expanded_location): Move here from gcc/input.h
550 (linemap_resolve_location, linemap_expand_location)
551 (linemap_expand_location_full): Declare new functions.
552 * line-map.c: Include cpplib.h, internal.h
553 (linemap_enter_macro, linemap_add_macro_token)
554 (linemap_get_expansion_line, linemap_get_expansion_filename): New
555 functions that are private to libcpp.
556 (linemap_assert): New macro.
557 (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
558 (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
559 (linemap_macro_map_loc_unwind_toward_spelling)
560 (linemap_macro_map_loc_to_exp_point)
561 (first_map_in_common_1, first_map_in_common): New static
562 functions.
563 (new_linemap): Define new static functions. Extracted and
564 enhanced from ...
565 (linemap_add): ... here. Use linemap_assert in lieu of abort
566 previously.
567 (linemap_tracks_macro_expansion_locs_p)
568 (linemap_add_macro_token, linemap_macro_expansion_map_p)
569 (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
570 (linemap_macro_map_loc_to_def_point)
571 (linemap_macro_map_loc_unwind_once)
572 (linemap_step_out_once, linemap_map_get_index)
573 (linemap_get_source_line,linemap_get_source_column)
574 (linemap_get_file_path, linemap_map_get_macro_name)
575 (linemap_location_in_system_header_p)
576 (linemap_location_originated_from_system_header_p)
577 (linemap_location_from_macro_expansion_p)
578 (linemap_tracks_macro_expansion_locs_p)
579 (linemap_resolve_location, linemap_expand_location)
580 (linemap_expand_location_full)
581 (linemap_tracks_macro_expansion_locs_p)
582 (linemap_position_for_line_and_column, linemap_compare_locations):
583 Define new public functions.
584 (linemap_init): Initialize ordinary and macro maps information in
585 the map set.
586 (linemap_check_files_exited): Use the new accessors.
587 (linemap_free): Remove this dead code.
588 (linemap_line_start): Assert this uses an ordinary map. Adjust to
589 use the new ordinary map accessors and data structures. Don't
590 overflow past the lowest possible macro token's location.
591 (linemap_position_for_column): Assert the ordinary maps of the map
592 set are really ordinary. Use ordinary map accessors.
593 (linemap_lookup): Keep the same logic but generalize to allow
594 lookup of both ordinary and macro maps. Do not crash when called
595 with an empty line table.
596 * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
597 new API of line-map.h.
598 * directives.c (start_directive, do_line, do_linemarker)
599 (do_linemarker): Likewise.
600 * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
601 (make_cpp_dir, cpp_make_system_header): Likewise.
602 * init.c (cpp_read_main_file): Likewise.
603 * internal.h (CPP_INCREMENT_LINE): Likewise.
604 (linemap_enter_macro, linemap_add_macro_token)
605 (linemap_get_expansion_line, linemap_get_expansion_filename): New
606 functions private to libcpp.
607 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
608 (skip_line_comment, skip_whitespace, lex_raw_string)
609 (_cpp_lex_direct): Likewise.
610 * macro.c (_cpp_builtin_macro_text): Likewise.
611 (_cpp_aligned_alloc): Initialize the new name member of the macro.
612 * traditional.c (copy_comment, _cpp_scan_out_logical_line):
613 Likewise.
614 * errors.c (cpp_diagnostic): Adjust to new linemap API.
615
892a371f
DS
6162011-08-28 Dodji Seketeli <dodji@redhat.com>
617
618 * line-map.c (linemap_add): Assert that reason must not be
619 LC_RENAME when called for the first time on a "main input file".
620
e3dfef44
GC
6212011-08-22 Gabriel Charette <gchare@google.com>
622
623 * init.c (cpp_create_reader): Inititalize forced_token_location_p.
624 * internal.h (struct cpp_reader): Add field forced_token_location_p.
625 * lex.c (_cpp_lex_direct): Use forced_token_location_p.
626 (cpp_force_token_locations): New.
627 (cpp_stop_forcing_token_locations): New.
628
32fe396e
RO
6292011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
630
631 PR libstdc++/1773
632 * init.c (cpp_init_builtins): Define __cplusplus 19971L.
633
7c1ffff9
JM
6342011-08-18 Joseph Myers <joseph@codesourcery.com>
635
636 * include/cpplib.h (struct cpp_options): Fix typo.
637
a48e3dd1
JM
6382011-08-18 Joseph Myers <joseph@codesourcery.com>
639
640 * include/cpplib.h (struct cpp_options): Add rliterals.
641 * init.c (struct lang_flags, lang_defaults): Add rliterals.
642 (cpp_set_lang): Set rliterals option.
643 (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
644 * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
645
3f6ced10
GC
6462011-08-15 Gabriel Charette <gchare@google.com>
647
648 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
649 Update all users to use linemap_position_for_column instead.
650
0681d04c
GC
6512011-07-28 Gabriel Charette <gchare@google.com>
652
653 * include/line-map.h (struct line_maps):
654 Remove unused field last_listed. Update all users.
655
5e9627ca
L
6562011-07-28 H.J. Lu <hongjiu.lu@intel.com>
657
658 * configure.ac: Set need_64bit_hwint to yes for x86 targets.
659 * configure: Regenerated.
660
a024b70f
RO
6612011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
662
663 * system.h [__cplusplus]: Wrap C function declarations in extern "C".
664
5b6d595b
RO
6652011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
666 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
667
668 PR bootstrap/49794
669 * configure.ac: Test AM_ICONV with CXX.
670 * configure: Regenerate.
671 * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
672
d0a9fbe1
DS
6732011-07-15 Dodji Seketeli <dodji@redhat.com>
674
675 * directives.c (struct if_stack): Use source_location as type
676 here.
677 * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
678 indent, def_pragma, used_define, used_undef>: Properly use
679 source_location as parameter type, rather than unsigned int.
680
fbdd5d87
RO
6812011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
682
683 PR target/39150
684 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
685 like i[34567]86-*-solaris2.1[0-9]*.
686 * configure: Regenerate.
687
8787a05a
JM
6882011-06-16 Jason Merrill <jason@redhat.com>
689
690 PR c++/45399
691 * lex.c (lex_raw_string): Don't check for embedded NUL.
692
38fbfaf6
DS
6932011-06-06 Dodji Seketeli <dodji@redhat.com>
694
695 PR preprocessor/48532
696 * directives.c (do_pragma): Don't forget the invocation location
697 when parsing the pragma name of a namespaced pragma directive.
698
fc0993ac
JT
6992011-05-29 John Tytgat <John.Tytgat@aaug.net>
700
701 * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
702
ef230b38
UB
7032011-05-22 Uros Bizjak <ubizjak@gmail.com>
704
705 PR target/49104
706 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
707 is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
708
e5b0dad8
JK
7092011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com>
710
711 * system.h (ENUM_BITFIELD): Remove.
712
6cfae070
JJ
7132011-04-24 Jakub Jelinek <jakub@redhat.com>
714
715 PR preprocessor/48740
716 * lex.c (lex_raw_string): When raw string ends with
717 ??) followed by raw prefix and ", ensure it is preprocessed
718 with ??) rather than ??].
719
04695783
JM
7202011-04-20 Jim Meyering <meyering@redhat.com>
721
722 * files.c (destroy_cpp_file): Remove useless if-before-free.
723 * init.c (cpp_destroy): Likewise.
724 * macro.c (replace_args): Likewise.
725 * pch.c (cpp_valid_state): Likewise.
726
4489800d
KT
7272011-03-25 Kai Tietz <ktietz@redhat.com>
728
729 * files.c (file_hash_eq): Use filename_cmp
730 instead of strcmp.
731 (nonexistent_file_hash_eq): Likewise.
732 (remap_filename): Likewise.
733 Handle absolute DOS-path,
734 (append_file_to_dir): Check for IS_DIR_SEPARATOR
735 instead of slash.
736 (read_name_map): Likewise.
737 * linemap.c (linemap_add): Use filename_cmp
738 instead of strcmp.
739 * mkdeps.c (apply_vpath): Use filename_ncmp
740 instead of strncmp.
741 (deps_restore): Use filename_cmp instead of
742 strcmp.
743 * init.c (read_original_directory): Use
744 IS_DIR_SEPARATOR instead of checking for slash.
745
f3c33d9d
MM
7462011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
747
748 PR preprocessor/48192
749 * directives.c (do_ifdef): Do not consider conditional macros as
750 being defined.
751 (do_ifndef): Ditto.
752 * expr.c (parse_defined): Ditto.
753
01956319
RH
7542011-03-18 Richard Henderson <rth@redhat.com>
755
756 PR bootstrap/45381
757 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
758
c5a62c6f
EB
7592011-11-04 Eric Botcazou <ebotcazou@adacore.com>
760 Jakub Jelinek <jakub@redhat.com>
761
762 PR preprocessor/39213
763 * directives.c (end_directive): Call _cpp_remove_overlay for deferred
764 pragmas as well in traditional mode.
765
0e1a989c
ILT
7662010-11-17 Ian Lance Taylor <iant@google.com>
767
768 PR bootstrap/45538
769 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of
770 AC_LANG based on ENABLE_BUILD_WITH_CXX.
771
651a20b5
KT
7722010-11-16 Kai Tietz <kai.tietz@onevision.com>
773
774 PR preprocessor/17349
775 * lex.c (save_comment): Handle in argument passing c++
776 comments special.
777
480767a9
ILT
7782010-11-02 Ian Lance Taylor <iant@google.com>
779
780 * configure.ac: Use AC_SYS_LARGEFILE.
781 * configure: Rebuild.
782 * config.in: Rebuild.
783
078419c9 7842010-10-19 Basile Starynkevitch <basile@starynkevitch.net>
480767a9 785
078419c9
BS
786 * line-map.h (source_location): Remove obsolete comment
787 mentioning location_s.
788
d6874138
KT
7892010-09-29 Kai Tietz <kai.tietz@onevision.com>
790
791 PR preprocessor/45362
792 * directives.c (cpp_pop_definition): Make static.
793 (do_pragma_push_macro): Reworked to store text
794 definition.
795 (do_pragma_pop_macro): Add free text definition.
796 (cpp_push_definition): Removed.
797 * include/cpplib.h (cpp_push_definition): Removed.
798 (cpp_pop_definition): Likewise.
799 * internal.h (def_pragma_macro): Remove member 'value'
800 and add new members 'definition', 'line',
801 'syshdr', 'sued' and 'is_undef'.
802 * pch.c (_cpp_restore_pushed_macros): Rework to work
803 on text definition and store additional macro flags.
804 (_cpp_save_pushed_macros): Likewise.
805
e3339d0f
JM
8062010-09-29 Joseph Myers <joseph@codesourcery.com>
807
808 * include/cpplib.h (cpp_options): Rename warn_deprecated,
809 warn_traditional, warn_long_long and pedantic.
810 * directives.c (directive_diagnostics, _cpp_handle_directive):
811 Update names of cpp_options members.
812 * expr.c (cpp_classify_number, eval_token): Update names of
813 cpp_options members.
814 * init.c (cpp_create_reader, post_options): Update names of
815 cpp_options members.
816 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
817 cpp_options members.
818 * macro.c (parse_params): Update names of cpp_options members.
819
128465e6
ILT
8202010-09-15 Ian Lance Taylor <iant@google.com>
821
822 * init.c: Fix type name in comment.
823
a69d2520
JJ
8242010-08-31 Jakub Jelinek <jakub@redhat.com>
825
826 PR preprocessor/45457
827 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
828 needed.
829 * directives.c (do_ifdef, do_ifndef): Likewise.
830
707bcb7a
RO
8312010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
832
833 * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
834
6f173e52
RH
8352010-08-24 Richard Henderson <rth@redhat.com>
836
837 PR bootstrap/45376
838 * configure.ac (HAVE_SSE4): New check.
839 * configure, config.in: Rebuild.
840 * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
841
789d73cb
RO
8422010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
843
844 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
845 etc. on Solaris 2/x86.
846
246a2fcb
RH
8472010-08-21 Richard Henderson <rth@redhat.com>
848 Andi Kleen <ak@linux.intel.com>
849 David S. Miller <davem@davemloft.net>
850
851 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
852 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
853 (ptrdiff_t): Check via AC_CHECK_TYPE.
854 * config.in, configure: Rebuild.
855 * system.h: Include stdint.h, if available.
856 * lex.c (WORDS_BIGENDIAN): Provide default.
857 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
858 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
859 search_line_sse2, search_line_sse42, init_vectorized_lexer,
860 search_line_fast): New.
861 (_cpp_clean_line): Use search_line_fast. Restructure the fast
862 loop to make it clear when we're leaving the loop. Stay in the
863 fast loop for non-trigraph '?'.
864
8e680db5
JJ
8652010-06-11 Jakub Jelinek <jakub@redhat.com>
866
867 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
868 callback.
869 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
870 (cpp_macro_definition): Remove const qual from second argument.
871 * macro.c (enter_macro_context): Call user_builtin_macro callback for
872 NODE_BUILTIN !NODE_USED macros.
873 (warn_of_redefinition): Likewise. Remove const qual from second
874 argument.
875 (cpp_macro_definition): Likewise.
876 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
877 for NODE_BUILTIN !NODE_USED macros.
878
1cb42611
JM
8792010-06-10 Joseph Myers <joseph@codesourcery.com>
880
881 * include/cpplib.h (struct cpp_options): Remove show_column.
882 * init.c (cpp_create_reader, post_options): Don't set show_column.
883
ff5dfc48
JR
8842010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
885
886 PR bootstrap/44432
887 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
888 check that C++ compiler works.
889 * configure: Regenerate.
890
a9429e29
LB
8912010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
892
893 * include/symtab.h (ht_identifier_ptr): New.
894
c3f247f4
RW
8952010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
896 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
897
898 PR bootstrap/42798
899 * configure.ac: Check for declaration of 'basename(char *)'.
900 * configure: Regenerate.
901 * config.in: Regenerate.
902
2778d766
JM
9032010-04-25 Joseph Myers <joseph@codesourcery.com>
904
905 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
906 * init.c (lang_defaults): Add entries for new language variants.
907 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
908 variants.
909
d8a12e84
MLI
9102010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
911
912 PR cpp/43195
913 * files.c (report_missing_guard): Test for #pragma once.
914
87cf0651
SB
9152010-04-07 Simon Baldwin <simonb@google.com>
916
917 * directives.c (do_diagnostic): Add warning reason argument,
918 call appropriate error reporting function for code.
919 (directive_diagnostics): Call specific warning functions with
920 warning reason where appropriate.
921 (do_error, do_warning, do_pragma_dependency): Add warning reason
922 argument to do_diagnostic calls.
923 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
924 _cpp_create_definition): Call specific warning functions with
925 warning reason where appropriate.
926 * Makefile.in: Add new diagnostic functions to gettext translations.
927 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
928 to error callback.
929 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
930 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
931 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
932 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
933 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
934 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
935 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
936 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
937 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
938 warning reason codes.
939 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
940 cpp_warning_with_line, cpp_pedwarning_with_line,
941 cpp_warning_with_line_syshdr): New specific error reporting functions.
942 * pch.c (cpp_valid_state): Call specific warning functions with
943 warning reason where appropriate.
944 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
945 diagnostic handlers.
946 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
947 cpp_warning_with_line, cpp_pedwarning_with_line,
948 cpp_warning_with_line_syshdr): New specific error reporting functions.
949 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
950 specific warning functions with warning reason where appropriate.
951 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
952 warn_about_normalization, lex_identifier_intern, lex_identifier,
953 _cpp_lex_direct): Ditto.
954 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
955 narrow_str_to_charconst): Ditto.
956
d947ada0
JJ
9572010-04-06 Jakub Jelinek <jakub@redhat.com>
958
959 PR preprocessor/43642
960 * lex.c (lex_raw_string): Change type of TYPE variable to
961 unsigned char.
962
4d9e8446
RW
9632010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
964
965 * aclocal.m4: Regenerate.
966
52150625
JM
9672010-03-29 Jason Merrill <jason@redhat.com>
968
00a81b8b
JM
969 More N3077 raw string changes
970 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
971 strings.
972 * lex.c (bufring_append): Split out from...
973 (lex_raw_string): ...here. Undo trigraph and line splicing
974 transformations. Do process line notes in multi-line literals.
975 (_cpp_process_line_notes): Ignore notes that were already handled.
976
52150625
JM
977 Some raw string changes from N3077
978 * charset.c (cpp_interpret_string): Change inner delimiters to ().
979 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
980
709d7160
JJ
9812010-02-11 Jakub Jelinek <jakub@redhat.com>
982
983 * init.c (read_original_filename): Don't call read_original_directory
984 if _cpp_handle_directive returns 0.
985
dadab4fd
JM
9862010-01-01 Joseph Myers <joseph@codesourcery.com>
987
988 PR preprocessor/41947
989 * expr.c (cpp_classify_number): Give error for hexadecimal
990 floating-point constant with no digits before or after point.
991
3de8a540
AC
9922009-11-20 Arnaud Charlet <charlet@adacore.com>
993
994 * macro.c (enter_macro_context): Call cb.used callback if defined.
995 * directives.c (do_idef, do_ifndef): Ditto.
996 * include/cpplib.h (struct cpp_callbacks): Add used callback.
997
17e7cb85
KT
9982009-11-11 Kai Tietz <kai.tietz@onevision.com>
999
1000 * directives.c (do_pragma_push_macro): New pragma handler.
1001 (do_pragma_pop_macro): Likewise.
1002 (_cpp_init_internal_pragmas): Add push_macro and
1003 pop_macro handler to internal pragmas.
1004 (lex_macro_node_from_str): Removed.
1005 (cpp_push_definition): Replace lex_macro_node_from_str
1006 by _cpp_lex_identifier.
1007 (cpp_pop_definition): Likewise.
1008 * internal.h (_cpp_lex_identifier): New prototype.
1009 (def_pragma_macro): New structure.
1010 (cpp_reader): New member pushed_macros.
1011 * lex.c (_cpp_lex_identifier): New function.
1012 (lex_identifier_intern): New function.
1013 * init.c (cpp_create_reader): Initialize pushed_macros
1014 member.
1015 (cpp_destroy): Free elements in pushed_macros member.
1016 * pch.c (_cpp_save_pushed_macros): New function.
1017 (_cpp_restore_pushed_macros): Likewise.
1018 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
1019 (cpp_read_state): Use _cpp_restore_pushed_macros.
1020
2c6e3f55
JJ
10212009-10-19 Jakub Jelinek <jakub@redhat.com>
1022
1023 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
1024 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
1025 and char32_cset_desc.
1026 (converter_for_type): Handle CPP_UTF8STRING.
1027 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
1028 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
1029 (parse_include): Reject raw strings.
1030 * include/cpplib.h (CPP_UTF8STRING): New token type.
1031 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
1032 * lex.c (lex_raw_string): New function.
1033 (lex_string): Handle u8 string literals, call lex_raw_string
1034 for raw string literals.
1035 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
1036 sequences.
1037 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
1038
96c169e1
JJ
10392009-10-14 Jakub Jelinek <jakub@redhat.com>
1040
1041 PR preprocessor/41543
1042 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
1043 * line-map.c (linemap_init): Initialize highest_location and
1044 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
1045
30c99a9e
JM
10462009-10-09 Jason Merrill <jason@redhat.com>
1047
1048 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
1049
2214382c
NV
10502009-10-09 Neil Vachharajani <nvachhar@google.com>
1051
1052 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
1053 sccs.
1054
e02222d2
LR
10552009-09-23 Loren J. Rittle <ljrittle@acm.org>
1056
1057 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
1058 * configure: Rebuilt.
1059
9a8a2b7a
RG
10602009-09-22 Richard Guenther <rguenther@suse.de>
1061
1062 PR pch/38987
1063 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
1064
74dc6a11
CD
10652009-09-18 Chris Demetriou <cgd@google.com>
1066
1067 PR preprocessor/28435:
1068 * include/cpplib.h (struct cpp_options): Add new member
1069 deps.need_preprocessor_output.
1070 * files.c (open_file_failed): If preprocessor output is needed
1071 always report an error.
1072
933608b7
KT
10732009-09-13 Kai Tietz <kai.tietz@onevision.com>
1074
1075 * configure.ac: Set for i?86-w64-mingw*
1076 need_64bit_hwint to yes.
1077 * configure: Regenerated.
1078
86373e7e
JM
10792009-09-10 Jason Merrill <jason@redhat.com>
1080
1081 * directives.c (cpp_define): constify.
1082
fd2ab214
ILT
10832009-09-02 Ian Lance Taylor <iant@google.com>
1084
1085 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
1086
df58e648
RW
10872009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1088
1089 * configure.ac (AC_PREREQ): Bump to 2.64.
1090
5213506e
RW
10912009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1092
1093 * aclocal.m4: Regenerate.
1094 * config.in: Regenerate.
1095 * configure: Regenerate.
1096
709a22df
TT
10972009-08-17 Tom Tromey <tromey@redhat.com>
1098
1099 PR preprocessor/41067:
1100 * charset.c (convert_escape): Add missing ":" to error text.
1101
0c539b47
DR
11022009-07-27 Douglas B Rupp <rupp@gnat.com>
1103
1104 * include/cpplib.h (INO_T_CPP): New macro.
1105 (struct cpp_dir): Use it.
1106
2b69c841
JQ
11072009-07-20 Jerry Quinn <jlquinn@optonline.net>
1108
1109 PR regression/40800
1110 * configure.ac: Use = instead of == for testing
1111 ENABLE_BUILD_WITH_CXX.
1112 * configure: Rebuild.
1113
f1bf410c
JQ
11142009-07-17 Jerry Quinn <jlquinn@optonline.net>
1115
1116 * directives.c (do_linemarker, do_line): Use CPP_STRING for
1117 ignored enum value.
1118 * files.c (find_file_in_dir): Add cast from void* to char*.
1119 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
1120 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
1121 warnings.
1122 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
1123 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
1124 COMPILER_FLAGS): New.
1125 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
1126 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
1127 instead of ALL_CFLAGS.
1128 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
1129 from other warnings. Add -Wc++-compat to C-specific warnings.
1130 Check for --enable-build-with-cxx. Set and substitute
1131 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
1132 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
1133 AC_CHECK_HEADERS.
1134 * configure: Rebuild.
1135 * include/cpp-id-data.h: Remove extern "C".
1136 * include/line-map.h: Likewise.
1137 * include/mkdeps.h: Likewise.
1138 * include/symtab.h: Likewise.
1139 * internal.h: Likewise.
1140
a28fbdba
MLI
11412009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1142
1143 * directives.c (parse_include): Add location argument. Update all
1144 calls.
1145 (parse_answer): Likewise.
1146 (do_include_common): Error with exact location.
1147 (parse_assertion): Likewise.
1148
b506a5a2
MLI
11492009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1150
1151 * expr.c (num_div_op): Take explicit location.
1152
7d8847a4
ILT
11532009-06-17 Ian Lance Taylor <iant@google.com>
1154
1155 * include/cpplib.h (progname): Don't declare.
1156
3d8b2a98
ILT
11572009-06-12 Ian Lance Taylor <iant@google.com>
1158
1159 * include/cpplib.h (struct cpp_options): Add
1160 warn_cxx_operator_names field.
1161 (NODE_WARN_OPERATOR): Define.
1162 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
1163 type to 6 bits.
1164 * init.c (mark_named_operators): Add flags parameter.
1165 (cpp_post_options): Pick flags value to pass to
1166 mark_named_operators.
1167 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
1168 identifier is an operator name in C++.
1169
e74fe492
AH
11702009-06-01 Aldy Hernandez <aldyh@redhat.com>
1171
1172 * include/line-map.h (LAST_SOURCE_COLUMN): New.
1173
4851089f
ILT
11742009-06-01 Ian Lance Taylor <iant@google.com>
1175
1176 * include/cpp-id-data.h: Add extern "C".
1177 * include/line-map.h: Likewise.
1178 * include/mkdeps.h: Likewise.
1179 * include/symtab.h: Likewise.
1180 * internal.h: Likewise.
1181
7e5487a2
ILT
11822009-05-15 Ian Lance Taylor <iant@google.com>
1183
1184 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
1185 builtin_type. Change all uses.
1186
00b0c19b
MLI
11872009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1188
1189 PR cpp/36674
1190 * directives (do_linemarker): Compensate for the increment in
1191 location that occurs when we reach the end of line.
1192 * files (_cpp_stack_include): Mention _cpp_find_file in the
1193 comment.
1194
9a0c6187
JM
11952009-05-10 Joseph Myers <joseph@codesourcery.com>
1196
1197 * include/cpplib.h (enum cpp_token_fld_kind): Add
1198 CPP_TOKEN_FLD_TOKEN_NO.
1199 (struct cpp_macro_arg, struct cpp_identifier): Define.
1200 (union cpp_token_u): Use struct cpp_identifier for identifiers.
1201 Use struct cpp_macro_arg for macro arguments. Add token_no for
1202 CPP_PASTE token numbers.
1203 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
1204 do_pragma_poison, parse_assertion): Use val.node.node in place of
1205 val.node.
1206 * expr.c (parse_defined, eval_token): Use val.node.node in place
1207 of val.node.
1208 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
1209 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
1210 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
1211 place of val.arg_no. Use val.node.node in place of val.node.
1212 * macro.c (replace_args, cpp_get_token, parse_params,
1213 lex_expansion_token, create_iso_definition, cpp_macro_definition):
1214 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
1215 Use val.node.node in place of val.node.
1216
9e322bc1
JM
12172009-05-03 Joseph Myers <joseph@codesourcery.com>
1218
1219 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
1220 UTF-8 sequences.
1221
f88d0772
JM
12222009-04-25 Joseph Myers <joseph@codesourcery.com>
1223
1224 PR preprocessor/39559
1225 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
1226 constants larger than intmax_t in C99 mode.
1227
d1b38208
TG
12282009-04-21 Taras Glek <tglek@mozilla.com>
1229
1230 * include/cpp-id-data.h: Update GTY annotations to new syntax.
1231 * include/cpplib.h: Likewise.
1232 * include/line-map.h: Likewise.
1233 * include/symtab.h: Likewise.
1234
cfc93532
MLI
12352009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1236
1237 PR c++/14875
1238 * lex.c (cpp_type2name): Take a flags parameter. Call
1239 cpp_named_operator2name for named operators and cpp_digraph2name
1240 for digraphs.
1241 (cpp_digraph2name): New.
1242 (cpp_spell_token): Use it.
1243 (cpp_output_token): Likewise.
1244 * include/cpplib.h (cpp_type2name): Update declaration.
1245 * init.c (cpp_named_operator2name): New.
1246 * internal.h (cpp_named_operator2name): Declare.
1247
9c650d90
MLI
12482009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1249
1250 PR c++/13358
1251 * init.c (cpp_create_reader): Wlong_long is disabled by default.
1252 * expr.c (cpp_classify_number): Give different messages for C and
1253 C++ front-ends.
1254
aa508502
JM
12552009-04-19 Joseph Myers <joseph@codesourcery.com>
1256
1257 PR preprocessor/20078
1258 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
1259 field.
1260 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
1261 (struct cpp_token): Change flags to unsigned short.
1262 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
1263 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
1264 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
1265 tokens.
1266 * macro.c (macro_real_token_count): New.
1267 (enter_macro_context, replace_args): Use macro_real_token_count.
1268 (create_iso_definition): Record whitespace surrounding and digraph
1269 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
1270 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
1271 multiple consecutive ## tokens.
1272 (_cpp_create_definition): Initialize extra_tokens.
1273 (cpp_macro_definition): Use macro_real_token_count.
1274
61cc8223
JM
12752009-04-18 Joseph Myers <joseph@codesourcery.com>
1276
1277 * directives.c (parse_include): Pass true to check_eol.
1278
c7f9c0b9
JM
12792009-04-18 Joseph Myers <joseph@codesourcery.com>
1280
1281 PR preprocessor/39646
1282 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
1283 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
1284 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
1285 place of LC_RENAME.
1286
a5cb563b
JM
12872009-04-18 Joseph Myers <joseph@codesourcery.com>
1288
1289 PR preprocessor/39647
1290 * directives.c (check_eol): Add parameter expand.
1291 (do_undef, parse_include, do_line, do_linemarker, do_ident,
1292 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
1293 do_else, do_endif, do_assert, do_unassert): All callers changed.
1294 Pass true from do_line, false elsewhere.
1295
18f41a1b
JM
12962009-04-12 Joseph Myers <joseph@codesourcery.com>
1297
1298 PR preprocessor/31869
1299 * macro.c (stringify_arg): Handle NULL source token in padding
1300 token where previous padding token did not have source token with
1301 preceding whitespace.
1302
748086b7
JJ
13032009-04-09 Jakub Jelinek <jakub@redhat.com>
1304
1305 * Makefile.in: Change copyright header to refer to version
1306 3 of the GNU General Public License and to point readers at the
1307 COPYING3 file and the FSF's license web page.
1308 * charset.c: Likewise.
1309 * directives-only.c: Likewise.
1310 * directives.c: Likewise.
1311 * errors.c: Likewise.
1312 * expr.c: Likewise.
1313 * files.c: Likewise.
1314 * identifiers.c: Likewise.
1315 * include/cpp-id-data.h: Likewise.
1316 * include/cpplib.h: Likewise.
1317 * include/line-map.h: Likewise.
1318 * include/mkdeps.h: Likewise.
1319 * include/symtab.h: Likewise.
1320 * init.c: Likewise.
1321 * internal.h: Likewise.
1322 * lex.c: Likewise.
1323 * line-map.c: Likewise.
1324 * macro.c: Likewise.
1325 * makeucnid.c: Likewise.
1326 * mkdeps.c: Likewise.
1327 * pch.c: Likewise.
1328 * symtab.c: Likewise.
1329 * system.h: Likewise.
1330 * traditional.c: Likewise.
1331 * ucnid.tab: Likewise.
1332 * ucnid.h: Regenerate.
1333
eec49116
JJ
13342009-04-01 Janis Johnson <janis187@us.ibm.com>
1335
839a3b8a
JJ
1336 PR c/39027
1337 * include/cpplib.h (CPP_N_DEFAULT): Define.
1338 * expr.c (interpret_float_suffix): Recognize d or D for double,
1339 return new value for default.
1340 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
1341
eec49116
JJ
1342 PR c/33466
1343 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
1344 letters from decimal float and fixed-point suffixes.
1345
47580d22
JM
13462009-03-31 Joseph Myers <joseph@codesourcery.com>
1347
1348 PR preprocessor/15638
1349 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
1350 invalid PCH.
1351 (open_file_failed): Make error for missing file fatal.
1352 * include/cpplib.h (CPP_DL_FATAL): Define.
1353
5a2df0fa
SV
13542009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
1355
1356 PR preprocessor/31932:
1357 * internal.h: Don't mention HAVE_ICONV_H.
1358 * configure, config.in: Rebuild.
1359 * configure.ac: Don't check for iconv.h.
1360
c1a8a3c6
TT
13612009-03-30 Tom Tromey <tromey@redhat.com>
1362
1363 PR preprocessor/39512:
1364 * line-map.c (linemap_init): Initialize 'reallocator' field.
1365
a37a7b8a
JJ
13662009-03-30 Jakub Jelinek <jakub@redhat.com>
1367
1368 PR target/39558
1369 * macro.c (cpp_get_token): If macro_to_expand returns NULL
1370 and used some tokens, add CPP_PADDING before next token.
1371
148e4216
JM
13722009-03-29 Joseph Myers <joseph@codesourcery.com>
1373
1374 PR preprocessor/34695
1375 * makedepend.c: Remove.
1376 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
1377 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
1378 * directives.c (cpp_errors): Remove.
1379 * errors.c (print_location, _cpp_begin_message, v_message):
1380 Remove.
1381 (cpp_error, cpp_error_with_line): Always use error callback.
1382 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
1383 * include/cpplib.h (cpp_options): Remove pedantic_errors,
1384 inhibit_warnings, warn_system_headers, inhibit_errors,
1385 warnings_are_errors, client_diagnostic.
1386 (cpp_callbacks): Add extra arguments to error callback; make it
1387 return bool.
1388 (cpp_finish): Return void.
1389 (cpp_destroy): Remove inaccurate comment about return value.
1390 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
1391 (CPP_DL_NOTE): Define.
1392 * include/line-map.h (linemap_print_containing_files): Remove.
1393 * init.c (cpp_finish): Do not check for or return number of
1394 errors.
1395 * internal.h (cpp_reader): Remove errors field.
1396 * line-map.c (linemap_print_containing_files): Remove.
1397 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
1398 about previous definition. Only emit it if previous diagnostic
1399 was emitted.
1400
f1450211
JM
14012009-03-28 Joseph Myers <joseph@codesourcery.com>
1402
1403 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1404 mkinstalldirs.
1405
8f5929e1
JJ
14062009-03-18 Jakub Jelinek <jakub@redhat.com>
1407
1408 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1409
4bb09c26
JM
14102009-02-21 Joseph Myers <joseph@codesourcery.com>
1411
1412 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1413 header name.
1414 (_cpp_lex_direct): Handle this.
1415
68c9ab45
RG
14162009-02-15 Richard Guenther <rguenther@suse.de>
1417
1418 Revert last change.
1419
601b3e1a
RG
14202009-02-13 Richard Guenther <rguenther@suse.de>
1421
1422 * configure.ac: Enable LFS.
1423 * configure: Re-generate.
1424 * config.in: Likewise.
1425
fc0cd180
BE
14262009-01-05 Ben Elliston <bje@au.ibm.com>
1427
1428 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1429 (.po.pox): Likewise.
1430 (po/$(PACKAGE).pot): Likewise.
1431
db89a3be
AO
14322008-12-10 Alexandre Oliva <aoliva@redhat.com>
1433
1434 PR target/37033
1435 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1436 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1437
cc955282
JM
14382008-11-29 Joseph Myers <joseph@codesourcery.com>
1439
1440 * lex.c (cpp_token_len): Use 6 as default length.
1441
47960aaf
MLI
14422008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
1443
1444 * expr.c (struct op): Add location.
1445 (_cpp_parse_expr): Propagate locations throught the stack
1446 of expressions.
1447 (reduce): Likewise.
1448 (check_promotion): Use explicit location in errors.
1449
631d0d36
MG
14502008-10-05 Matthew Gingell <gingell@adacore.com>
1451 Arnaud Charlet <charlet@adacore.com>
1452
1453 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1454 (cpp_get_comments): New function.
1455 * internal.h (struct cpp_reader): Add comments field.
1456 * init.c (cpp_destroy): Free comments.
1457 * lex.c (store_comment, cpp_get_comments): New functions.
1458 (comments): New struct.
1459 (save_comment): Store comments in comments struct.
1460
c047ce93
SB
14612008-09-18 Simon Baldwin <simonb@google.com>
1462
1463 * include/cpplib.h (struct cpp_options): Add new boolean flag
1464 warn_builtin_macro_redefined.
1465 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1466 * (struct builtin_operator): Split out from previous struct builtin,
1467 enhance extra const correctness.
1468 * (struct builtin_macro): Split out from previous struct builtin, add
1469 new always_warn_if_redefined flag, enhance const correctness.
1470 * (mark_named_operators): Use struct builtin_operator.
1471 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1472 to builtins selectively.
1473 * macro.c (warn_of_redefinition): Return false if a builtin macro
1474 is not flagged with NODE_WARN.
1475
affa55c6
JJ
14762008-07-31 Jakub Jelinek <jakub@redhat.com>
1477
1478 PR preprocessor/36649
1479 * files.c (struct report_missing_guard_data): New type.
1480 (report_missing_guard): Put paths into an array instead of printing
1481 them right away. Return 1 rather than 0.
1482 (report_missing_guard_cmp): New function.
1483 (_cpp_report_missing_guards): Sort and print paths gathered by
1484 report_missing_guard callback.
1485
3b8f20a1
MLI
14862008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1487
1488 PR 28079
1489 * directives.c (strtolinenum): Handle overflow.
1490 (do_line): Give a warning if line number overflowed.
1491 (do_linemarker): Update call to strtolinenum.
1492
1bb64668
MLI
14932008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1494
1495 * include/line-map.h (linenum_type): New typedef.
1496 (struct line_map): Use it.
1497 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1498 (SOURCE_COLUMN): Likewise.
1499 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1500 source_location values in a variable of type linenum_type.
1501 * directives.c (struct if_stack): Use linenum_type.
1502 (strtoul_for_line): Rename as strtolinenum.
1503 (do_line): Use linenum_type.
1504 (do_linemarker): Use linenum_type and strtolinenum.
1505 (_cpp_do_file_change): Use linenum_t.
1506 * line-map.c (linemap_add): Likewise.
1507 (linemap_line_start): Likewise.
1508 * traditional.c (struct fun_macro): 'line' is a source_location.
1509 * errors.c (print_location): Use linenum_type.
1510 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1511 * internal.h (CPP_INCREMENT_LINE): Likewise.
1512 * lex.c (_cpp_skip_block_comment): Use source_location.
1513
5950c3c9
BE
15142008-07-14 Ben Elliston <bje@au.ibm.com>
1515
1516 * include/cpplib.h (NODE_CONDITIONAL): New.
1517 (struct cpp_callbacks): New macro_to_expand field.
1518 (struct cpp_hashnode): Adjust size of flags and type fields.
1519 (cpp_peek_token): Prototype.
1520 * lex.c (cpp_peek_token): New function.
1521 (_cpp_temp_token): Protect pre-existing lookaheads.
1522 * macro.c (cpp_get_token): Expand any conditional macros.
1523 (_cpp_backup_tokens_direct): New.
1524 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1525 (warn_of_redefinition): Silently allow redefined conditional
1526 macros.
1527 (_cpp_create_definition): Remove the conditional flag when a user
1528 defines one of the conditional macros.
1529 * internal.h (_cpp_backup_tokens_direct): New prototype.
1530
e85edc9e
AH
15312008-06-13 Andrew Haley <aph@redhat.com>
1532
1533 PR preprocessor/33305
1534 * macro.c (replace_args): Print a warning for empty macro
1535 arguments in C89 and C++.
1536
18c04407
RW
15372008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1538
1539 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1540 * configure: Regenerate.
1541
2d09b640
RW
15422008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1543
1544 * Makefile.in (datarootdir): New variable.
1545
0b7c73cc
L
15462008-06-12 H.J. Lu <hongjiu.lu@intel.com>
1547
1548 PR preprocessor/36479
1549 * charset.c (cpp_interpret_string_notranslate): Also set
1550 narrow_cset_desc.width.
1551
cd985f66
JM
15522008-06-07 Joseph Myers <joseph@codesourcery.com>
1553
1554 * configure.ac (parisc*64*-*-*): Remove.
1555 * configure: Regenerate.
1556
d750887f
TT
15572008-05-30 Tom Tromey <tromey@redhat.com>
1558
1559 PR preprocessor/36320:
1560 * internal.h (_cpp_parse_expr): Update.
1561 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
1562 messages.
1563 * directives.c (do_if): Update.
1564 (do_elif): Require expression if processing group.
1565
c100de59
DS
15662008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
1567
1568 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1569
5d6342eb
TT
15702008-05-21 Tom Tromey <tromey@redhat.com>
1571
1572 PR preprocessor/27777:
1573 * lex.c (cpp_output_line_to_string): New function.
1574 * internal.h (_cpp_begin_message): Don't declare.
1575 * errors.c (_cpp_begin_message): Now static.
1576 * include/cpplib.h (cpp_output_line_to_string): Declare.
1577 * directives.c (do_diagnostic): Rewrote. Use
1578 cpp_output_line_to_string. Don't use _cpp_begin_message.
1579
dae4174e
TT
15802008-05-21 Tom Tromey <tromey@redhat.com>
1581
1582 * include/symtab.h (HT_ALLOCED): Remove.
1583 (ht_purge): Declare.
1584 * symtab.c (DELETED): New define.
1585 (ht_lookup): Update comment.
1586 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
1587 code. Use subobject allocator for strings, if it exists.
1588 (ht_expand): Handle deleted entries.
1589 (ht_forall): Likewise.
1590 (ht_purge): New function.
1591 (ht_dump_statistics): Print deletion statistics.
1592
899015a0
TT
15932008-05-13 Tom Tromey <tromey@redhat.com>
1594
1595 PR preprocessor/22168:
1596 * include/cpplib.h (struct cpp_options) <objc>: Update
1597 documentation.
1598 * expr.c (eval_token): Warn for use of assertions.
1599 * directives.c (directive_diagnostics): Warn about extensions.
1600 (DEPRECATED): New define.
1601 (DIRECTIVE_TABLE): Use it.
1602
71c10038
TT
16032008-05-06 Tom Tromey <tromey@redhat.com>
1604
1605 PR preprocessor/35313, PR preprocessor/36088:
1606 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1607 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1608
2bd0fe3d
DM
16092008-05-04 David S. Miller <davem@davemloft.net>
1610
1611 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1612 * configure: Regenerate.
1613
28f68625
DF
16142008-04-22 Daniel Franke <franke.daniel@gmail.com>
1615
1616 * include/cpplib.h (cpp_define_formatted): New.
1617 * directives.c (cpp_define_formatted): New.
1618
688e7a53
TT
16192008-04-21 Tom Tromey <tromey@redhat.com>
1620
1621 PR libcpp/33415:
1622 * charset.c (_cpp_convert_input): Add buffer_start argument.
1623 Ignore UTF-8 BOM if seen.
1624 * internal.h (_cpp_convert_input): Add argument.
1625 * files.c (struct _cpp_file) <buffer_start>: New field.
1626 (destroy_cpp_file): Free buffer_start, not buffer.
1627 (_cpp_pop_file_buffer): Likewise.
1628 (read_file_guts): Update.
1629
b6baa67d
KVH
16302008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1631
1632 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1633 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1634 (struct cpp_options): Added uliterals.
1635 (cpp_interpret_string): Update prototype.
1636 (cpp_interpret_string_notranslate): Idem.
1637 * charset.c (init_iconv_desc): New width member in cset_converter.
1638 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1639 (convert_ucn): Idem.
1640 (emit_numeric_escape): Idem.
1641 (convert_hex): Idem.
1642 (convert_oct): Idem.
1643 (convert_escape): Idem.
1644 (converter_for_type): New function.
1645 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1646 (cpp_interpret_string_notranslate): Match changed prototype.
1647 (wide_str_to_charconst): Use converter_for_type.
1648 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1649 * directives.c (linemarker_dir): Macro U changed to UC.
1650 (parse_include): Idem.
1651 (register_pragma_1): Idem.
1652 (restore_registered_pragmas): Idem.
1653 (get__Pragma_string): Support CPP_STRING{16,32}.
1654 * expr.c (eval_token): Support CPP_CHAR{16,32}.
1655 * init.c (struct lang_flags): Added uliterals.
1656 (lang_defaults): Idem.
1657 * internal.h (struct cset_converter) <width>: New field.
1658 (struct cpp_reader) <char16_cset_desc>: Idem.
1659 (struct cpp_reader) <char32_cset_desc>: Idem.
1660 * lex.c (digraph_spellings): Macro U changed to UC.
1661 (OP, TK): Idem.
1662 (lex_string): Add support for u'...', U'...', u"..." and U"...".
1663 (_cpp_lex_direct): Idem.
1664 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1665 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1666
deb984e6
PB
16672008-04-18 Paolo Bonzini <bonzini@gnu.org>
1668
1669 PR bootstrap/35457
1670 * aclocal.m4: Regenerate.
1671 * configure: Regenerate.
1672
bf048bea
TT
16732008-04-17 Tom Tromey <tromey@redhat.com>
1674
1675 PR libcpp/34866:
1676 * errors.c (cpp_error): Don't reference a token before the start
1677 of the current run.
1678
7f27b0f8
TT
16792008-04-16 Tom Tromey <tromey@redhat.com>
1680
1681 * Makefile.in (TAGS_SOURCES): New variable.
1682 (TAGS): New target.
1683
a1fcb9a1
KK
16842008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
1685
1686 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1687 and shbe-*-*.
1688 * configure: Rebuilt.
1689
93d45d9e
JM
16902008-04-02 Joseph Myers <joseph@codesourcery.com>
1691
1692 * include/cpplib.h (struct cpp_callbacks): Add used_define,
1693 used_undef and before_define.
1694 (NODE_USED): Define.
1695 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1696 do_ifndef, cpp_pop_definition): Handle new flag and use new
1697 callbacks.
1698 * expr.c (parse_defined): Handle new flag and use new callbacks.
1699 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1700 flag and use new callbacks.
1701
d4c32e1d
JJ
17022008-04-01 Jakub Jelinek <jakub@redhat.com>
1703
1704 PR pch/13675
1705 * files.c (struct _cpp_file): Remove pch field.
1706 (pch_open_file): Don't set file->pch, just file->pchname.
1707 (should_stack_file): After pfile->cb.read_pch call
1708 free pchname and clear pchname, don't close file->fd.
1709 Test file->pchname instead of file->pch. Don't close fd after cb.
1710 (_cpp_stack_include): Test file->pchname instead of file->pch.
1711
161031e3
TT
17122008-03-28 Tom Tromey <tromey@redhat.com>
1713
1714 * Makefile.in (POSTCOMPILE): New variable.
1715 (.c.o): Use it.
1716
14ccf800
TT
17172008-03-13 Tom Tromey <tromey@redhat.com>
1718
1719 PR libcpp/35322:
1720 * directives.c (destringize_and_run): Set pfile->directive.
1721
830465c6
MM
17222008-03-06 Markus Milleder <markus.milleder@generali.at>
1723
1724 PR preprocessor/35458
1725 * mkdeps.c (munge): Quote '#' with a '\'.
1726
d482a073
RW
17272008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1728
1729 PR preprocessor/35379
1730 * mkdeps.c (deps_write): Ensure the first target always appears
1731 in the first column, without leading backslash newline. Avoid
1732 some more extra whitespace.
1733
185a6cc1
TS
17342008-02-25 Thiemo Seufer <ths@mips.com>
1735
d482a073 1736 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 1737
2bf41bf0
TT
17382008-02-19 Tom Tromey <tromey@redhat.com>
1739
1740 * traditional.c (lex_identifier): Use CPP_HASHNODE.
1741 * lex.c (lex_identifier): Use CPP_HASHNODE.
1742 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
1743 do-while.
1744 * identifiers.c (alloc_node): Change return type.
1745 (_cpp_init_hashtable): Don't cast 'alloc_node'.
1746 (proxy_assertion_broken): New declaration.
1747 (cpp_forall_identifiers): Move comment.
1748 * line-map.c (linemap_add): Comment fix.
1749 (linemap_line_start): Indentation fix.
1750
765d600a
JJ
17512008-01-25 Jakub Jelinek <jakub@redhat.com>
1752
1753 PR preprocessor/34692
1754 * macro.c (collect_args): Add pragma_buff argument. Push
1755 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1756 than into arguments. Reset prevent_expansion and parsing_args
1757 state at CPP_PRAGMA_EOL/CPP_EOF.
1758 (funlike_invocation_p): Add pragma_buff argument, pass it through
1759 to collect_args.
1760 (enter_macro_context): Add result argument. Adjust
1761 funlike_invocation_p caller. Emit all deferred pragma tokens
1762 gathered during collect_args before the expansion, add a padding
1763 token. Return 2 instead of 1 if any pragma tokens were prepended.
1764 (cpp_get_token): If enter_macro_context returns 2, don't return
1765 a padding token, instead cycle to grab CPP_PRAGMA token.
1766 * directives.c (_cpp_handle_directive): If was_parsing_args
1767 in deferred pragma, leave parsing_args and prevent_expansion as is.
1768
ec46053b
TT
17692008-01-22 Tom Tromey <tromey@redhat.com>
1770
765d600a 1771 PR c++/34859
ec46053b
TT
1772 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1773 __STDC_CONSTANT_MACROS.
1774
681c6ab0
FF
17752008-01-07 Fred Fish <fnf@specifix.com>
1776
765d600a 1777 PR preprocessor/30363
681c6ab0
FF
1778 * traditional.c (replace_args_and_push): Add local variable
1779 cxtquote, calculate the replacement text size assuming a
1780 worst case of every input character quoted with backslash,
1781 and properly handle output quoting of quote characters in
1782 actual arguments used in function-like macros.
1783
33ae4837
TT
17842008-01-03 Tom Tromey <tromey@redhat.com>
1785
765d600a 1786 PR preprocessor/34602
33ae4837
TT
1787 * directives.c (do_line): Don't try to spell EOF token.
1788 (do_linemarker): Add comment.
1789
675575f5
DD
17902007-12-11 DJ Delorie <dj@redhat.com>
1791
1792 * charset.c (convert_using_iconv): Close out any shift states,
1793 returning to the initial state.
1794
97f6bd40
TT
17952007-12-06 Tom Tromey <tromey@redhat.com>
1796
765d600a 1797 PR c/29172
97f6bd40
TT
1798 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1799 type.
1800 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1801 * files.c (FILE_HASH_POOL_SIZE): New macro.
1802 (struct file_hash_entry_pool): New.
1803 (destroy_all_cpp_files): New function.
1804 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1805 (new_file_hash_entry): Update.
1806 (free_file_hash_entries): New function.
1807 (_cpp_cleanup_files): Call free_file_hash_entries and
1808 destroy_all_cpp_files.
1809 (cpp_clear_file_cache): New function.
1810 * include/cpplib.h (cpp_clear_file_cache): Declare.
1811
d56a25e1
TT
18122007-12-03 Tom Tromey <tromey@redhat.com>
1813
765d600a 1814 PR preprocessor/34288
d56a25e1
TT
1815 * configure.ac, config.in: Rebuilt.
1816 * configure.ac: Check for ssize_t.
1817
607f74e9
TT
18182007-11-30 Tom Tromey <tromey@redhat.com>
1819
765d600a 1820 PR preprocessor/32868
607f74e9
TT
1821 * macro.c (_cpp_create_definition): Special case
1822 __STDC_FORMAT_MACROS.
1823
b0f4807f
MM
18242007-11-16 Michael Matz <matz@suse.de>
1825
1826 * files.c (search_path_head): Fix check for absolute paths.
1827
f1e20710
TT
18282007-11-11 Tom Tromey <tromey@redhat.com>
1829
765d600a 1830 PR c++/17557
f1e20710
TT
1831 * include/cpplib.h (cpp_included_before): Declare.
1832 * files.c (struct file_hash_entry) <location>: New field.
1833 (_cpp_find_file): Initialize new field.
1834 (make_cpp_dir): Likewise.
1835 (cpp_included_before): New function.
1836
f373b44d
TT
18372007-11-01 Tom Tromey <tromey@redhat.com>
1838
765d600a 1839 PR preprocessor/30805
f373b44d
TT
1840 * macro.c (paste_tokens): Handle padding token.
1841 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1842
5b9a40df
TT
18432007-10-31 Tom Tromey <tromey@redhat.com>
1844
765d600a 1845 PR preprocessor/30786
5b9a40df
TT
1846 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1847 * directives.c (_cpp_do__Pragma): Return error status.
1848 * internal.h (_cpp_do__Pragma): Update.
1849 * directives.c (get__Pragma_string): Back up if EOF seen.
1850
5ffeb913
TT
18512007-09-06 Tom Tromey <tromey@redhat.com>
1852
1853 * internal.h (struct cpp_reader) <invocation_location>: New
1854 field.
1855 (struct cpp_reader) <set_invocation_location>: Likewise.
1856 * init.c (cpp_set_line_map): New function.
1857 * line-map.c (linemap_add): Use linemap's allocator.
1858 * include/line-map.h (GTY): Define.
1859 (line_map_realloc): New typedef.
1860 (struct line_map): Mark with GTY.
1861 (struct line_maps): Likewise.
1862 (struct line_maps) <maps>: Likewise.
1863 (struct line_maps) <reallocator>: New field.
1864 * include/symtab.h (GTY): Conditionally define.
1865 * include/cpplib.h (cpp_set_line_map): Declare.
1866 (cpp_get_token_with_location): Declare.
1867 * macro.c (cpp_get_token): Set invocation_location on the reader.
1868 (cpp_get_token_with_location): New function.
1869
ac6b1c67
CF
18702007-08-30 Chao-ying Fu <fu@mips.com>
1871
1872 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1873 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1874 (cpp_classify_number): Support decimal fixed-point constants without
1875 exponents.
1876 Warn about fixed-point constants when -pedantic.
1877 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1878 comments to support fixed-point values.
1879 (CPP_N_FRACT, CPP_N_ACCUM): Define.
1880
cda5e672
TT
18812007-08-18 Tom Tromey <tromey@redhat.com>
1882
765d600a 1883 PR preprocessor/32974
cda5e672
TT
1884 * directives.c (parse_include): Don't check for EOL when
1885 processing #pragma dependency.
1886
ccfc4c91
OW
18872007-07-30 Ollie Wild <aaw@google.com>
1888
1889 * directives-only.c: New file.
1890 * internal.h (struct _cpp_dir_only_callbacks): New.
1891 (_cpp_preprocess_dir_only): New function.
1892 * directives.c (_cpp_handle_directive): Check directives_only before
1893 disabling execution of indented directives.
1894 * files.c (_cpp_stack_file): Add directives_only check.
1895 * include/cpplib.h (struct cpp_options): Add directives_only.
1896 (cpp_init_special_builtins): New function.
1897 * init.c (cpp_init_special_builtins): New function.
1898 (cpp_init_builtins): Move builtin_array initialization to
1899 cpp_init_special_builtins.
1900 (post_options): Check directives_only before setting
1901 pfile->state.prevent_expansion = 1.
1902 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1903 is expanded inside a directive while -fdirectives-only is enabled.
1904 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1905 (libcpp_a_SOURCES): Add directives-only.c.
1906
a206413a
UB
19072007-07-04 Uros Bizjak <ubizjak@gmail.com>
1908
1909 * traditional.c (_cpp_scan_out_logical_line): Initialize
1910 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1911 fmacro.args to prevent 'may be used uninitialized' warning.
1912
c77cd3d1
UB
19132007-07-03 Uros Bizjak <ubizjak@gmail.com>
1914
1915 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1916 Add new constants.
1917 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1918 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1919 for 'q' or 'Q' suffixes.
1920
66938a1d
DS
19212007-06-17 Danny Smith <dannysmith@users.sourceforge.net
1922
e1311401 1923 * files.c (open_file): Correct typo.
66938a1d 1924
71995ede
VP
19252007-06-16 Vladimir Prus <vladimir@codesourcery.com>
1926
e1311401 1927 * files.c (open_file): Prevent the call
71995ede
VP
1928 for stat from overwriting errno.
1929
84152c25
VP
19302007-06-09 Vladimir Prus <vladimir@codesourcery.com>
1931
e1311401 1932 * files.c (open_file): Account for the
84152c25
VP
1933 fact that on windows, opening a directory gives
1934 EACCES.
1935
f7fd775f
JW
19362007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
1937
1938 PR preprocessor/23479
1939 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
1940 integer constants.
1941 (append_digit): Likewise.
1942 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
1943 binary integer constants.
1944
ed0e74e0
DK
19452007-05-31 Dave Korn <dave.korn@artimi.com>
1946
1947 PR preprocessor/14331
1948 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
1949
a702045a
OW
19502007-05-24 Ollie Wild <aaw@google.com>
1951
1952 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
1953 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
1954 (cpp_write_pch_state): Save __COUNTER__ state.
1955 (cpp_valid_state): Check valid __COUNTER__ state.
1956 (cpp_read_state): Read new __COUNTER__ state.
1957 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
1958 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
1959 * internal.h (struct cpp_reader): Add counter member.
1960
126e073b
SM
19612007-05-23 Simon Martin <simartin@users.sourceforge.net>
1962
1963 PR preprocessor/20077
1964 * macro.c (create_iso_definition): Fixed the method to determine
1965 whether the token-pasting operator appears at the beginning or the end
1966 of a macro.
1967
0b4cafec
ILT
19682007-05-21 Ian Lance Taylor <iant@google.com>
1969
1970 * internal.h (struct cpp_reader): Add new fields:
1971 nonexistent_file_hash and nonexistent_file_ob.
1972 * files.c: Include "obstack.h".
1973 (find_file_in_dir): Before trying to open the file, look up the
1974 path name in the hash table of nonexistent files. After failing
1975 to open the file, add the path name to the hash table.
1976 (_cpp_find_file): Cache the results of looking up the file name
1977 starting with the quote and bracket chain heads, if we can.
1978 (nonexistent_file_hash_eq): New static function.
1979 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
1980 pfile->nonexistent_file_ob.
1981 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
1982 pfile->nonexistent_file_ob.
1983
30e04921
JJ
19842007-05-14 Janis Johnson <janis187@us.ibm.com>
1985
5a6bb57e
JJ
1986 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
1987
30e04921
JJ
1988 PR c/31924
1989 * expr.c (interpret_float_suffix): Check for invalid suffix.
1990
22a8a52d
EC
19912007-05-02 Eric Christopher <echristo@apple.com>
1992
1993 * expr.c (num_div_op): Don't overflow if the result is
1994 zero.
1995
fca35e1b
TT
19962007-05-02 Tom Tromey <tromey@redhat.com>
1997
765d600a 1998 PR preprocessor/28709
fca35e1b
TT
1999 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
2000
4cd97075
MM
20012007-03-30 Michael Meissner <michael.meissner@amd.com>
2002
2003 * directives.c (lex_macro_node_from_str): Fix alloca call to be
2004 type correct.
2005
121de39f
RH
20062007-03-30 Richard Henderson <rth@redhat.com>
2007
2008 * directives.c (lex_macro_node_from_str): New.
2009 (cpp_push_definition, cpp_pop_definition): New.
2010 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
2011
4fcb360b
BM
20122007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2013
2014 * Makefile.in: Add dummy install-pdf target.
2015
67e64439
TT
20162007-01-30 Tom Tromey <tromey@redhat.com>
2017
765d600a 2018 PR preprocessor/30468
67e64439
TT
2019 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
2020 './'.
2021
ee380365
TT
20222007-01-30 Tom Tromey <tromey@redhat.com>
2023
765d600a 2024 PR preprocessor/29966
ee380365
TT
2025 * macro.c (lex_expansion_token): Save and restore cpp_reader's
2026 cur_token.
2027 (_cpp_create_definition): Don't restore cur_token here.
2028 * lex.c (_cpp_lex_token): Added assertion.
2029
024abeb3
TT
20302007-01-27 Tom Tromey <tromey@redhat.com>
2031
2032 * configure: Rebuilt.
2033
ee1c2a10
TT
20342007-01-12 Tom Tromey <tromey@redhat.com>
2035
765d600a 2036 PR preprocessor/28227
ee1c2a10
TT
2037 * directives.c (lex_macro_node): Added 'is_def_or_undef'
2038 argument.
2039 (do_define): Update.
2040 (do_undef): Update.
2041 (do_ifdef): Update.
2042 (do_ifndef): Update.
2043
67214c16
PB
20442007-01-11 Paolo Bonzini <bonzini@gnu.org>
2045
2046 * configure: Regenerate.
2047
1aa6ca40
PB
20482007-01-11 Paolo Bonzini <bonzini@gnu.org>
2049
2050 * configure: Regenerate.
2051
705e2d28
TT
20522007-01-04 Tom Tromey <tromey@redhat.com>
2053
765d600a 2054 PR preprocessor/28165
705e2d28
TT
2055 * internal.h (cpp_in_primary_file): New function.
2056 * directives.c (do_include_next): Use cpp_in_primary_file.
2057 (do_pragma_once): Likewise.
2058 (do_pragma_system_header): Likewise.
2059
7af45bd4
ILT
20602006-12-29 Ian Lance Taylor <iant@google.com>
2061
2062 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
2063 look backward at the end of the line unless we saw a backslash.
2064
9d30f270
JJ
20652006-12-29 Jakub Jelinek <jakub@redhat.com>
2066
2067 PR preprocessor/29612
2068 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
2069 only when new_sysp is non-zero.
2070
30b0edc0
TT
20712006-12-28 Tom Tromey <tromey@redhat.com>
2072
765d600a 2073 PR preprocessor/30001
30b0edc0
TT
2074 * charset.c (_cpp_convert_input): Check that to.len is greater
2075 than zero.
2076
85d9c13c
TS
20772006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
2078
2079 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 2080 * configure: Rebuilt.
85d9c13c 2081
dfafdaa6
DG
20822006-11-01 Douglas Gregor <doug.gregor@gmail.com>
2083
2084 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
2085 for experimental C++0x mode.
2086 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
2087 adopted the preprocessor changes introduced in C99.
2088
0f45f0f5
JM
20892006-10-29 Joseph Myers <joseph@codesourcery.com>
2090
2091 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
2092 depending on --enable-targets=all.
2093 * configure: Regenerate.
2094
de000d22
JJ
20952006-10-12 Jakub Jelinek <jakub@redhat.com>
2096
2097 PR preprocessor/28709
2098 * macro.c (paste_tokens): Do error reporting here, use BUF with the
2099 spelled LHS token as opposed to spelling it again.
2100 (paste_all_tokens): Don't report errors here, just break on failure.
2101
b5422ad7
BM
21022006-10-10 Brooks Moses <bmoses@stanford.edu>
2103
2104 * Makefile.in: Added empty "pdf" target.
2105
aaf50ff2
GK
21062006-09-22 Geoffrey Keating <geoffk@apple.com>
2107
2108 * configure.ac: Make need_64_bit_hwint case for x86-darwin
2109 match exactly the glob in gcc/config.gcc.
2110 * configure: Regenerate.
2111
c663e301
JM
21122006-09-13 Joseph S. Myers <joseph@codesourcery.com>
2113
2114 PR c/28768
2115 PR preprocessor/14634
2116 * lex.c (lex_string): Pedwarn for unterminated literals.
2117
f7288899
EC
21182006-09-08 Eric Christopher <echristo@apple.com>
2119
2120 * configure.ac: Add 64-bit HWI support for i?86-darwin.
2121
b52dbbf8
SE
21222006-08-14 Steve Ellcey <sje@cup.hp.com>
2123
2124 PR c++/28288
2125 PR c++/14556
2126 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
2127 (CPP_LAST_EQ): Change.
2128 (CPP_LAST_PUNCTUATOR): Change.
2129 * expr.c (cpp_operator): Remove MIN and MAX.
2130 (reduce): Remove CPP_MIN and CPP_MAX.
2131 (num_binary_op): Ditto.
2132 * lex.c (_cpp_lex_direct): Ditto.
2133 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
2134
1c90c6f9
JJ
21352006-06-09 Jakub Jelinek <jakub@redhat.com>
2136
2137 PR preprocessor/27746
2138 * directives.c (do_pragma): Handle pragma with valid namespace
2139 and invalid name coming from macro expansion.
2140 * directives.c (destringize_and_run): Initialize next field in
2141 context.
2142
2143 PR c/27747
2144 PR c++/27748
2145 * directives.c (destringize_and_run): Set NO_EXPAND on the
2146 tokens.
2147
2148 * macro.c (_cpp_backup_tokens): Fix comment typo.
2149
5c3c3683
DJ
21502006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
2151
2152 * Makefile.in (CATALOGS): Add po/ prefix.
2153 * configure: Regenerated.
2154
b2bd74bc
CD
21552006-05-23 Carlos O'Donell <carlos@codesourcery.com>
2156
2157 * Makefile.in: Add install-html target. Add install-html to .PHONY
2158
be8ac3e2
GZ
21592006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
2160
2161 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
2162 * files.c (_cpp_get_file_stat): New function.
2163 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
2164 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
2165 * internal.h (_cpp_get_file_stat): Prototype.
2166 (struct cpp_buffer): Add timestamp.
2167
83900997
JJ
21682006-01-23 Jakub Jelinek <jakub@redhat.com>
2169
2170 PR preprocessor/25717
2171 * init.c (cpp_init_builtins): If __STDC__ will not change value
2172 between system headers and other sources, define it as a normal
2173 macro rather than a builtin.
2174 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
2175 cpp_in_system_header condition.
2176
21772006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
2178
2179 * Makefile.in: Use -MMD instead of -MD.
2180
bc4071dd
RH
21812006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2182 Richard Henderson <rth@redhat.com>
2183
2184 Merge from gomp branch:
2185 * directives.c (struct pragma_entry): Add is_deferred. Add ident
2186 entry to value union.
2187 (end_directive): Don't eat the line if in_deferred_pragma.
2188 (run_directive): Remove pragma hacks.
2189 (insert_pragma_entry): Remove.
2190 (new_pragma_entry): New.
2191 (register_pragma_1): Split out of register_pragma. Only handle
2192 the lookup tree and return the new entry.
2193 (cpp_register_pragma): Fill in the pragma entry here.
2194 (cpp_register_deferred_pragma): New.
2195 (register_pragma_internal): New.
2196 (_cpp_init_internal_pragmas): Use register_pragma_internal.
2197 (do_pragma): Allow pragma expansion after namespace. For deferred
2198 pragmas, don't slurp the line into a string.
2199 (destringize_and_run): Save tokens for deferred pragmas.
2200 (cpp_handle_deferred_pragma): Remove.
2201 * macro.c (builtin_macro): Remove pragma token hack.
2202 (_cpp_push_token_context): Rename from push_token_context and export.
2203 * internal.h (struct lexer_state): Add pragma_allow_expansion.
2204 (_cpp_push_token_context): Declare.
2205 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
2206 a token. Update the line number correctly if so.
2207 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
2208 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
2209 * include/cpplib.h (PRAGMA_EOL): New.
2210 (CPP_TOKEN_FLD_PRAGMA): New.
2211 (struct cpp_token): Add val.pragma.
2212 (struct cpp_options): Remove defer_pragmas.
2213 (cpp_handle_deferred_pragma): Remove.
2214 (cpp_register_deferred_pragma): Declare.
2215
d09e893f
JJ
22162006-01-01 Jakub Jelinek <jakub@redhat.com>
2217
2218 PR c++/25294
2219 * directives.c (do_pragma): If pragma line ends with multi-line
2220 block comment, end the saved deferred pragma string before that
2221 comment. Handle embedded '\0' chars on the pragma line.
2222
ab84748a
VR
22232005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2224
2225 PR c++/23333
2226 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
2227
ad6ed77e
JG
22282005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
2229 Ben Elliston <bje@au.ibm.com>
2230
2231 * include/cpplib.h (CPP_N_DFLOAT): New.
2232 * expr.c (interpret_float_suffix): Identify df, dd, and dl
2233 suffixes as decimal floating point constants.
2234 (cpp_classify_number): Disallow hexadecimal DFP constants.
2235
ba096620 22362005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 2237 Ian Lance Taylor <ian@airs.com>
ba096620
GP
2238
2239 * include/cpplib.h (struct cpp_callbacks): Annotate error with
2240 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
2241
456b8ce5
UB
22422005-11-09 Per Bothner <per@bothner.com>
2243 Uros Bizjak <uros@kss-loka.si>
f7288899 2244
456b8ce5
UB
2245 PR c/24101
2246 * init.c (read_original_filename): Temporarily set
2247 state.in_directive before calling _cpp_lex_direct for
2248 CPP_HASH tokens.
2249
5571f74f
JW
22502005-11-03 James E Wilson <wilson@specifix.com>
2251
2252 PR preprocessor/24202
2253 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
2254
a63607ed
JM
22552005-11-04 Joseph S. Myers <joseph@codesourcery.com>
2256
2257 * include/cpplib.h (struct cpp_callbacks): Make error take
2258 va_list* parameter.
2259 * errors.c (cpp_error): Update call to callback.
2260
651ed942
AP
22612005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
2262
2263 PR preprocessor/22042
2264 * macro.c (_cpp_builtin_macro_text): Lower the needed max
2265 buffer size.
2266 (cpp_quote_string): Don't octalify non printable
2267 charactors.
2268
178b58b5
JM
22692005-11-03 Joseph S. Myers <joseph@codesourcery.com>
2270
2271 PR c++/17964
2272 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
2273 (struct cpp_callbacks): Add error.
2274 * errors.c (cpp_error): If client_diagnostic, use error callback.
2275 * charset.c (convert_escape): Don't use %03o in diagnostic.
2276
3ee5ed11 22772005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
2278
2279 PR preprocessor/15220
2280 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
2281 callers. Pass to open_file_failed.
2282 (open_file_failed): New parameter angle_brackets. Fix all callers.
2283 Use in print_dep assignment.
2284 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
2285 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 2286
077fc835
KH
22872005-10-08 Kazu Hirata <kazu@codesourcery.com>
2288
2289 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
2290 * configure: Regenerate.
2291
cbc43ae0
ILT
22922005-10-04 Ian Lance Taylor <ian@airs.com>
2293
2294 PR preprocessor/13726
2295 * directives.c (check_eol_return_comments): New static function.
2296 (parse_include): Add buf parameter. Change all callers.
2297 (do_include_common): If not discard comments, turn on
2298 save_comments. Pass collected comments to include callback.
2299 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
2300 include callback: cpp_token list.
2301
af15a2fe
JM
23022005-09-20 Joseph S. Myers <joseph@codesourcery.com>
2303
2304 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
2305 * init.c (struct lang_flags, lang_defaults): Add
2306 extended_identifiers.
2307 (cpp_set_lang): Use it.
2308 * lex.c (forms_identifier_p): Check extended_identifiers.
2309
f5eab47e
JJ
23102005-08-30 Jakub Jelinek <jakub@redhat.com>
2311
2312 PR preprocessor/20348
2313 PR preprocessor/20356
2314 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
2315 2004-06-05 changes.
2316
467129e6
KG
23172005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2318
2319 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
2320 -Wmissing-format-attribute.
2321
2322 * configure: Regenerate.
2323
200031d1
KC
23242005-06-29 Kelley Cook <kcook@gcc.gnu.org>
2325
2326 * all files: Update FSF address in copyright headers.
2327 * makeucnid.c (write_copyright): Update outputted FSF address.
2328
f610dd5f
ZW
23292005-06-13 Zack Weinberg <zack@codesourcery.com>
2330
2331 * configure.ac: Invoke ZW_CREATE_DEPDIR and
2332 ZW_PROG_COMPILER_DEPENDENCIES.
2333 * aclocal.m4, configure: Regenerate.
2334 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
2335 New variables.
2336 (distclean): Clean up $(DEPDIR) and its contents.
2337 (.c.o): Use $(COMPILE).
2338 Include $(DEPDIR)/*.Po for most object->header dependencies.
2339
c3f829c1
GDR
23402005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2341
2342 * configure.ac: Check declarations for asprintf and vasprintf.
2343 * config.in: Regenerate.
2344 * configure: Likewise.
2345
2346 * charset.c (conversion_loop): Use XRESIZEVEC.
2347 (convert_no_conversion): Likewise.
2348 (convert_using_iconv): Likewise.
2349 (init_iconv_desc): Cast return value of alloca.
2350 (cpp_host_to_exec_charset): Use XNEWVEC.
2351 (emit_numeric_escape): Use XRESIZEVEC.
2352 (cpp_interpret_string): Use XNEWVEC.
2353 (cpp_interpret_string): Use XRESIZEVEC.
2354 (_cpp_interpret_identifier): Cast return value of alloca.
2355 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
2356 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
2357 (parse_include): Use XNEWVEC.
2358 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 2359 "new_entry".
c3f829c1
GDR
2360 (save_registered_pragmas): Cast return value of xmemdup.
2361 (destringize_and_run): Same for alloca.
2362 (parse_assertion): Likewise.
2363 (do_assert): Cast allocated storage to proper type.
2364 (cpp_define): Likewise.
2365 (_cpp_define_builtin): Likewise.
2366 (cpp_undef): Likewise.
2367 (handle_assertion): Likewise.
2368 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
2369 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
2370 (CPP_UMINUS): Likewise.
2371 (struct cpp_operator): Rename from struct operator.
2372 (_cpp_expand_op_stack): Use XRESIZEVEC.
2373 * files.c (pch_open_file): Use XNEWVEC.
2374 (pch_open_file): Use XRESIZEVEC.
2375 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
2376 (dir_name_of_file): Use XNEWVEC.
2377 (make_cpp_file): Use XCNEW.
2378 (make_cpp_dir): Likewise.
2379 (allocate_file_hash_entries): USE XNEWVEC.
2380 (cpp_included): Cast return value of htab_find_with_hash.
2381 (append_file_to_dir): Use XNEWVEC.
2382 (read_filename_string): Likewise. Use XRESIZEVEC too.
2383 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
2384 (remap_filename): Use XNEWVEC.
2385 (struct pchf_entry): Move definition out of struct pchf_data.
2386 (_cpp_save_file_entries): Use XCNEWVAR.
2387 (_cpp_read_file_entries): Use XNEWVAR.
2388 * identifiers.c (alloc_node): Use XOBNEW.
2389 * init.c (cpp_create_reader): Use XCNEW.
2390 (cpp_init_builtins): Cast of b->value to enum builtin_type.
2391 (read_original_directory): Cast return value of alloca.
2392 * lex.c (add_line_note): Use XRESIZEVEC.
2393 (warn_about_normalization): Use XNEWVEC.
2394 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
2395 (new_buff): Use XNEWVEC.
2396 * line-map.c (linemap_add): Use XRESIZEVEC.
2397 * macro.c (builtin_macro): Cast return value of alloca.
2398 (paste_tokens): Likewise.
2399 (expand_arg): Use XNEWVEC and XRESIZEVEC.
2400 (_cpp_save_parameter): Use XRESIZEVEC.
2401 (create_iso_definition): Cast allocated storage to proper type.
2402 (_cpp_create_definition): Likewise.
2403 (cpp_macro_definition): Use XRESIZEVEC.
2404 * makedepend.c (add_clm): Use XNEW.
2405 (add_dir): Likewise.
2406 * mkdeps.c (munge): Use XNEWVEC.
2407 (deps_init): Use XCNEW.
2408 (deps_add_target): Use XRESIZEVEC.
2409 (deps_add_default_target): Cast return value of alloca.
2410 (deps_add_dep): Use XRESIZEVEC.
2411 (deps_add_vpath): Likewise. Use XNEWVEC too.
2412 (deps_restore): Likewise.
2413 * pch.c (save_idents): Use XNEW and XNEWVEC.
2414 (cpp_save_state): Use XNEW.
2415 (count_defs): Cast return value of htab_find.
2416 (write_defs): Likewise.
2417 (cpp_write_pch_deps): Use XNEWVEC.
2418 (collect_ht_nodes): Use XRESIZEVEC.
2419 (cpp_valid_state): Use XNEWVEC.
2420 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
2421 * symtab.c (ht_create): Use XCNEW.
2422 (ht_lookup_with_hash): Cast return value of obstack_copy0.
2423 (ht_expand): Use XCNEWVEC.
2424 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2425 (bool): Do not define if __cplusplus.
2426
1ed17cd5
ZW
24272005-05-12 Zack Weinberg <zack@codesourcery.com>
2428
2429 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2430 (do_sccs): Delete function definition, #define to do_ident.
2431 (do_ident): Don't hardwire directive name.
2432
5a8c20ce
RK
24332005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
2434
2435 PR bootstrap/21230
2436 * configure: Regenerate.
2437
473c5bc9
AP
24382005-04-27 Andris Pavenis <pavenis@latnet.lv>
2439
2440 * files.c: Include io.h for DJGPP to get prototype of setmode.
2441
c1fc5047
PB
24422005-04-19 Per Bothner <per@bothner.com>
2443
2444 PR preprocessor/20907
2445 * line-map.c (linemap_line_start): Fix bug when we need to increse
2446 column_bits but can re-use the current line_map.
2447
042630ad
KG
24482005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2449
2450 * system.h (fopen, fdopen, freopen): Define these to the unlocked
2451 libiberty functions.
2452
0d667716
KG
24532005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2454
2455 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2456 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2457 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2458 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2459 _unlocked function.
2460 (fwrite_unlocked): Fix prototype.
1ed17cd5 2461
0d667716
KG
2462 * configure, config.in: Regenerate.
2463
cae064e7
JJ
24642005-04-05 Jakub Jelinek <jakub@redhat.com>
2465
2466 PR preprocessor/19475
2467 * macro.c (create_iso_definition): For < ISO C99, don't
2468 pedwarn if there is no whitespace between macro name and its
2469 replacement, but the replacement starts with a basic character
2470 set character.
2471
cbada204
AJ
24722005-03-28 Andreas Jaeger <aj@suse.de>
2473
2474 * lex.c (warn_about_normalization): Cast field width to int to
2475 avoid warning.
2476
f42eccdb
JM
24772005-03-19 Joseph S. Myers <joseph@codesourcery.com>
2478
2479 * configure.ac: Consistently use solaris2.1[0-9]* instead of
2480 solaris2.1[0-9].
2481 * configure: Regenerate.
2482
c79e602b
GK
24832005-03-15 Geoffrey Keating <geoffk@apple.com>
2484
2485 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2486 UCN rather than printing an error.
2487
50668cf6
GK
24882005-03-14 Geoffrey Keating <geoffk@apple.com>
2489
6baba9bb
GK
2490 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2491
24922005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 2493
50668cf6
GK
2494 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2495 * charset.c: Update for new format of ucnid.h.
2496 (ucn_valid_in_identifier): Update for new format of ucnid.h.
2497 Add NST parameter, and update it; update callers.
2498 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
2499 with cpp_error.
2500 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2501 * internal.h (struct normalize_state): New.
2502 (INITIAL_NORMALIZE_STATE): New.
2503 (NORMALIZE_STATE_RESULT): New.
2504 (NORMALIZE_STATE_UPDATE_IDNUM): New.
2505 (_cpp_valid_ucn): New.
2506 * lex.c (warn_about_normalization): New.
2507 (forms_identifier_p): Add normalize_state parameter, update callers.
2508 (lex_identifier): Add normalize_state parameter, update callers. Keep
2509 the state current.
2510 (lex_number): Likewise.
2511 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
2512 it with warn_about_normalization.
2513 * makeucnid.c: New.
2514 * ucnid.h: Replace.
2515 * ucnid.pl: Remove.
2516 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
2517 comments about obsolete version of C++.
2518 * include/cpplib.h (enum cpp_normalize_level): New.
2519 (struct cpp_options): Add warn_normalize field.
2520
47e20491
GK
25212005-03-11 Geoffrey Keating <geoffk@apple.com>
2522
2523 * directives.c (glue_header_name): Update call to cpp_spell_token.
2524 * internal.h (_cpp_interpret_identifier): New.
2525 * charset.c (_cpp_interpret_identifier): New.
2526 (_cpp_valid_ucn): Allow UCN version of '$'.
2527 * lex.c (lex_identifier): Add extra parameter to indicate if initial
2528 character was '$' or '\'. Support identifiers with UCNs.
2529 (forms_identifier_p): Allow UCNs.
2530 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2531 (utf8_to_ucn): New.
2532 (cpp_spell_token): Add FORSTRING parameter. Use it.
2533 (cpp_token_as_text): Update call to cpp_spell_token.
2534 (cpp_output_token): Write UCNs back out.
2535 (stringify_arg): Update call to cpp_spell_token.
2536 (paste_tokens): Likewise.
2537 (cpp_macro_definition): Likewise.
2538 * macro.c (stringify_arg): Likewise.
2539 (paste_tokens): Likewise.
2540 (cpp_macro_definition): Likewise.
2541 * include/cpplib.h: Add parameter to cpp_spell_token.
2542
73096711
JJ
25432005-03-04 Jakub Jelinek <jakub@redhat.com>
2544
2545 PR bootstrap/20282
2546 PR bootstrap/20305
2547 * macro.c (replace_args, cpp_get_token): Copy whole
2548 cpp_token_u instead of just cpp_string field from it.
2549
2203a881
DP
25502005-02-28 Devang Patel <dpatel@apple.com>
2551
2552 * directives.c (do_line): Save sysp early before line table is
2553 realloc'ed.
1ed17cd5 2554
c5ff069d
ZW
25552005-02-20 Zack Weinberg <zack@codesourcery.com>
2556
2557 PR 18785
2558 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2559 (cpp_host_to_exec_charset): New function.
2560 * include/cpplib.h: Declare cpp_host_to_exec_charset.
2561
04c90eea
DP
25622005-02-19 Devang Patel <dpatel@apple.com>
2563
2564 * charset.c (_cpp_convert_input): Check '\r' before inserting
2565 '\n' at the end.
c5ff069d 2566
6da55c00
EC
25672005-02-15 Eric Christopher <echristo@redhat.com>
2568
2569 PR preprocessor/19077
2570 * macro.c (cpp_macro_definition): Move handling of whitespace
2571 to PREV_WHITE conditional. Remove overloading of len
2572 variable.
2573
31c3e631
KH
25742005-02-14 Kazu Hirata <kazu@cs.umass.edu>
2575
2576 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2577 traditional.c: Update copyright.
2578
be0f1e54
PB
25792005-02-14 Paolo Bonzini <bonzini@gnu.org>
2580
2581 PR bootstrap/19818
2582 * configure.ac: Check for declaration of basename and getopt.
2583 * config.in: Regenerate.
2584 * configure: Regenerate.
2585 * internal.h (ustrcspn): New.
2586 * macro.c (create_iso_definition): Fix allocation of memory.
2587 (padding_token): Add cast to remove const-ness.
2588 * pch.c (cpp_read_state): Use ustrcspn.
2589
ecddfb39
MS
25902005-02-08 Mike Stump <mrs@apple.com>
2591
2592 * files.c (pchf_adder): Remove.
2593 (struct pchf_adder_info): Likewise.
2594 (_cpp_save_file_entries): Write out all files so that #import works.
2595
9fcdd891
JM
25962005-01-23 Joseph S. Myers <joseph@codesourcery.com>
2597
2598 * configure: Regenerate.
2599
ecfd72e7
TS
26002005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2601
2602 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2603
6c25a4f7 2604 * include/cpplib.h: Also update copyright years.
c5ff069d 2605
942926ad
GK
26062005-01-03 Geoffrey Keating <geoffk@apple.com>
2607
2608 * files.c (_cpp_find_file): Add files found by search_path_exhausted
2609 to the list of all files.
2610
a2566ae9
GDR
26112005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2612
2613 * internal.h: Update references to Cpp lib filenames.
2614 * directives.c: Likewise.
2615 * init.c: Likewise.
2616 * macro.c: Likewise.
2617 * traditional.c: Likewise.
2618
1b449375
EB
26192004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
2620
2621 PR preprocessor/15167
2622 * files.c (destroy_cpp_file): New function.
2623 (should_stack_file): Make a new file if the
2624 compared file is still stacked.
2625
28303828
NN
26262004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
2627
c5ff069d 2628 PR preprocessor/17610
28303828
NN
2629 * directives.c (do_include_common): Error out if an empty filename
2630 is given for #include (or #include_next or #import).
2631
c812785a
RS
26322004-11-27 Roger Sayle <roger@eyesopen.com>
2633 Zack Weinberg <zack@codesourcery.com>
2634
2635 * internal.h: Replace all uses of uchar with unsigned char.
2636 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
2637 with !IN_GCC, so uchar is only defined whilst building libcpp.
2638
f91eaa01
KC
26392004-11-24 Kelley Cook <kcook@gcc.gnu.org>
2640
2641 * aclocal.m4: Regenerate.
2642
f78ce0c2
RS
26432004-11-24 Roger Sayle <roger@eyesopen.com>
2644
2645 PR preprocessor/15824
2646 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2647 directly, instead of the non-existant "system.h" and "ansidecl.h".
2648 * configure: Regenerate.
2649
b5b3e36a 26502004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 2651 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
2652
2653 * internal.h (struct lexer_state): Add in_deferred_pragma.
2654 * directives.c (struct pragma_entry): Add allow_expansion.
2655 (insert_pragma_entry): Take allow_expansion flag.
2656 (register_pragma): Likewise.
2657 (cpp_register_pragma): Likewise.
2658 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2659 (do_pragma): Honor allow_expansion.
2660 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2661 * include/cpplib.h (cpp_register_pragma): Update prototype.
2662
a8e68029 26632004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 2664 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
2665
2666 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2667 need_64bit_hwint=yes.
2668 * configure: Regenerate.
2669
50f47ee0
JM
26702004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2671
2672 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
2673 po/$(PACKAGE).pot.
2674 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2675 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2676 Remove local srcdir path from generated file.
2677
968e08d6 26782004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 2679 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
2680
2681 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2682 as well.
2683
3da3d587
ZW
26842004-10-27 Zack Weinberg <zack@codesourcery.com>
2685
2686 PR 18075
2687 * directives.c (do_pragma): Do not defer pragmas which are unknown.
2688 (cpp_handle_deferred_pragma): Add cast to silence warning.
2689
ac24fc25
JM
26902004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
2691
2692 * errors.c (_cpp_begin_message): Print "error: " for errors.
2693
7731405b
AJ
26942004-10-10 Andreas Jaeger <aj@suse.de>
2695
2696 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2697 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2698
646544e3
AP
26992004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2700
2701 * pch.c (cpp_write_pch_state): Remove variable z as it is not
2702 used.
2703 (cpp_read_state): Remove unused variables, m, d and mac_count.
2704
67a74146
PB
27052004-09-29 Per Bothner <per@bothner.com>
2706
2707 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
2708 cb.line_change. Otherwise do_pragma will call the line_change
2709 call-back with a meaningless line number.
2710
018a4785
ZW
27112004-09-24 Zack Weinberg <zack@codesourcery.com>
2712
2713 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
2714 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
2715 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2716 * aclocal.m4, configure: Regenerate.
2717 * init.c: Include localedir.h.
2718 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
2719 (DEFS): Delete.
2720 (.c.o): Use $(ALL_CFLAGS).
2721 (localedir.h, localedir.hs): New rules.
2722 (clean): Use rm -rf to remove directories.
2723 (distclean): Also delete localedir.h and localedir.hs.
2724 (init.o): Update dependencies.
2725
88fa57d7
KC
27262004-09-22 Kelley Cook <kcook@gcc.gnu.org>
2727
2728 * Makefile.in (aclocal.m4): Update dependencies.
2729 * configure.ac (AC_CONFIG_MACRO_DIR): New.
2730 * aclocal.m4, configure: Regenerate.
2731
8f8e9aa5
ZW
27322004-09-17 Zack Weinberg <zack@codesourcery.com>
2733
a29f62d9
ZW
2734 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
2735 (_cpp_convert_input, _cpp_default_encoding): Add comments.
2736 Some other comments in this file also tweaked.
2737
8f8e9aa5
ZW
2738 * directives.c (do_pragma): Save current buffer position
2739 before lexing the pragma keywords; don't call
2740 _cpp_backup_tokens in the defer_pragmas case.
2741
a2981930
PB
27422004-09-15 Per Bothner <per@bothner.com>
2743
2744 * include/line-map.h (line_map_start): Add parameter names so
2745 preceding comment makes sense.
2746 (linemap_add): Remove from comment mention of non-existing parameter.
2747
21b11495
ZW
27482004-09-09 Matt Austern <austern@apple.com>
2749 Zack Weinberg <zack@codesourcery.com>
2750
2751 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
2752 prefixes throughout. Add entry for PRAGMA. Remove
2753 unnecessary "= 0" from EQ.
2754 (enum cpp_ttype): Adjust OP and TK definitions to restore
2755 prefixes, via token-paste.
2756 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2757 Change from #defines to additional cpp_ttype enumerators.
2758 (struct cpp_options): Add defer_pragmas.
2759 (cpp_handle_deferred_pragma): Prototype new interface.
2760
2761 * internal.h (struct cpp_reader): Add directive_result.
2762 * directives.c (struct pragma_entry): Add is_internal field;
2763 give boolean fields type bool.
2764 (start_directive): Initialize pfile->directive_result.type.
2765 (_cpp_do__Pragma): Likewise.
2766 (run_directive): Do not crash if pfile->buffer->prev is NULL.
2767 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2768 from it.
2769 (register_pragma): New static function, bulk of former
2770 cpp_register_pragma here; add 'internal' argument, pass along
2771 to insert_pragma_entry.
2772 (cpp_register_pragma): Now a wrapper around register_pragma which
2773 always passes false for 'internal' argument.
2774 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2775 true for 'internal'.
2776 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2777 an internal pragma, save text till the end of the line as a CPP_PRAGMA
2778 token instead of executing the pragma.
2779 (cpp_handle_deferred_pragma): New interface.
2780 * lex.c (token_spellings): Adjust OP and TK definitions to
2781 match changes to cpplib.h.
2782 (_cpp_lex_token): Check for a directive-result token and
2783 return it if present.
2784 (cpp_token_val_index): Handle CPP_PRAGMA.
2785 * macro.c (cpp_builtin_macro_text): Correct comment.
2786 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2787
0fd9e8dd
SB
27882004-09-06 Serge Belyshev <belyshev@lubercy.com>
2789
2790 PR preprocessor/14699
2791 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2792 from size_t to double.
2793
39b8ce7f
AS
27942004-08-28 Andreas Schwab <schwab@suse.de>
2795 Andreas Jaeger <aj@suse.de>
2796
2797 * configure.ac: Set PACKAGE correctly.
2798 * configure: Regenerated.
2799
5d1f4b27
PB
28002004-08-25 Paolo Bonzini <bonzini@gnu.org>
2801
2802 * Makefile.in: Add back top_builddir.
2803
078e3ffe
PB
28042004-08-25 Paolo Bonzini <bonzini@gnu.org>
2805
2806 * configure.ac: Replace Automake macro invocations
2807 with manual Autoconf checks and substitutions.
2808 * configure: Regenerate.
2809 * aclocal.m4: Regenerate.
2810 * config.in: Regenerate.
2811 * Makefile.am: Removed.
2812 * Makefile.in: Heavy simplification and reorganization.
2813
b3f8d95d
MM
28142004-08-09 Mark Mitchell <mark@codesourcery.com>
2815
2816 * configure.ac (arm*-*-eabi*): New target.
2817 (arm*-*-symbianelf*): Likewise.
2818 * configure: Regenerated.
2819
72bb2c39
BI
28202004-07-24 Bernardo Innocenti <bernie@develer.com>
2821
2822 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2823 * directives.c: Use XNEW-family macros from libiberty.
2824 * lex.c: Likewise.
2825 * macro.c: Likewise.
2826 * cpplib.h (cpp_deps_style): Export enum with name.
2827
21b11495 28282004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 2829
21b11495 2830 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 2831
a23ee064
AP
28322004-07-16 Andris Pavenis <pavenis@latnet.lv>
2833
2834 PR preprocessor/16366
2835 * internal.h (struct cpp_reader): New field dir_hash.
2836 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2837 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2838
a09d4744
NB
28392004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
2840
2841 PR preprocessor/16192
2842 PR preprocessor/15913
2843 PR preprocessor/15572
2844 * expr.c (_cpp_parse_expr): Handle remaining cases where an
2845 expression is missing.
2846 * init.c (post_options): Traditional cpp doesn't do // comments.
2847
f58f7def
PB
28482004-06-30 Per Bothner <per@bothner.com>
2849
2850 * include/line-map.h (fileline): Remove old typedef.
2851 * internal.h (struct cpp_reader): Use source_location typedef instead.
2852
e83d8d43
ZW
28532004-06-26 Zack Weinberg <zack@codesourcery.com>
2854
2855 Partially revert patch of 2004-06-05.
2856 * files.c (search_cache): Remove pfile argument. Don't check
2857 for file that would be found by "" or <> search here...
2858 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2859 Do not apply directory-of-current-file correction to files
2860 found by this check. Rearrange code slightly.
2861
c0d578e6
GK
28622004-06-21 Geoffrey Keating <geoffk@apple.com>
2863
2864 * files.c (should_stack_file): Correct swapped parameters to call
2865 to cb.read_pch.
2866 * pch.c (cpp_valid_state): Handle -fpreprocessed.
2867
159d5224
PB
28682004-06-15 Paolo Bonzini <bonzini@gnu.org>
2869
2870 * Makefile.in: Regenerate with automake 1.8.5.
2871 * aclocal.m4: Likewise.
2872 * configure: Regenerate.
2873
2fac9c01
ZW
28742004-06-11 Zack Weinberg <zack@codesourcery.com>
2875
2876 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2877 * configure, config.in: Regenerate.
2878 * system.h: Unconditionally define bool as unsigned char,
2879 BOOL_BITFIELD as unsigned int.
2880 * .cvsignore: New file.
2881
d8044160
GK
28822004-06-09 Geoffrey Keating <geoffk@apple.com>
2883
2884 * traditional.c (push_replacement_text): Set macro->traditional.
2885 (save_replacement_text): Likewise.
2886 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2887 (struct save_macro_item): Delete.
2888 (struct save_macro_data): Use a character array not the previous
2889 structured format.
2890 (save_macros): Save macro as text not as internal structures.
2891 (cpp_prepare_state): Update for changes to save_macro_data.
2892 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 2893 -D macros as text.
d8044160
GK
2894 * macro.c (create_iso_definition): Honour alloc_subobject.
2895 Clear traditional flag.
2896 (_cpp_create_definition): Honour alloc_subobject.
2897 * lex.c (cpp_token_val_index): New.
2898 * internal.h: Include cpp-id-data.h.
2899 (uchar): Move definition to cpp-id-data.h.
2900 (U): Likewise.
2901 (cpp_macro): Likewise.
2902 * directives.c (struct answer): Move to cpp-id-data.h.
2903 (do_assert): Honour alloc_subobject.
2cf22451
ZW
2904
2905 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2906 * include/cpplib.h (struct cpp_string): Add GTY marker.
2907 (enum cpp_token_fld_kind): New.
2908 (struct cpp_token): Add GTY markers.
2909 (cpp_token_val_index): Prototype.
2910 (CPP_HASHNODE_VALUE_IDX): New.
2911 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2912 * include/cpp-id-data.h: New file.
d8044160 2913
0ca8e815
PB
29142004-06-09 Paolo Bonzini <bonzini@gnu.org>
2915
2916 * Makefile.am (all-local): New.
2917 * Makefile.in: Regenerate.
2918
b51fa00f
RS
29192004-06-06 Roger Sayle <roger@eyesopen.com>
2920
2921 * Makefile.am (LIBICONV): Declare.
2922 (makedepend_LDADD): Use LIBICONV.
2923 * Makefile.in: Regenerate.
2924
5e2f3f39
AP
29252004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
2926
2927 * Makefile.am (LIBINTL): Declare
2928 (makedepend_LDADD): Use LIBINTL.
2929 * Makefile.in: Regenerate.
2930
c6e83800
ZW
29312004-06-05 Zack Weinberg <zack@codesourcery.com>
2932
2933 * Makefile.am: Add makedepend.
2934 * Makefile.in, aclocal.m4: Regenerate.
2935 * charset.c: Insert a space to avoid a warning.
2936 * directives.c: Include mkdeps.h.
2937 (_cpp_handle_directive): Reenable macro expander if appropriate.
2938 (undefine_macros): Inline body of _cpp_free_definition for speed.
2939 Do not call undef callback or _cpp_warn_if_unused_macro.
2940 (cpp_get_deps): New interface.
2941 * files.c (search_cache): Add pfile argument. Check for file
2942 that would be found by "" or <> search here...
2943 (_cpp_find_file): ...not here. Correct recorded start_dir of
2944 files found by directory-of-current-file search that would be
2945 found by "" or <> search.
2946 * init.c (cpp_add_dependency_target): Delete.
2947 * internal.h (struct lexer_state): Add discarding_output flag.
2948 * lex.c (lex_identifier): Compute hash function while scanning.
2949 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
2950 directives.
2951 * makedepend.c: New file.
2952 * mkdeps.c (struct deps): Add vpath vector.
2953 (apply_vpath, deps_add_vpath): New function.
2954 (deps_free): Free vpath vector.
2955 (deps_add_dep, deps_add_target): Use apply_vpath.
2956 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
2957 (ht_lookup_with_hash): New function.
2958 * cpplib.h, mkdeps.h: Update prototypes.
2959 * symtab.h: Update prototypes.
2960 (HT_HASHSTEP, HT_FINISH): New macros.
2961
b453c95f
GK
29622004-05-29 Geoffrey Keating <geoffk@apple.com>
2963
2964 * symtab.c (ht_create): Set entries_owned.
2965 (ht_destroy): Honour entries_owned.
2966 (ht_expand): Likewise.
2967 (ht_load): New.
2cf22451
ZW
2968 * include/symtab.h (struct ht): New field 'entries_owned'
2969 (ht_load): New prototype.
b453c95f 2970
963e23c5
PB
29712004-05-26 Paolo Bonzini <bonzini@gnu.org>
2972
2973 PR bootstrap/15651
2974 * configure.ac: Fix m4 quoting when picking
2975 the size of HOST_WIDE_INT.
2976 * configure: Regenerate.
2977
0429bc77
PB
29782004-05-25 Paolo Bonzini <bonzini@gnu.org>
2979
2980 * Makefile.am: the correct directory for
2981 gettext include files is given by @INCINTL@.
2982 * Makefile.in: Regenerate.
2983
c86dd7db
PB
29842004-05-24 Paolo Bonzini <bonzini@gnu.org>
2985
2986 * system.h [!ENABLE_NLS]: dgettext takes two
2987 parameters.
2988
4f4e53dd
PB
29892004-05-23 Paolo Bonzini <bonzini@gnu.org>
2990
2991 Moved libcpp from the gcc subdirectory to the toplevel.
2992 * Makefile.am: New file.
2993 * Makefile.in: Regenerate.
2994 * configure.ac: New file.
2995 * configure: Regenerate.
2996 * config.in: Regenerate.
2997 * charset.c: Moved from gcc/cppcharset.c. Add note about
2998 brokenness of input charset detection. Adjust for change
2999 in name of cppucnid.h.
3000 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
3001 * expr.c: Moved from gcc/cppexp.c.
3002 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
3003 Remove #define of O_BINARY, it is in system.h.
3004 * identifiers.c: Moved from gcc/cpphash.c.
3005 * internal.h: Moved from gcc/cpphash.h. Change header
3006 guard name. All other files adjusted to match name change.
3007 * init.c: Moved from gcc/cppinit.c.
3008 (init_library) [ENABLE_NLS]: Call bindtextdomain.
3009 * lex.c: Moved from gcc/cpplex.c.
3010 * directives.c: Moved from gcc/cpplib.c.
3011 * macro.c: Moved from gcc/cppmacro.c.
3012 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
3013 * traditional.c: Moved from gcc/cpptrad.c.
3014 * ucnid.h: Moved from gcc/cppucnid.h. Change header
3015 guard name.
3016 * ucnid.pl: Moved from gcc/cppucnid.pl.
3017 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
3018 guard name.
3019 * symtab.c: Moved from gcc/hashtable.c.
3020 * line-map.c: Moved from gcc. Do not include intl.h.
3021 * mkdeps.c: Moved from gcc.
3022 * system.h: New file.
2cf22451
ZW
3023 * include/cpplib.h: Moved from gcc. Change header guard name.
3024 * include/line-map.h: Moved from gcc. Change header guard name.
3025 * include/mkdeps.h: Moved from gcc. Change header guard name.
3026 * include/symtab.h: Moved from gcc/hashtable.h. Change header
3027 guard name.