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