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