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