]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
re PR target/56445 (avr.c:11551:16: error: invoking macro FX_FTYPE_FX ar gument 1...
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
561f7fc7
ESR
12013-02-13 Ed Smith-Rowland <3dw4rd@verizon.net>
2
3 PR c++/55582
4 * libcpp/lex.c (lex_raw_string): Allow string literal with suffix
5 beginning with 's' to be parsed as a C++11 user-defined literal.
6
500f3ed9
RS
72013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
8
9 Update copyright years.
10
1582c677
PC
112013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
12
13 PR c++/54526 (again)
14 * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2.
15
8ac16127
MG
162013-01-03 Marc Glisse <marc.glisse@inria.fr>
17
18 PR bootstrap/50177
19 * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type.
20 (new_linemap): Likewise.
21 (linemap_enter_macro): Likewise.
22
f41e5bd1
JJ
232012-12-03 Jakub Jelinek <jakub@redhat.com>
24
25 PR bootstrap/55380
26 PR other/54691
27 * files.c (read_file_guts): Allocate extra 16 bytes instead of
28 1 byte at the end of buf. Pass size + 16 instead of size
29 to _cpp_convert_input.
30 * charset.c (_cpp_convert_input): Reallocate if there aren't
31 at least 16 bytes beyond to.len in the buffer. Clear 16 bytes
32 at to.text + to.len.
33
31962032
SE
342012-11-21 Steve Ellcey <sellcey@mips.com>
35
36 PR pch/55399
37 * files.c (pch_open_file): Fix check for implicit_preinclude.
38
5dc99c46
SB
392012-11-16 Simon Baldwin <simonb@google.com>
40
41 * include/cpplib.h (struct cpp_options): Add canonical_system_headers.
42 * files.c (find_file_in_dir): Call maybe_shorter_path() only if
43 canonical_system_headers is set.
44 * init.c (cpp_create_reader): Initialize canonical_system_headers.
45 * configure.ac: Add new --enable-canonical-system-headers.
46 * configure: Regenerate.
47 * config.in: Regenerate.
48
a4a0016d
ESR
492012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
50
51 PR c++/54413
52 * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg.
53 (cpp_interpret_int_suffix): Add cpp_reader* arg.
54 * init.c (cpp_create_reader): Iitialize new flags.
55 * expr.c (interpret_float_suffix): Use new flags.
56 (cpp_interpret_float_suffix): Add cpp_reader* arg.
57 (interpret_int_suffix): Use new flags.
58 (cpp_interpret_int_suffix): Add cpp_reader* arg.
59 (cpp_classify_number): Adjust calls to interpret_x_suffix.
60
04ce690f
IB
612012-10-23 Ian Bolton <ian.bolton@arm.com>
62 Jim MacArthur <jim.macarthur@arm.com>
63 Marcus Shawcroft <marcus.shawcroft@arm.com>
64 Nigel Stephens <nigel.stephens@arm.com>
65 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
66 Richard Earnshaw <rearnsha@arm.com>
67 Sofiane Naci <sofiane.naci@arm.com>
68 Stephen Thomas <stephen.thomas@arm.com>
69 Tejas Belagod <tejas.belagod@arm.com>
70 Yufeng Zhang <yufeng.zhang@arm.com>
71
72 * configure.ac: Enable AArch64.
73 * configure: Regenerate.
74
1efcb8c6
JM
752012-10-23 Joseph Myers <joseph@codesourcery.com>
76
77 * files.c (struct _cpp_file): Add implicit_preinclude.
78 (pch_open_file): Allow a previously opened implicitly included
79 file.
80 (_cpp_find_file): Add implicit_preinclude argument. Free file and
81 do not call open_file_failed if implicit_preinclude. Store
82 implicit_preinclude value.
83 (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date):
84 Update calls to _cpp_find_file.
85 (_cpp_stack_include): Handle IT_DEFAULT.
86 (cpp_push_default_include): New.
87 * include/cpplib.h (cpp_push_default_include): Declare.
88 * init.c (cpp_read_main_file): Update call to _cpp_find_file.
89 * internal.h (enum include_type): Add IT_DEFAULT.
90 (_cpp_find_file): Update prototype.
91
55e7f907
TB
922012-10-15 Tobias Burnus <burnus@net-b.de>
93
94 * files.c (read_file_guts, _cpp_save_file_entries): Free memory
95 before returning.
96 * lex.c (warn_about_normalization): Ditto.
97 * mkdeps.c (deps_save): Ditto.
98 * pch.c (cpp_valid_state): Ditto.
99
f591bd8f
FW
1002012-10-04 Florian Weimer <fweimer@redhat.com>
101
102 * directives.c (do_pragma_warning_or_error): New.
103 (do_pragma_warning): New.
104 (do_pragma_error): New.
105 (_cpp_init_internal_pragmas): Register new pragmas.
106
ec6e0399
DC
1072012-09-25 Dehao Chen <dehao@google.com>
108
109 PR middle-end/54704
110 * line-map.c (location_adhoc_data_hash): Fix the hash function.
111
52187008
DC
1122012-09-25 Dehao Chen <dehao@google.com>
113
114 PR middle-end/54645
115 * include/line-map.h (location_adhoc_data): Move location_adhoc_data
116 into GC.
117 (location_adhoc_data_map): Likewise.
118 (line_maps): Likewise.
119 (rebuild_location_adhoc_htab): New Function.
120 * line-map.c (+rebuild_location_adhoc_htab): new Funcion.
121 (get_combined_adhoc_loc): Move location_adhoc_data into GC.
122 (location_adhoc_data_fini): Likewise.
123 (linemap_init): Likewise.
124 (location_adhoc_data_init): Remove Function.
125
5368224f
DC
1262012-09-19 Dehao Chen <dehao@google.com>
127
128 * include/line-map.h (MAX_SOURCE_LOCATION): New value.
129 (location_adhoc_data_fini): New.
130 (get_combined_adhoc_loc): New.
131 (get_data_from_adhoc_loc): New.
132 (get_location_from_adhoc_loc): New.
133 (location_adhoc_data_map): New.
134 (COMBINE_LOCATION_DATA): New.
135 (IS_ADHOC_LOC): New.
136 (expanded_location): New field.
137 (line_maps): New field.
138 * line-map.c (location_adhoc_data): New.
139 (location_adhoc_data_hash): New.
140 (location_adhoc_data_eq): New.
141 (location_adhoc_data_update): New.
142 (get_combined_adhoc_loc): New.
143 (get_data_from_adhoc_loc): New.
144 (get_location_from_adhoc_loc): New.
145 (location_adhoc_data_init): New.
146 (location_adhoc_data_fini): New.
147 (linemap_init): Initialize location_adhoc_data.
148 (linemap_lookup): Change to use new location.
149 (linemap_ordinary_map_lookup): Likewise.
150 (linemap_macro_map_lookup): Likewise.
151 (linemap_macro_map_loc_to_def_point): Likewise.
152 (linemap_macro_map_loc_unwind_toward_spel): Likewise.
153 (linemap_get_expansion_line): Likewise.
154 (linemap_get_expansion_filename): Likewise.
155 (linemap_location_in_system_header_p): Likewise.
156 (linemap_location_from_macro_expansion_p): Likewise.
157 (linemap_macro_loc_to_spelling_point): Likewise.
158 (linemap_macro_loc_to_def_point): Likewise.
159 (linemap_macro_loc_to_exp_point): Likewise.
160 (linemap_resolve_location): Likewise.
161 (linemap_unwind_toward_expansion): Likewise.
162 (linemap_unwind_to_first_non_reserved_loc): Likewise.
163 (linemap_expand_location): Likewise.
164 (linemap_dump_location): Likewise.
165 (linemap_line_start): Likewise.
166
f3d25c65
DS
1672012-05-25 Dodji Seketeli <dodji@redhat.com>
168
169 PR preprocessor/53469
170 * directives.c (do_pragma): Use the virtual location for the
171 pragma token, instead of its spelling location.
172
0823efed
DN
1732012-08-14 Diego Novillo <dnovillo@google.com>
174
175 Merge from cxx-conversion branch. Configury.
176
177 * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
178 * configure.ac: Likewise.
179 * configure: Regenerate.
180
1812012-08-14 Lawrence Crowl <crowl@google.com>
182
183 Merge from cxx-conversion branch. New C++ hash table.
184
185 * include/symtab.h (typedef struct ht hash_table): Change the typedef
186 name to cpp_hash_table. Update all users of the typedef.
187
c0fd3497
LB
1882012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
189
190 * include/line-map.h (line_map_macro): Use the "atomic" GTY option
191 for the macro_locations field.
192
d35d1c0f
UB
1932011-06-19 Uros Bizjak <ubizjak@gmail.com>
194
195 * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
196 __builtin_ia32_pcmpestri128 instead of asm.
197
d86d2119
DA
1982012-06-04 Dimitrios Apostolou <jimis@gmx.net>
199
200 * line-map.c (linemap_enter_macro): Don't zero max_column_hint in
201 every macro. This improves performance by reducing the number of
202 reallocations when track-macro-expansion is on.
203
7ca643e1
DS
2042012-06-04 Dodji Seketeli <dodji@redhat.com>
205
206 PR preprocessor/53463
207 * line-map.c (linemap_location_in_system_header_p): For built-in
208 macro tokens, check the first expansion point location that is not
209 for a token coming from a built-in macro.
210
7d9641cc
JM
2112012-05-29 Joseph Myers <joseph@codesourcery.com>
212
213 * directives.c: Fix typos.
214 * include/line-map.h: Fix typos.
215 * line-map.c: Fix typos.
216 * macro.c: Fix typos.
217
53a103d3
DS
2182012-05-25 Dodji Seketeli <dodji@redhat.com>
219
220 PR bootstrap/53459
221 * lex.c (search_line_fast): Avoid unused local typedefs to simulate
222 a static assertion.
223
828a7f76
DS
2242012-05-29 Dodji Seketeli <dodji@redhat.com>
225
226 PR preprocessor/53229
227 * internal.h (cpp_reader::set_invocation_location): Remove.
228 (cpp_reader::about_to_expand_macro_p): New member flag.
229 * directives.c (do_pragma): Remove Kludge as
230 pfile->set_invocation_location is no more.
231 * macro.c (cpp_get_token_1): Do away with the use of
232 cpp_reader::set_invocation_location. Just collect the macro
233 expansion point when we are about to expand the top-most macro.
234 Do not override cpp_reader::about_to_expand_macro_p.
235 This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
236 properly handle locations of expansion points.
237 (cpp_get_token_with_location): Adjust, as
238 cpp_reader::set_invocation_location is no more.
239 (paste_tokens): Take a virtual location parameter for
240 the LHS of the pasting operator. Use it in diagnostics. Update
241 comments.
242 (paste_all_tokens): Tighten the assert. Propagate the location of
243 the expansion point when no virtual locations are available.
244 Pass the virtual location to paste_tokens.
245 (in_macro_expansion_p): New static function.
246 (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
247 flag until we really start expanding the macro.
248
0b2c4be5
DS
2492012-05-16 Dodji Seketeli <dodji@redhat.com>
250
251 PR preprocessor/7263
252 * include/cpplib.h (cpp_classify_number): Take a location
253 parameter.
254 * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
255 macros that take a location parameter.
256 (cpp_classify_number): Take a (virtual) location parameter. Use
257 it for diagnostics. Adjust comments.
258 (eval_token): Take a location parameter. Pass it to
259 cpp_classify_number and to diagnostic routines.
260 (_cpp_parse_expr): Use virtual locations of tokens when parsing
261 expressions. Pass a virtual location to eval_token and to
262 diagnostic routines.
263
638d2065
TG
2642012-05-10 Tristan Gingold <gingold@adacore.com>
265
266 * expr.c (interpret_float_suffix): Add a guard.
267
3ad64f53
DS
2682012-05-02 Dodji Seketeli <dodji@redhat.com>
269
270 Properly initialize cpp_context in destringize_and_run
271 * directives.c (destringize_and_run): Properly initialize the new
272 context.
273 * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
274 the initial base context, which has the same life time as the
275 current instance of cpp_file.
276
b193dfa8
MLI
2772012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
278 Dodji Seketeli <dodji@seketeli.org>
279
3efc2959 280 PR c++/52974
b193dfa8
MLI
281 * libcpp/files.c (maybe_shorter_path): New.
282 (find_file_in_dir): Use it.
283
4e65a470
DS
2842012-04-30 Dodji Seketeli <dodji@redhat.com>
285
51fce2d3
DS
286 Switch -ftrack-macro-expansion=2 on by default.
287 * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
288 by default. Add comments.
289
c4ca1a09
DS
290 Strip "<built-in>" loc from displayed expansion context
291 * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
292 in comment.
293 (linemap_unwind_to_first_non_reserved_loc): Declare new function.
294 * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
295 new function.
296
3600218c
DS
297 Fix expansion point loc for macro-like tokens
298 * macro.c (macro_of_context): New static function.
299 (_cpp_push_token_context, push_extended_tokens_context): If the
300 macro argument is NULL, it means we are continuing the expansion
301 of the current macro, if any. Update comments.
302 (_cpp_pop_context): Re-enable expansion of the macro only when we
303 are really out of the context of the current expansion.
304
0ff2b8a0
DS
305 Fix token pasting with -ftrack-macro-expansion
306 * macro.c (paste_all_tokens): Put the token resulting from pasting
307 into an extended token context with -ftrack-macro-location is in
308 effect.
309
4e65a470
DS
310 Fix cpp_sys_macro_p with -ftrack-macro-expansion
311 * macro.c (cpp_sys_macro_p): Support -ftrack-macro-expansion.
312
112448b4
DS
3132012-04-29 Dodji Seketeli <dodji@redhat.com>
314
315 * lex.c (lex_raw_string): Change C++ style comments into C style
316 comments.
317 (lex_string): Likewise.
318
7f5f5f98
OW
3192012-04-27 Ollie Wild <aaw@google.com>
320
321 * include/cpplib.h (struct cpp_options): Add new field,
322 warn_literal_suffix.
323 (CPP_W_LITERAL_SUFFIX): New enum.
324 * init.c (cpp_create_reader): Default initialization of
325 warn_literal_suffix.
326 * lex.c (lex_raw_string): Treat user-defined literals which don't
327 begin with '_' as separate tokens and produce a warning.
328 (lex_string): Ditto.
329
1d72e96f
MLI
3302012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
331
332 * line-map.c (linemap_resolve_location): Synchronize comments with
333 those in line-map.h.
334 * include/line-map.h (linemap_resolve_location): Fix spelling in
335 comment.
336
e75b54a2
RE
3372012-03-22 Richard Earnshaw <rearnsha@arm.com>
338
339 * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
340
7888f266
RO
3412012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
342
343 * lex.c: Remove Solaris 8 reference.
344
dd552284
WL
3452012-02-14 Walter Lee <walt@tilera.com>
346
347 * configure.ac: Require 64-bit hwint for tilegx and tilepro.
348 * configure: Regenerate.
349
2c5cbc31
RG
3502012-01-09 Richard Guenther <rguenther@suse.de>
351
352 * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
353
b492b686
GF
3542012-01-09 Gary Funck <gary@intrepid.com>
355
356 PR preprocessor/33919
357 * files.c (_cpp_get_file_name): New. Implement file name
358 access function.
359 * internal.h (_cpp_get_file_name): New prototype.
360 * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
361 to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
362
75291c57
OH
3632012-01-03 Olivier Hainque <hainque@adacore.com>
364
365 * system.h: Prior to #define, #undef fopen and freopen unconditionally.
366
48b0b196
JM
3672011-12-20 Joseph Myers <joseph@codesourcery.com>
368
369 * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
370 (CLK_STDC1X): Change to CLK_STDC11.
371 * init.c (lang_defaults): Update comments.
372 (cpp_init_builtins): Update language tests. Use 201112L for C11
373 __STDC_VERSION__.
374
4a5e00ca
AS
3752011-12-20 Andreas Schwab <schwab@linux-m68k.org>
376
377 * configure: Regenerate.
378
095af58f
AS
3792011-12-19 Andreas Schwab <schwab@linux-m68k.org>
380
381 * configure: Regenerate.
382
b0c084b7
JJ
3832011-12-07 Jakub Jelinek <jakub@redhat.com>
384
385 PR bootstrap/50237
386 * internal.h (_cpp_init_lexer): New prototype.
387 * init.c (init_library): Call it.
388 * lex.c (init_vectorized_lexer): Remove constructor attribute,
389 add inline keyword.
390 (HAVE_init_vectorized_lexer): Define.
391 (_cpp_init_lexer): New function.
392
9b554be9
DS
3932011-12-03 Dodji Seketeli <dodji@redhat.com>
394
395 * macro.c (tokens_buff_remove_last_token)
396 (tokens_buff_put_token_to): Add an 'inline' function specifier to
397 the prototype.
398
8dcf72a8
DN
3992011-11-22 Diego Novillo <dnovillo@google.com>
400
401 * include/line-map.h (linemap_dump): Declare.
402 (line_table_dump): Declare.
403 * line-map.c (linemap_dump): New.
404 (line_table_dump): New.
405
7e74ce3f
ESR
4062011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
407
408 PR c++/50958
409 * expr.c (cpp_userdef_char_remove_type): Fix typo.
410
e9411247
MM
4112011-11-03 Michael Matz <matz@suse.de>
412
413 PR bootstrap/50857
414 * configure.ac: Check for -fno-exceptions -fno-rtti.
415 * configure: Regenerate.
416 * Makefile.in (NOEXCEPTION_FLAGS): New flag.
417 (ALL_CXXFLAGS): Use it.
418
0c1dace3
PC
4192011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
420
421 * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
422
25339f10
JM
4232011-11-02 Jason Merrill <jason@redhat.com>
424
425 PR c++/50810
426 * configure.ac: Add -Wno-narrowing to warning options.
427
97e3ad20
JM
4282011-10-31 Jason Merrill <jason@redhat.com>
429
1fb80b0c
JM
430 PR libstdc++/1773
431 * init.c (cpp_init_builtins): Set __cplusplus for C++11.
432
97e3ad20
JM
433 PR c++/50920
434 * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
435 CLK_GNUCXX0X to CLK_GNUCXX11.
436
3ce4f9e4
ESR
4372011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
438
439 Implement C++11 user-defined literals.
440 * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
441 cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
442 cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
443 cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
444 (cpp_classify_number): Classify unrecognized tokens as user-defined
445 literals.
446 * include/cpplib.h: Add new tokens for user-defined literals.
447 * init.c: Add new preprocessor flag (cxx11).
448 * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
449 including concatenation and promotion with suffixes.
450
3bb0c8db
DS
4512011-10-24 Dodji Seketeli <dodji@redhat.com>
452
453 * line-map.c (linemap_macro_map_lookup): Fix logic.
454
84756fd4
DS
4552011-10-24 Dodji Seketeli <dodji@redhat.com>
456
457 * include/line-map.h (linemap_expand_location): Take a line table
458 parameter. Update comment.
459 (linemap_resolve_location): Update comment.
460 (linemap_expand_location_full): Remove.
461 * line-map.c (linemap_resolve_location): Handle reserved
462 locations; return a NULL map in those cases.
463 (linemap_expand_location): If location is reserved, return a
464 zeroed expanded location. Update comment. Take a line table to
465 assert that the function takes non-virtual locations only.
466 (linemap_expand_location_full): remove.
467 (linemap_dump_location): Handle the fact that
468 linemap_resolve_location can return NULL line maps when the
469 location resolves to a reserved location.
470
471 * line-map.c (linemap_macro_map_lookup): Fix logic.
472
ad2305ad
DS
4732011-10-22 Dodji Seketeli <dodji@redhat.com>
474
475 PR bootstrap/50778
476 * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
477 context to act upon.
478 * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update
479 comment.
480 (cpp_token_from_context_at): Likewise.
481 (cpp_peek_token): Use the context to peek tokens from.
482
cbbcf655
DS
4832011-10-20 Dodji Seketeli <dodji@redhat.com>
484
485 PR bootstrap/50801
486 * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
487 number of tokens.
488
d17687f6
DS
4892011-10-18 Dodji Seketeli <dodji@redhat.com>
490
491 PR bootstrap/50760
492 * include/line-map.h (struct linemap_stats): Change the type of
493 the members from size_t to long.
494 * macro.c (macro_arg_token_iter_init): Unconditionally initialize
495 iter->location_ptr.
496
411f92de
DS
4972011-10-17 Dodji Seketeli <dodji@redhat.com>
498
499 * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
500 variable without using it if ENABLE_CHECKING is not defined. Mark
501 the LOCATION parameter as being unused.
502
b9bd6f74
TT
5032011-10-15 Tom Tromey <tromey@redhat.com>
504 Dodji Seketeli <dodji@redhat.com>
505
506 * include/line-map.h (struct line_maps::alloced_size_for_request):
507 New member.
508 * line-map.c (new_linemap): Use set->alloced_size_for_request to
509 get the actual allocated size of line maps.
510
64a1a422
TT
5112011-10-15 Tom Tromey <tromey@redhat.com>
512 Dodji Seketeli <dodji@redhat.com>
513
514 * line-map.h (struct linemap_stats): Declare new struct.
515 (linemap_get_statistics): Declare ...
516 * line-map.c (linemap_get_statistics): ... new function.
517 * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
518 Declare new counters.
519 (enter_macro_context, replace_args): Update
520 num_macro_tokens_counter.
521 (cpp_get_token_1): Update num_expanded_macros_counter.
522
847e697a
TT
5232011-10-15 Tom Tromey <tromey@redhat.com>
524 Dodji Seketeli <dodji@redhat.com>
525
526 * include/cpplib.h (struct cpp_options)<debug>: New struct member.
527 * include/line-map.h (linemap_dump_location): Declare ...
528 * line-map.c (linemap_dump_location): ... new function.
529
92582b75
TT
5302011-10-15 Tom Tromey <tromey@redhat.com>
531 Dodji Seketeli <dodji@redhat.com>
532
533 * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
534 New option.
535 * internal.h (struct macro_context): New struct.
536 (enum context_tokens_kind): New enum.
537 (struct cpp_context)<tokens_kind>: New member of type enum
538 context_tokens_kind.
539 (struct cpp_context)<macro>: Remove this. Replace it with an enum
540 of macro and macro_context.
541 (struct cpp_context)<direct_p>: Remove.
542 (_cpp_remaining_tokens_num_in_context): Declare new function.
543 * directives.c (destringize_and_run): Adjust.
544 * lex.c (_cpp_remaining_tokens_num_in_context)
545 (_cpp_token_from_context_at): Define new functions
546 (cpp_peek_token): Use them.
547 * init.c (cpp_create_reader): Initialize the base context to zero.
548 (_cpp_token_from_context_at): Define new static function.
549 (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
550 _cpp_token_from_context_at.
551 * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
552 members.
553 (enum macro_arg_token_kind): New enum.
554 (struct macro_arg_token_iter): New struct.
555 (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
556 (alloc_expanded_arg_mem, ensure_expanded_arg_room)
557 (delete_macro_args, set_arg_token, get_arg_token_location)
558 (arg_token_ptr_at, macro_arg_token_iter_init)
559 (macro_arg_token_iter_get_token)
560 (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
561 (expanded_token_index, tokens_buff_new, tokens_buff_count)
562 (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
563 (tokens_buff_add_token, tokens_buff_remove_last_token)
564 (reached_end_of_context, consume_next_token_from_context): New
565 static functions.
566 (cpp_get_token_1): New static function. Split and extended from
567 cpp_get_token. Use reached_end_of_context and
568 consume_next_token_from_context. Unify its return point. Move
569 the location tweaking from cpp_get_token_with_location in here.
570 (cpp_get_token): Use cpp_get_token_1
571 (stringify_arg): Use the new arg_token_at.
572 (paste_all_tokens): Support tokens coming from extended tokens
573 contexts.
574 (collect_args): Return the number of collected arguments, by
575 parameter. Store virtual locations of tokens that constitute the
576 collected args.
577 (funlike_invocation_p): Return the number of collected arguments,
578 by parameter.
579 (enter_macro_context): Add a parameter for macro expansion point.
580 Pass it to replace_args and to the "used" cpp callback. Get the
581 number of function-like macro arguments from funlike_invocation_p,
582 pass it to the new delete_macro_args to free the memory used by
583 macro args. When -ftrack-macro-expansion is in effect, for macros
584 that have no arguments, create a macro map for the macro expansion
585 and use it to allocate proper virtual locations for tokens
586 resulting from the expansion. Push an extended tokens context
587 containing the tokens resulting from macro expansion and their
588 virtual locations.
589 (replace_args): Rename the different variables named 'count' into
590 variables with more meaningful names. Create a macro map;
591 allocate virtual locations of tokens resulting from this
592 expansion. Use macro_arg_token_iter to iterate over tokens of a
593 given macro. Handle the case of the argument of
594 -ftrack-macro-expansion being < 2. Don't free macro arguments
595 memory resulting from expand_arg here, as these are freed by the
596 caller of replace_arg using delete_macro_args now. Push extended
597 token context.
598 (next_context, push_ptoken_context, _cpp_push_token_context)
599 (_cpp_push_text_context): Properly initialize the context.
600 (expand_arg): Use the new alloc_expanded_arg_mem,
601 push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
602 (_cpp_pop_context): Really free the memory held by the context.
603 Handle freeing memory used by extended tokens contexts.
604 (cpp_get_token_with_location): Use cpp_get_token_1.
605 (cpp_sys_macro_p): Adjust.
606 (_cpp_backup_tokens): Support the new kinds of token contexts.
607 * traditional.c (recursive_macro): Adjust.
608
46427374
TT
6092011-10-15 Tom Tromey <tromey@redhat>
610 Dodji Seketeli <dodji@redhat.com>
611
612 * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
613 member.
614 (MAX_SOURCE_LOCATION): New constant.
615 (struct line_map_ordinary, struct line_map_macro): New structs.
616 (struct line_map): Turn this into a union of the two above. Add
617 comments.
618 (struct maps_info): New struct.
619 (struct line_maps)<info_ordinary, info_macro>: Two new fields.
620 These now carry the map information that was previously scattered
621 in struct line_maps.
622 (struct map_info::allocated): Fix comment.
623 (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
624 (ORDINARY_MAP_STARTING_LINE_NUMBER)
625 (ORDINARY_MAP_INCLUDER_FILE_INDEX)
626 (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
627 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
628 (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
629 (MACRO_MAP_EXPANSION_POINT_LOCATION)
630 (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
631 (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
632 (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
633 (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
634 (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
635 (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
636 (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
637 (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
638 (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
639 (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
640 (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
641 information.
642 (linemap_check_ordinary, linemap_assert)
643 (linemap_location_before_p): New macros.
644 (linemap_position_for_line_and_column)
645 (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
646 (linemap_macro_expansion_map_p)
647 (linemap_macro_map_loc_to_def_point)
648 (linemap_macro_map_loc_unwind_once)
649 (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
650 (linemap_get_source_line linemap_get_source_column)
651 (linemap_map_get_macro_name, linemap_get_file_path)
652 (linemap_location_in_system_header_p)
653 (linemap_location_from_macro_expansion_p): Declare new functions.
654 (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
655 (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
656 accessors act on ordinary maps only.
657 (INCLUDED_FROM): Return NULL for main files; use the new
658 accessors.
659 (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
660 (struct expanded_location): Move here from gcc/input.h
661 (linemap_resolve_location, linemap_expand_location)
662 (linemap_expand_location_full): Declare new functions.
663 * line-map.c: Include cpplib.h, internal.h
664 (linemap_enter_macro, linemap_add_macro_token)
665 (linemap_get_expansion_line, linemap_get_expansion_filename): New
666 functions that are private to libcpp.
667 (linemap_assert): New macro.
668 (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
669 (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
670 (linemap_macro_map_loc_unwind_toward_spelling)
671 (linemap_macro_map_loc_to_exp_point)
672 (first_map_in_common_1, first_map_in_common): New static
673 functions.
674 (new_linemap): Define new static functions. Extracted and
675 enhanced from ...
676 (linemap_add): ... here. Use linemap_assert in lieu of abort
677 previously.
678 (linemap_tracks_macro_expansion_locs_p)
679 (linemap_add_macro_token, linemap_macro_expansion_map_p)
680 (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
681 (linemap_macro_map_loc_to_def_point)
682 (linemap_macro_map_loc_unwind_once)
683 (linemap_step_out_once, linemap_map_get_index)
684 (linemap_get_source_line,linemap_get_source_column)
685 (linemap_get_file_path, linemap_map_get_macro_name)
686 (linemap_location_in_system_header_p)
687 (linemap_location_originated_from_system_header_p)
688 (linemap_location_from_macro_expansion_p)
689 (linemap_tracks_macro_expansion_locs_p)
690 (linemap_resolve_location, linemap_expand_location)
691 (linemap_expand_location_full)
692 (linemap_tracks_macro_expansion_locs_p)
693 (linemap_position_for_line_and_column, linemap_compare_locations):
694 Define new public functions.
695 (linemap_init): Initialize ordinary and macro maps information in
696 the map set.
697 (linemap_check_files_exited): Use the new accessors.
698 (linemap_free): Remove this dead code.
699 (linemap_line_start): Assert this uses an ordinary map. Adjust to
700 use the new ordinary map accessors and data structures. Don't
701 overflow past the lowest possible macro token's location.
702 (linemap_position_for_column): Assert the ordinary maps of the map
703 set are really ordinary. Use ordinary map accessors.
704 (linemap_lookup): Keep the same logic but generalize to allow
705 lookup of both ordinary and macro maps. Do not crash when called
706 with an empty line table.
707 * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
708 new API of line-map.h.
709 * directives.c (start_directive, do_line, do_linemarker)
710 (do_linemarker): Likewise.
711 * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
712 (make_cpp_dir, cpp_make_system_header): Likewise.
713 * init.c (cpp_read_main_file): Likewise.
714 * internal.h (CPP_INCREMENT_LINE): Likewise.
715 (linemap_enter_macro, linemap_add_macro_token)
716 (linemap_get_expansion_line, linemap_get_expansion_filename): New
717 functions private to libcpp.
718 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
719 (skip_line_comment, skip_whitespace, lex_raw_string)
720 (_cpp_lex_direct): Likewise.
721 * macro.c (_cpp_builtin_macro_text): Likewise.
722 (_cpp_aligned_alloc): Initialize the new name member of the macro.
723 * traditional.c (copy_comment, _cpp_scan_out_logical_line):
724 Likewise.
725 * errors.c (cpp_diagnostic): Adjust to new linemap API.
726
892a371f
DS
7272011-08-28 Dodji Seketeli <dodji@redhat.com>
728
729 * line-map.c (linemap_add): Assert that reason must not be
730 LC_RENAME when called for the first time on a "main input file".
731
e3dfef44
GC
7322011-08-22 Gabriel Charette <gchare@google.com>
733
734 * init.c (cpp_create_reader): Inititalize forced_token_location_p.
735 * internal.h (struct cpp_reader): Add field forced_token_location_p.
736 * lex.c (_cpp_lex_direct): Use forced_token_location_p.
737 (cpp_force_token_locations): New.
738 (cpp_stop_forcing_token_locations): New.
739
32fe396e
RO
7402011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
741
742 PR libstdc++/1773
743 * init.c (cpp_init_builtins): Define __cplusplus 19971L.
744
7c1ffff9
JM
7452011-08-18 Joseph Myers <joseph@codesourcery.com>
746
747 * include/cpplib.h (struct cpp_options): Fix typo.
748
a48e3dd1
JM
7492011-08-18 Joseph Myers <joseph@codesourcery.com>
750
751 * include/cpplib.h (struct cpp_options): Add rliterals.
752 * init.c (struct lang_flags, lang_defaults): Add rliterals.
753 (cpp_set_lang): Set rliterals option.
754 (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
755 * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
756
3f6ced10
GC
7572011-08-15 Gabriel Charette <gchare@google.com>
758
759 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
760 Update all users to use linemap_position_for_column instead.
761
0681d04c
GC
7622011-07-28 Gabriel Charette <gchare@google.com>
763
764 * include/line-map.h (struct line_maps):
765 Remove unused field last_listed. Update all users.
766
5e9627ca
L
7672011-07-28 H.J. Lu <hongjiu.lu@intel.com>
768
769 * configure.ac: Set need_64bit_hwint to yes for x86 targets.
770 * configure: Regenerated.
771
a024b70f
RO
7722011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
773
774 * system.h [__cplusplus]: Wrap C function declarations in extern "C".
775
5b6d595b
RO
7762011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
777 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
778
779 PR bootstrap/49794
780 * configure.ac: Test AM_ICONV with CXX.
781 * configure: Regenerate.
782 * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
783
d0a9fbe1
DS
7842011-07-15 Dodji Seketeli <dodji@redhat.com>
785
786 * directives.c (struct if_stack): Use source_location as type
787 here.
788 * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
789 indent, def_pragma, used_define, used_undef>: Properly use
790 source_location as parameter type, rather than unsigned int.
791
fbdd5d87
RO
7922011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
793
794 PR target/39150
795 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
796 like i[34567]86-*-solaris2.1[0-9]*.
797 * configure: Regenerate.
798
8787a05a
JM
7992011-06-16 Jason Merrill <jason@redhat.com>
800
801 PR c++/45399
802 * lex.c (lex_raw_string): Don't check for embedded NUL.
803
38fbfaf6
DS
8042011-06-06 Dodji Seketeli <dodji@redhat.com>
805
806 PR preprocessor/48532
807 * directives.c (do_pragma): Don't forget the invocation location
808 when parsing the pragma name of a namespaced pragma directive.
809
fc0993ac
JT
8102011-05-29 John Tytgat <John.Tytgat@aaug.net>
811
812 * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
813
ef230b38
UB
8142011-05-22 Uros Bizjak <ubizjak@gmail.com>
815
816 PR target/49104
817 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
818 is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
819
e5b0dad8
JK
8202011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com>
821
822 * system.h (ENUM_BITFIELD): Remove.
823
6cfae070
JJ
8242011-04-24 Jakub Jelinek <jakub@redhat.com>
825
826 PR preprocessor/48740
827 * lex.c (lex_raw_string): When raw string ends with
828 ??) followed by raw prefix and ", ensure it is preprocessed
829 with ??) rather than ??].
830
04695783
JM
8312011-04-20 Jim Meyering <meyering@redhat.com>
832
833 * files.c (destroy_cpp_file): Remove useless if-before-free.
834 * init.c (cpp_destroy): Likewise.
835 * macro.c (replace_args): Likewise.
836 * pch.c (cpp_valid_state): Likewise.
837
4489800d
KT
8382011-03-25 Kai Tietz <ktietz@redhat.com>
839
840 * files.c (file_hash_eq): Use filename_cmp
841 instead of strcmp.
842 (nonexistent_file_hash_eq): Likewise.
843 (remap_filename): Likewise.
844 Handle absolute DOS-path,
845 (append_file_to_dir): Check for IS_DIR_SEPARATOR
846 instead of slash.
847 (read_name_map): Likewise.
848 * linemap.c (linemap_add): Use filename_cmp
849 instead of strcmp.
850 * mkdeps.c (apply_vpath): Use filename_ncmp
851 instead of strncmp.
852 (deps_restore): Use filename_cmp instead of
853 strcmp.
854 * init.c (read_original_directory): Use
855 IS_DIR_SEPARATOR instead of checking for slash.
856
f3c33d9d
MM
8572011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
858
859 PR preprocessor/48192
860 * directives.c (do_ifdef): Do not consider conditional macros as
861 being defined.
862 (do_ifndef): Ditto.
863 * expr.c (parse_defined): Ditto.
864
01956319
RH
8652011-03-18 Richard Henderson <rth@redhat.com>
866
867 PR bootstrap/45381
868 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
869
c5a62c6f
EB
8702011-11-04 Eric Botcazou <ebotcazou@adacore.com>
871 Jakub Jelinek <jakub@redhat.com>
872
873 PR preprocessor/39213
874 * directives.c (end_directive): Call _cpp_remove_overlay for deferred
875 pragmas as well in traditional mode.
876
0e1a989c
ILT
8772010-11-17 Ian Lance Taylor <iant@google.com>
878
879 PR bootstrap/45538
880 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of
881 AC_LANG based on ENABLE_BUILD_WITH_CXX.
882
651a20b5
KT
8832010-11-16 Kai Tietz <kai.tietz@onevision.com>
884
885 PR preprocessor/17349
886 * lex.c (save_comment): Handle in argument passing c++
887 comments special.
888
480767a9
ILT
8892010-11-02 Ian Lance Taylor <iant@google.com>
890
891 * configure.ac: Use AC_SYS_LARGEFILE.
892 * configure: Rebuild.
893 * config.in: Rebuild.
894
078419c9 8952010-10-19 Basile Starynkevitch <basile@starynkevitch.net>
480767a9 896
078419c9
BS
897 * line-map.h (source_location): Remove obsolete comment
898 mentioning location_s.
899
d6874138
KT
9002010-09-29 Kai Tietz <kai.tietz@onevision.com>
901
902 PR preprocessor/45362
903 * directives.c (cpp_pop_definition): Make static.
904 (do_pragma_push_macro): Reworked to store text
905 definition.
906 (do_pragma_pop_macro): Add free text definition.
907 (cpp_push_definition): Removed.
908 * include/cpplib.h (cpp_push_definition): Removed.
909 (cpp_pop_definition): Likewise.
910 * internal.h (def_pragma_macro): Remove member 'value'
911 and add new members 'definition', 'line',
912 'syshdr', 'sued' and 'is_undef'.
913 * pch.c (_cpp_restore_pushed_macros): Rework to work
914 on text definition and store additional macro flags.
915 (_cpp_save_pushed_macros): Likewise.
916
e3339d0f
JM
9172010-09-29 Joseph Myers <joseph@codesourcery.com>
918
919 * include/cpplib.h (cpp_options): Rename warn_deprecated,
920 warn_traditional, warn_long_long and pedantic.
921 * directives.c (directive_diagnostics, _cpp_handle_directive):
922 Update names of cpp_options members.
923 * expr.c (cpp_classify_number, eval_token): Update names of
924 cpp_options members.
925 * init.c (cpp_create_reader, post_options): Update names of
926 cpp_options members.
927 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
928 cpp_options members.
929 * macro.c (parse_params): Update names of cpp_options members.
930
128465e6
ILT
9312010-09-15 Ian Lance Taylor <iant@google.com>
932
933 * init.c: Fix type name in comment.
934
a69d2520
JJ
9352010-08-31 Jakub Jelinek <jakub@redhat.com>
936
937 PR preprocessor/45457
938 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
939 needed.
940 * directives.c (do_ifdef, do_ifndef): Likewise.
941
707bcb7a
RO
9422010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
943
944 * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
945
6f173e52
RH
9462010-08-24 Richard Henderson <rth@redhat.com>
947
948 PR bootstrap/45376
949 * configure.ac (HAVE_SSE4): New check.
950 * configure, config.in: Rebuild.
951 * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
952
789d73cb
RO
9532010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
954
955 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
956 etc. on Solaris 2/x86.
957
246a2fcb
RH
9582010-08-21 Richard Henderson <rth@redhat.com>
959 Andi Kleen <ak@linux.intel.com>
960 David S. Miller <davem@davemloft.net>
961
962 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
963 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
964 (ptrdiff_t): Check via AC_CHECK_TYPE.
965 * config.in, configure: Rebuild.
966 * system.h: Include stdint.h, if available.
967 * lex.c (WORDS_BIGENDIAN): Provide default.
968 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
969 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
970 search_line_sse2, search_line_sse42, init_vectorized_lexer,
971 search_line_fast): New.
972 (_cpp_clean_line): Use search_line_fast. Restructure the fast
973 loop to make it clear when we're leaving the loop. Stay in the
974 fast loop for non-trigraph '?'.
975
8e680db5
JJ
9762010-06-11 Jakub Jelinek <jakub@redhat.com>
977
978 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
979 callback.
980 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
981 (cpp_macro_definition): Remove const qual from second argument.
982 * macro.c (enter_macro_context): Call user_builtin_macro callback for
983 NODE_BUILTIN !NODE_USED macros.
984 (warn_of_redefinition): Likewise. Remove const qual from second
985 argument.
986 (cpp_macro_definition): Likewise.
987 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
988 for NODE_BUILTIN !NODE_USED macros.
989
1cb42611
JM
9902010-06-10 Joseph Myers <joseph@codesourcery.com>
991
992 * include/cpplib.h (struct cpp_options): Remove show_column.
993 * init.c (cpp_create_reader, post_options): Don't set show_column.
994
ff5dfc48
JR
9952010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
996
997 PR bootstrap/44432
998 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
999 check that C++ compiler works.
1000 * configure: Regenerate.
1001
a9429e29
LB
10022010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1003
1004 * include/symtab.h (ht_identifier_ptr): New.
1005
c3f247f4
RW
10062010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
1007 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1008
1009 PR bootstrap/42798
1010 * configure.ac: Check for declaration of 'basename(char *)'.
1011 * configure: Regenerate.
1012 * config.in: Regenerate.
1013
2778d766
JM
10142010-04-25 Joseph Myers <joseph@codesourcery.com>
1015
1016 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
1017 * init.c (lang_defaults): Add entries for new language variants.
1018 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
1019 variants.
1020
d8a12e84
MLI
10212010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1022
1023 PR cpp/43195
1024 * files.c (report_missing_guard): Test for #pragma once.
1025
87cf0651
SB
10262010-04-07 Simon Baldwin <simonb@google.com>
1027
1028 * directives.c (do_diagnostic): Add warning reason argument,
1029 call appropriate error reporting function for code.
1030 (directive_diagnostics): Call specific warning functions with
1031 warning reason where appropriate.
1032 (do_error, do_warning, do_pragma_dependency): Add warning reason
1033 argument to do_diagnostic calls.
1034 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
1035 _cpp_create_definition): Call specific warning functions with
1036 warning reason where appropriate.
1037 * Makefile.in: Add new diagnostic functions to gettext translations.
1038 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
1039 to error callback.
1040 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
1041 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
1042 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
1043 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
1044 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
1045 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
1046 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
1047 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
1048 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
1049 warning reason codes.
1050 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
1051 cpp_warning_with_line, cpp_pedwarning_with_line,
1052 cpp_warning_with_line_syshdr): New specific error reporting functions.
1053 * pch.c (cpp_valid_state): Call specific warning functions with
1054 warning reason where appropriate.
1055 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
1056 diagnostic handlers.
1057 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
1058 cpp_warning_with_line, cpp_pedwarning_with_line,
1059 cpp_warning_with_line_syshdr): New specific error reporting functions.
1060 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
1061 specific warning functions with warning reason where appropriate.
1062 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
1063 warn_about_normalization, lex_identifier_intern, lex_identifier,
1064 _cpp_lex_direct): Ditto.
1065 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
1066 narrow_str_to_charconst): Ditto.
1067
d947ada0
JJ
10682010-04-06 Jakub Jelinek <jakub@redhat.com>
1069
1070 PR preprocessor/43642
1071 * lex.c (lex_raw_string): Change type of TYPE variable to
1072 unsigned char.
1073
4d9e8446
RW
10742010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1075
1076 * aclocal.m4: Regenerate.
1077
52150625
JM
10782010-03-29 Jason Merrill <jason@redhat.com>
1079
00a81b8b
JM
1080 More N3077 raw string changes
1081 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
1082 strings.
1083 * lex.c (bufring_append): Split out from...
1084 (lex_raw_string): ...here. Undo trigraph and line splicing
1085 transformations. Do process line notes in multi-line literals.
1086 (_cpp_process_line_notes): Ignore notes that were already handled.
1087
52150625
JM
1088 Some raw string changes from N3077
1089 * charset.c (cpp_interpret_string): Change inner delimiters to ().
1090 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
1091
709d7160
JJ
10922010-02-11 Jakub Jelinek <jakub@redhat.com>
1093
1094 * init.c (read_original_filename): Don't call read_original_directory
1095 if _cpp_handle_directive returns 0.
1096
dadab4fd
JM
10972010-01-01 Joseph Myers <joseph@codesourcery.com>
1098
1099 PR preprocessor/41947
1100 * expr.c (cpp_classify_number): Give error for hexadecimal
1101 floating-point constant with no digits before or after point.
1102
3de8a540
AC
11032009-11-20 Arnaud Charlet <charlet@adacore.com>
1104
1105 * macro.c (enter_macro_context): Call cb.used callback if defined.
1106 * directives.c (do_idef, do_ifndef): Ditto.
1107 * include/cpplib.h (struct cpp_callbacks): Add used callback.
1108
17e7cb85
KT
11092009-11-11 Kai Tietz <kai.tietz@onevision.com>
1110
1111 * directives.c (do_pragma_push_macro): New pragma handler.
1112 (do_pragma_pop_macro): Likewise.
1113 (_cpp_init_internal_pragmas): Add push_macro and
1114 pop_macro handler to internal pragmas.
1115 (lex_macro_node_from_str): Removed.
1116 (cpp_push_definition): Replace lex_macro_node_from_str
1117 by _cpp_lex_identifier.
1118 (cpp_pop_definition): Likewise.
1119 * internal.h (_cpp_lex_identifier): New prototype.
1120 (def_pragma_macro): New structure.
1121 (cpp_reader): New member pushed_macros.
1122 * lex.c (_cpp_lex_identifier): New function.
1123 (lex_identifier_intern): New function.
1124 * init.c (cpp_create_reader): Initialize pushed_macros
1125 member.
1126 (cpp_destroy): Free elements in pushed_macros member.
1127 * pch.c (_cpp_save_pushed_macros): New function.
1128 (_cpp_restore_pushed_macros): Likewise.
1129 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
1130 (cpp_read_state): Use _cpp_restore_pushed_macros.
1131
2c6e3f55
JJ
11322009-10-19 Jakub Jelinek <jakub@redhat.com>
1133
1134 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
1135 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
1136 and char32_cset_desc.
1137 (converter_for_type): Handle CPP_UTF8STRING.
1138 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
1139 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
1140 (parse_include): Reject raw strings.
1141 * include/cpplib.h (CPP_UTF8STRING): New token type.
1142 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
1143 * lex.c (lex_raw_string): New function.
1144 (lex_string): Handle u8 string literals, call lex_raw_string
1145 for raw string literals.
1146 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
1147 sequences.
1148 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
1149
96c169e1
JJ
11502009-10-14 Jakub Jelinek <jakub@redhat.com>
1151
1152 PR preprocessor/41543
1153 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
1154 * line-map.c (linemap_init): Initialize highest_location and
1155 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
1156
30c99a9e
JM
11572009-10-09 Jason Merrill <jason@redhat.com>
1158
1159 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
1160
2214382c
NV
11612009-10-09 Neil Vachharajani <nvachhar@google.com>
1162
1163 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
1164 sccs.
1165
e02222d2
LR
11662009-09-23 Loren J. Rittle <ljrittle@acm.org>
1167
1168 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
1169 * configure: Rebuilt.
1170
9a8a2b7a
RG
11712009-09-22 Richard Guenther <rguenther@suse.de>
1172
1173 PR pch/38987
1174 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
1175
74dc6a11
CD
11762009-09-18 Chris Demetriou <cgd@google.com>
1177
1178 PR preprocessor/28435:
1179 * include/cpplib.h (struct cpp_options): Add new member
1180 deps.need_preprocessor_output.
1181 * files.c (open_file_failed): If preprocessor output is needed
1182 always report an error.
1183
933608b7
KT
11842009-09-13 Kai Tietz <kai.tietz@onevision.com>
1185
1186 * configure.ac: Set for i?86-w64-mingw*
1187 need_64bit_hwint to yes.
1188 * configure: Regenerated.
1189
86373e7e
JM
11902009-09-10 Jason Merrill <jason@redhat.com>
1191
1192 * directives.c (cpp_define): constify.
1193
fd2ab214
ILT
11942009-09-02 Ian Lance Taylor <iant@google.com>
1195
1196 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
1197
df58e648
RW
11982009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1199
1200 * configure.ac (AC_PREREQ): Bump to 2.64.
1201
5213506e
RW
12022009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1203
1204 * aclocal.m4: Regenerate.
1205 * config.in: Regenerate.
1206 * configure: Regenerate.
1207
709a22df
TT
12082009-08-17 Tom Tromey <tromey@redhat.com>
1209
1210 PR preprocessor/41067:
1211 * charset.c (convert_escape): Add missing ":" to error text.
1212
0c539b47
DR
12132009-07-27 Douglas B Rupp <rupp@gnat.com>
1214
1215 * include/cpplib.h (INO_T_CPP): New macro.
1216 (struct cpp_dir): Use it.
1217
2b69c841
JQ
12182009-07-20 Jerry Quinn <jlquinn@optonline.net>
1219
1220 PR regression/40800
1221 * configure.ac: Use = instead of == for testing
1222 ENABLE_BUILD_WITH_CXX.
1223 * configure: Rebuild.
1224
f1bf410c
JQ
12252009-07-17 Jerry Quinn <jlquinn@optonline.net>
1226
1227 * directives.c (do_linemarker, do_line): Use CPP_STRING for
1228 ignored enum value.
1229 * files.c (find_file_in_dir): Add cast from void* to char*.
1230 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
1231 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
1232 warnings.
1233 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
1234 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
1235 COMPILER_FLAGS): New.
1236 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
1237 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
1238 instead of ALL_CFLAGS.
1239 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
1240 from other warnings. Add -Wc++-compat to C-specific warnings.
1241 Check for --enable-build-with-cxx. Set and substitute
1242 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
1243 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
1244 AC_CHECK_HEADERS.
1245 * configure: Rebuild.
1246 * include/cpp-id-data.h: Remove extern "C".
1247 * include/line-map.h: Likewise.
1248 * include/mkdeps.h: Likewise.
1249 * include/symtab.h: Likewise.
1250 * internal.h: Likewise.
1251
a28fbdba
MLI
12522009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1253
1254 * directives.c (parse_include): Add location argument. Update all
1255 calls.
1256 (parse_answer): Likewise.
1257 (do_include_common): Error with exact location.
1258 (parse_assertion): Likewise.
1259
b506a5a2
MLI
12602009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1261
1262 * expr.c (num_div_op): Take explicit location.
1263
7d8847a4
ILT
12642009-06-17 Ian Lance Taylor <iant@google.com>
1265
1266 * include/cpplib.h (progname): Don't declare.
1267
3d8b2a98
ILT
12682009-06-12 Ian Lance Taylor <iant@google.com>
1269
1270 * include/cpplib.h (struct cpp_options): Add
1271 warn_cxx_operator_names field.
1272 (NODE_WARN_OPERATOR): Define.
1273 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
1274 type to 6 bits.
1275 * init.c (mark_named_operators): Add flags parameter.
1276 (cpp_post_options): Pick flags value to pass to
1277 mark_named_operators.
1278 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
1279 identifier is an operator name in C++.
1280
e74fe492
AH
12812009-06-01 Aldy Hernandez <aldyh@redhat.com>
1282
1283 * include/line-map.h (LAST_SOURCE_COLUMN): New.
1284
4851089f
ILT
12852009-06-01 Ian Lance Taylor <iant@google.com>
1286
1287 * include/cpp-id-data.h: Add extern "C".
1288 * include/line-map.h: Likewise.
1289 * include/mkdeps.h: Likewise.
1290 * include/symtab.h: Likewise.
1291 * internal.h: Likewise.
1292
7e5487a2
ILT
12932009-05-15 Ian Lance Taylor <iant@google.com>
1294
1295 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
1296 builtin_type. Change all uses.
1297
00b0c19b
MLI
12982009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1299
1300 PR cpp/36674
1301 * directives (do_linemarker): Compensate for the increment in
1302 location that occurs when we reach the end of line.
1303 * files (_cpp_stack_include): Mention _cpp_find_file in the
1304 comment.
1305
9a0c6187
JM
13062009-05-10 Joseph Myers <joseph@codesourcery.com>
1307
1308 * include/cpplib.h (enum cpp_token_fld_kind): Add
1309 CPP_TOKEN_FLD_TOKEN_NO.
1310 (struct cpp_macro_arg, struct cpp_identifier): Define.
1311 (union cpp_token_u): Use struct cpp_identifier for identifiers.
1312 Use struct cpp_macro_arg for macro arguments. Add token_no for
1313 CPP_PASTE token numbers.
1314 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
1315 do_pragma_poison, parse_assertion): Use val.node.node in place of
1316 val.node.
1317 * expr.c (parse_defined, eval_token): Use val.node.node in place
1318 of val.node.
1319 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
1320 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
1321 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
1322 place of val.arg_no. Use val.node.node in place of val.node.
1323 * macro.c (replace_args, cpp_get_token, parse_params,
1324 lex_expansion_token, create_iso_definition, cpp_macro_definition):
1325 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
1326 Use val.node.node in place of val.node.
1327
9e322bc1
JM
13282009-05-03 Joseph Myers <joseph@codesourcery.com>
1329
1330 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
1331 UTF-8 sequences.
1332
f88d0772
JM
13332009-04-25 Joseph Myers <joseph@codesourcery.com>
1334
1335 PR preprocessor/39559
1336 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
1337 constants larger than intmax_t in C99 mode.
1338
d1b38208
TG
13392009-04-21 Taras Glek <tglek@mozilla.com>
1340
1341 * include/cpp-id-data.h: Update GTY annotations to new syntax.
1342 * include/cpplib.h: Likewise.
1343 * include/line-map.h: Likewise.
1344 * include/symtab.h: Likewise.
1345
cfc93532
MLI
13462009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1347
1348 PR c++/14875
1349 * lex.c (cpp_type2name): Take a flags parameter. Call
1350 cpp_named_operator2name for named operators and cpp_digraph2name
1351 for digraphs.
1352 (cpp_digraph2name): New.
1353 (cpp_spell_token): Use it.
1354 (cpp_output_token): Likewise.
1355 * include/cpplib.h (cpp_type2name): Update declaration.
1356 * init.c (cpp_named_operator2name): New.
1357 * internal.h (cpp_named_operator2name): Declare.
1358
9c650d90
MLI
13592009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1360
1361 PR c++/13358
1362 * init.c (cpp_create_reader): Wlong_long is disabled by default.
1363 * expr.c (cpp_classify_number): Give different messages for C and
1364 C++ front-ends.
1365
aa508502
JM
13662009-04-19 Joseph Myers <joseph@codesourcery.com>
1367
1368 PR preprocessor/20078
1369 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
1370 field.
1371 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
1372 (struct cpp_token): Change flags to unsigned short.
1373 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
1374 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
1375 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
1376 tokens.
1377 * macro.c (macro_real_token_count): New.
1378 (enter_macro_context, replace_args): Use macro_real_token_count.
1379 (create_iso_definition): Record whitespace surrounding and digraph
1380 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
1381 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
1382 multiple consecutive ## tokens.
1383 (_cpp_create_definition): Initialize extra_tokens.
1384 (cpp_macro_definition): Use macro_real_token_count.
1385
61cc8223
JM
13862009-04-18 Joseph Myers <joseph@codesourcery.com>
1387
1388 * directives.c (parse_include): Pass true to check_eol.
1389
c7f9c0b9
JM
13902009-04-18 Joseph Myers <joseph@codesourcery.com>
1391
1392 PR preprocessor/39646
1393 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
1394 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
1395 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
1396 place of LC_RENAME.
1397
a5cb563b
JM
13982009-04-18 Joseph Myers <joseph@codesourcery.com>
1399
1400 PR preprocessor/39647
1401 * directives.c (check_eol): Add parameter expand.
1402 (do_undef, parse_include, do_line, do_linemarker, do_ident,
1403 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
1404 do_else, do_endif, do_assert, do_unassert): All callers changed.
1405 Pass true from do_line, false elsewhere.
1406
18f41a1b
JM
14072009-04-12 Joseph Myers <joseph@codesourcery.com>
1408
1409 PR preprocessor/31869
1410 * macro.c (stringify_arg): Handle NULL source token in padding
1411 token where previous padding token did not have source token with
1412 preceding whitespace.
1413
748086b7
JJ
14142009-04-09 Jakub Jelinek <jakub@redhat.com>
1415
1416 * Makefile.in: Change copyright header to refer to version
1417 3 of the GNU General Public License and to point readers at the
1418 COPYING3 file and the FSF's license web page.
1419 * charset.c: Likewise.
1420 * directives-only.c: Likewise.
1421 * directives.c: Likewise.
1422 * errors.c: Likewise.
1423 * expr.c: Likewise.
1424 * files.c: Likewise.
1425 * identifiers.c: Likewise.
1426 * include/cpp-id-data.h: Likewise.
1427 * include/cpplib.h: Likewise.
1428 * include/line-map.h: Likewise.
1429 * include/mkdeps.h: Likewise.
1430 * include/symtab.h: Likewise.
1431 * init.c: Likewise.
1432 * internal.h: Likewise.
1433 * lex.c: Likewise.
1434 * line-map.c: Likewise.
1435 * macro.c: Likewise.
1436 * makeucnid.c: Likewise.
1437 * mkdeps.c: Likewise.
1438 * pch.c: Likewise.
1439 * symtab.c: Likewise.
1440 * system.h: Likewise.
1441 * traditional.c: Likewise.
1442 * ucnid.tab: Likewise.
1443 * ucnid.h: Regenerate.
1444
eec49116
JJ
14452009-04-01 Janis Johnson <janis187@us.ibm.com>
1446
839a3b8a
JJ
1447 PR c/39027
1448 * include/cpplib.h (CPP_N_DEFAULT): Define.
1449 * expr.c (interpret_float_suffix): Recognize d or D for double,
1450 return new value for default.
1451 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
1452
eec49116
JJ
1453 PR c/33466
1454 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
1455 letters from decimal float and fixed-point suffixes.
1456
47580d22
JM
14572009-03-31 Joseph Myers <joseph@codesourcery.com>
1458
1459 PR preprocessor/15638
1460 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
1461 invalid PCH.
1462 (open_file_failed): Make error for missing file fatal.
1463 * include/cpplib.h (CPP_DL_FATAL): Define.
1464
5a2df0fa
SV
14652009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
1466
1467 PR preprocessor/31932:
1468 * internal.h: Don't mention HAVE_ICONV_H.
1469 * configure, config.in: Rebuild.
1470 * configure.ac: Don't check for iconv.h.
1471
c1a8a3c6
TT
14722009-03-30 Tom Tromey <tromey@redhat.com>
1473
1474 PR preprocessor/39512:
1475 * line-map.c (linemap_init): Initialize 'reallocator' field.
1476
a37a7b8a
JJ
14772009-03-30 Jakub Jelinek <jakub@redhat.com>
1478
1479 PR target/39558
1480 * macro.c (cpp_get_token): If macro_to_expand returns NULL
1481 and used some tokens, add CPP_PADDING before next token.
1482
148e4216
JM
14832009-03-29 Joseph Myers <joseph@codesourcery.com>
1484
1485 PR preprocessor/34695
1486 * makedepend.c: Remove.
1487 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
1488 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
1489 * directives.c (cpp_errors): Remove.
1490 * errors.c (print_location, _cpp_begin_message, v_message):
1491 Remove.
1492 (cpp_error, cpp_error_with_line): Always use error callback.
1493 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
1494 * include/cpplib.h (cpp_options): Remove pedantic_errors,
1495 inhibit_warnings, warn_system_headers, inhibit_errors,
1496 warnings_are_errors, client_diagnostic.
1497 (cpp_callbacks): Add extra arguments to error callback; make it
1498 return bool.
1499 (cpp_finish): Return void.
1500 (cpp_destroy): Remove inaccurate comment about return value.
1501 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
1502 (CPP_DL_NOTE): Define.
1503 * include/line-map.h (linemap_print_containing_files): Remove.
1504 * init.c (cpp_finish): Do not check for or return number of
1505 errors.
1506 * internal.h (cpp_reader): Remove errors field.
1507 * line-map.c (linemap_print_containing_files): Remove.
1508 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
1509 about previous definition. Only emit it if previous diagnostic
1510 was emitted.
1511
f1450211
JM
15122009-03-28 Joseph Myers <joseph@codesourcery.com>
1513
1514 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1515 mkinstalldirs.
1516
8f5929e1
JJ
15172009-03-18 Jakub Jelinek <jakub@redhat.com>
1518
1519 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1520
4bb09c26
JM
15212009-02-21 Joseph Myers <joseph@codesourcery.com>
1522
1523 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1524 header name.
1525 (_cpp_lex_direct): Handle this.
1526
68c9ab45
RG
15272009-02-15 Richard Guenther <rguenther@suse.de>
1528
1529 Revert last change.
1530
601b3e1a
RG
15312009-02-13 Richard Guenther <rguenther@suse.de>
1532
1533 * configure.ac: Enable LFS.
1534 * configure: Re-generate.
1535 * config.in: Likewise.
1536
fc0cd180
BE
15372009-01-05 Ben Elliston <bje@au.ibm.com>
1538
1539 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1540 (.po.pox): Likewise.
1541 (po/$(PACKAGE).pot): Likewise.
1542
db89a3be
AO
15432008-12-10 Alexandre Oliva <aoliva@redhat.com>
1544
1545 PR target/37033
1546 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1547 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1548
cc955282
JM
15492008-11-29 Joseph Myers <joseph@codesourcery.com>
1550
1551 * lex.c (cpp_token_len): Use 6 as default length.
1552
47960aaf
MLI
15532008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
1554
1555 * expr.c (struct op): Add location.
1556 (_cpp_parse_expr): Propagate locations throught the stack
1557 of expressions.
1558 (reduce): Likewise.
1559 (check_promotion): Use explicit location in errors.
1560
631d0d36
MG
15612008-10-05 Matthew Gingell <gingell@adacore.com>
1562 Arnaud Charlet <charlet@adacore.com>
1563
1564 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1565 (cpp_get_comments): New function.
1566 * internal.h (struct cpp_reader): Add comments field.
1567 * init.c (cpp_destroy): Free comments.
1568 * lex.c (store_comment, cpp_get_comments): New functions.
1569 (comments): New struct.
1570 (save_comment): Store comments in comments struct.
1571
c047ce93
SB
15722008-09-18 Simon Baldwin <simonb@google.com>
1573
1574 * include/cpplib.h (struct cpp_options): Add new boolean flag
1575 warn_builtin_macro_redefined.
1576 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1577 * (struct builtin_operator): Split out from previous struct builtin,
1578 enhance extra const correctness.
1579 * (struct builtin_macro): Split out from previous struct builtin, add
1580 new always_warn_if_redefined flag, enhance const correctness.
1581 * (mark_named_operators): Use struct builtin_operator.
1582 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1583 to builtins selectively.
1584 * macro.c (warn_of_redefinition): Return false if a builtin macro
1585 is not flagged with NODE_WARN.
1586
affa55c6
JJ
15872008-07-31 Jakub Jelinek <jakub@redhat.com>
1588
1589 PR preprocessor/36649
1590 * files.c (struct report_missing_guard_data): New type.
1591 (report_missing_guard): Put paths into an array instead of printing
1592 them right away. Return 1 rather than 0.
1593 (report_missing_guard_cmp): New function.
1594 (_cpp_report_missing_guards): Sort and print paths gathered by
1595 report_missing_guard callback.
1596
3b8f20a1
MLI
15972008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1598
1599 PR 28079
1600 * directives.c (strtolinenum): Handle overflow.
1601 (do_line): Give a warning if line number overflowed.
1602 (do_linemarker): Update call to strtolinenum.
1603
1bb64668
MLI
16042008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1605
1606 * include/line-map.h (linenum_type): New typedef.
1607 (struct line_map): Use it.
1608 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1609 (SOURCE_COLUMN): Likewise.
1610 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1611 source_location values in a variable of type linenum_type.
1612 * directives.c (struct if_stack): Use linenum_type.
1613 (strtoul_for_line): Rename as strtolinenum.
1614 (do_line): Use linenum_type.
1615 (do_linemarker): Use linenum_type and strtolinenum.
1616 (_cpp_do_file_change): Use linenum_t.
1617 * line-map.c (linemap_add): Likewise.
1618 (linemap_line_start): Likewise.
1619 * traditional.c (struct fun_macro): 'line' is a source_location.
1620 * errors.c (print_location): Use linenum_type.
1621 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1622 * internal.h (CPP_INCREMENT_LINE): Likewise.
1623 * lex.c (_cpp_skip_block_comment): Use source_location.
1624
5950c3c9
BE
16252008-07-14 Ben Elliston <bje@au.ibm.com>
1626
1627 * include/cpplib.h (NODE_CONDITIONAL): New.
1628 (struct cpp_callbacks): New macro_to_expand field.
1629 (struct cpp_hashnode): Adjust size of flags and type fields.
1630 (cpp_peek_token): Prototype.
1631 * lex.c (cpp_peek_token): New function.
1632 (_cpp_temp_token): Protect pre-existing lookaheads.
1633 * macro.c (cpp_get_token): Expand any conditional macros.
1634 (_cpp_backup_tokens_direct): New.
1635 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1636 (warn_of_redefinition): Silently allow redefined conditional
1637 macros.
1638 (_cpp_create_definition): Remove the conditional flag when a user
1639 defines one of the conditional macros.
1640 * internal.h (_cpp_backup_tokens_direct): New prototype.
1641
e85edc9e
AH
16422008-06-13 Andrew Haley <aph@redhat.com>
1643
1644 PR preprocessor/33305
1645 * macro.c (replace_args): Print a warning for empty macro
1646 arguments in C89 and C++.
1647
18c04407
RW
16482008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1649
1650 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1651 * configure: Regenerate.
1652
2d09b640
RW
16532008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1654
1655 * Makefile.in (datarootdir): New variable.
1656
0b7c73cc
L
16572008-06-12 H.J. Lu <hongjiu.lu@intel.com>
1658
1659 PR preprocessor/36479
1660 * charset.c (cpp_interpret_string_notranslate): Also set
1661 narrow_cset_desc.width.
1662
cd985f66
JM
16632008-06-07 Joseph Myers <joseph@codesourcery.com>
1664
1665 * configure.ac (parisc*64*-*-*): Remove.
1666 * configure: Regenerate.
1667
d750887f
TT
16682008-05-30 Tom Tromey <tromey@redhat.com>
1669
1670 PR preprocessor/36320:
1671 * internal.h (_cpp_parse_expr): Update.
1672 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
1673 messages.
1674 * directives.c (do_if): Update.
1675 (do_elif): Require expression if processing group.
1676
c100de59
DS
16772008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
1678
1679 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1680
5d6342eb
TT
16812008-05-21 Tom Tromey <tromey@redhat.com>
1682
1683 PR preprocessor/27777:
1684 * lex.c (cpp_output_line_to_string): New function.
1685 * internal.h (_cpp_begin_message): Don't declare.
1686 * errors.c (_cpp_begin_message): Now static.
1687 * include/cpplib.h (cpp_output_line_to_string): Declare.
1688 * directives.c (do_diagnostic): Rewrote. Use
1689 cpp_output_line_to_string. Don't use _cpp_begin_message.
1690
dae4174e
TT
16912008-05-21 Tom Tromey <tromey@redhat.com>
1692
1693 * include/symtab.h (HT_ALLOCED): Remove.
1694 (ht_purge): Declare.
1695 * symtab.c (DELETED): New define.
1696 (ht_lookup): Update comment.
1697 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
1698 code. Use subobject allocator for strings, if it exists.
1699 (ht_expand): Handle deleted entries.
1700 (ht_forall): Likewise.
1701 (ht_purge): New function.
1702 (ht_dump_statistics): Print deletion statistics.
1703
899015a0
TT
17042008-05-13 Tom Tromey <tromey@redhat.com>
1705
1706 PR preprocessor/22168:
1707 * include/cpplib.h (struct cpp_options) <objc>: Update
1708 documentation.
1709 * expr.c (eval_token): Warn for use of assertions.
1710 * directives.c (directive_diagnostics): Warn about extensions.
1711 (DEPRECATED): New define.
1712 (DIRECTIVE_TABLE): Use it.
1713
71c10038
TT
17142008-05-06 Tom Tromey <tromey@redhat.com>
1715
1716 PR preprocessor/35313, PR preprocessor/36088:
1717 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1718 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1719
2bd0fe3d
DM
17202008-05-04 David S. Miller <davem@davemloft.net>
1721
1722 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1723 * configure: Regenerate.
1724
28f68625
DF
17252008-04-22 Daniel Franke <franke.daniel@gmail.com>
1726
1727 * include/cpplib.h (cpp_define_formatted): New.
1728 * directives.c (cpp_define_formatted): New.
1729
688e7a53
TT
17302008-04-21 Tom Tromey <tromey@redhat.com>
1731
1732 PR libcpp/33415:
1733 * charset.c (_cpp_convert_input): Add buffer_start argument.
1734 Ignore UTF-8 BOM if seen.
1735 * internal.h (_cpp_convert_input): Add argument.
1736 * files.c (struct _cpp_file) <buffer_start>: New field.
1737 (destroy_cpp_file): Free buffer_start, not buffer.
1738 (_cpp_pop_file_buffer): Likewise.
1739 (read_file_guts): Update.
1740
b6baa67d
KVH
17412008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1742
1743 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1744 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1745 (struct cpp_options): Added uliterals.
1746 (cpp_interpret_string): Update prototype.
1747 (cpp_interpret_string_notranslate): Idem.
1748 * charset.c (init_iconv_desc): New width member in cset_converter.
1749 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1750 (convert_ucn): Idem.
1751 (emit_numeric_escape): Idem.
1752 (convert_hex): Idem.
1753 (convert_oct): Idem.
1754 (convert_escape): Idem.
1755 (converter_for_type): New function.
1756 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1757 (cpp_interpret_string_notranslate): Match changed prototype.
1758 (wide_str_to_charconst): Use converter_for_type.
1759 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1760 * directives.c (linemarker_dir): Macro U changed to UC.
1761 (parse_include): Idem.
1762 (register_pragma_1): Idem.
1763 (restore_registered_pragmas): Idem.
1764 (get__Pragma_string): Support CPP_STRING{16,32}.
1765 * expr.c (eval_token): Support CPP_CHAR{16,32}.
1766 * init.c (struct lang_flags): Added uliterals.
1767 (lang_defaults): Idem.
1768 * internal.h (struct cset_converter) <width>: New field.
1769 (struct cpp_reader) <char16_cset_desc>: Idem.
1770 (struct cpp_reader) <char32_cset_desc>: Idem.
1771 * lex.c (digraph_spellings): Macro U changed to UC.
1772 (OP, TK): Idem.
1773 (lex_string): Add support for u'...', U'...', u"..." and U"...".
1774 (_cpp_lex_direct): Idem.
1775 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1776 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1777
deb984e6
PB
17782008-04-18 Paolo Bonzini <bonzini@gnu.org>
1779
1780 PR bootstrap/35457
1781 * aclocal.m4: Regenerate.
1782 * configure: Regenerate.
1783
bf048bea
TT
17842008-04-17 Tom Tromey <tromey@redhat.com>
1785
1786 PR libcpp/34866:
1787 * errors.c (cpp_error): Don't reference a token before the start
1788 of the current run.
1789
7f27b0f8
TT
17902008-04-16 Tom Tromey <tromey@redhat.com>
1791
1792 * Makefile.in (TAGS_SOURCES): New variable.
1793 (TAGS): New target.
1794
a1fcb9a1
KK
17952008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
1796
1797 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1798 and shbe-*-*.
1799 * configure: Rebuilt.
1800
93d45d9e
JM
18012008-04-02 Joseph Myers <joseph@codesourcery.com>
1802
1803 * include/cpplib.h (struct cpp_callbacks): Add used_define,
1804 used_undef and before_define.
1805 (NODE_USED): Define.
1806 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1807 do_ifndef, cpp_pop_definition): Handle new flag and use new
1808 callbacks.
1809 * expr.c (parse_defined): Handle new flag and use new callbacks.
1810 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1811 flag and use new callbacks.
1812
d4c32e1d
JJ
18132008-04-01 Jakub Jelinek <jakub@redhat.com>
1814
1815 PR pch/13675
1816 * files.c (struct _cpp_file): Remove pch field.
1817 (pch_open_file): Don't set file->pch, just file->pchname.
1818 (should_stack_file): After pfile->cb.read_pch call
1819 free pchname and clear pchname, don't close file->fd.
1820 Test file->pchname instead of file->pch. Don't close fd after cb.
1821 (_cpp_stack_include): Test file->pchname instead of file->pch.
1822
161031e3
TT
18232008-03-28 Tom Tromey <tromey@redhat.com>
1824
1825 * Makefile.in (POSTCOMPILE): New variable.
1826 (.c.o): Use it.
1827
14ccf800
TT
18282008-03-13 Tom Tromey <tromey@redhat.com>
1829
1830 PR libcpp/35322:
1831 * directives.c (destringize_and_run): Set pfile->directive.
1832
830465c6
MM
18332008-03-06 Markus Milleder <markus.milleder@generali.at>
1834
1835 PR preprocessor/35458
1836 * mkdeps.c (munge): Quote '#' with a '\'.
1837
d482a073
RW
18382008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1839
1840 PR preprocessor/35379
1841 * mkdeps.c (deps_write): Ensure the first target always appears
1842 in the first column, without leading backslash newline. Avoid
1843 some more extra whitespace.
1844
185a6cc1
TS
18452008-02-25 Thiemo Seufer <ths@mips.com>
1846
d482a073 1847 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 1848
2bf41bf0
TT
18492008-02-19 Tom Tromey <tromey@redhat.com>
1850
1851 * traditional.c (lex_identifier): Use CPP_HASHNODE.
1852 * lex.c (lex_identifier): Use CPP_HASHNODE.
1853 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
1854 do-while.
1855 * identifiers.c (alloc_node): Change return type.
1856 (_cpp_init_hashtable): Don't cast 'alloc_node'.
1857 (proxy_assertion_broken): New declaration.
1858 (cpp_forall_identifiers): Move comment.
1859 * line-map.c (linemap_add): Comment fix.
1860 (linemap_line_start): Indentation fix.
1861
765d600a
JJ
18622008-01-25 Jakub Jelinek <jakub@redhat.com>
1863
1864 PR preprocessor/34692
1865 * macro.c (collect_args): Add pragma_buff argument. Push
1866 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1867 than into arguments. Reset prevent_expansion and parsing_args
1868 state at CPP_PRAGMA_EOL/CPP_EOF.
1869 (funlike_invocation_p): Add pragma_buff argument, pass it through
1870 to collect_args.
1871 (enter_macro_context): Add result argument. Adjust
1872 funlike_invocation_p caller. Emit all deferred pragma tokens
1873 gathered during collect_args before the expansion, add a padding
1874 token. Return 2 instead of 1 if any pragma tokens were prepended.
1875 (cpp_get_token): If enter_macro_context returns 2, don't return
1876 a padding token, instead cycle to grab CPP_PRAGMA token.
1877 * directives.c (_cpp_handle_directive): If was_parsing_args
1878 in deferred pragma, leave parsing_args and prevent_expansion as is.
1879
ec46053b
TT
18802008-01-22 Tom Tromey <tromey@redhat.com>
1881
765d600a 1882 PR c++/34859
ec46053b
TT
1883 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1884 __STDC_CONSTANT_MACROS.
1885
681c6ab0
FF
18862008-01-07 Fred Fish <fnf@specifix.com>
1887
765d600a 1888 PR preprocessor/30363
681c6ab0
FF
1889 * traditional.c (replace_args_and_push): Add local variable
1890 cxtquote, calculate the replacement text size assuming a
1891 worst case of every input character quoted with backslash,
1892 and properly handle output quoting of quote characters in
1893 actual arguments used in function-like macros.
1894
33ae4837
TT
18952008-01-03 Tom Tromey <tromey@redhat.com>
1896
765d600a 1897 PR preprocessor/34602
33ae4837
TT
1898 * directives.c (do_line): Don't try to spell EOF token.
1899 (do_linemarker): Add comment.
1900
675575f5
DD
19012007-12-11 DJ Delorie <dj@redhat.com>
1902
1903 * charset.c (convert_using_iconv): Close out any shift states,
1904 returning to the initial state.
1905
97f6bd40
TT
19062007-12-06 Tom Tromey <tromey@redhat.com>
1907
765d600a 1908 PR c/29172
97f6bd40
TT
1909 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1910 type.
1911 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1912 * files.c (FILE_HASH_POOL_SIZE): New macro.
1913 (struct file_hash_entry_pool): New.
1914 (destroy_all_cpp_files): New function.
1915 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1916 (new_file_hash_entry): Update.
1917 (free_file_hash_entries): New function.
1918 (_cpp_cleanup_files): Call free_file_hash_entries and
1919 destroy_all_cpp_files.
1920 (cpp_clear_file_cache): New function.
1921 * include/cpplib.h (cpp_clear_file_cache): Declare.
1922
d56a25e1
TT
19232007-12-03 Tom Tromey <tromey@redhat.com>
1924
765d600a 1925 PR preprocessor/34288
d56a25e1
TT
1926 * configure.ac, config.in: Rebuilt.
1927 * configure.ac: Check for ssize_t.
1928
607f74e9
TT
19292007-11-30 Tom Tromey <tromey@redhat.com>
1930
765d600a 1931 PR preprocessor/32868
607f74e9
TT
1932 * macro.c (_cpp_create_definition): Special case
1933 __STDC_FORMAT_MACROS.
1934
b0f4807f
MM
19352007-11-16 Michael Matz <matz@suse.de>
1936
1937 * files.c (search_path_head): Fix check for absolute paths.
1938
f1e20710
TT
19392007-11-11 Tom Tromey <tromey@redhat.com>
1940
765d600a 1941 PR c++/17557
f1e20710
TT
1942 * include/cpplib.h (cpp_included_before): Declare.
1943 * files.c (struct file_hash_entry) <location>: New field.
1944 (_cpp_find_file): Initialize new field.
1945 (make_cpp_dir): Likewise.
1946 (cpp_included_before): New function.
1947
f373b44d
TT
19482007-11-01 Tom Tromey <tromey@redhat.com>
1949
765d600a 1950 PR preprocessor/30805
f373b44d
TT
1951 * macro.c (paste_tokens): Handle padding token.
1952 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1953
5b9a40df
TT
19542007-10-31 Tom Tromey <tromey@redhat.com>
1955
765d600a 1956 PR preprocessor/30786
5b9a40df
TT
1957 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1958 * directives.c (_cpp_do__Pragma): Return error status.
1959 * internal.h (_cpp_do__Pragma): Update.
1960 * directives.c (get__Pragma_string): Back up if EOF seen.
1961
5ffeb913
TT
19622007-09-06 Tom Tromey <tromey@redhat.com>
1963
1964 * internal.h (struct cpp_reader) <invocation_location>: New
1965 field.
1966 (struct cpp_reader) <set_invocation_location>: Likewise.
1967 * init.c (cpp_set_line_map): New function.
1968 * line-map.c (linemap_add): Use linemap's allocator.
1969 * include/line-map.h (GTY): Define.
1970 (line_map_realloc): New typedef.
1971 (struct line_map): Mark with GTY.
1972 (struct line_maps): Likewise.
1973 (struct line_maps) <maps>: Likewise.
1974 (struct line_maps) <reallocator>: New field.
1975 * include/symtab.h (GTY): Conditionally define.
1976 * include/cpplib.h (cpp_set_line_map): Declare.
1977 (cpp_get_token_with_location): Declare.
1978 * macro.c (cpp_get_token): Set invocation_location on the reader.
1979 (cpp_get_token_with_location): New function.
1980
ac6b1c67
CF
19812007-08-30 Chao-ying Fu <fu@mips.com>
1982
1983 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1984 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1985 (cpp_classify_number): Support decimal fixed-point constants without
1986 exponents.
1987 Warn about fixed-point constants when -pedantic.
1988 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1989 comments to support fixed-point values.
1990 (CPP_N_FRACT, CPP_N_ACCUM): Define.
1991
cda5e672
TT
19922007-08-18 Tom Tromey <tromey@redhat.com>
1993
765d600a 1994 PR preprocessor/32974
cda5e672
TT
1995 * directives.c (parse_include): Don't check for EOL when
1996 processing #pragma dependency.
1997
ccfc4c91
OW
19982007-07-30 Ollie Wild <aaw@google.com>
1999
2000 * directives-only.c: New file.
2001 * internal.h (struct _cpp_dir_only_callbacks): New.
2002 (_cpp_preprocess_dir_only): New function.
2003 * directives.c (_cpp_handle_directive): Check directives_only before
2004 disabling execution of indented directives.
2005 * files.c (_cpp_stack_file): Add directives_only check.
2006 * include/cpplib.h (struct cpp_options): Add directives_only.
2007 (cpp_init_special_builtins): New function.
2008 * init.c (cpp_init_special_builtins): New function.
2009 (cpp_init_builtins): Move builtin_array initialization to
2010 cpp_init_special_builtins.
2011 (post_options): Check directives_only before setting
2012 pfile->state.prevent_expansion = 1.
2013 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
2014 is expanded inside a directive while -fdirectives-only is enabled.
2015 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
2016 (libcpp_a_SOURCES): Add directives-only.c.
2017
a206413a
UB
20182007-07-04 Uros Bizjak <ubizjak@gmail.com>
2019
2020 * traditional.c (_cpp_scan_out_logical_line): Initialize
2021 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
2022 fmacro.args to prevent 'may be used uninitialized' warning.
2023
c77cd3d1
UB
20242007-07-03 Uros Bizjak <ubizjak@gmail.com>
2025
2026 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
2027 Add new constants.
2028 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
2029 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
2030 for 'q' or 'Q' suffixes.
2031
66938a1d
DS
20322007-06-17 Danny Smith <dannysmith@users.sourceforge.net
2033
e1311401 2034 * files.c (open_file): Correct typo.
66938a1d 2035
71995ede
VP
20362007-06-16 Vladimir Prus <vladimir@codesourcery.com>
2037
e1311401 2038 * files.c (open_file): Prevent the call
71995ede
VP
2039 for stat from overwriting errno.
2040
84152c25
VP
20412007-06-09 Vladimir Prus <vladimir@codesourcery.com>
2042
e1311401 2043 * files.c (open_file): Account for the
84152c25
VP
2044 fact that on windows, opening a directory gives
2045 EACCES.
2046
f7fd775f
JW
20472007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
2048
2049 PR preprocessor/23479
2050 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
2051 integer constants.
2052 (append_digit): Likewise.
2053 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
2054 binary integer constants.
2055
ed0e74e0
DK
20562007-05-31 Dave Korn <dave.korn@artimi.com>
2057
2058 PR preprocessor/14331
2059 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
2060
a702045a
OW
20612007-05-24 Ollie Wild <aaw@google.com>
2062
2063 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
2064 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
2065 (cpp_write_pch_state): Save __COUNTER__ state.
2066 (cpp_valid_state): Check valid __COUNTER__ state.
2067 (cpp_read_state): Read new __COUNTER__ state.
2068 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
2069 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
2070 * internal.h (struct cpp_reader): Add counter member.
2071
126e073b
SM
20722007-05-23 Simon Martin <simartin@users.sourceforge.net>
2073
2074 PR preprocessor/20077
2075 * macro.c (create_iso_definition): Fixed the method to determine
2076 whether the token-pasting operator appears at the beginning or the end
2077 of a macro.
2078
0b4cafec
ILT
20792007-05-21 Ian Lance Taylor <iant@google.com>
2080
2081 * internal.h (struct cpp_reader): Add new fields:
2082 nonexistent_file_hash and nonexistent_file_ob.
2083 * files.c: Include "obstack.h".
2084 (find_file_in_dir): Before trying to open the file, look up the
2085 path name in the hash table of nonexistent files. After failing
2086 to open the file, add the path name to the hash table.
2087 (_cpp_find_file): Cache the results of looking up the file name
2088 starting with the quote and bracket chain heads, if we can.
2089 (nonexistent_file_hash_eq): New static function.
2090 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
2091 pfile->nonexistent_file_ob.
2092 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
2093 pfile->nonexistent_file_ob.
2094
30e04921
JJ
20952007-05-14 Janis Johnson <janis187@us.ibm.com>
2096
5a6bb57e
JJ
2097 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
2098
30e04921
JJ
2099 PR c/31924
2100 * expr.c (interpret_float_suffix): Check for invalid suffix.
2101
22a8a52d
EC
21022007-05-02 Eric Christopher <echristo@apple.com>
2103
2104 * expr.c (num_div_op): Don't overflow if the result is
2105 zero.
2106
fca35e1b
TT
21072007-05-02 Tom Tromey <tromey@redhat.com>
2108
765d600a 2109 PR preprocessor/28709
fca35e1b
TT
2110 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
2111
4cd97075
MM
21122007-03-30 Michael Meissner <michael.meissner@amd.com>
2113
2114 * directives.c (lex_macro_node_from_str): Fix alloca call to be
2115 type correct.
2116
121de39f
RH
21172007-03-30 Richard Henderson <rth@redhat.com>
2118
2119 * directives.c (lex_macro_node_from_str): New.
2120 (cpp_push_definition, cpp_pop_definition): New.
2121 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
2122
4fcb360b
BM
21232007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2124
2125 * Makefile.in: Add dummy install-pdf target.
2126
67e64439
TT
21272007-01-30 Tom Tromey <tromey@redhat.com>
2128
765d600a 2129 PR preprocessor/30468
67e64439
TT
2130 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
2131 './'.
2132
ee380365
TT
21332007-01-30 Tom Tromey <tromey@redhat.com>
2134
765d600a 2135 PR preprocessor/29966
ee380365
TT
2136 * macro.c (lex_expansion_token): Save and restore cpp_reader's
2137 cur_token.
2138 (_cpp_create_definition): Don't restore cur_token here.
2139 * lex.c (_cpp_lex_token): Added assertion.
2140
024abeb3
TT
21412007-01-27 Tom Tromey <tromey@redhat.com>
2142
2143 * configure: Rebuilt.
2144
ee1c2a10
TT
21452007-01-12 Tom Tromey <tromey@redhat.com>
2146
765d600a 2147 PR preprocessor/28227
ee1c2a10
TT
2148 * directives.c (lex_macro_node): Added 'is_def_or_undef'
2149 argument.
2150 (do_define): Update.
2151 (do_undef): Update.
2152 (do_ifdef): Update.
2153 (do_ifndef): Update.
2154
67214c16
PB
21552007-01-11 Paolo Bonzini <bonzini@gnu.org>
2156
2157 * configure: Regenerate.
2158
1aa6ca40
PB
21592007-01-11 Paolo Bonzini <bonzini@gnu.org>
2160
2161 * configure: Regenerate.
2162
705e2d28
TT
21632007-01-04 Tom Tromey <tromey@redhat.com>
2164
765d600a 2165 PR preprocessor/28165
705e2d28
TT
2166 * internal.h (cpp_in_primary_file): New function.
2167 * directives.c (do_include_next): Use cpp_in_primary_file.
2168 (do_pragma_once): Likewise.
2169 (do_pragma_system_header): Likewise.
2170
7af45bd4
ILT
21712006-12-29 Ian Lance Taylor <iant@google.com>
2172
2173 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
2174 look backward at the end of the line unless we saw a backslash.
2175
9d30f270
JJ
21762006-12-29 Jakub Jelinek <jakub@redhat.com>
2177
2178 PR preprocessor/29612
2179 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
2180 only when new_sysp is non-zero.
2181
30b0edc0
TT
21822006-12-28 Tom Tromey <tromey@redhat.com>
2183
765d600a 2184 PR preprocessor/30001
30b0edc0
TT
2185 * charset.c (_cpp_convert_input): Check that to.len is greater
2186 than zero.
2187
85d9c13c
TS
21882006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
2189
2190 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 2191 * configure: Rebuilt.
85d9c13c 2192
dfafdaa6
DG
21932006-11-01 Douglas Gregor <doug.gregor@gmail.com>
2194
2195 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
2196 for experimental C++0x mode.
2197 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
2198 adopted the preprocessor changes introduced in C99.
2199
0f45f0f5
JM
22002006-10-29 Joseph Myers <joseph@codesourcery.com>
2201
2202 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
2203 depending on --enable-targets=all.
2204 * configure: Regenerate.
2205
de000d22
JJ
22062006-10-12 Jakub Jelinek <jakub@redhat.com>
2207
2208 PR preprocessor/28709
2209 * macro.c (paste_tokens): Do error reporting here, use BUF with the
2210 spelled LHS token as opposed to spelling it again.
2211 (paste_all_tokens): Don't report errors here, just break on failure.
2212
b5422ad7
BM
22132006-10-10 Brooks Moses <bmoses@stanford.edu>
2214
2215 * Makefile.in: Added empty "pdf" target.
2216
aaf50ff2
GK
22172006-09-22 Geoffrey Keating <geoffk@apple.com>
2218
2219 * configure.ac: Make need_64_bit_hwint case for x86-darwin
2220 match exactly the glob in gcc/config.gcc.
2221 * configure: Regenerate.
2222
c663e301
JM
22232006-09-13 Joseph S. Myers <joseph@codesourcery.com>
2224
2225 PR c/28768
2226 PR preprocessor/14634
2227 * lex.c (lex_string): Pedwarn for unterminated literals.
2228
f7288899
EC
22292006-09-08 Eric Christopher <echristo@apple.com>
2230
2231 * configure.ac: Add 64-bit HWI support for i?86-darwin.
2232
b52dbbf8
SE
22332006-08-14 Steve Ellcey <sje@cup.hp.com>
2234
2235 PR c++/28288
2236 PR c++/14556
2237 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
2238 (CPP_LAST_EQ): Change.
2239 (CPP_LAST_PUNCTUATOR): Change.
2240 * expr.c (cpp_operator): Remove MIN and MAX.
2241 (reduce): Remove CPP_MIN and CPP_MAX.
2242 (num_binary_op): Ditto.
2243 * lex.c (_cpp_lex_direct): Ditto.
2244 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
2245
1c90c6f9
JJ
22462006-06-09 Jakub Jelinek <jakub@redhat.com>
2247
2248 PR preprocessor/27746
2249 * directives.c (do_pragma): Handle pragma with valid namespace
2250 and invalid name coming from macro expansion.
2251 * directives.c (destringize_and_run): Initialize next field in
2252 context.
2253
2254 PR c/27747
2255 PR c++/27748
2256 * directives.c (destringize_and_run): Set NO_EXPAND on the
2257 tokens.
2258
2259 * macro.c (_cpp_backup_tokens): Fix comment typo.
2260
5c3c3683
DJ
22612006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
2262
2263 * Makefile.in (CATALOGS): Add po/ prefix.
2264 * configure: Regenerated.
2265
b2bd74bc
CD
22662006-05-23 Carlos O'Donell <carlos@codesourcery.com>
2267
2268 * Makefile.in: Add install-html target. Add install-html to .PHONY
2269
be8ac3e2
GZ
22702006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
2271
2272 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
2273 * files.c (_cpp_get_file_stat): New function.
2274 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
2275 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
2276 * internal.h (_cpp_get_file_stat): Prototype.
2277 (struct cpp_buffer): Add timestamp.
2278
83900997
JJ
22792006-01-23 Jakub Jelinek <jakub@redhat.com>
2280
2281 PR preprocessor/25717
2282 * init.c (cpp_init_builtins): If __STDC__ will not change value
2283 between system headers and other sources, define it as a normal
2284 macro rather than a builtin.
2285 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
2286 cpp_in_system_header condition.
2287
22882006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
2289
2290 * Makefile.in: Use -MMD instead of -MD.
2291
bc4071dd
RH
22922006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2293 Richard Henderson <rth@redhat.com>
2294
2295 Merge from gomp branch:
2296 * directives.c (struct pragma_entry): Add is_deferred. Add ident
2297 entry to value union.
2298 (end_directive): Don't eat the line if in_deferred_pragma.
2299 (run_directive): Remove pragma hacks.
2300 (insert_pragma_entry): Remove.
2301 (new_pragma_entry): New.
2302 (register_pragma_1): Split out of register_pragma. Only handle
2303 the lookup tree and return the new entry.
2304 (cpp_register_pragma): Fill in the pragma entry here.
2305 (cpp_register_deferred_pragma): New.
2306 (register_pragma_internal): New.
2307 (_cpp_init_internal_pragmas): Use register_pragma_internal.
2308 (do_pragma): Allow pragma expansion after namespace. For deferred
2309 pragmas, don't slurp the line into a string.
2310 (destringize_and_run): Save tokens for deferred pragmas.
2311 (cpp_handle_deferred_pragma): Remove.
2312 * macro.c (builtin_macro): Remove pragma token hack.
2313 (_cpp_push_token_context): Rename from push_token_context and export.
2314 * internal.h (struct lexer_state): Add pragma_allow_expansion.
2315 (_cpp_push_token_context): Declare.
2316 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
2317 a token. Update the line number correctly if so.
2318 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
2319 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
2320 * include/cpplib.h (PRAGMA_EOL): New.
2321 (CPP_TOKEN_FLD_PRAGMA): New.
2322 (struct cpp_token): Add val.pragma.
2323 (struct cpp_options): Remove defer_pragmas.
2324 (cpp_handle_deferred_pragma): Remove.
2325 (cpp_register_deferred_pragma): Declare.
2326
d09e893f
JJ
23272006-01-01 Jakub Jelinek <jakub@redhat.com>
2328
2329 PR c++/25294
2330 * directives.c (do_pragma): If pragma line ends with multi-line
2331 block comment, end the saved deferred pragma string before that
2332 comment. Handle embedded '\0' chars on the pragma line.
2333
ab84748a
VR
23342005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2335
2336 PR c++/23333
2337 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
2338
ad6ed77e
JG
23392005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
2340 Ben Elliston <bje@au.ibm.com>
2341
2342 * include/cpplib.h (CPP_N_DFLOAT): New.
2343 * expr.c (interpret_float_suffix): Identify df, dd, and dl
2344 suffixes as decimal floating point constants.
2345 (cpp_classify_number): Disallow hexadecimal DFP constants.
2346
ba096620 23472005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 2348 Ian Lance Taylor <ian@airs.com>
ba096620
GP
2349
2350 * include/cpplib.h (struct cpp_callbacks): Annotate error with
2351 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
2352
456b8ce5
UB
23532005-11-09 Per Bothner <per@bothner.com>
2354 Uros Bizjak <uros@kss-loka.si>
f7288899 2355
456b8ce5
UB
2356 PR c/24101
2357 * init.c (read_original_filename): Temporarily set
2358 state.in_directive before calling _cpp_lex_direct for
2359 CPP_HASH tokens.
2360
5571f74f
JW
23612005-11-03 James E Wilson <wilson@specifix.com>
2362
2363 PR preprocessor/24202
2364 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
2365
a63607ed
JM
23662005-11-04 Joseph S. Myers <joseph@codesourcery.com>
2367
2368 * include/cpplib.h (struct cpp_callbacks): Make error take
2369 va_list* parameter.
2370 * errors.c (cpp_error): Update call to callback.
2371
651ed942
AP
23722005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
2373
2374 PR preprocessor/22042
2375 * macro.c (_cpp_builtin_macro_text): Lower the needed max
2376 buffer size.
2377 (cpp_quote_string): Don't octalify non printable
2378 charactors.
2379
178b58b5
JM
23802005-11-03 Joseph S. Myers <joseph@codesourcery.com>
2381
2382 PR c++/17964
2383 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
2384 (struct cpp_callbacks): Add error.
2385 * errors.c (cpp_error): If client_diagnostic, use error callback.
2386 * charset.c (convert_escape): Don't use %03o in diagnostic.
2387
3ee5ed11 23882005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
2389
2390 PR preprocessor/15220
2391 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
2392 callers. Pass to open_file_failed.
2393 (open_file_failed): New parameter angle_brackets. Fix all callers.
2394 Use in print_dep assignment.
2395 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
2396 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 2397
077fc835
KH
23982005-10-08 Kazu Hirata <kazu@codesourcery.com>
2399
2400 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
2401 * configure: Regenerate.
2402
cbc43ae0
ILT
24032005-10-04 Ian Lance Taylor <ian@airs.com>
2404
2405 PR preprocessor/13726
2406 * directives.c (check_eol_return_comments): New static function.
2407 (parse_include): Add buf parameter. Change all callers.
2408 (do_include_common): If not discard comments, turn on
2409 save_comments. Pass collected comments to include callback.
2410 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
2411 include callback: cpp_token list.
2412
af15a2fe
JM
24132005-09-20 Joseph S. Myers <joseph@codesourcery.com>
2414
2415 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
2416 * init.c (struct lang_flags, lang_defaults): Add
2417 extended_identifiers.
2418 (cpp_set_lang): Use it.
2419 * lex.c (forms_identifier_p): Check extended_identifiers.
2420
f5eab47e
JJ
24212005-08-30 Jakub Jelinek <jakub@redhat.com>
2422
2423 PR preprocessor/20348
2424 PR preprocessor/20356
2425 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
2426 2004-06-05 changes.
2427
467129e6
KG
24282005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2429
2430 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
2431 -Wmissing-format-attribute.
2432
2433 * configure: Regenerate.
2434
200031d1
KC
24352005-06-29 Kelley Cook <kcook@gcc.gnu.org>
2436
2437 * all files: Update FSF address in copyright headers.
2438 * makeucnid.c (write_copyright): Update outputted FSF address.
2439
f610dd5f
ZW
24402005-06-13 Zack Weinberg <zack@codesourcery.com>
2441
2442 * configure.ac: Invoke ZW_CREATE_DEPDIR and
2443 ZW_PROG_COMPILER_DEPENDENCIES.
2444 * aclocal.m4, configure: Regenerate.
2445 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
2446 New variables.
2447 (distclean): Clean up $(DEPDIR) and its contents.
2448 (.c.o): Use $(COMPILE).
2449 Include $(DEPDIR)/*.Po for most object->header dependencies.
2450
c3f829c1
GDR
24512005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2452
2453 * configure.ac: Check declarations for asprintf and vasprintf.
2454 * config.in: Regenerate.
2455 * configure: Likewise.
2456
2457 * charset.c (conversion_loop): Use XRESIZEVEC.
2458 (convert_no_conversion): Likewise.
2459 (convert_using_iconv): Likewise.
2460 (init_iconv_desc): Cast return value of alloca.
2461 (cpp_host_to_exec_charset): Use XNEWVEC.
2462 (emit_numeric_escape): Use XRESIZEVEC.
2463 (cpp_interpret_string): Use XNEWVEC.
2464 (cpp_interpret_string): Use XRESIZEVEC.
2465 (_cpp_interpret_identifier): Cast return value of alloca.
2466 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
2467 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
2468 (parse_include): Use XNEWVEC.
2469 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 2470 "new_entry".
c3f829c1
GDR
2471 (save_registered_pragmas): Cast return value of xmemdup.
2472 (destringize_and_run): Same for alloca.
2473 (parse_assertion): Likewise.
2474 (do_assert): Cast allocated storage to proper type.
2475 (cpp_define): Likewise.
2476 (_cpp_define_builtin): Likewise.
2477 (cpp_undef): Likewise.
2478 (handle_assertion): Likewise.
2479 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
2480 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
2481 (CPP_UMINUS): Likewise.
2482 (struct cpp_operator): Rename from struct operator.
2483 (_cpp_expand_op_stack): Use XRESIZEVEC.
2484 * files.c (pch_open_file): Use XNEWVEC.
2485 (pch_open_file): Use XRESIZEVEC.
2486 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
2487 (dir_name_of_file): Use XNEWVEC.
2488 (make_cpp_file): Use XCNEW.
2489 (make_cpp_dir): Likewise.
2490 (allocate_file_hash_entries): USE XNEWVEC.
2491 (cpp_included): Cast return value of htab_find_with_hash.
2492 (append_file_to_dir): Use XNEWVEC.
2493 (read_filename_string): Likewise. Use XRESIZEVEC too.
2494 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
2495 (remap_filename): Use XNEWVEC.
2496 (struct pchf_entry): Move definition out of struct pchf_data.
2497 (_cpp_save_file_entries): Use XCNEWVAR.
2498 (_cpp_read_file_entries): Use XNEWVAR.
2499 * identifiers.c (alloc_node): Use XOBNEW.
2500 * init.c (cpp_create_reader): Use XCNEW.
2501 (cpp_init_builtins): Cast of b->value to enum builtin_type.
2502 (read_original_directory): Cast return value of alloca.
2503 * lex.c (add_line_note): Use XRESIZEVEC.
2504 (warn_about_normalization): Use XNEWVEC.
2505 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
2506 (new_buff): Use XNEWVEC.
2507 * line-map.c (linemap_add): Use XRESIZEVEC.
2508 * macro.c (builtin_macro): Cast return value of alloca.
2509 (paste_tokens): Likewise.
2510 (expand_arg): Use XNEWVEC and XRESIZEVEC.
2511 (_cpp_save_parameter): Use XRESIZEVEC.
2512 (create_iso_definition): Cast allocated storage to proper type.
2513 (_cpp_create_definition): Likewise.
2514 (cpp_macro_definition): Use XRESIZEVEC.
2515 * makedepend.c (add_clm): Use XNEW.
2516 (add_dir): Likewise.
2517 * mkdeps.c (munge): Use XNEWVEC.
2518 (deps_init): Use XCNEW.
2519 (deps_add_target): Use XRESIZEVEC.
2520 (deps_add_default_target): Cast return value of alloca.
2521 (deps_add_dep): Use XRESIZEVEC.
2522 (deps_add_vpath): Likewise. Use XNEWVEC too.
2523 (deps_restore): Likewise.
2524 * pch.c (save_idents): Use XNEW and XNEWVEC.
2525 (cpp_save_state): Use XNEW.
2526 (count_defs): Cast return value of htab_find.
2527 (write_defs): Likewise.
2528 (cpp_write_pch_deps): Use XNEWVEC.
2529 (collect_ht_nodes): Use XRESIZEVEC.
2530 (cpp_valid_state): Use XNEWVEC.
2531 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
2532 * symtab.c (ht_create): Use XCNEW.
2533 (ht_lookup_with_hash): Cast return value of obstack_copy0.
2534 (ht_expand): Use XCNEWVEC.
2535 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2536 (bool): Do not define if __cplusplus.
2537
1ed17cd5
ZW
25382005-05-12 Zack Weinberg <zack@codesourcery.com>
2539
2540 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2541 (do_sccs): Delete function definition, #define to do_ident.
2542 (do_ident): Don't hardwire directive name.
2543
5a8c20ce
RK
25442005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
2545
2546 PR bootstrap/21230
2547 * configure: Regenerate.
2548
473c5bc9
AP
25492005-04-27 Andris Pavenis <pavenis@latnet.lv>
2550
2551 * files.c: Include io.h for DJGPP to get prototype of setmode.
2552
c1fc5047
PB
25532005-04-19 Per Bothner <per@bothner.com>
2554
2555 PR preprocessor/20907
2556 * line-map.c (linemap_line_start): Fix bug when we need to increse
2557 column_bits but can re-use the current line_map.
2558
042630ad
KG
25592005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2560
2561 * system.h (fopen, fdopen, freopen): Define these to the unlocked
2562 libiberty functions.
2563
0d667716
KG
25642005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2565
2566 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2567 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2568 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2569 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2570 _unlocked function.
2571 (fwrite_unlocked): Fix prototype.
1ed17cd5 2572
0d667716
KG
2573 * configure, config.in: Regenerate.
2574
cae064e7
JJ
25752005-04-05 Jakub Jelinek <jakub@redhat.com>
2576
2577 PR preprocessor/19475
2578 * macro.c (create_iso_definition): For < ISO C99, don't
2579 pedwarn if there is no whitespace between macro name and its
2580 replacement, but the replacement starts with a basic character
2581 set character.
2582
cbada204
AJ
25832005-03-28 Andreas Jaeger <aj@suse.de>
2584
2585 * lex.c (warn_about_normalization): Cast field width to int to
2586 avoid warning.
2587
f42eccdb
JM
25882005-03-19 Joseph S. Myers <joseph@codesourcery.com>
2589
2590 * configure.ac: Consistently use solaris2.1[0-9]* instead of
2591 solaris2.1[0-9].
2592 * configure: Regenerate.
2593
c79e602b
GK
25942005-03-15 Geoffrey Keating <geoffk@apple.com>
2595
2596 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2597 UCN rather than printing an error.
2598
50668cf6
GK
25992005-03-14 Geoffrey Keating <geoffk@apple.com>
2600
6baba9bb
GK
2601 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2602
26032005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 2604
50668cf6
GK
2605 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2606 * charset.c: Update for new format of ucnid.h.
2607 (ucn_valid_in_identifier): Update for new format of ucnid.h.
2608 Add NST parameter, and update it; update callers.
2609 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
2610 with cpp_error.
2611 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2612 * internal.h (struct normalize_state): New.
2613 (INITIAL_NORMALIZE_STATE): New.
2614 (NORMALIZE_STATE_RESULT): New.
2615 (NORMALIZE_STATE_UPDATE_IDNUM): New.
2616 (_cpp_valid_ucn): New.
2617 * lex.c (warn_about_normalization): New.
2618 (forms_identifier_p): Add normalize_state parameter, update callers.
2619 (lex_identifier): Add normalize_state parameter, update callers. Keep
2620 the state current.
2621 (lex_number): Likewise.
2622 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
2623 it with warn_about_normalization.
2624 * makeucnid.c: New.
2625 * ucnid.h: Replace.
2626 * ucnid.pl: Remove.
2627 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
2628 comments about obsolete version of C++.
2629 * include/cpplib.h (enum cpp_normalize_level): New.
2630 (struct cpp_options): Add warn_normalize field.
2631
47e20491
GK
26322005-03-11 Geoffrey Keating <geoffk@apple.com>
2633
2634 * directives.c (glue_header_name): Update call to cpp_spell_token.
2635 * internal.h (_cpp_interpret_identifier): New.
2636 * charset.c (_cpp_interpret_identifier): New.
2637 (_cpp_valid_ucn): Allow UCN version of '$'.
2638 * lex.c (lex_identifier): Add extra parameter to indicate if initial
2639 character was '$' or '\'. Support identifiers with UCNs.
2640 (forms_identifier_p): Allow UCNs.
2641 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2642 (utf8_to_ucn): New.
2643 (cpp_spell_token): Add FORSTRING parameter. Use it.
2644 (cpp_token_as_text): Update call to cpp_spell_token.
2645 (cpp_output_token): Write UCNs back out.
2646 (stringify_arg): Update call to cpp_spell_token.
2647 (paste_tokens): Likewise.
2648 (cpp_macro_definition): Likewise.
2649 * macro.c (stringify_arg): Likewise.
2650 (paste_tokens): Likewise.
2651 (cpp_macro_definition): Likewise.
2652 * include/cpplib.h: Add parameter to cpp_spell_token.
2653
73096711
JJ
26542005-03-04 Jakub Jelinek <jakub@redhat.com>
2655
2656 PR bootstrap/20282
2657 PR bootstrap/20305
2658 * macro.c (replace_args, cpp_get_token): Copy whole
2659 cpp_token_u instead of just cpp_string field from it.
2660
2203a881
DP
26612005-02-28 Devang Patel <dpatel@apple.com>
2662
2663 * directives.c (do_line): Save sysp early before line table is
2664 realloc'ed.
1ed17cd5 2665
c5ff069d
ZW
26662005-02-20 Zack Weinberg <zack@codesourcery.com>
2667
2668 PR 18785
2669 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2670 (cpp_host_to_exec_charset): New function.
2671 * include/cpplib.h: Declare cpp_host_to_exec_charset.
2672
04c90eea
DP
26732005-02-19 Devang Patel <dpatel@apple.com>
2674
2675 * charset.c (_cpp_convert_input): Check '\r' before inserting
2676 '\n' at the end.
c5ff069d 2677
6da55c00
EC
26782005-02-15 Eric Christopher <echristo@redhat.com>
2679
2680 PR preprocessor/19077
2681 * macro.c (cpp_macro_definition): Move handling of whitespace
2682 to PREV_WHITE conditional. Remove overloading of len
2683 variable.
2684
31c3e631
KH
26852005-02-14 Kazu Hirata <kazu@cs.umass.edu>
2686
2687 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2688 traditional.c: Update copyright.
2689
be0f1e54
PB
26902005-02-14 Paolo Bonzini <bonzini@gnu.org>
2691
2692 PR bootstrap/19818
2693 * configure.ac: Check for declaration of basename and getopt.
2694 * config.in: Regenerate.
2695 * configure: Regenerate.
2696 * internal.h (ustrcspn): New.
2697 * macro.c (create_iso_definition): Fix allocation of memory.
2698 (padding_token): Add cast to remove const-ness.
2699 * pch.c (cpp_read_state): Use ustrcspn.
2700
ecddfb39
MS
27012005-02-08 Mike Stump <mrs@apple.com>
2702
2703 * files.c (pchf_adder): Remove.
2704 (struct pchf_adder_info): Likewise.
2705 (_cpp_save_file_entries): Write out all files so that #import works.
2706
9fcdd891
JM
27072005-01-23 Joseph S. Myers <joseph@codesourcery.com>
2708
2709 * configure: Regenerate.
2710
ecfd72e7
TS
27112005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2712
2713 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2714
6c25a4f7 2715 * include/cpplib.h: Also update copyright years.
c5ff069d 2716
942926ad
GK
27172005-01-03 Geoffrey Keating <geoffk@apple.com>
2718
2719 * files.c (_cpp_find_file): Add files found by search_path_exhausted
2720 to the list of all files.
2721
a2566ae9
GDR
27222005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2723
2724 * internal.h: Update references to Cpp lib filenames.
2725 * directives.c: Likewise.
2726 * init.c: Likewise.
2727 * macro.c: Likewise.
2728 * traditional.c: Likewise.
2729
1b449375
EB
27302004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
2731
2732 PR preprocessor/15167
2733 * files.c (destroy_cpp_file): New function.
2734 (should_stack_file): Make a new file if the
2735 compared file is still stacked.
2736
28303828
NN
27372004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
2738
c5ff069d 2739 PR preprocessor/17610
28303828
NN
2740 * directives.c (do_include_common): Error out if an empty filename
2741 is given for #include (or #include_next or #import).
2742
c812785a
RS
27432004-11-27 Roger Sayle <roger@eyesopen.com>
2744 Zack Weinberg <zack@codesourcery.com>
2745
2746 * internal.h: Replace all uses of uchar with unsigned char.
2747 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
2748 with !IN_GCC, so uchar is only defined whilst building libcpp.
2749
f91eaa01
KC
27502004-11-24 Kelley Cook <kcook@gcc.gnu.org>
2751
2752 * aclocal.m4: Regenerate.
2753
f78ce0c2
RS
27542004-11-24 Roger Sayle <roger@eyesopen.com>
2755
2756 PR preprocessor/15824
2757 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2758 directly, instead of the non-existant "system.h" and "ansidecl.h".
2759 * configure: Regenerate.
2760
b5b3e36a 27612004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 2762 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
2763
2764 * internal.h (struct lexer_state): Add in_deferred_pragma.
2765 * directives.c (struct pragma_entry): Add allow_expansion.
2766 (insert_pragma_entry): Take allow_expansion flag.
2767 (register_pragma): Likewise.
2768 (cpp_register_pragma): Likewise.
2769 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2770 (do_pragma): Honor allow_expansion.
2771 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2772 * include/cpplib.h (cpp_register_pragma): Update prototype.
2773
a8e68029 27742004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 2775 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
2776
2777 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2778 need_64bit_hwint=yes.
2779 * configure: Regenerate.
2780
50f47ee0
JM
27812004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2782
2783 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
2784 po/$(PACKAGE).pot.
2785 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2786 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2787 Remove local srcdir path from generated file.
2788
968e08d6 27892004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 2790 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
2791
2792 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2793 as well.
2794
3da3d587
ZW
27952004-10-27 Zack Weinberg <zack@codesourcery.com>
2796
2797 PR 18075
2798 * directives.c (do_pragma): Do not defer pragmas which are unknown.
2799 (cpp_handle_deferred_pragma): Add cast to silence warning.
2800
ac24fc25
JM
28012004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
2802
2803 * errors.c (_cpp_begin_message): Print "error: " for errors.
2804
7731405b
AJ
28052004-10-10 Andreas Jaeger <aj@suse.de>
2806
2807 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2808 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2809
646544e3
AP
28102004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2811
2812 * pch.c (cpp_write_pch_state): Remove variable z as it is not
2813 used.
2814 (cpp_read_state): Remove unused variables, m, d and mac_count.
2815
67a74146
PB
28162004-09-29 Per Bothner <per@bothner.com>
2817
2818 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
2819 cb.line_change. Otherwise do_pragma will call the line_change
2820 call-back with a meaningless line number.
2821
018a4785
ZW
28222004-09-24 Zack Weinberg <zack@codesourcery.com>
2823
2824 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
2825 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
2826 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2827 * aclocal.m4, configure: Regenerate.
2828 * init.c: Include localedir.h.
2829 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
2830 (DEFS): Delete.
2831 (.c.o): Use $(ALL_CFLAGS).
2832 (localedir.h, localedir.hs): New rules.
2833 (clean): Use rm -rf to remove directories.
2834 (distclean): Also delete localedir.h and localedir.hs.
2835 (init.o): Update dependencies.
2836
88fa57d7
KC
28372004-09-22 Kelley Cook <kcook@gcc.gnu.org>
2838
2839 * Makefile.in (aclocal.m4): Update dependencies.
2840 * configure.ac (AC_CONFIG_MACRO_DIR): New.
2841 * aclocal.m4, configure: Regenerate.
2842
8f8e9aa5
ZW
28432004-09-17 Zack Weinberg <zack@codesourcery.com>
2844
a29f62d9
ZW
2845 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
2846 (_cpp_convert_input, _cpp_default_encoding): Add comments.
2847 Some other comments in this file also tweaked.
2848
8f8e9aa5
ZW
2849 * directives.c (do_pragma): Save current buffer position
2850 before lexing the pragma keywords; don't call
2851 _cpp_backup_tokens in the defer_pragmas case.
2852
a2981930
PB
28532004-09-15 Per Bothner <per@bothner.com>
2854
2855 * include/line-map.h (line_map_start): Add parameter names so
2856 preceding comment makes sense.
2857 (linemap_add): Remove from comment mention of non-existing parameter.
2858
21b11495
ZW
28592004-09-09 Matt Austern <austern@apple.com>
2860 Zack Weinberg <zack@codesourcery.com>
2861
2862 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
2863 prefixes throughout. Add entry for PRAGMA. Remove
2864 unnecessary "= 0" from EQ.
2865 (enum cpp_ttype): Adjust OP and TK definitions to restore
2866 prefixes, via token-paste.
2867 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2868 Change from #defines to additional cpp_ttype enumerators.
2869 (struct cpp_options): Add defer_pragmas.
2870 (cpp_handle_deferred_pragma): Prototype new interface.
2871
2872 * internal.h (struct cpp_reader): Add directive_result.
2873 * directives.c (struct pragma_entry): Add is_internal field;
2874 give boolean fields type bool.
2875 (start_directive): Initialize pfile->directive_result.type.
2876 (_cpp_do__Pragma): Likewise.
2877 (run_directive): Do not crash if pfile->buffer->prev is NULL.
2878 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2879 from it.
2880 (register_pragma): New static function, bulk of former
2881 cpp_register_pragma here; add 'internal' argument, pass along
2882 to insert_pragma_entry.
2883 (cpp_register_pragma): Now a wrapper around register_pragma which
2884 always passes false for 'internal' argument.
2885 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2886 true for 'internal'.
2887 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2888 an internal pragma, save text till the end of the line as a CPP_PRAGMA
2889 token instead of executing the pragma.
2890 (cpp_handle_deferred_pragma): New interface.
2891 * lex.c (token_spellings): Adjust OP and TK definitions to
2892 match changes to cpplib.h.
2893 (_cpp_lex_token): Check for a directive-result token and
2894 return it if present.
2895 (cpp_token_val_index): Handle CPP_PRAGMA.
2896 * macro.c (cpp_builtin_macro_text): Correct comment.
2897 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2898
0fd9e8dd
SB
28992004-09-06 Serge Belyshev <belyshev@lubercy.com>
2900
2901 PR preprocessor/14699
2902 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2903 from size_t to double.
2904
39b8ce7f
AS
29052004-08-28 Andreas Schwab <schwab@suse.de>
2906 Andreas Jaeger <aj@suse.de>
2907
2908 * configure.ac: Set PACKAGE correctly.
2909 * configure: Regenerated.
2910
5d1f4b27
PB
29112004-08-25 Paolo Bonzini <bonzini@gnu.org>
2912
2913 * Makefile.in: Add back top_builddir.
2914
078e3ffe
PB
29152004-08-25 Paolo Bonzini <bonzini@gnu.org>
2916
2917 * configure.ac: Replace Automake macro invocations
2918 with manual Autoconf checks and substitutions.
2919 * configure: Regenerate.
2920 * aclocal.m4: Regenerate.
2921 * config.in: Regenerate.
2922 * Makefile.am: Removed.
2923 * Makefile.in: Heavy simplification and reorganization.
2924
b3f8d95d
MM
29252004-08-09 Mark Mitchell <mark@codesourcery.com>
2926
2927 * configure.ac (arm*-*-eabi*): New target.
2928 (arm*-*-symbianelf*): Likewise.
2929 * configure: Regenerated.
2930
72bb2c39
BI
29312004-07-24 Bernardo Innocenti <bernie@develer.com>
2932
2933 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2934 * directives.c: Use XNEW-family macros from libiberty.
2935 * lex.c: Likewise.
2936 * macro.c: Likewise.
2937 * cpplib.h (cpp_deps_style): Export enum with name.
2938
21b11495 29392004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 2940
21b11495 2941 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 2942
a23ee064
AP
29432004-07-16 Andris Pavenis <pavenis@latnet.lv>
2944
2945 PR preprocessor/16366
2946 * internal.h (struct cpp_reader): New field dir_hash.
2947 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2948 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2949
a09d4744
NB
29502004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
2951
2952 PR preprocessor/16192
2953 PR preprocessor/15913
2954 PR preprocessor/15572
2955 * expr.c (_cpp_parse_expr): Handle remaining cases where an
2956 expression is missing.
2957 * init.c (post_options): Traditional cpp doesn't do // comments.
2958
f58f7def
PB
29592004-06-30 Per Bothner <per@bothner.com>
2960
2961 * include/line-map.h (fileline): Remove old typedef.
2962 * internal.h (struct cpp_reader): Use source_location typedef instead.
2963
e83d8d43
ZW
29642004-06-26 Zack Weinberg <zack@codesourcery.com>
2965
2966 Partially revert patch of 2004-06-05.
2967 * files.c (search_cache): Remove pfile argument. Don't check
2968 for file that would be found by "" or <> search here...
2969 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2970 Do not apply directory-of-current-file correction to files
2971 found by this check. Rearrange code slightly.
2972
c0d578e6
GK
29732004-06-21 Geoffrey Keating <geoffk@apple.com>
2974
2975 * files.c (should_stack_file): Correct swapped parameters to call
2976 to cb.read_pch.
2977 * pch.c (cpp_valid_state): Handle -fpreprocessed.
2978
159d5224
PB
29792004-06-15 Paolo Bonzini <bonzini@gnu.org>
2980
2981 * Makefile.in: Regenerate with automake 1.8.5.
2982 * aclocal.m4: Likewise.
2983 * configure: Regenerate.
2984
2fac9c01
ZW
29852004-06-11 Zack Weinberg <zack@codesourcery.com>
2986
2987 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2988 * configure, config.in: Regenerate.
2989 * system.h: Unconditionally define bool as unsigned char,
2990 BOOL_BITFIELD as unsigned int.
2991 * .cvsignore: New file.
2992
d8044160
GK
29932004-06-09 Geoffrey Keating <geoffk@apple.com>
2994
2995 * traditional.c (push_replacement_text): Set macro->traditional.
2996 (save_replacement_text): Likewise.
2997 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2998 (struct save_macro_item): Delete.
2999 (struct save_macro_data): Use a character array not the previous
3000 structured format.
3001 (save_macros): Save macro as text not as internal structures.
3002 (cpp_prepare_state): Update for changes to save_macro_data.
3003 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 3004 -D macros as text.
d8044160
GK
3005 * macro.c (create_iso_definition): Honour alloc_subobject.
3006 Clear traditional flag.
3007 (_cpp_create_definition): Honour alloc_subobject.
3008 * lex.c (cpp_token_val_index): New.
3009 * internal.h: Include cpp-id-data.h.
3010 (uchar): Move definition to cpp-id-data.h.
3011 (U): Likewise.
3012 (cpp_macro): Likewise.
3013 * directives.c (struct answer): Move to cpp-id-data.h.
3014 (do_assert): Honour alloc_subobject.
2cf22451
ZW
3015
3016 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
3017 * include/cpplib.h (struct cpp_string): Add GTY marker.
3018 (enum cpp_token_fld_kind): New.
3019 (struct cpp_token): Add GTY markers.
3020 (cpp_token_val_index): Prototype.
3021 (CPP_HASHNODE_VALUE_IDX): New.
3022 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
3023 * include/cpp-id-data.h: New file.
d8044160 3024
0ca8e815
PB
30252004-06-09 Paolo Bonzini <bonzini@gnu.org>
3026
3027 * Makefile.am (all-local): New.
3028 * Makefile.in: Regenerate.
3029
b51fa00f
RS
30302004-06-06 Roger Sayle <roger@eyesopen.com>
3031
3032 * Makefile.am (LIBICONV): Declare.
3033 (makedepend_LDADD): Use LIBICONV.
3034 * Makefile.in: Regenerate.
3035
5e2f3f39
AP
30362004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
3037
3038 * Makefile.am (LIBINTL): Declare
3039 (makedepend_LDADD): Use LIBINTL.
3040 * Makefile.in: Regenerate.
3041
c6e83800
ZW
30422004-06-05 Zack Weinberg <zack@codesourcery.com>
3043
3044 * Makefile.am: Add makedepend.
3045 * Makefile.in, aclocal.m4: Regenerate.
3046 * charset.c: Insert a space to avoid a warning.
3047 * directives.c: Include mkdeps.h.
3048 (_cpp_handle_directive): Reenable macro expander if appropriate.
3049 (undefine_macros): Inline body of _cpp_free_definition for speed.
3050 Do not call undef callback or _cpp_warn_if_unused_macro.
3051 (cpp_get_deps): New interface.
3052 * files.c (search_cache): Add pfile argument. Check for file
3053 that would be found by "" or <> search here...
3054 (_cpp_find_file): ...not here. Correct recorded start_dir of
3055 files found by directory-of-current-file search that would be
3056 found by "" or <> search.
3057 * init.c (cpp_add_dependency_target): Delete.
3058 * internal.h (struct lexer_state): Add discarding_output flag.
3059 * lex.c (lex_identifier): Compute hash function while scanning.
3060 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
3061 directives.
3062 * makedepend.c: New file.
3063 * mkdeps.c (struct deps): Add vpath vector.
3064 (apply_vpath, deps_add_vpath): New function.
3065 (deps_free): Free vpath vector.
3066 (deps_add_dep, deps_add_target): Use apply_vpath.
3067 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
3068 (ht_lookup_with_hash): New function.
3069 * cpplib.h, mkdeps.h: Update prototypes.
3070 * symtab.h: Update prototypes.
3071 (HT_HASHSTEP, HT_FINISH): New macros.
3072
b453c95f
GK
30732004-05-29 Geoffrey Keating <geoffk@apple.com>
3074
3075 * symtab.c (ht_create): Set entries_owned.
3076 (ht_destroy): Honour entries_owned.
3077 (ht_expand): Likewise.
3078 (ht_load): New.
2cf22451
ZW
3079 * include/symtab.h (struct ht): New field 'entries_owned'
3080 (ht_load): New prototype.
b453c95f 3081
963e23c5
PB
30822004-05-26 Paolo Bonzini <bonzini@gnu.org>
3083
3084 PR bootstrap/15651
3085 * configure.ac: Fix m4 quoting when picking
3086 the size of HOST_WIDE_INT.
3087 * configure: Regenerate.
3088
0429bc77
PB
30892004-05-25 Paolo Bonzini <bonzini@gnu.org>
3090
3091 * Makefile.am: the correct directory for
3092 gettext include files is given by @INCINTL@.
3093 * Makefile.in: Regenerate.
3094
c86dd7db
PB
30952004-05-24 Paolo Bonzini <bonzini@gnu.org>
3096
3097 * system.h [!ENABLE_NLS]: dgettext takes two
3098 parameters.
3099
4f4e53dd
PB
31002004-05-23 Paolo Bonzini <bonzini@gnu.org>
3101
3102 Moved libcpp from the gcc subdirectory to the toplevel.
3103 * Makefile.am: New file.
3104 * Makefile.in: Regenerate.
3105 * configure.ac: New file.
3106 * configure: Regenerate.
3107 * config.in: Regenerate.
3108 * charset.c: Moved from gcc/cppcharset.c. Add note about
3109 brokenness of input charset detection. Adjust for change
3110 in name of cppucnid.h.
3111 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
3112 * expr.c: Moved from gcc/cppexp.c.
3113 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
3114 Remove #define of O_BINARY, it is in system.h.
3115 * identifiers.c: Moved from gcc/cpphash.c.
3116 * internal.h: Moved from gcc/cpphash.h. Change header
3117 guard name. All other files adjusted to match name change.
3118 * init.c: Moved from gcc/cppinit.c.
3119 (init_library) [ENABLE_NLS]: Call bindtextdomain.
3120 * lex.c: Moved from gcc/cpplex.c.
3121 * directives.c: Moved from gcc/cpplib.c.
3122 * macro.c: Moved from gcc/cppmacro.c.
3123 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
3124 * traditional.c: Moved from gcc/cpptrad.c.
3125 * ucnid.h: Moved from gcc/cppucnid.h. Change header
3126 guard name.
3127 * ucnid.pl: Moved from gcc/cppucnid.pl.
3128 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
3129 guard name.
3130 * symtab.c: Moved from gcc/hashtable.c.
3131 * line-map.c: Moved from gcc. Do not include intl.h.
3132 * mkdeps.c: Moved from gcc.
3133 * system.h: New file.
2cf22451
ZW
3134 * include/cpplib.h: Moved from gcc. Change header guard name.
3135 * include/line-map.h: Moved from gcc. Change header guard name.
3136 * include/mkdeps.h: Moved from gcc. Change header guard name.
3137 * include/symtab.h: Moved from gcc/hashtable.h. Change header
3138 guard name.