]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
[multiple changes]
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
d82f1e13
MLI
12014-11-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
2
3 * include/line-map.h: Include EXPR, so that unused variable warnings
4 do not occur.
5
3aa34c1d
MLI
62014-11-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7
8 PR fortran/44054
9 * include/line-map.h (linemap_position_for_loc_and_offset):
10 Declare.
11 * line-map.c (linemap_position_for_loc_and_offset): New.
12
35485da9
DM
132014-11-11 David Malcolm <dmalcolm@redhat.com>
14
15 * ChangeLog.jit: New.
16
42fd12b1
ESR
172014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
18
19 * include/cpplib.h (cpp_callbacks): Add has_attribute.
20 * internal.h (lexer_state): Add in__has_attribute__.
21 * directives.c (lex_macro_node): Prevent use of __has_attribute__
22 as a macro.
23 * expr.c (parse_has_attribute): New function; (eval_token): Look for
24 __has_attribute__ and route to parse_has_attribute.
25 * identifiers.c (_cpp_init_hashtable): Initialize n__has_attribute__.
26 * pch.c (cpp_read_state): Initialize n__has_attribute__.
27 * traditional.c (enum ls): Add ls_has_attribute, ls_has_attribute_close;
28 (_cpp_scan_out_logical_line): Attend to __has_attribute__.
29
be5ffc59
JM
302014-11-06 Joseph Myers <joseph@codesourcery.com>
31
32 * include/cpp-id-data.h (struct cpp_macro): Update comment
33 regarding parameters.
34 * include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier):
35 Add spelling fields.
36 (struct cpp_token): Update comment on macro_arg.
37 * internal.h (_cpp_save_parameter): Add extra argument.
38 (_cpp_spell_ident_ucns): New declaration.
39 * lex.c (lex_identifier): Add SPELLING argument. Set *SPELLING to
40 original spelling of identifier.
41 (_cpp_lex_direct): Update calls to lex_identifier.
42 (_cpp_spell_ident_ucns): New function, factored out of
43 cpp_spell_token.
44 (cpp_spell_token): Adjust FORSTRING argument semantics to return
45 original spelling of identifiers. Use _cpp_spell_ident_ucns in
46 !FORSTRING case.
47 (_cpp_equiv_tokens): Check spellings of identifiers and macro
48 arguments are identical.
49 * macro.c (macro_arg_saved_data): New structure.
50 (paste_tokens): Use original spellings of identifiers from
51 cpp_spell_token.
52 (_cpp_save_parameter): Add argument SPELLING. Save both canonical
53 node and its value.
54 (parse_params): Update calls to _cpp_save_parameter.
55 (lex_expansion_token): Save spelling of macro argument tokens.
56 (_cpp_create_definition): Extract canonical node from saved data.
57 (cpp_macro_definition): Use UCNs in spelling of macro name. Use
58 original spellings of macro argument tokens and identifiers.
59 * traditional.c (scan_parameters): Update call to
60 _cpp_save_parameter.
61
701cade1
JM
622014-11-05 Joseph Myers <joseph@codesourcery.com>
63
64 PR preprocessor/9449
65 * init.c (lang_defaults): Enable extended identifiers for C++ and
66 C99-based standards.
67
19a9ba64
AM
682014-10-22 Alan Modra <amodra@gmail.com>
69
70 * symtab.c (ht_create): Use obstack_specify_allocation in place of
71 _obstack_begin.
72 * files.c (_cpp_init_files): Likewise.
73 * init.c (cpp_create_reader): Likewise.
74 * identifiers.c (_cpp_init_hashtable): Likewise.
75
3aac0952
MLI
762014-10-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
77
78 * include/line-map.h (linemap_location_from_macro_expansion_p):
79 const struct line_maps * argument.
80 (linemap_position_for_line_and_column): const struct line_map *
81 argument.
82 * line-map.c (linemap_add_macro_token): Use correct argument name
83 in comment.
84 (linemap_position_for_line_and_column): const struct line_map *
85 argument.
86 (linemap_macro_map_loc_to_def_point): Fix comment. Make static.
87 (linemap_location_from_macro_expansion_p): const struct line_maps *
88 argument.
89 (linemap_resolve_location): Fix argument names in comment.
90
0ccaaab0
BS
912014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
92
93 * lex.c (search_line_fast): Add new version to be used for Power8
94 and later targets when Altivec is enabled. Restrict the existing
95 Altivec version to big-endian systems so that lvsr is not used on
96 little endian, where it is deprecated. Remove LE-specific code
97 from the now-BE-only version.
98
dc257367
BE
992014-10-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
100 Jeff Law <law@redhat.com>
101
102 * charset.c (convert_no_conversion): Reallocate memory with 25%
103 headroom.
104
a15f7cb8
ESR
1052014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
106
107 Implement SD-6: SG10 Feature Test Recommendations
108 * internal.h (lexer_state, spec_nodes): Add in__has_include__.
109 * directives.c: Support __has_include__ builtin.
110 * expr.c (parse_has_include): New function to parse __has_include__
111 builtin; (eval_token()): Use it.
112 * files.c (_cpp_has_header()): New funtion to look for header;
113 (open_file_failed()): Not an error to not find a header file for
114 __has_include__.
115 * identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__.
116 * pch.c (cpp_read_state): Lookup __has_include__.
117 * traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through
118 __has_include__ statements.
119
cc811a8a
BE
1202014-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
121
122 PR preprocessor/58893
123 * errors.c (cpp_diagnostic): Fix possible out of bounds access.
124 * files.c (_cpp_stack_include): Initialize src_loc for IT_CMDLINE.
125
083e891e
MP
1262014-09-24 Marek Polacek <polacek@redhat.com>
127
128 PR c/61405
129 PR c/53874
130 * include/cpplib.h (enum cpp_ttype): Define CPP_KEYWORD.
131
d87fc699
JH
1322014-09-17 Jan Hubicka <hubicka@ucw.cz>
133
134 * charset.c (conversion): Rename to ...
135 (cpp_conversion): ... this one; update.
136 * files.c (file_hash_entry): Rename to ...
137 (cpp_file_hash_entry): ... this one ; update.
138
909eb89c
MP
1392014-09-17 Marek Polacek <polacek@redhat.com>
140
141 PR c/61854
142 * init.c (struct lang_flags): Remove cplusplus_comments.
143 (cpp_set_lang): Likewise.
144 (post_options): Likewise.
145 * lex.c (_cpp_lex_direct): Disallow C++ style comments in C90/C94.
146
1ef33fd4
MLI
1472014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
148
149 * include/cpplib.h (struct cpp_options): Declare warn_normalize as
150 int instead of enum.
151
2b71f4a4
MLI
1522014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
153
154 * macro.c (replace_args): Use cpp_pedwarning, cpp_warning and
155 CPP_W flags.
156 * include/cpplib.h: Add CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
157 * init.c (cpp_create_reader): Do not init to -1 here.
158 * expr.c (num_binary_op): Use cpp_pedwarning.
159
81b5d104
MLI
1602014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
161
162 * directives.c (check_eol_1): New.
163 (check_eol_endif_labels): New.
164 (check_eol): Call check_eol_1.
165 (do_else,do_endif): Call check_eol_endif_labels.
166
b753b37b
MLI
1672014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
168
169 * macro.c (warn_of_redefinition): Suppress warnings for builtins
170 that lack the NODE_WARN flag, unless Wbuiltin-macro-redefined.
171 (_cpp_create_definition): Use Wbuiltin-macro-redefined for
172 builtins that lack the NODE_WARN flag.
173 * directives.c (do_undef): Likewise.
174 * init.c (cpp_init_special_builtins): Do not change flags
175 depending on Wbuiltin-macro-redefined.
176
7c05e50c
ESR
1772014-08-28 Edward Smith-Rowland <3dw4rd@verizon.net>
178
179 PR cpp/23827 - standard C++ should not have hex float preprocessor
180 tokens
181 * libcpp/init.c (lang_flags): Change CXX98 flag for extended numbers
182 from 1 to 0.
183 * libcpp/expr.c (cpp_classify_number): Weite error message for improper
184 use of hex floating literal.
185
e4276ba5
ESR
1862014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
187
188 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z;
189 Rename CLK_GNUCXX1Y, CLK_CXX1Y to CLK_GNUCXX14, CLK_CXX14;
190 * init.c (struct lang_flags lang_defaults): Add column for trigraphs;
191 Add rows for CLK_GNUCXX1Z, CLK_CXX1Z; (cpp_set_lang): Set trigraphs;
192 (cpp_init_builtins): Set __cplusplus to 201402L for C++14;
193 Set __cplusplus to 201500L for C++17.
194 * expr.c (cpp_classify_number): Change C++1y to C++14 in binary
195 constants error message.
196
dd3ff077
MP
1972014-08-20 Marek Polacek <polacek@redhat.com>
198
199 * include/cpplib.h (cpp_options): Use signed char.
200 * lex.c (_cpp_lex_direct): Don't warn in C++ mode.
201
3f4f5c9a
MP
2022014-08-19 Marek Polacek <polacek@redhat.com>
203
204 * lex.c (_cpp_lex_direct): Fix a typo.
205
177cce46
MP
2062014-08-19 Marek Polacek <polacek@redhat.com>
207
208 * charset.c (_cpp_valid_ucn): Warn only if -Wc90-c99-compat.
209 * lex.c (_cpp_lex_direct): Likewise.
210 * macro.c (replace_args): Likewise.
211 (parse_params): Likewise.
212 * include/cpplib.h (cpp_options): Change cpp_warn_c90_c99_compat
213 to char.
214
f3bede71
MP
2152014-08-10 Marek Polacek <polacek@redhat.com>
216
217 PR c/51849
218 * lex.c (_cpp_lex_direct): Warn when -Wc90-c99-compat is in effect.
219 * charset.c (_cpp_valid_ucn): Likewise.
220 * include/cpplib.h (cpp_options): Add cpp_warn_c90_c99_compat.
221 * macro.c (replace_args): Warn when -Wc90-c99-compat is in effect.
222 (parse_params): Likewise.
223
61eb99f6
MP
2242014-07-27 Marek Polacek <polacek@redhat.com>
225
226 PR c/61861
227 * macro.c (builtin_macro): Add location parameter. Set
228 location of builtin macro to the expansion point.
229 (enter_macro_context): Pass location to builtin_macro.
230
c468587a
DS
2312014-07-16 Dodji Seketeli <dodji@redhat.com>
232
233 Support location tracking for built-in macro tokens
234 * include/line-map.h (line_maps::builtin_location): New data
235 member.
236 (line_map_init): Add a new parameter to initialize the new
237 line_maps::builtin_location data member.
238 * line-map.c (linemap_init): Initialize the
239 line_maps::builtin_location data member.
240 * macro.c (builtin_macro): Create a macro map and track the token
241 resulting from the expansion of a built-in macro.
242
3976796b
ESR
2432014-07-10 Edward Smith-Rowland <3dw4rd@verizon.net>
244 Jonathan Wakely <jwakely@redhat.com>
245
c786fca6 246 PR preprocessor/61389
3976796b
ESR
247 * macro.c (_cpp_arguments_ok, parse_params, create_iso_definition):
248 Warning messages mention C++11 in c++ mode and C99 in c mode.
249 * lex.c (lex_identifier_intern, lex_identifier): Ditto
250
7aee8646
ESR
2512014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net>
252
253 PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
254 by preprocessor
255 * lex.c (lex_raw_string ()): Do not warn about invalid suffix
256 if skipping. (lex_string ()): Ditto.
257
98ba7482
ESR
2582014-06-04 Edward Smith-Rowland <3dw4rd@verizon.net>
259
260 PR c++/61038
261 * macro.c (stringify_arg (cpp_reader *, macro_arg *)):
262 Combine user-defined escape logic with the other string and char logic.
263
edf6ddf6
RB
2642014-05-26 Richard Biener <rguenther@suse.de>
265
266 * configure.ac: Remove long long and __int64 type checks,
267 add check for uint64_t and fail if that wasn't found.
268 * include/cpplib.h (cpp_num_part): Use uint64_t.
269 * config.in: Regenerate.
270 * configure: Likewise.
271
28939589
MP
2722014-05-21 Marek Polacek <polacek@redhat.com>
273
274 PR c/61212
275 * files.c (find_file_in_dir): Add parens around &&.
276
49039169
ESR
2772014-05-20 Edward Smith-Rowland <3dw4rd@verizon.net>
278
28939589 279 PR c++/61038
49039169
ESR
280 * macro.c (stringify_arg (cpp_reader *, macro_arg *)):
281 Check for user-defined literal strings and user-defined literal chars
282 to escape necessary characters.
283
54da09ee
RB
2842014-05-20 Richard Biener <rguenther@suse.de>
285
286 * configure.ac: Copy gcc logic of detecting a 64bit type.
287 Remove HOST_WIDE_INT define.
288 * include/cpplib.h: typedef cpp_num_part to a 64bit type,
289 similar to how hwint.h does it.
290 * config.in: Regenerate.
291 * configure: Likewise.
292
eac3e079
JY
2932014-05-09 Joey Ye <joey.ye@arm.com>
294
295 * files.c (find_file_in_dir): Always try to shorten for DOS
296 non-system headers.
297 * init.c (ENABLE_CANONICAL_SYSTEM_HEADERS): Default enabled for DOS.
298
f543058d
RB
2992014-05-07 Richard Biener <rguenther@suse.de>
300
301 * configure.ac: Always set need_64bit_hwint to yes.
302 * configure: Regenerated.
303
d9f069ab
RO
3042014-04-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
305
306 * lex.c: Remove Solaris 9 reference.
307
341c653c
WL
3082014-02-24 Walter Lee <walt@tilera.com>
309
310 * configure.ac: Change "tilepro" triplet to "tilepro*".
311 * configure: Regenerate.
312
179652df
JJ
3132014-02-19 Jakub Jelinek <jakub@redhat.com>
314
315 PR preprocessor/58844
316 * macro.c (enter_macro_context): Only push
317 macro_real_token_count (macro) tokens rather than
318 macro->count tokens, regardless of
319 CPP_OPTION (pfile, track-macro-expansion).
320
acf601ae
JJ
3212014-02-07 Jakub Jelinek <jakub@redhat.com>
322
323 PR preprocessor/56824
324 * line-map.c (get_combined_adhoc_loc, linemap_get_expansion_line,
325 linemap_get_expansion_filename, linemap_location_in_system_header_p,
326 linemap_location_from_macro_expansion_p,
327 linemap_macro_loc_to_spelling_point, linemap_macro_loc_to_def_point,
328 linemap_macro_loc_to_exp_point, linemap_expand_location): Fix
329 formatting.
330 (linemap_compare_locations): Look through adhoc locations for both
331 l0 and l1.
332
7ecc3eb9
DS
3332014-01-23 Dodji Seketeli <dodji@redhat.com>
334
335 PR PR preprocessor/58580
336 * include/line-map.h (linemap_get_file_highest_location): Declare
337 new function.
338 * line-map.c (linemap_get_file_highest_location): Define it.
339
35c3d610
RS
3402014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
341
342 Update copyright years
343
3a4efce7
JM
3442013-12-09 Joseph Myers <joseph@codesourcery.com>
345
346 PR preprocessor/55715
347 * expr.c (num_binary_op): Implement subtraction directly rather
348 than with negation and falling through into addition case.
349
aadce585
BS
3502013-11-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
351
352 * lex.c (search_line_fast): Correct for little endian.
353
d3f4ff8b
JM
3542013-11-15 Joseph Myers <joseph@codesourcery.com>
355
356 * ucnid.tab: Add C11 and C11NOSTART data.
357 * makeucnid.c (digit): Rename enum value to N99.
358 (C11, N11, all_languages): New enum values.
359 (NUM_CODE_POINTS, MAX_CODE_POINT): New macros.
360 (flags, decomp, combining_value): Use NUM_CODE_POINTS as array
361 size.
362 (decomp): Use unsigned int as element type.
363 (all_decomp): New array.
364 (read_ucnid): Handle C11 and C11NOSTART. Use MAX_CODE_POINT.
365 (read_table): Use MAX_CODE_POINT. Store all decompositions in
366 all_decomp.
367 (read_derived): Use MAX_CODE_POINT.
368 (write_table): Use NUM_CODE_POINTS. Print N99, C11 and N11
369 flags. Print whole array variable declaration rather than just
370 array contents.
371 (char_id_valid, write_context_switch): New functions.
372 (main): Call write_context_switch.
373 * ucnid.h: Regenerate.
374 * include/cpplib.h (struct cpp_options): Add c11_identifiers.
375 * init.c (struct lang_flags): Add c11_identifiers.
376 (cpp_set_lang): Set c11_identifiers option from selected language.
377 * internal.h (struct normalize_state): Document "previous" as
378 previous starter character.
379 (NORMALIZE_STATE_UPDATE_IDNUM): Take character as argument.
380 * charset.c (DIG): Rename enum value to N99.
381 (C11, N11): New enum values.
382 (struct ucnrange): Give name to struct. Use short for flags and
383 unsigned int for end of range. Include ucnid.h for whole variable
384 declaration.
385 (ucn_valid_in_identifier): Allow for characters up to 0x10FFFF.
386 Allow for C11 in determining valid characters and valid start
387 characters. Use check_nfc for non-Hangul context-dependent
388 checks. Only store starter characters in nst->previous.
389 (_cpp_valid_ucn): Pass new argument to
390 NORMALIZE_STATE_UPDATE_IDNUM.
391 * lex.c (lex_identifier): Pass new argument to
392 NORMALIZE_STATE_UPDATE_IDNUM. Call NORMALIZE_STATE_UPDATE_IDNUM
393 after initial non-UCN part of identifier.
394 (lex_number): Pass new argument to NORMALIZE_STATE_UPDATE_IDNUM.
395
54848ff8
JM
3962013-11-15 Joseph Myers <joseph@codesourcery.com>
397
398 * ucnid.tab: Mark C99 digits as [C99DIG].
399 * makeucnid.c (read_ucnid): Handle [C99DIG].
400 (read_table): Don't check for digit characters.
401 * ucnid.h: Regenerate.
402
5157b91e
TB
4032013-11-06 Tobias Burnus <burnus@net-b.de>
404
405 * macro.c (_cpp_builtin_macro_text): Correct
406 wording of two warnings.
407
e8ff5196
TB
4082013-11-05 Tobias Burnus <burnus@net-b.de>
409
410 * include/cpplib.h (CPP_W_DATE_TIME): Added.
411 (cpp_options): Add warn_date_time.
412 * init.c (cpp_create_reader): Init it.
413 * macro.c (_cpp_builtin_macro_text): Warn when
414 __DATE__/__TIME__/__TIMESTAMP__ is used.
415
7057e645
ESR
4162013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
417
e8ff5196 418 Implement C++14 digit separators.
7057e645
ESR
419 * include/cpplib.h (cpp_options): Add digit_separators flag.
420 * internal.h (DIGIT_SEP(c)): New macro.
421 * expr.c (cpp_classify_number): Check improper placement of digit sep;
422 (cpp_interpret_integer): Skip over digit separators.
423 * init.c (lang_flags): Add digit_separators flag; (lang_defaults): Add
424 digit separator flags per language; (cpp_set_lang): Set
425 digit_separators
426 * lex.c (lex_number): Add digits separator to allowable characters for
427 C++14.
428
459260ec
DM
4292013-10-15 David Malcolm <dmalcolm@redhat.com>
430
431 * Makefile.in (PICFLAG): New.
432 (ALL_CFLAGS): Add PICFLAG.
433 (ALL_CXXFLAGS): Likewise.
434 * configure.ac: Add --enable-host-shared, setting up new
435 PICFLAG variable.
436 * configure: Regenerate.
437
fd6eea0c
RE
4382013-08-07 Richard Earnshaw <rearnsha@arm.com>
439
440 * configure.ac: Set need_64bit_hwint for all arm targets.
441 * configure: Regenerated.
442
8cf88735
JJ
4432013-07-20 Jakub Jelinek <jakub@redhat.com>
444
445 PR preprocessor/57620
446 * lex.c (lex_raw_string): Undo phase1 and phase2 transformations
447 between R" and final " rather than only in between R"del( and )del".
448
87e356ba
JJ
4492013-07-10 Jakub Jelinek <jakub@redhat.com>
450
d5e48350
JJ
451 PR preprocessor/57824
452 * lex.c (lex_raw_string): Allow reading new-lines if
453 in_deferred_pragma or if parsing_args and there is still
454 data in the current buffer.
455
c26302d5
JJ
456 * include/cpplib.h (cpp_token_val_index): Change parameter type to
457 const cpp_token *.
458 * lex.c (cpp_token_val_index): Likewise.
459
87e356ba
JJ
460 PR preprocessor/57757
461 * lex.c (cpp_avoid_paste): Avoid pasting CPP_{,W,UTF8}STRING
462 or CPP_STRING{16,32} with CPP_NAME or SPELL_LITERAL token that
463 starts if a-zA-Z_.
464
c865f923
ESR
4652013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
466
467 * lex.c (lex_raw_string(), lex_string()): Constrain suffixes treated
468 as concatenated literal and macro to just the patterns found in
469 inttypes.h; (is_macro()): New.
470
39953c79
DC
4712013-06-24 Dehao Chen <dehao@google.com>
472
473 * files.c (_cpp_stack_include): Fix the highest_location when header
474 file is guarded by #ifndef and is included twice.
475
01187df0
JJ
4762013-04-28 Jakub Jelinek <jakub@redhat.com>
477
478 N3472 binary constants
479 * include/cpplib.h (struct cpp_options): Fix a typo in user_literals
480 field comment. Add binary_constants field.
481 * init.c (struct lang_flags): Add binary_constants field.
482 (lang_defaults): Add bin_cst column to the table.
483 (cpp_set_lang): Initialize CPP_OPTION (pfile, binary_constants).
484 * expr.c (cpp_classify_number): Talk about C++11 instead of C++0x
485 in diagnostics. Accept binary constants if
486 CPP_OPTION (pfile, binary_constants) even when pedantic. Adjust
487 pedwarn message.
488
61949153
PC
4892013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
490
491 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Y and CLK_CXX1Y.
492 * init.c (lang_defaults): Add defaults for the latter.
493 (cpp_init_builtins): Define __cplusplus as 201300L for the latter.
494 * lex.c (_cpp_lex_direct): Update.
495
994a4cc0
SH
4962013-04-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
497
498 PR target/56771
499 * configure.ac: Require 64-bit int for arm*-*-rtems*.
500 * configure: Regenerate.
501
28937f11
JJ
5022013-03-06 Jakub Jelinek <jakub@redhat.com>
503
504 PR middle-end/56461
505 * internal.h (struct cpp_buffer): Add to_free field.
506 (_cpp_pop_file_buffer): Add third argument.
507 * files.c (_cpp_stack_file): Set buffer->to_free.
508 (_cpp_pop_file_buffer): Add to_free argument. Free to_free
509 if non-NULL, and if equal to file->buffer_start, also clear
510 file->buffer{,_start,_valid}.
511 * directives.c (_cpp_pop_buffer): Pass buffer->to_free
512 to _cpp_pop_file_buffer.
513
3b8af25b
JJ
5142013-03-01 Jakub Jelinek <jakub@redhat.com>
515
516 PR middle-end/56461
517 * files.c (_cpp_save_file_entries): Free result at the end.
518 * pch.c (cpp_string_free): New function.
519 (cpp_save_state): Use it in htab_create call.
520 (cpp_write_pch_deps): Free ss->defs. Destroy ss->definedhash.
521
1a80db97
JJ
5222013-02-28 Jakub Jelinek <jakub@redhat.com>
523
15fd8332
JJ
524 * files.c (_cpp_find_file): If returning early, before storing
525 something to *hash_slot and *hash_slot is NULL, call htab_clear_slot
526 on it. Access *hash_slot using void * type rather than
527 struct file_hash_entry * to avoid aliasing issues.
528
1a80db97
JJ
529 * configure.ac: Don't define ENABLE_CHECKING whenever
530 --enable-checking is seen, instead use similar --enable-checking=yes
531 vs. --enable-checking=release default as gcc/ subdir has and
532 define ENABLE_CHECKING if ENABLE_CHECKING is defined in gcc/.
533 Define ENABLE_VALGRIND_CHECKING if requested.
534 * lex.c (new_buff): If ENABLE_VALGRIND_CHECKING, put _cpp_buff
535 struct first in the allocated buffer and result->base after it.
536 (_cpp_free_buff): If ENABLE_VALGRIND_CHECKING, free buff itself
537 instead of buff->base.
538 * config.in: Regenerated.
539 * configure: Regenerated.
540
561f7fc7
ESR
5412013-02-13 Ed Smith-Rowland <3dw4rd@verizon.net>
542
543 PR c++/55582
61949153 544 * lex.c (lex_raw_string): Allow string literal with suffix
561f7fc7
ESR
545 beginning with 's' to be parsed as a C++11 user-defined literal.
546
500f3ed9
RS
5472013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
548
549 Update copyright years.
550
1582c677
PC
5512013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
552
553 PR c++/54526 (again)
554 * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2.
555
8ac16127
MG
5562013-01-03 Marc Glisse <marc.glisse@inria.fr>
557
558 PR bootstrap/50177
559 * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type.
560 (new_linemap): Likewise.
561 (linemap_enter_macro): Likewise.
562
f41e5bd1
JJ
5632012-12-03 Jakub Jelinek <jakub@redhat.com>
564
565 PR bootstrap/55380
566 PR other/54691
567 * files.c (read_file_guts): Allocate extra 16 bytes instead of
568 1 byte at the end of buf. Pass size + 16 instead of size
569 to _cpp_convert_input.
570 * charset.c (_cpp_convert_input): Reallocate if there aren't
571 at least 16 bytes beyond to.len in the buffer. Clear 16 bytes
572 at to.text + to.len.
573
31962032
SE
5742012-11-21 Steve Ellcey <sellcey@mips.com>
575
576 PR pch/55399
577 * files.c (pch_open_file): Fix check for implicit_preinclude.
578
5dc99c46
SB
5792012-11-16 Simon Baldwin <simonb@google.com>
580
581 * include/cpplib.h (struct cpp_options): Add canonical_system_headers.
582 * files.c (find_file_in_dir): Call maybe_shorter_path() only if
583 canonical_system_headers is set.
584 * init.c (cpp_create_reader): Initialize canonical_system_headers.
585 * configure.ac: Add new --enable-canonical-system-headers.
586 * configure: Regenerate.
587 * config.in: Regenerate.
588
a4a0016d
ESR
5892012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
590
591 PR c++/54413
592 * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg.
593 (cpp_interpret_int_suffix): Add cpp_reader* arg.
594 * init.c (cpp_create_reader): Iitialize new flags.
595 * expr.c (interpret_float_suffix): Use new flags.
596 (cpp_interpret_float_suffix): Add cpp_reader* arg.
597 (interpret_int_suffix): Use new flags.
598 (cpp_interpret_int_suffix): Add cpp_reader* arg.
599 (cpp_classify_number): Adjust calls to interpret_x_suffix.
600
04ce690f
IB
6012012-10-23 Ian Bolton <ian.bolton@arm.com>
602 Jim MacArthur <jim.macarthur@arm.com>
603 Marcus Shawcroft <marcus.shawcroft@arm.com>
604 Nigel Stephens <nigel.stephens@arm.com>
605 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
606 Richard Earnshaw <rearnsha@arm.com>
607 Sofiane Naci <sofiane.naci@arm.com>
608 Stephen Thomas <stephen.thomas@arm.com>
609 Tejas Belagod <tejas.belagod@arm.com>
610 Yufeng Zhang <yufeng.zhang@arm.com>
611
612 * configure.ac: Enable AArch64.
613 * configure: Regenerate.
614
1efcb8c6
JM
6152012-10-23 Joseph Myers <joseph@codesourcery.com>
616
617 * files.c (struct _cpp_file): Add implicit_preinclude.
618 (pch_open_file): Allow a previously opened implicitly included
619 file.
620 (_cpp_find_file): Add implicit_preinclude argument. Free file and
621 do not call open_file_failed if implicit_preinclude. Store
622 implicit_preinclude value.
623 (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date):
624 Update calls to _cpp_find_file.
625 (_cpp_stack_include): Handle IT_DEFAULT.
626 (cpp_push_default_include): New.
627 * include/cpplib.h (cpp_push_default_include): Declare.
628 * init.c (cpp_read_main_file): Update call to _cpp_find_file.
629 * internal.h (enum include_type): Add IT_DEFAULT.
630 (_cpp_find_file): Update prototype.
631
55e7f907
TB
6322012-10-15 Tobias Burnus <burnus@net-b.de>
633
634 * files.c (read_file_guts, _cpp_save_file_entries): Free memory
635 before returning.
636 * lex.c (warn_about_normalization): Ditto.
637 * mkdeps.c (deps_save): Ditto.
638 * pch.c (cpp_valid_state): Ditto.
639
f591bd8f
FW
6402012-10-04 Florian Weimer <fweimer@redhat.com>
641
642 * directives.c (do_pragma_warning_or_error): New.
643 (do_pragma_warning): New.
644 (do_pragma_error): New.
645 (_cpp_init_internal_pragmas): Register new pragmas.
646
ec6e0399
DC
6472012-09-25 Dehao Chen <dehao@google.com>
648
649 PR middle-end/54704
650 * line-map.c (location_adhoc_data_hash): Fix the hash function.
651
52187008
DC
6522012-09-25 Dehao Chen <dehao@google.com>
653
654 PR middle-end/54645
655 * include/line-map.h (location_adhoc_data): Move location_adhoc_data
656 into GC.
657 (location_adhoc_data_map): Likewise.
658 (line_maps): Likewise.
659 (rebuild_location_adhoc_htab): New Function.
660 * line-map.c (+rebuild_location_adhoc_htab): new Funcion.
661 (get_combined_adhoc_loc): Move location_adhoc_data into GC.
662 (location_adhoc_data_fini): Likewise.
663 (linemap_init): Likewise.
664 (location_adhoc_data_init): Remove Function.
665
5368224f
DC
6662012-09-19 Dehao Chen <dehao@google.com>
667
668 * include/line-map.h (MAX_SOURCE_LOCATION): New value.
669 (location_adhoc_data_fini): New.
670 (get_combined_adhoc_loc): New.
671 (get_data_from_adhoc_loc): New.
672 (get_location_from_adhoc_loc): New.
673 (location_adhoc_data_map): New.
674 (COMBINE_LOCATION_DATA): New.
675 (IS_ADHOC_LOC): New.
676 (expanded_location): New field.
677 (line_maps): New field.
678 * line-map.c (location_adhoc_data): New.
679 (location_adhoc_data_hash): New.
680 (location_adhoc_data_eq): New.
681 (location_adhoc_data_update): New.
682 (get_combined_adhoc_loc): New.
683 (get_data_from_adhoc_loc): New.
684 (get_location_from_adhoc_loc): New.
685 (location_adhoc_data_init): New.
686 (location_adhoc_data_fini): New.
687 (linemap_init): Initialize location_adhoc_data.
688 (linemap_lookup): Change to use new location.
689 (linemap_ordinary_map_lookup): Likewise.
690 (linemap_macro_map_lookup): Likewise.
691 (linemap_macro_map_loc_to_def_point): Likewise.
692 (linemap_macro_map_loc_unwind_toward_spel): Likewise.
693 (linemap_get_expansion_line): Likewise.
694 (linemap_get_expansion_filename): Likewise.
695 (linemap_location_in_system_header_p): Likewise.
696 (linemap_location_from_macro_expansion_p): Likewise.
697 (linemap_macro_loc_to_spelling_point): Likewise.
698 (linemap_macro_loc_to_def_point): Likewise.
699 (linemap_macro_loc_to_exp_point): Likewise.
700 (linemap_resolve_location): Likewise.
701 (linemap_unwind_toward_expansion): Likewise.
702 (linemap_unwind_to_first_non_reserved_loc): Likewise.
703 (linemap_expand_location): Likewise.
704 (linemap_dump_location): Likewise.
705 (linemap_line_start): Likewise.
706
f3d25c65
DS
7072012-05-25 Dodji Seketeli <dodji@redhat.com>
708
709 PR preprocessor/53469
710 * directives.c (do_pragma): Use the virtual location for the
711 pragma token, instead of its spelling location.
712
0823efed
DN
7132012-08-14 Diego Novillo <dnovillo@google.com>
714
715 Merge from cxx-conversion branch. Configury.
716
717 * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
718 * configure.ac: Likewise.
719 * configure: Regenerate.
720
7212012-08-14 Lawrence Crowl <crowl@google.com>
722
723 Merge from cxx-conversion branch. New C++ hash table.
724
725 * include/symtab.h (typedef struct ht hash_table): Change the typedef
726 name to cpp_hash_table. Update all users of the typedef.
727
c0fd3497
LB
7282012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
729
730 * include/line-map.h (line_map_macro): Use the "atomic" GTY option
731 for the macro_locations field.
732
d35d1c0f
UB
7332011-06-19 Uros Bizjak <ubizjak@gmail.com>
734
735 * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
736 __builtin_ia32_pcmpestri128 instead of asm.
737
d86d2119
DA
7382012-06-04 Dimitrios Apostolou <jimis@gmx.net>
739
740 * line-map.c (linemap_enter_macro): Don't zero max_column_hint in
741 every macro. This improves performance by reducing the number of
742 reallocations when track-macro-expansion is on.
743
7ca643e1
DS
7442012-06-04 Dodji Seketeli <dodji@redhat.com>
745
746 PR preprocessor/53463
747 * line-map.c (linemap_location_in_system_header_p): For built-in
748 macro tokens, check the first expansion point location that is not
749 for a token coming from a built-in macro.
750
7d9641cc
JM
7512012-05-29 Joseph Myers <joseph@codesourcery.com>
752
753 * directives.c: Fix typos.
754 * include/line-map.h: Fix typos.
755 * line-map.c: Fix typos.
756 * macro.c: Fix typos.
757
53a103d3
DS
7582012-05-25 Dodji Seketeli <dodji@redhat.com>
759
760 PR bootstrap/53459
761 * lex.c (search_line_fast): Avoid unused local typedefs to simulate
762 a static assertion.
763
828a7f76
DS
7642012-05-29 Dodji Seketeli <dodji@redhat.com>
765
766 PR preprocessor/53229
767 * internal.h (cpp_reader::set_invocation_location): Remove.
768 (cpp_reader::about_to_expand_macro_p): New member flag.
769 * directives.c (do_pragma): Remove Kludge as
770 pfile->set_invocation_location is no more.
771 * macro.c (cpp_get_token_1): Do away with the use of
772 cpp_reader::set_invocation_location. Just collect the macro
773 expansion point when we are about to expand the top-most macro.
774 Do not override cpp_reader::about_to_expand_macro_p.
775 This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
776 properly handle locations of expansion points.
777 (cpp_get_token_with_location): Adjust, as
778 cpp_reader::set_invocation_location is no more.
779 (paste_tokens): Take a virtual location parameter for
780 the LHS of the pasting operator. Use it in diagnostics. Update
781 comments.
782 (paste_all_tokens): Tighten the assert. Propagate the location of
783 the expansion point when no virtual locations are available.
784 Pass the virtual location to paste_tokens.
785 (in_macro_expansion_p): New static function.
786 (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
787 flag until we really start expanding the macro.
788
0b2c4be5
DS
7892012-05-16 Dodji Seketeli <dodji@redhat.com>
790
791 PR preprocessor/7263
792 * include/cpplib.h (cpp_classify_number): Take a location
793 parameter.
794 * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
795 macros that take a location parameter.
796 (cpp_classify_number): Take a (virtual) location parameter. Use
797 it for diagnostics. Adjust comments.
798 (eval_token): Take a location parameter. Pass it to
799 cpp_classify_number and to diagnostic routines.
800 (_cpp_parse_expr): Use virtual locations of tokens when parsing
801 expressions. Pass a virtual location to eval_token and to
802 diagnostic routines.
803
638d2065
TG
8042012-05-10 Tristan Gingold <gingold@adacore.com>
805
806 * expr.c (interpret_float_suffix): Add a guard.
807
3ad64f53
DS
8082012-05-02 Dodji Seketeli <dodji@redhat.com>
809
810 Properly initialize cpp_context in destringize_and_run
811 * directives.c (destringize_and_run): Properly initialize the new
812 context.
813 * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
814 the initial base context, which has the same life time as the
815 current instance of cpp_file.
816
b193dfa8
MLI
8172012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
818 Dodji Seketeli <dodji@seketeli.org>
819
3efc2959 820 PR c++/52974
b193dfa8
MLI
821 * libcpp/files.c (maybe_shorter_path): New.
822 (find_file_in_dir): Use it.
823
4e65a470
DS
8242012-04-30 Dodji Seketeli <dodji@redhat.com>
825
51fce2d3
DS
826 Switch -ftrack-macro-expansion=2 on by default.
827 * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
828 by default. Add comments.
829
c4ca1a09
DS
830 Strip "<built-in>" loc from displayed expansion context
831 * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
832 in comment.
833 (linemap_unwind_to_first_non_reserved_loc): Declare new function.
834 * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
835 new function.
836
3600218c
DS
837 Fix expansion point loc for macro-like tokens
838 * macro.c (macro_of_context): New static function.
839 (_cpp_push_token_context, push_extended_tokens_context): If the
840 macro argument is NULL, it means we are continuing the expansion
841 of the current macro, if any. Update comments.
842 (_cpp_pop_context): Re-enable expansion of the macro only when we
843 are really out of the context of the current expansion.
844
0ff2b8a0
DS
845 Fix token pasting with -ftrack-macro-expansion
846 * macro.c (paste_all_tokens): Put the token resulting from pasting
847 into an extended token context with -ftrack-macro-location is in
848 effect.
849
4e65a470
DS
850 Fix cpp_sys_macro_p with -ftrack-macro-expansion
851 * macro.c (cpp_sys_macro_p): Support -ftrack-macro-expansion.
852
112448b4
DS
8532012-04-29 Dodji Seketeli <dodji@redhat.com>
854
855 * lex.c (lex_raw_string): Change C++ style comments into C style
856 comments.
19a9ba64 857 (lex_string): Likewise.
112448b4 858
7f5f5f98
OW
8592012-04-27 Ollie Wild <aaw@google.com>
860
861 * include/cpplib.h (struct cpp_options): Add new field,
862 warn_literal_suffix.
863 (CPP_W_LITERAL_SUFFIX): New enum.
864 * init.c (cpp_create_reader): Default initialization of
865 warn_literal_suffix.
866 * lex.c (lex_raw_string): Treat user-defined literals which don't
867 begin with '_' as separate tokens and produce a warning.
868 (lex_string): Ditto.
869
1d72e96f
MLI
8702012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
871
872 * line-map.c (linemap_resolve_location): Synchronize comments with
873 those in line-map.h.
874 * include/line-map.h (linemap_resolve_location): Fix spelling in
875 comment.
876
e75b54a2
RE
8772012-03-22 Richard Earnshaw <rearnsha@arm.com>
878
879 * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
880
7888f266
RO
8812012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
882
883 * lex.c: Remove Solaris 8 reference.
884
dd552284
WL
8852012-02-14 Walter Lee <walt@tilera.com>
886
887 * configure.ac: Require 64-bit hwint for tilegx and tilepro.
888 * configure: Regenerate.
889
2c5cbc31
RG
8902012-01-09 Richard Guenther <rguenther@suse.de>
891
892 * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
893
b492b686
GF
8942012-01-09 Gary Funck <gary@intrepid.com>
895
896 PR preprocessor/33919
897 * files.c (_cpp_get_file_name): New. Implement file name
898 access function.
899 * internal.h (_cpp_get_file_name): New prototype.
900 * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
901 to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
902
75291c57
OH
9032012-01-03 Olivier Hainque <hainque@adacore.com>
904
905 * system.h: Prior to #define, #undef fopen and freopen unconditionally.
906
48b0b196
JM
9072011-12-20 Joseph Myers <joseph@codesourcery.com>
908
909 * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
910 (CLK_STDC1X): Change to CLK_STDC11.
911 * init.c (lang_defaults): Update comments.
912 (cpp_init_builtins): Update language tests. Use 201112L for C11
913 __STDC_VERSION__.
914
4a5e00ca
AS
9152011-12-20 Andreas Schwab <schwab@linux-m68k.org>
916
917 * configure: Regenerate.
918
095af58f
AS
9192011-12-19 Andreas Schwab <schwab@linux-m68k.org>
920
921 * configure: Regenerate.
922
b0c084b7
JJ
9232011-12-07 Jakub Jelinek <jakub@redhat.com>
924
925 PR bootstrap/50237
926 * internal.h (_cpp_init_lexer): New prototype.
927 * init.c (init_library): Call it.
928 * lex.c (init_vectorized_lexer): Remove constructor attribute,
929 add inline keyword.
930 (HAVE_init_vectorized_lexer): Define.
931 (_cpp_init_lexer): New function.
932
9b554be9
DS
9332011-12-03 Dodji Seketeli <dodji@redhat.com>
934
935 * macro.c (tokens_buff_remove_last_token)
936 (tokens_buff_put_token_to): Add an 'inline' function specifier to
937 the prototype.
938
8dcf72a8
DN
9392011-11-22 Diego Novillo <dnovillo@google.com>
940
941 * include/line-map.h (linemap_dump): Declare.
942 (line_table_dump): Declare.
943 * line-map.c (linemap_dump): New.
944 (line_table_dump): New.
945
7e74ce3f
ESR
9462011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
947
948 PR c++/50958
949 * expr.c (cpp_userdef_char_remove_type): Fix typo.
950
e9411247
MM
9512011-11-03 Michael Matz <matz@suse.de>
952
953 PR bootstrap/50857
954 * configure.ac: Check for -fno-exceptions -fno-rtti.
955 * configure: Regenerate.
956 * Makefile.in (NOEXCEPTION_FLAGS): New flag.
957 (ALL_CXXFLAGS): Use it.
958
0c1dace3
PC
9592011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
960
961 * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
962
25339f10
JM
9632011-11-02 Jason Merrill <jason@redhat.com>
964
965 PR c++/50810
966 * configure.ac: Add -Wno-narrowing to warning options.
967
97e3ad20
JM
9682011-10-31 Jason Merrill <jason@redhat.com>
969
1fb80b0c
JM
970 PR libstdc++/1773
971 * init.c (cpp_init_builtins): Set __cplusplus for C++11.
972
97e3ad20
JM
973 PR c++/50920
974 * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
975 CLK_GNUCXX0X to CLK_GNUCXX11.
976
3ce4f9e4
ESR
9772011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
978
979 Implement C++11 user-defined literals.
980 * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
981 cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
982 cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
983 cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
984 (cpp_classify_number): Classify unrecognized tokens as user-defined
985 literals.
986 * include/cpplib.h: Add new tokens for user-defined literals.
987 * init.c: Add new preprocessor flag (cxx11).
988 * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
989 including concatenation and promotion with suffixes.
990
3bb0c8db
DS
9912011-10-24 Dodji Seketeli <dodji@redhat.com>
992
993 * line-map.c (linemap_macro_map_lookup): Fix logic.
994
84756fd4
DS
9952011-10-24 Dodji Seketeli <dodji@redhat.com>
996
997 * include/line-map.h (linemap_expand_location): Take a line table
998 parameter. Update comment.
999 (linemap_resolve_location): Update comment.
1000 (linemap_expand_location_full): Remove.
1001 * line-map.c (linemap_resolve_location): Handle reserved
1002 locations; return a NULL map in those cases.
1003 (linemap_expand_location): If location is reserved, return a
1004 zeroed expanded location. Update comment. Take a line table to
1005 assert that the function takes non-virtual locations only.
1006 (linemap_expand_location_full): remove.
1007 (linemap_dump_location): Handle the fact that
1008 linemap_resolve_location can return NULL line maps when the
1009 location resolves to a reserved location.
1010
1011 * line-map.c (linemap_macro_map_lookup): Fix logic.
1012
ad2305ad
DS
10132011-10-22 Dodji Seketeli <dodji@redhat.com>
1014
1015 PR bootstrap/50778
1016 * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
1017 context to act upon.
1018 * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update
1019 comment.
1020 (cpp_token_from_context_at): Likewise.
1021 (cpp_peek_token): Use the context to peek tokens from.
1022
cbbcf655
DS
10232011-10-20 Dodji Seketeli <dodji@redhat.com>
1024
1025 PR bootstrap/50801
1026 * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
1027 number of tokens.
1028
d17687f6
DS
10292011-10-18 Dodji Seketeli <dodji@redhat.com>
1030
1031 PR bootstrap/50760
1032 * include/line-map.h (struct linemap_stats): Change the type of
19a9ba64 1033 the members from size_t to long.
d17687f6 1034 * macro.c (macro_arg_token_iter_init): Unconditionally initialize
19a9ba64 1035 iter->location_ptr.
d17687f6 1036
411f92de
DS
10372011-10-17 Dodji Seketeli <dodji@redhat.com>
1038
1039 * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
19a9ba64
AM
1040 variable without using it if ENABLE_CHECKING is not defined. Mark
1041 the LOCATION parameter as being unused.
411f92de 1042
b9bd6f74
TT
10432011-10-15 Tom Tromey <tromey@redhat.com>
1044 Dodji Seketeli <dodji@redhat.com>
1045
1046 * include/line-map.h (struct line_maps::alloced_size_for_request):
1047 New member.
1048 * line-map.c (new_linemap): Use set->alloced_size_for_request to
1049 get the actual allocated size of line maps.
1050
64a1a422
TT
10512011-10-15 Tom Tromey <tromey@redhat.com>
1052 Dodji Seketeli <dodji@redhat.com>
1053
1054 * line-map.h (struct linemap_stats): Declare new struct.
1055 (linemap_get_statistics): Declare ...
1056 * line-map.c (linemap_get_statistics): ... new function.
1057 * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
1058 Declare new counters.
1059 (enter_macro_context, replace_args): Update
1060 num_macro_tokens_counter.
1061 (cpp_get_token_1): Update num_expanded_macros_counter.
1062
847e697a
TT
10632011-10-15 Tom Tromey <tromey@redhat.com>
1064 Dodji Seketeli <dodji@redhat.com>
1065
1066 * include/cpplib.h (struct cpp_options)<debug>: New struct member.
1067 * include/line-map.h (linemap_dump_location): Declare ...
1068 * line-map.c (linemap_dump_location): ... new function.
1069
92582b75
TT
10702011-10-15 Tom Tromey <tromey@redhat.com>
1071 Dodji Seketeli <dodji@redhat.com>
1072
1073 * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
1074 New option.
1075 * internal.h (struct macro_context): New struct.
1076 (enum context_tokens_kind): New enum.
1077 (struct cpp_context)<tokens_kind>: New member of type enum
1078 context_tokens_kind.
1079 (struct cpp_context)<macro>: Remove this. Replace it with an enum
1080 of macro and macro_context.
1081 (struct cpp_context)<direct_p>: Remove.
1082 (_cpp_remaining_tokens_num_in_context): Declare new function.
1083 * directives.c (destringize_and_run): Adjust.
1084 * lex.c (_cpp_remaining_tokens_num_in_context)
1085 (_cpp_token_from_context_at): Define new functions
1086 (cpp_peek_token): Use them.
1087 * init.c (cpp_create_reader): Initialize the base context to zero.
1088 (_cpp_token_from_context_at): Define new static function.
1089 (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
1090 _cpp_token_from_context_at.
1091 * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
1092 members.
1093 (enum macro_arg_token_kind): New enum.
1094 (struct macro_arg_token_iter): New struct.
1095 (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
1096 (alloc_expanded_arg_mem, ensure_expanded_arg_room)
1097 (delete_macro_args, set_arg_token, get_arg_token_location)
1098 (arg_token_ptr_at, macro_arg_token_iter_init)
1099 (macro_arg_token_iter_get_token)
1100 (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
1101 (expanded_token_index, tokens_buff_new, tokens_buff_count)
1102 (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
1103 (tokens_buff_add_token, tokens_buff_remove_last_token)
1104 (reached_end_of_context, consume_next_token_from_context): New
1105 static functions.
1106 (cpp_get_token_1): New static function. Split and extended from
1107 cpp_get_token. Use reached_end_of_context and
1108 consume_next_token_from_context. Unify its return point. Move
1109 the location tweaking from cpp_get_token_with_location in here.
1110 (cpp_get_token): Use cpp_get_token_1
1111 (stringify_arg): Use the new arg_token_at.
1112 (paste_all_tokens): Support tokens coming from extended tokens
1113 contexts.
1114 (collect_args): Return the number of collected arguments, by
1115 parameter. Store virtual locations of tokens that constitute the
1116 collected args.
1117 (funlike_invocation_p): Return the number of collected arguments,
1118 by parameter.
1119 (enter_macro_context): Add a parameter for macro expansion point.
1120 Pass it to replace_args and to the "used" cpp callback. Get the
1121 number of function-like macro arguments from funlike_invocation_p,
1122 pass it to the new delete_macro_args to free the memory used by
1123 macro args. When -ftrack-macro-expansion is in effect, for macros
1124 that have no arguments, create a macro map for the macro expansion
1125 and use it to allocate proper virtual locations for tokens
1126 resulting from the expansion. Push an extended tokens context
1127 containing the tokens resulting from macro expansion and their
1128 virtual locations.
1129 (replace_args): Rename the different variables named 'count' into
1130 variables with more meaningful names. Create a macro map;
1131 allocate virtual locations of tokens resulting from this
1132 expansion. Use macro_arg_token_iter to iterate over tokens of a
1133 given macro. Handle the case of the argument of
1134 -ftrack-macro-expansion being < 2. Don't free macro arguments
1135 memory resulting from expand_arg here, as these are freed by the
1136 caller of replace_arg using delete_macro_args now. Push extended
1137 token context.
1138 (next_context, push_ptoken_context, _cpp_push_token_context)
1139 (_cpp_push_text_context): Properly initialize the context.
1140 (expand_arg): Use the new alloc_expanded_arg_mem,
1141 push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
1142 (_cpp_pop_context): Really free the memory held by the context.
1143 Handle freeing memory used by extended tokens contexts.
1144 (cpp_get_token_with_location): Use cpp_get_token_1.
1145 (cpp_sys_macro_p): Adjust.
1146 (_cpp_backup_tokens): Support the new kinds of token contexts.
1147 * traditional.c (recursive_macro): Adjust.
1148
46427374
TT
11492011-10-15 Tom Tromey <tromey@redhat>
1150 Dodji Seketeli <dodji@redhat.com>
1151
1152 * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
1153 member.
1154 (MAX_SOURCE_LOCATION): New constant.
1155 (struct line_map_ordinary, struct line_map_macro): New structs.
19a9ba64 1156 (struct line_map): Turn this into a union of the two above. Add
46427374
TT
1157 comments.
1158 (struct maps_info): New struct.
1159 (struct line_maps)<info_ordinary, info_macro>: Two new fields.
1160 These now carry the map information that was previously scattered
1161 in struct line_maps.
1162 (struct map_info::allocated): Fix comment.
1163 (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
1164 (ORDINARY_MAP_STARTING_LINE_NUMBER)
1165 (ORDINARY_MAP_INCLUDER_FILE_INDEX)
1166 (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
1167 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
1168 (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
1169 (MACRO_MAP_EXPANSION_POINT_LOCATION)
1170 (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
1171 (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
1172 (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
1173 (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
1174 (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
1175 (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
1176 (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
1177 (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
1178 (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
1179 (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
1180 (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
1181 information.
1182 (linemap_check_ordinary, linemap_assert)
1183 (linemap_location_before_p): New macros.
1184 (linemap_position_for_line_and_column)
1185 (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
1186 (linemap_macro_expansion_map_p)
1187 (linemap_macro_map_loc_to_def_point)
1188 (linemap_macro_map_loc_unwind_once)
1189 (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
1190 (linemap_get_source_line linemap_get_source_column)
1191 (linemap_map_get_macro_name, linemap_get_file_path)
1192 (linemap_location_in_system_header_p)
1193 (linemap_location_from_macro_expansion_p): Declare new functions.
1194 (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
1195 (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
1196 accessors act on ordinary maps only.
1197 (INCLUDED_FROM): Return NULL for main files; use the new
1198 accessors.
1199 (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
1200 (struct expanded_location): Move here from gcc/input.h
1201 (linemap_resolve_location, linemap_expand_location)
1202 (linemap_expand_location_full): Declare new functions.
1203 * line-map.c: Include cpplib.h, internal.h
1204 (linemap_enter_macro, linemap_add_macro_token)
1205 (linemap_get_expansion_line, linemap_get_expansion_filename): New
1206 functions that are private to libcpp.
1207 (linemap_assert): New macro.
1208 (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
1209 (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
1210 (linemap_macro_map_loc_unwind_toward_spelling)
1211 (linemap_macro_map_loc_to_exp_point)
1212 (first_map_in_common_1, first_map_in_common): New static
1213 functions.
1214 (new_linemap): Define new static functions. Extracted and
1215 enhanced from ...
1216 (linemap_add): ... here. Use linemap_assert in lieu of abort
1217 previously.
1218 (linemap_tracks_macro_expansion_locs_p)
1219 (linemap_add_macro_token, linemap_macro_expansion_map_p)
1220 (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
1221 (linemap_macro_map_loc_to_def_point)
1222 (linemap_macro_map_loc_unwind_once)
1223 (linemap_step_out_once, linemap_map_get_index)
1224 (linemap_get_source_line,linemap_get_source_column)
1225 (linemap_get_file_path, linemap_map_get_macro_name)
1226 (linemap_location_in_system_header_p)
1227 (linemap_location_originated_from_system_header_p)
1228 (linemap_location_from_macro_expansion_p)
1229 (linemap_tracks_macro_expansion_locs_p)
1230 (linemap_resolve_location, linemap_expand_location)
1231 (linemap_expand_location_full)
1232 (linemap_tracks_macro_expansion_locs_p)
1233 (linemap_position_for_line_and_column, linemap_compare_locations):
1234 Define new public functions.
1235 (linemap_init): Initialize ordinary and macro maps information in
1236 the map set.
1237 (linemap_check_files_exited): Use the new accessors.
1238 (linemap_free): Remove this dead code.
1239 (linemap_line_start): Assert this uses an ordinary map. Adjust to
1240 use the new ordinary map accessors and data structures. Don't
1241 overflow past the lowest possible macro token's location.
1242 (linemap_position_for_column): Assert the ordinary maps of the map
1243 set are really ordinary. Use ordinary map accessors.
1244 (linemap_lookup): Keep the same logic but generalize to allow
1245 lookup of both ordinary and macro maps. Do not crash when called
1246 with an empty line table.
1247 * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
1248 new API of line-map.h.
1249 * directives.c (start_directive, do_line, do_linemarker)
1250 (do_linemarker): Likewise.
1251 * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
1252 (make_cpp_dir, cpp_make_system_header): Likewise.
1253 * init.c (cpp_read_main_file): Likewise.
1254 * internal.h (CPP_INCREMENT_LINE): Likewise.
1255 (linemap_enter_macro, linemap_add_macro_token)
1256 (linemap_get_expansion_line, linemap_get_expansion_filename): New
1257 functions private to libcpp.
1258 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
1259 (skip_line_comment, skip_whitespace, lex_raw_string)
1260 (_cpp_lex_direct): Likewise.
1261 * macro.c (_cpp_builtin_macro_text): Likewise.
1262 (_cpp_aligned_alloc): Initialize the new name member of the macro.
1263 * traditional.c (copy_comment, _cpp_scan_out_logical_line):
1264 Likewise.
1265 * errors.c (cpp_diagnostic): Adjust to new linemap API.
1266
892a371f
DS
12672011-08-28 Dodji Seketeli <dodji@redhat.com>
1268
1269 * line-map.c (linemap_add): Assert that reason must not be
1270 LC_RENAME when called for the first time on a "main input file".
1271
e3dfef44
GC
12722011-08-22 Gabriel Charette <gchare@google.com>
1273
1274 * init.c (cpp_create_reader): Inititalize forced_token_location_p.
1275 * internal.h (struct cpp_reader): Add field forced_token_location_p.
1276 * lex.c (_cpp_lex_direct): Use forced_token_location_p.
1277 (cpp_force_token_locations): New.
1278 (cpp_stop_forcing_token_locations): New.
1279
32fe396e
RO
12802011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1281
1282 PR libstdc++/1773
1283 * init.c (cpp_init_builtins): Define __cplusplus 19971L.
1284
7c1ffff9
JM
12852011-08-18 Joseph Myers <joseph@codesourcery.com>
1286
1287 * include/cpplib.h (struct cpp_options): Fix typo.
1288
a48e3dd1
JM
12892011-08-18 Joseph Myers <joseph@codesourcery.com>
1290
1291 * include/cpplib.h (struct cpp_options): Add rliterals.
1292 * init.c (struct lang_flags, lang_defaults): Add rliterals.
1293 (cpp_set_lang): Set rliterals option.
1294 (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
1295 * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
1296
3f6ced10
GC
12972011-08-15 Gabriel Charette <gchare@google.com>
1298
1299 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
1300 Update all users to use linemap_position_for_column instead.
1301
0681d04c
GC
13022011-07-28 Gabriel Charette <gchare@google.com>
1303
1304 * include/line-map.h (struct line_maps):
1305 Remove unused field last_listed. Update all users.
1306
5e9627ca
L
13072011-07-28 H.J. Lu <hongjiu.lu@intel.com>
1308
1309 * configure.ac: Set need_64bit_hwint to yes for x86 targets.
1310 * configure: Regenerated.
1311
a024b70f
RO
13122011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1313
1314 * system.h [__cplusplus]: Wrap C function declarations in extern "C".
1315
5b6d595b
RO
13162011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1317 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1318
1319 PR bootstrap/49794
1320 * configure.ac: Test AM_ICONV with CXX.
1321 * configure: Regenerate.
1322 * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
1323
d0a9fbe1
DS
13242011-07-15 Dodji Seketeli <dodji@redhat.com>
1325
1326 * directives.c (struct if_stack): Use source_location as type
1327 here.
1328 * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
1329 indent, def_pragma, used_define, used_undef>: Properly use
1330 source_location as parameter type, rather than unsigned int.
1331
fbdd5d87
RO
13322011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1333
1334 PR target/39150
1335 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
1336 like i[34567]86-*-solaris2.1[0-9]*.
1337 * configure: Regenerate.
1338
8787a05a
JM
13392011-06-16 Jason Merrill <jason@redhat.com>
1340
1341 PR c++/45399
1342 * lex.c (lex_raw_string): Don't check for embedded NUL.
1343
38fbfaf6
DS
13442011-06-06 Dodji Seketeli <dodji@redhat.com>
1345
1346 PR preprocessor/48532
1347 * directives.c (do_pragma): Don't forget the invocation location
1348 when parsing the pragma name of a namespaced pragma directive.
1349
fc0993ac
JT
13502011-05-29 John Tytgat <John.Tytgat@aaug.net>
1351
1352 * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
1353
ef230b38
UB
13542011-05-22 Uros Bizjak <ubizjak@gmail.com>
1355
1356 PR target/49104
1357 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
1358 is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
1359
e5b0dad8
JK
13602011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1361
1362 * system.h (ENUM_BITFIELD): Remove.
1363
6cfae070
JJ
13642011-04-24 Jakub Jelinek <jakub@redhat.com>
1365
1366 PR preprocessor/48740
1367 * lex.c (lex_raw_string): When raw string ends with
1368 ??) followed by raw prefix and ", ensure it is preprocessed
1369 with ??) rather than ??].
1370
04695783
JM
13712011-04-20 Jim Meyering <meyering@redhat.com>
1372
1373 * files.c (destroy_cpp_file): Remove useless if-before-free.
1374 * init.c (cpp_destroy): Likewise.
1375 * macro.c (replace_args): Likewise.
1376 * pch.c (cpp_valid_state): Likewise.
1377
4489800d
KT
13782011-03-25 Kai Tietz <ktietz@redhat.com>
1379
1380 * files.c (file_hash_eq): Use filename_cmp
1381 instead of strcmp.
1382 (nonexistent_file_hash_eq): Likewise.
1383 (remap_filename): Likewise.
1384 Handle absolute DOS-path,
1385 (append_file_to_dir): Check for IS_DIR_SEPARATOR
1386 instead of slash.
1387 (read_name_map): Likewise.
1388 * linemap.c (linemap_add): Use filename_cmp
1389 instead of strcmp.
1390 * mkdeps.c (apply_vpath): Use filename_ncmp
1391 instead of strncmp.
1392 (deps_restore): Use filename_cmp instead of
1393 strcmp.
1394 * init.c (read_original_directory): Use
1395 IS_DIR_SEPARATOR instead of checking for slash.
1396
f3c33d9d
MM
13972011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
1398
1399 PR preprocessor/48192
1400 * directives.c (do_ifdef): Do not consider conditional macros as
1401 being defined.
1402 (do_ifndef): Ditto.
1403 * expr.c (parse_defined): Ditto.
1404
01956319
RH
14052011-03-18 Richard Henderson <rth@redhat.com>
1406
1407 PR bootstrap/45381
1408 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
1409
c5a62c6f 14102011-11-04 Eric Botcazou <ebotcazou@adacore.com>
19a9ba64 1411 Jakub Jelinek <jakub@redhat.com>
c5a62c6f
EB
1412
1413 PR preprocessor/39213
1414 * directives.c (end_directive): Call _cpp_remove_overlay for deferred
1415 pragmas as well in traditional mode.
1416
0e1a989c
ILT
14172010-11-17 Ian Lance Taylor <iant@google.com>
1418
1419 PR bootstrap/45538
1420 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of
1421 AC_LANG based on ENABLE_BUILD_WITH_CXX.
1422
651a20b5
KT
14232010-11-16 Kai Tietz <kai.tietz@onevision.com>
1424
1425 PR preprocessor/17349
1426 * lex.c (save_comment): Handle in argument passing c++
1427 comments special.
1428
480767a9
ILT
14292010-11-02 Ian Lance Taylor <iant@google.com>
1430
1431 * configure.ac: Use AC_SYS_LARGEFILE.
1432 * configure: Rebuild.
1433 * config.in: Rebuild.
1434
078419c9 14352010-10-19 Basile Starynkevitch <basile@starynkevitch.net>
480767a9 1436
078419c9
BS
1437 * line-map.h (source_location): Remove obsolete comment
1438 mentioning location_s.
1439
d6874138
KT
14402010-09-29 Kai Tietz <kai.tietz@onevision.com>
1441
1442 PR preprocessor/45362
1443 * directives.c (cpp_pop_definition): Make static.
1444 (do_pragma_push_macro): Reworked to store text
1445 definition.
1446 (do_pragma_pop_macro): Add free text definition.
1447 (cpp_push_definition): Removed.
1448 * include/cpplib.h (cpp_push_definition): Removed.
1449 (cpp_pop_definition): Likewise.
1450 * internal.h (def_pragma_macro): Remove member 'value'
1451 and add new members 'definition', 'line',
1452 'syshdr', 'sued' and 'is_undef'.
1453 * pch.c (_cpp_restore_pushed_macros): Rework to work
1454 on text definition and store additional macro flags.
1455 (_cpp_save_pushed_macros): Likewise.
1456
e3339d0f
JM
14572010-09-29 Joseph Myers <joseph@codesourcery.com>
1458
1459 * include/cpplib.h (cpp_options): Rename warn_deprecated,
1460 warn_traditional, warn_long_long and pedantic.
1461 * directives.c (directive_diagnostics, _cpp_handle_directive):
1462 Update names of cpp_options members.
1463 * expr.c (cpp_classify_number, eval_token): Update names of
1464 cpp_options members.
1465 * init.c (cpp_create_reader, post_options): Update names of
1466 cpp_options members.
1467 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
1468 cpp_options members.
1469 * macro.c (parse_params): Update names of cpp_options members.
1470
128465e6
ILT
14712010-09-15 Ian Lance Taylor <iant@google.com>
1472
1473 * init.c: Fix type name in comment.
1474
a69d2520
JJ
14752010-08-31 Jakub Jelinek <jakub@redhat.com>
1476
1477 PR preprocessor/45457
1478 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
1479 needed.
1480 * directives.c (do_ifdef, do_ifndef): Likewise.
1481
707bcb7a
RO
14822010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1483
1484 * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
1485
6f173e52
RH
14862010-08-24 Richard Henderson <rth@redhat.com>
1487
1488 PR bootstrap/45376
1489 * configure.ac (HAVE_SSE4): New check.
1490 * configure, config.in: Rebuild.
1491 * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
1492
789d73cb
RO
14932010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1494
1495 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
1496 etc. on Solaris 2/x86.
1497
246a2fcb
RH
14982010-08-21 Richard Henderson <rth@redhat.com>
1499 Andi Kleen <ak@linux.intel.com>
1500 David S. Miller <davem@davemloft.net>
1501
1502 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
1503 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
1504 (ptrdiff_t): Check via AC_CHECK_TYPE.
1505 * config.in, configure: Rebuild.
1506 * system.h: Include stdint.h, if available.
1507 * lex.c (WORDS_BIGENDIAN): Provide default.
1508 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
1509 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
1510 search_line_sse2, search_line_sse42, init_vectorized_lexer,
1511 search_line_fast): New.
1512 (_cpp_clean_line): Use search_line_fast. Restructure the fast
1513 loop to make it clear when we're leaving the loop. Stay in the
1514 fast loop for non-trigraph '?'.
1515
8e680db5
JJ
15162010-06-11 Jakub Jelinek <jakub@redhat.com>
1517
1518 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
1519 callback.
1520 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
1521 (cpp_macro_definition): Remove const qual from second argument.
1522 * macro.c (enter_macro_context): Call user_builtin_macro callback for
1523 NODE_BUILTIN !NODE_USED macros.
1524 (warn_of_redefinition): Likewise. Remove const qual from second
1525 argument.
1526 (cpp_macro_definition): Likewise.
1527 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
1528 for NODE_BUILTIN !NODE_USED macros.
1529
1cb42611
JM
15302010-06-10 Joseph Myers <joseph@codesourcery.com>
1531
1532 * include/cpplib.h (struct cpp_options): Remove show_column.
1533 * init.c (cpp_create_reader, post_options): Don't set show_column.
1534
ff5dfc48
JR
15352010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
1536
1537 PR bootstrap/44432
1538 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
1539 check that C++ compiler works.
1540 * configure: Regenerate.
1541
a9429e29
LB
15422010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1543
1544 * include/symtab.h (ht_identifier_ptr): New.
1545
c3f247f4
RW
15462010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
1547 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1548
1549 PR bootstrap/42798
1550 * configure.ac: Check for declaration of 'basename(char *)'.
1551 * configure: Regenerate.
1552 * config.in: Regenerate.
1553
2778d766
JM
15542010-04-25 Joseph Myers <joseph@codesourcery.com>
1555
1556 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
1557 * init.c (lang_defaults): Add entries for new language variants.
1558 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
1559 variants.
1560
d8a12e84
MLI
15612010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1562
1563 PR cpp/43195
1564 * files.c (report_missing_guard): Test for #pragma once.
1565
87cf0651
SB
15662010-04-07 Simon Baldwin <simonb@google.com>
1567
1568 * directives.c (do_diagnostic): Add warning reason argument,
1569 call appropriate error reporting function for code.
1570 (directive_diagnostics): Call specific warning functions with
1571 warning reason where appropriate.
1572 (do_error, do_warning, do_pragma_dependency): Add warning reason
1573 argument to do_diagnostic calls.
1574 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
1575 _cpp_create_definition): Call specific warning functions with
1576 warning reason where appropriate.
1577 * Makefile.in: Add new diagnostic functions to gettext translations.
1578 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
1579 to error callback.
1580 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
1581 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
1582 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
1583 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
1584 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
1585 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
1586 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
1587 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
1588 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
1589 warning reason codes.
1590 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
1591 cpp_warning_with_line, cpp_pedwarning_with_line,
1592 cpp_warning_with_line_syshdr): New specific error reporting functions.
1593 * pch.c (cpp_valid_state): Call specific warning functions with
1594 warning reason where appropriate.
1595 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
1596 diagnostic handlers.
1597 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
1598 cpp_warning_with_line, cpp_pedwarning_with_line,
1599 cpp_warning_with_line_syshdr): New specific error reporting functions.
1600 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
1601 specific warning functions with warning reason where appropriate.
1602 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
1603 warn_about_normalization, lex_identifier_intern, lex_identifier,
1604 _cpp_lex_direct): Ditto.
1605 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
1606 narrow_str_to_charconst): Ditto.
1607
d947ada0
JJ
16082010-04-06 Jakub Jelinek <jakub@redhat.com>
1609
1610 PR preprocessor/43642
1611 * lex.c (lex_raw_string): Change type of TYPE variable to
1612 unsigned char.
1613
4d9e8446
RW
16142010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1615
1616 * aclocal.m4: Regenerate.
1617
52150625
JM
16182010-03-29 Jason Merrill <jason@redhat.com>
1619
00a81b8b
JM
1620 More N3077 raw string changes
1621 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
1622 strings.
1623 * lex.c (bufring_append): Split out from...
1624 (lex_raw_string): ...here. Undo trigraph and line splicing
1625 transformations. Do process line notes in multi-line literals.
1626 (_cpp_process_line_notes): Ignore notes that were already handled.
1627
52150625
JM
1628 Some raw string changes from N3077
1629 * charset.c (cpp_interpret_string): Change inner delimiters to ().
1630 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
1631
709d7160
JJ
16322010-02-11 Jakub Jelinek <jakub@redhat.com>
1633
1634 * init.c (read_original_filename): Don't call read_original_directory
1635 if _cpp_handle_directive returns 0.
1636
dadab4fd
JM
16372010-01-01 Joseph Myers <joseph@codesourcery.com>
1638
1639 PR preprocessor/41947
1640 * expr.c (cpp_classify_number): Give error for hexadecimal
1641 floating-point constant with no digits before or after point.
1642
3de8a540
AC
16432009-11-20 Arnaud Charlet <charlet@adacore.com>
1644
1645 * macro.c (enter_macro_context): Call cb.used callback if defined.
1646 * directives.c (do_idef, do_ifndef): Ditto.
1647 * include/cpplib.h (struct cpp_callbacks): Add used callback.
1648
17e7cb85
KT
16492009-11-11 Kai Tietz <kai.tietz@onevision.com>
1650
1651 * directives.c (do_pragma_push_macro): New pragma handler.
1652 (do_pragma_pop_macro): Likewise.
1653 (_cpp_init_internal_pragmas): Add push_macro and
1654 pop_macro handler to internal pragmas.
1655 (lex_macro_node_from_str): Removed.
1656 (cpp_push_definition): Replace lex_macro_node_from_str
1657 by _cpp_lex_identifier.
1658 (cpp_pop_definition): Likewise.
1659 * internal.h (_cpp_lex_identifier): New prototype.
1660 (def_pragma_macro): New structure.
1661 (cpp_reader): New member pushed_macros.
1662 * lex.c (_cpp_lex_identifier): New function.
1663 (lex_identifier_intern): New function.
1664 * init.c (cpp_create_reader): Initialize pushed_macros
1665 member.
1666 (cpp_destroy): Free elements in pushed_macros member.
1667 * pch.c (_cpp_save_pushed_macros): New function.
1668 (_cpp_restore_pushed_macros): Likewise.
1669 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
1670 (cpp_read_state): Use _cpp_restore_pushed_macros.
1671
2c6e3f55
JJ
16722009-10-19 Jakub Jelinek <jakub@redhat.com>
1673
1674 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
1675 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
1676 and char32_cset_desc.
1677 (converter_for_type): Handle CPP_UTF8STRING.
1678 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
1679 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
1680 (parse_include): Reject raw strings.
1681 * include/cpplib.h (CPP_UTF8STRING): New token type.
1682 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
1683 * lex.c (lex_raw_string): New function.
1684 (lex_string): Handle u8 string literals, call lex_raw_string
1685 for raw string literals.
1686 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
1687 sequences.
1688 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
1689
96c169e1
JJ
16902009-10-14 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR preprocessor/41543
1693 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
1694 * line-map.c (linemap_init): Initialize highest_location and
1695 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
1696
30c99a9e
JM
16972009-10-09 Jason Merrill <jason@redhat.com>
1698
1699 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
1700
2214382c
NV
17012009-10-09 Neil Vachharajani <nvachhar@google.com>
1702
1703 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
1704 sccs.
1705
e02222d2
LR
17062009-09-23 Loren J. Rittle <ljrittle@acm.org>
1707
1708 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
1709 * configure: Rebuilt.
1710
9a8a2b7a
RG
17112009-09-22 Richard Guenther <rguenther@suse.de>
1712
1713 PR pch/38987
1714 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
1715
74dc6a11
CD
17162009-09-18 Chris Demetriou <cgd@google.com>
1717
1718 PR preprocessor/28435:
1719 * include/cpplib.h (struct cpp_options): Add new member
1720 deps.need_preprocessor_output.
1721 * files.c (open_file_failed): If preprocessor output is needed
1722 always report an error.
1723
933608b7
KT
17242009-09-13 Kai Tietz <kai.tietz@onevision.com>
1725
1726 * configure.ac: Set for i?86-w64-mingw*
1727 need_64bit_hwint to yes.
1728 * configure: Regenerated.
1729
86373e7e
JM
17302009-09-10 Jason Merrill <jason@redhat.com>
1731
1732 * directives.c (cpp_define): constify.
1733
fd2ab214
ILT
17342009-09-02 Ian Lance Taylor <iant@google.com>
1735
1736 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
1737
df58e648
RW
17382009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1739
1740 * configure.ac (AC_PREREQ): Bump to 2.64.
1741
5213506e
RW
17422009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1743
1744 * aclocal.m4: Regenerate.
1745 * config.in: Regenerate.
1746 * configure: Regenerate.
1747
709a22df
TT
17482009-08-17 Tom Tromey <tromey@redhat.com>
1749
1750 PR preprocessor/41067:
1751 * charset.c (convert_escape): Add missing ":" to error text.
1752
0c539b47
DR
17532009-07-27 Douglas B Rupp <rupp@gnat.com>
1754
1755 * include/cpplib.h (INO_T_CPP): New macro.
1756 (struct cpp_dir): Use it.
1757
2b69c841
JQ
17582009-07-20 Jerry Quinn <jlquinn@optonline.net>
1759
1760 PR regression/40800
1761 * configure.ac: Use = instead of == for testing
1762 ENABLE_BUILD_WITH_CXX.
1763 * configure: Rebuild.
1764
f1bf410c
JQ
17652009-07-17 Jerry Quinn <jlquinn@optonline.net>
1766
1767 * directives.c (do_linemarker, do_line): Use CPP_STRING for
1768 ignored enum value.
1769 * files.c (find_file_in_dir): Add cast from void* to char*.
1770 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
1771 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
1772 warnings.
1773 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
1774 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
1775 COMPILER_FLAGS): New.
1776 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
1777 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
1778 instead of ALL_CFLAGS.
1779 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
1780 from other warnings. Add -Wc++-compat to C-specific warnings.
1781 Check for --enable-build-with-cxx. Set and substitute
1782 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
1783 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
1784 AC_CHECK_HEADERS.
1785 * configure: Rebuild.
1786 * include/cpp-id-data.h: Remove extern "C".
1787 * include/line-map.h: Likewise.
1788 * include/mkdeps.h: Likewise.
1789 * include/symtab.h: Likewise.
1790 * internal.h: Likewise.
1791
a28fbdba
MLI
17922009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1793
1794 * directives.c (parse_include): Add location argument. Update all
1795 calls.
1796 (parse_answer): Likewise.
1797 (do_include_common): Error with exact location.
1798 (parse_assertion): Likewise.
1799
b506a5a2
MLI
18002009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1801
1802 * expr.c (num_div_op): Take explicit location.
1803
7d8847a4
ILT
18042009-06-17 Ian Lance Taylor <iant@google.com>
1805
1806 * include/cpplib.h (progname): Don't declare.
1807
3d8b2a98
ILT
18082009-06-12 Ian Lance Taylor <iant@google.com>
1809
1810 * include/cpplib.h (struct cpp_options): Add
1811 warn_cxx_operator_names field.
1812 (NODE_WARN_OPERATOR): Define.
1813 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
1814 type to 6 bits.
1815 * init.c (mark_named_operators): Add flags parameter.
1816 (cpp_post_options): Pick flags value to pass to
1817 mark_named_operators.
1818 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
1819 identifier is an operator name in C++.
1820
e74fe492
AH
18212009-06-01 Aldy Hernandez <aldyh@redhat.com>
1822
1823 * include/line-map.h (LAST_SOURCE_COLUMN): New.
1824
4851089f
ILT
18252009-06-01 Ian Lance Taylor <iant@google.com>
1826
1827 * include/cpp-id-data.h: Add extern "C".
1828 * include/line-map.h: Likewise.
1829 * include/mkdeps.h: Likewise.
1830 * include/symtab.h: Likewise.
1831 * internal.h: Likewise.
1832
7e5487a2
ILT
18332009-05-15 Ian Lance Taylor <iant@google.com>
1834
1835 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
1836 builtin_type. Change all uses.
1837
00b0c19b
MLI
18382009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1839
1840 PR cpp/36674
1841 * directives (do_linemarker): Compensate for the increment in
1842 location that occurs when we reach the end of line.
1843 * files (_cpp_stack_include): Mention _cpp_find_file in the
1844 comment.
1845
9a0c6187
JM
18462009-05-10 Joseph Myers <joseph@codesourcery.com>
1847
1848 * include/cpplib.h (enum cpp_token_fld_kind): Add
1849 CPP_TOKEN_FLD_TOKEN_NO.
1850 (struct cpp_macro_arg, struct cpp_identifier): Define.
1851 (union cpp_token_u): Use struct cpp_identifier for identifiers.
1852 Use struct cpp_macro_arg for macro arguments. Add token_no for
1853 CPP_PASTE token numbers.
1854 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
1855 do_pragma_poison, parse_assertion): Use val.node.node in place of
1856 val.node.
1857 * expr.c (parse_defined, eval_token): Use val.node.node in place
1858 of val.node.
1859 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
1860 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
1861 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
1862 place of val.arg_no. Use val.node.node in place of val.node.
1863 * macro.c (replace_args, cpp_get_token, parse_params,
1864 lex_expansion_token, create_iso_definition, cpp_macro_definition):
1865 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
1866 Use val.node.node in place of val.node.
1867
9e322bc1
JM
18682009-05-03 Joseph Myers <joseph@codesourcery.com>
1869
1870 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
1871 UTF-8 sequences.
1872
f88d0772
JM
18732009-04-25 Joseph Myers <joseph@codesourcery.com>
1874
1875 PR preprocessor/39559
1876 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
1877 constants larger than intmax_t in C99 mode.
1878
d1b38208
TG
18792009-04-21 Taras Glek <tglek@mozilla.com>
1880
1881 * include/cpp-id-data.h: Update GTY annotations to new syntax.
1882 * include/cpplib.h: Likewise.
1883 * include/line-map.h: Likewise.
1884 * include/symtab.h: Likewise.
1885
cfc93532
MLI
18862009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1887
1888 PR c++/14875
1889 * lex.c (cpp_type2name): Take a flags parameter. Call
1890 cpp_named_operator2name for named operators and cpp_digraph2name
1891 for digraphs.
1892 (cpp_digraph2name): New.
1893 (cpp_spell_token): Use it.
1894 (cpp_output_token): Likewise.
1895 * include/cpplib.h (cpp_type2name): Update declaration.
1896 * init.c (cpp_named_operator2name): New.
1897 * internal.h (cpp_named_operator2name): Declare.
1898
9c650d90
MLI
18992009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1900
1901 PR c++/13358
1902 * init.c (cpp_create_reader): Wlong_long is disabled by default.
1903 * expr.c (cpp_classify_number): Give different messages for C and
1904 C++ front-ends.
1905
aa508502
JM
19062009-04-19 Joseph Myers <joseph@codesourcery.com>
1907
1908 PR preprocessor/20078
1909 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
1910 field.
1911 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
1912 (struct cpp_token): Change flags to unsigned short.
1913 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
1914 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
1915 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
1916 tokens.
1917 * macro.c (macro_real_token_count): New.
1918 (enter_macro_context, replace_args): Use macro_real_token_count.
1919 (create_iso_definition): Record whitespace surrounding and digraph
1920 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
1921 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
1922 multiple consecutive ## tokens.
1923 (_cpp_create_definition): Initialize extra_tokens.
1924 (cpp_macro_definition): Use macro_real_token_count.
1925
61cc8223
JM
19262009-04-18 Joseph Myers <joseph@codesourcery.com>
1927
1928 * directives.c (parse_include): Pass true to check_eol.
1929
c7f9c0b9
JM
19302009-04-18 Joseph Myers <joseph@codesourcery.com>
1931
1932 PR preprocessor/39646
1933 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
1934 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
1935 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
1936 place of LC_RENAME.
1937
a5cb563b
JM
19382009-04-18 Joseph Myers <joseph@codesourcery.com>
1939
1940 PR preprocessor/39647
1941 * directives.c (check_eol): Add parameter expand.
1942 (do_undef, parse_include, do_line, do_linemarker, do_ident,
1943 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
1944 do_else, do_endif, do_assert, do_unassert): All callers changed.
1945 Pass true from do_line, false elsewhere.
1946
18f41a1b
JM
19472009-04-12 Joseph Myers <joseph@codesourcery.com>
1948
1949 PR preprocessor/31869
1950 * macro.c (stringify_arg): Handle NULL source token in padding
1951 token where previous padding token did not have source token with
1952 preceding whitespace.
1953
748086b7
JJ
19542009-04-09 Jakub Jelinek <jakub@redhat.com>
1955
1956 * Makefile.in: Change copyright header to refer to version
1957 3 of the GNU General Public License and to point readers at the
1958 COPYING3 file and the FSF's license web page.
1959 * charset.c: Likewise.
1960 * directives-only.c: Likewise.
1961 * directives.c: Likewise.
1962 * errors.c: Likewise.
1963 * expr.c: Likewise.
1964 * files.c: Likewise.
1965 * identifiers.c: Likewise.
1966 * include/cpp-id-data.h: Likewise.
1967 * include/cpplib.h: Likewise.
1968 * include/line-map.h: Likewise.
1969 * include/mkdeps.h: Likewise.
1970 * include/symtab.h: Likewise.
1971 * init.c: Likewise.
1972 * internal.h: Likewise.
1973 * lex.c: Likewise.
1974 * line-map.c: Likewise.
1975 * macro.c: Likewise.
1976 * makeucnid.c: Likewise.
1977 * mkdeps.c: Likewise.
1978 * pch.c: Likewise.
1979 * symtab.c: Likewise.
1980 * system.h: Likewise.
1981 * traditional.c: Likewise.
1982 * ucnid.tab: Likewise.
1983 * ucnid.h: Regenerate.
1984
eec49116
JJ
19852009-04-01 Janis Johnson <janis187@us.ibm.com>
1986
839a3b8a
JJ
1987 PR c/39027
1988 * include/cpplib.h (CPP_N_DEFAULT): Define.
1989 * expr.c (interpret_float_suffix): Recognize d or D for double,
1990 return new value for default.
1991 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
1992
eec49116
JJ
1993 PR c/33466
1994 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
1995 letters from decimal float and fixed-point suffixes.
1996
47580d22
JM
19972009-03-31 Joseph Myers <joseph@codesourcery.com>
1998
1999 PR preprocessor/15638
2000 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
2001 invalid PCH.
2002 (open_file_failed): Make error for missing file fatal.
2003 * include/cpplib.h (CPP_DL_FATAL): Define.
2004
5a2df0fa
SV
20052009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
2006
2007 PR preprocessor/31932:
2008 * internal.h: Don't mention HAVE_ICONV_H.
2009 * configure, config.in: Rebuild.
2010 * configure.ac: Don't check for iconv.h.
2011
c1a8a3c6
TT
20122009-03-30 Tom Tromey <tromey@redhat.com>
2013
2014 PR preprocessor/39512:
2015 * line-map.c (linemap_init): Initialize 'reallocator' field.
2016
a37a7b8a
JJ
20172009-03-30 Jakub Jelinek <jakub@redhat.com>
2018
2019 PR target/39558
2020 * macro.c (cpp_get_token): If macro_to_expand returns NULL
2021 and used some tokens, add CPP_PADDING before next token.
2022
148e4216
JM
20232009-03-29 Joseph Myers <joseph@codesourcery.com>
2024
2025 PR preprocessor/34695
2026 * makedepend.c: Remove.
2027 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
2028 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
2029 * directives.c (cpp_errors): Remove.
2030 * errors.c (print_location, _cpp_begin_message, v_message):
2031 Remove.
2032 (cpp_error, cpp_error_with_line): Always use error callback.
2033 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
2034 * include/cpplib.h (cpp_options): Remove pedantic_errors,
2035 inhibit_warnings, warn_system_headers, inhibit_errors,
2036 warnings_are_errors, client_diagnostic.
2037 (cpp_callbacks): Add extra arguments to error callback; make it
2038 return bool.
2039 (cpp_finish): Return void.
2040 (cpp_destroy): Remove inaccurate comment about return value.
2041 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
2042 (CPP_DL_NOTE): Define.
2043 * include/line-map.h (linemap_print_containing_files): Remove.
2044 * init.c (cpp_finish): Do not check for or return number of
2045 errors.
2046 * internal.h (cpp_reader): Remove errors field.
2047 * line-map.c (linemap_print_containing_files): Remove.
2048 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
2049 about previous definition. Only emit it if previous diagnostic
2050 was emitted.
2051
f1450211
JM
20522009-03-28 Joseph Myers <joseph@codesourcery.com>
2053
2054 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
2055 mkinstalldirs.
2056
8f5929e1
JJ
20572009-03-18 Jakub Jelinek <jakub@redhat.com>
2058
2059 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
2060
4bb09c26
JM
20612009-02-21 Joseph Myers <joseph@codesourcery.com>
2062
2063 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
2064 header name.
2065 (_cpp_lex_direct): Handle this.
2066
68c9ab45
RG
20672009-02-15 Richard Guenther <rguenther@suse.de>
2068
2069 Revert last change.
2070
601b3e1a
RG
20712009-02-13 Richard Guenther <rguenther@suse.de>
2072
2073 * configure.ac: Enable LFS.
2074 * configure: Re-generate.
2075 * config.in: Likewise.
2076
fc0cd180
BE
20772009-01-05 Ben Elliston <bje@au.ibm.com>
2078
2079 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
2080 (.po.pox): Likewise.
2081 (po/$(PACKAGE).pot): Likewise.
2082
db89a3be
AO
20832008-12-10 Alexandre Oliva <aoliva@redhat.com>
2084
2085 PR target/37033
2086 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
2087 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
2088
cc955282
JM
20892008-11-29 Joseph Myers <joseph@codesourcery.com>
2090
2091 * lex.c (cpp_token_len): Use 6 as default length.
2092
47960aaf
MLI
20932008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
2094
2095 * expr.c (struct op): Add location.
2096 (_cpp_parse_expr): Propagate locations throught the stack
2097 of expressions.
2098 (reduce): Likewise.
2099 (check_promotion): Use explicit location in errors.
2100
631d0d36
MG
21012008-10-05 Matthew Gingell <gingell@adacore.com>
2102 Arnaud Charlet <charlet@adacore.com>
2103
2104 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
2105 (cpp_get_comments): New function.
2106 * internal.h (struct cpp_reader): Add comments field.
2107 * init.c (cpp_destroy): Free comments.
2108 * lex.c (store_comment, cpp_get_comments): New functions.
2109 (comments): New struct.
2110 (save_comment): Store comments in comments struct.
2111
c047ce93
SB
21122008-09-18 Simon Baldwin <simonb@google.com>
2113
2114 * include/cpplib.h (struct cpp_options): Add new boolean flag
2115 warn_builtin_macro_redefined.
2116 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
2117 * (struct builtin_operator): Split out from previous struct builtin,
2118 enhance extra const correctness.
2119 * (struct builtin_macro): Split out from previous struct builtin, add
2120 new always_warn_if_redefined flag, enhance const correctness.
2121 * (mark_named_operators): Use struct builtin_operator.
2122 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
2123 to builtins selectively.
2124 * macro.c (warn_of_redefinition): Return false if a builtin macro
2125 is not flagged with NODE_WARN.
2126
affa55c6
JJ
21272008-07-31 Jakub Jelinek <jakub@redhat.com>
2128
2129 PR preprocessor/36649
2130 * files.c (struct report_missing_guard_data): New type.
2131 (report_missing_guard): Put paths into an array instead of printing
2132 them right away. Return 1 rather than 0.
2133 (report_missing_guard_cmp): New function.
2134 (_cpp_report_missing_guards): Sort and print paths gathered by
2135 report_missing_guard callback.
2136
3b8f20a1
MLI
21372008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2138
2139 PR 28079
2140 * directives.c (strtolinenum): Handle overflow.
2141 (do_line): Give a warning if line number overflowed.
2142 (do_linemarker): Update call to strtolinenum.
2143
1bb64668
MLI
21442008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2145
2146 * include/line-map.h (linenum_type): New typedef.
2147 (struct line_map): Use it.
2148 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
2149 (SOURCE_COLUMN): Likewise.
2150 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
2151 source_location values in a variable of type linenum_type.
2152 * directives.c (struct if_stack): Use linenum_type.
2153 (strtoul_for_line): Rename as strtolinenum.
2154 (do_line): Use linenum_type.
2155 (do_linemarker): Use linenum_type and strtolinenum.
2156 (_cpp_do_file_change): Use linenum_t.
2157 * line-map.c (linemap_add): Likewise.
2158 (linemap_line_start): Likewise.
2159 * traditional.c (struct fun_macro): 'line' is a source_location.
2160 * errors.c (print_location): Use linenum_type.
2161 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
2162 * internal.h (CPP_INCREMENT_LINE): Likewise.
2163 * lex.c (_cpp_skip_block_comment): Use source_location.
19a9ba64 2164
5950c3c9
BE
21652008-07-14 Ben Elliston <bje@au.ibm.com>
2166
2167 * include/cpplib.h (NODE_CONDITIONAL): New.
2168 (struct cpp_callbacks): New macro_to_expand field.
2169 (struct cpp_hashnode): Adjust size of flags and type fields.
2170 (cpp_peek_token): Prototype.
2171 * lex.c (cpp_peek_token): New function.
2172 (_cpp_temp_token): Protect pre-existing lookaheads.
2173 * macro.c (cpp_get_token): Expand any conditional macros.
2174 (_cpp_backup_tokens_direct): New.
2175 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
2176 (warn_of_redefinition): Silently allow redefined conditional
2177 macros.
2178 (_cpp_create_definition): Remove the conditional flag when a user
2179 defines one of the conditional macros.
2180 * internal.h (_cpp_backup_tokens_direct): New prototype.
2181
e85edc9e
AH
21822008-06-13 Andrew Haley <aph@redhat.com>
2183
2184 PR preprocessor/33305
2185 * macro.c (replace_args): Print a warning for empty macro
2186 arguments in C89 and C++.
2187
18c04407
RW
21882008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2189
2190 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
2191 * configure: Regenerate.
2192
2d09b640
RW
21932008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2194
2195 * Makefile.in (datarootdir): New variable.
2196
0b7c73cc
L
21972008-06-12 H.J. Lu <hongjiu.lu@intel.com>
2198
2199 PR preprocessor/36479
2200 * charset.c (cpp_interpret_string_notranslate): Also set
2201 narrow_cset_desc.width.
2202
cd985f66
JM
22032008-06-07 Joseph Myers <joseph@codesourcery.com>
2204
2205 * configure.ac (parisc*64*-*-*): Remove.
2206 * configure: Regenerate.
2207
d750887f
TT
22082008-05-30 Tom Tromey <tromey@redhat.com>
2209
2210 PR preprocessor/36320:
2211 * internal.h (_cpp_parse_expr): Update.
2212 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
2213 messages.
2214 * directives.c (do_if): Update.
2215 (do_elif): Require expression if processing group.
2216
c100de59
DS
22172008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
2218
2219 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
2220
5d6342eb
TT
22212008-05-21 Tom Tromey <tromey@redhat.com>
2222
2223 PR preprocessor/27777:
2224 * lex.c (cpp_output_line_to_string): New function.
2225 * internal.h (_cpp_begin_message): Don't declare.
2226 * errors.c (_cpp_begin_message): Now static.
2227 * include/cpplib.h (cpp_output_line_to_string): Declare.
2228 * directives.c (do_diagnostic): Rewrote. Use
2229 cpp_output_line_to_string. Don't use _cpp_begin_message.
2230
dae4174e
TT
22312008-05-21 Tom Tromey <tromey@redhat.com>
2232
2233 * include/symtab.h (HT_ALLOCED): Remove.
2234 (ht_purge): Declare.
2235 * symtab.c (DELETED): New define.
2236 (ht_lookup): Update comment.
2237 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
2238 code. Use subobject allocator for strings, if it exists.
2239 (ht_expand): Handle deleted entries.
2240 (ht_forall): Likewise.
2241 (ht_purge): New function.
2242 (ht_dump_statistics): Print deletion statistics.
2243
899015a0
TT
22442008-05-13 Tom Tromey <tromey@redhat.com>
2245
2246 PR preprocessor/22168:
2247 * include/cpplib.h (struct cpp_options) <objc>: Update
2248 documentation.
2249 * expr.c (eval_token): Warn for use of assertions.
2250 * directives.c (directive_diagnostics): Warn about extensions.
2251 (DEPRECATED): New define.
2252 (DIRECTIVE_TABLE): Use it.
2253
71c10038
TT
22542008-05-06 Tom Tromey <tromey@redhat.com>
2255
2256 PR preprocessor/35313, PR preprocessor/36088:
2257 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
2258 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
2259
2bd0fe3d
DM
22602008-05-04 David S. Miller <davem@davemloft.net>
2261
2262 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
2263 * configure: Regenerate.
2264
28f68625
DF
22652008-04-22 Daniel Franke <franke.daniel@gmail.com>
2266
2267 * include/cpplib.h (cpp_define_formatted): New.
2268 * directives.c (cpp_define_formatted): New.
2269
688e7a53
TT
22702008-04-21 Tom Tromey <tromey@redhat.com>
2271
2272 PR libcpp/33415:
2273 * charset.c (_cpp_convert_input): Add buffer_start argument.
2274 Ignore UTF-8 BOM if seen.
2275 * internal.h (_cpp_convert_input): Add argument.
2276 * files.c (struct _cpp_file) <buffer_start>: New field.
2277 (destroy_cpp_file): Free buffer_start, not buffer.
2278 (_cpp_pop_file_buffer): Likewise.
2279 (read_file_guts): Update.
2280
b6baa67d
KVH
22812008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2282
2283 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
2284 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
2285 (struct cpp_options): Added uliterals.
2286 (cpp_interpret_string): Update prototype.
2287 (cpp_interpret_string_notranslate): Idem.
2288 * charset.c (init_iconv_desc): New width member in cset_converter.
2289 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
2290 (convert_ucn): Idem.
2291 (emit_numeric_escape): Idem.
2292 (convert_hex): Idem.
2293 (convert_oct): Idem.
2294 (convert_escape): Idem.
2295 (converter_for_type): New function.
2296 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
2297 (cpp_interpret_string_notranslate): Match changed prototype.
2298 (wide_str_to_charconst): Use converter_for_type.
2299 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
2300 * directives.c (linemarker_dir): Macro U changed to UC.
2301 (parse_include): Idem.
2302 (register_pragma_1): Idem.
2303 (restore_registered_pragmas): Idem.
2304 (get__Pragma_string): Support CPP_STRING{16,32}.
2305 * expr.c (eval_token): Support CPP_CHAR{16,32}.
2306 * init.c (struct lang_flags): Added uliterals.
2307 (lang_defaults): Idem.
2308 * internal.h (struct cset_converter) <width>: New field.
2309 (struct cpp_reader) <char16_cset_desc>: Idem.
2310 (struct cpp_reader) <char32_cset_desc>: Idem.
2311 * lex.c (digraph_spellings): Macro U changed to UC.
2312 (OP, TK): Idem.
2313 (lex_string): Add support for u'...', U'...', u"..." and U"...".
2314 (_cpp_lex_direct): Idem.
2315 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
2316 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
2317
deb984e6
PB
23182008-04-18 Paolo Bonzini <bonzini@gnu.org>
2319
2320 PR bootstrap/35457
2321 * aclocal.m4: Regenerate.
2322 * configure: Regenerate.
2323
bf048bea
TT
23242008-04-17 Tom Tromey <tromey@redhat.com>
2325
2326 PR libcpp/34866:
2327 * errors.c (cpp_error): Don't reference a token before the start
2328 of the current run.
2329
7f27b0f8
TT
23302008-04-16 Tom Tromey <tromey@redhat.com>
2331
2332 * Makefile.in (TAGS_SOURCES): New variable.
2333 (TAGS): New target.
2334
a1fcb9a1
KK
23352008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
2336
2337 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
2338 and shbe-*-*.
2339 * configure: Rebuilt.
2340
93d45d9e
JM
23412008-04-02 Joseph Myers <joseph@codesourcery.com>
2342
2343 * include/cpplib.h (struct cpp_callbacks): Add used_define,
2344 used_undef and before_define.
2345 (NODE_USED): Define.
2346 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
2347 do_ifndef, cpp_pop_definition): Handle new flag and use new
2348 callbacks.
2349 * expr.c (parse_defined): Handle new flag and use new callbacks.
2350 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
2351 flag and use new callbacks.
2352
d4c32e1d
JJ
23532008-04-01 Jakub Jelinek <jakub@redhat.com>
2354
2355 PR pch/13675
2356 * files.c (struct _cpp_file): Remove pch field.
2357 (pch_open_file): Don't set file->pch, just file->pchname.
2358 (should_stack_file): After pfile->cb.read_pch call
2359 free pchname and clear pchname, don't close file->fd.
2360 Test file->pchname instead of file->pch. Don't close fd after cb.
2361 (_cpp_stack_include): Test file->pchname instead of file->pch.
2362
161031e3
TT
23632008-03-28 Tom Tromey <tromey@redhat.com>
2364
2365 * Makefile.in (POSTCOMPILE): New variable.
2366 (.c.o): Use it.
2367
14ccf800
TT
23682008-03-13 Tom Tromey <tromey@redhat.com>
2369
2370 PR libcpp/35322:
2371 * directives.c (destringize_and_run): Set pfile->directive.
2372
830465c6
MM
23732008-03-06 Markus Milleder <markus.milleder@generali.at>
2374
2375 PR preprocessor/35458
2376 * mkdeps.c (munge): Quote '#' with a '\'.
2377
d482a073
RW
23782008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2379
2380 PR preprocessor/35379
2381 * mkdeps.c (deps_write): Ensure the first target always appears
2382 in the first column, without leading backslash newline. Avoid
2383 some more extra whitespace.
2384
185a6cc1
TS
23852008-02-25 Thiemo Seufer <ths@mips.com>
2386
d482a073 2387 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 2388
2bf41bf0
TT
23892008-02-19 Tom Tromey <tromey@redhat.com>
2390
2391 * traditional.c (lex_identifier): Use CPP_HASHNODE.
2392 * lex.c (lex_identifier): Use CPP_HASHNODE.
2393 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
2394 do-while.
2395 * identifiers.c (alloc_node): Change return type.
2396 (_cpp_init_hashtable): Don't cast 'alloc_node'.
2397 (proxy_assertion_broken): New declaration.
2398 (cpp_forall_identifiers): Move comment.
2399 * line-map.c (linemap_add): Comment fix.
2400 (linemap_line_start): Indentation fix.
2401
765d600a
JJ
24022008-01-25 Jakub Jelinek <jakub@redhat.com>
2403
2404 PR preprocessor/34692
2405 * macro.c (collect_args): Add pragma_buff argument. Push
2406 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
2407 than into arguments. Reset prevent_expansion and parsing_args
2408 state at CPP_PRAGMA_EOL/CPP_EOF.
2409 (funlike_invocation_p): Add pragma_buff argument, pass it through
2410 to collect_args.
2411 (enter_macro_context): Add result argument. Adjust
2412 funlike_invocation_p caller. Emit all deferred pragma tokens
2413 gathered during collect_args before the expansion, add a padding
2414 token. Return 2 instead of 1 if any pragma tokens were prepended.
2415 (cpp_get_token): If enter_macro_context returns 2, don't return
2416 a padding token, instead cycle to grab CPP_PRAGMA token.
2417 * directives.c (_cpp_handle_directive): If was_parsing_args
2418 in deferred pragma, leave parsing_args and prevent_expansion as is.
2419
ec46053b
TT
24202008-01-22 Tom Tromey <tromey@redhat.com>
2421
765d600a 2422 PR c++/34859
ec46053b
TT
2423 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
2424 __STDC_CONSTANT_MACROS.
2425
681c6ab0
FF
24262008-01-07 Fred Fish <fnf@specifix.com>
2427
765d600a 2428 PR preprocessor/30363
681c6ab0 2429 * traditional.c (replace_args_and_push): Add local variable
19a9ba64 2430 cxtquote, calculate the replacement text size assuming a
681c6ab0
FF
2431 worst case of every input character quoted with backslash,
2432 and properly handle output quoting of quote characters in
2433 actual arguments used in function-like macros.
2434
33ae4837
TT
24352008-01-03 Tom Tromey <tromey@redhat.com>
2436
765d600a 2437 PR preprocessor/34602
33ae4837
TT
2438 * directives.c (do_line): Don't try to spell EOF token.
2439 (do_linemarker): Add comment.
2440
675575f5
DD
24412007-12-11 DJ Delorie <dj@redhat.com>
2442
2443 * charset.c (convert_using_iconv): Close out any shift states,
2444 returning to the initial state.
2445
97f6bd40
TT
24462007-12-06 Tom Tromey <tromey@redhat.com>
2447
765d600a 2448 PR c/29172
97f6bd40
TT
2449 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
2450 type.
2451 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
2452 * files.c (FILE_HASH_POOL_SIZE): New macro.
2453 (struct file_hash_entry_pool): New.
2454 (destroy_all_cpp_files): New function.
2455 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
2456 (new_file_hash_entry): Update.
2457 (free_file_hash_entries): New function.
2458 (_cpp_cleanup_files): Call free_file_hash_entries and
2459 destroy_all_cpp_files.
2460 (cpp_clear_file_cache): New function.
2461 * include/cpplib.h (cpp_clear_file_cache): Declare.
2462
d56a25e1
TT
24632007-12-03 Tom Tromey <tromey@redhat.com>
2464
765d600a 2465 PR preprocessor/34288
d56a25e1
TT
2466 * configure.ac, config.in: Rebuilt.
2467 * configure.ac: Check for ssize_t.
2468
607f74e9
TT
24692007-11-30 Tom Tromey <tromey@redhat.com>
2470
765d600a 2471 PR preprocessor/32868
607f74e9
TT
2472 * macro.c (_cpp_create_definition): Special case
2473 __STDC_FORMAT_MACROS.
2474
b0f4807f
MM
24752007-11-16 Michael Matz <matz@suse.de>
2476
2477 * files.c (search_path_head): Fix check for absolute paths.
2478
f1e20710
TT
24792007-11-11 Tom Tromey <tromey@redhat.com>
2480
765d600a 2481 PR c++/17557
f1e20710
TT
2482 * include/cpplib.h (cpp_included_before): Declare.
2483 * files.c (struct file_hash_entry) <location>: New field.
2484 (_cpp_find_file): Initialize new field.
2485 (make_cpp_dir): Likewise.
2486 (cpp_included_before): New function.
2487
f373b44d
TT
24882007-11-01 Tom Tromey <tromey@redhat.com>
2489
765d600a 2490 PR preprocessor/30805
f373b44d
TT
2491 * macro.c (paste_tokens): Handle padding token.
2492 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
2493
5b9a40df
TT
24942007-10-31 Tom Tromey <tromey@redhat.com>
2495
765d600a 2496 PR preprocessor/30786
5b9a40df
TT
2497 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
2498 * directives.c (_cpp_do__Pragma): Return error status.
2499 * internal.h (_cpp_do__Pragma): Update.
2500 * directives.c (get__Pragma_string): Back up if EOF seen.
2501
5ffeb913
TT
25022007-09-06 Tom Tromey <tromey@redhat.com>
2503
2504 * internal.h (struct cpp_reader) <invocation_location>: New
2505 field.
2506 (struct cpp_reader) <set_invocation_location>: Likewise.
2507 * init.c (cpp_set_line_map): New function.
2508 * line-map.c (linemap_add): Use linemap's allocator.
2509 * include/line-map.h (GTY): Define.
2510 (line_map_realloc): New typedef.
2511 (struct line_map): Mark with GTY.
2512 (struct line_maps): Likewise.
2513 (struct line_maps) <maps>: Likewise.
2514 (struct line_maps) <reallocator>: New field.
2515 * include/symtab.h (GTY): Conditionally define.
2516 * include/cpplib.h (cpp_set_line_map): Declare.
2517 (cpp_get_token_with_location): Declare.
2518 * macro.c (cpp_get_token): Set invocation_location on the reader.
2519 (cpp_get_token_with_location): New function.
2520
ac6b1c67
CF
25212007-08-30 Chao-ying Fu <fu@mips.com>
2522
2523 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
2524 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
2525 (cpp_classify_number): Support decimal fixed-point constants without
2526 exponents.
2527 Warn about fixed-point constants when -pedantic.
2528 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
2529 comments to support fixed-point values.
2530 (CPP_N_FRACT, CPP_N_ACCUM): Define.
2531
cda5e672
TT
25322007-08-18 Tom Tromey <tromey@redhat.com>
2533
765d600a 2534 PR preprocessor/32974
cda5e672
TT
2535 * directives.c (parse_include): Don't check for EOL when
2536 processing #pragma dependency.
2537
ccfc4c91
OW
25382007-07-30 Ollie Wild <aaw@google.com>
2539
2540 * directives-only.c: New file.
2541 * internal.h (struct _cpp_dir_only_callbacks): New.
2542 (_cpp_preprocess_dir_only): New function.
2543 * directives.c (_cpp_handle_directive): Check directives_only before
2544 disabling execution of indented directives.
2545 * files.c (_cpp_stack_file): Add directives_only check.
2546 * include/cpplib.h (struct cpp_options): Add directives_only.
2547 (cpp_init_special_builtins): New function.
2548 * init.c (cpp_init_special_builtins): New function.
2549 (cpp_init_builtins): Move builtin_array initialization to
2550 cpp_init_special_builtins.
2551 (post_options): Check directives_only before setting
2552 pfile->state.prevent_expansion = 1.
2553 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
2554 is expanded inside a directive while -fdirectives-only is enabled.
2555 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
2556 (libcpp_a_SOURCES): Add directives-only.c.
2557
a206413a
UB
25582007-07-04 Uros Bizjak <ubizjak@gmail.com>
2559
2560 * traditional.c (_cpp_scan_out_logical_line): Initialize
2561 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
2562 fmacro.args to prevent 'may be used uninitialized' warning.
2563
c77cd3d1
UB
25642007-07-03 Uros Bizjak <ubizjak@gmail.com>
2565
2566 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
2567 Add new constants.
2568 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
2569 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
2570 for 'q' or 'Q' suffixes.
2571
66938a1d
DS
25722007-06-17 Danny Smith <dannysmith@users.sourceforge.net
2573
e1311401 2574 * files.c (open_file): Correct typo.
66938a1d 2575
71995ede
VP
25762007-06-16 Vladimir Prus <vladimir@codesourcery.com>
2577
e1311401 2578 * files.c (open_file): Prevent the call
71995ede
VP
2579 for stat from overwriting errno.
2580
84152c25
VP
25812007-06-09 Vladimir Prus <vladimir@codesourcery.com>
2582
e1311401 2583 * files.c (open_file): Account for the
19a9ba64
AM
2584 fact that on windows, opening a directory gives
2585 EACCES.
84152c25 2586
f7fd775f
JW
25872007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
2588
2589 PR preprocessor/23479
2590 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
2591 integer constants.
2592 (append_digit): Likewise.
2593 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
2594 binary integer constants.
2595
ed0e74e0
DK
25962007-05-31 Dave Korn <dave.korn@artimi.com>
2597
2598 PR preprocessor/14331
2599 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
2600
a702045a
OW
26012007-05-24 Ollie Wild <aaw@google.com>
2602
2603 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
2604 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
2605 (cpp_write_pch_state): Save __COUNTER__ state.
2606 (cpp_valid_state): Check valid __COUNTER__ state.
2607 (cpp_read_state): Read new __COUNTER__ state.
2608 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
2609 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
2610 * internal.h (struct cpp_reader): Add counter member.
2611
126e073b
SM
26122007-05-23 Simon Martin <simartin@users.sourceforge.net>
2613
2614 PR preprocessor/20077
2615 * macro.c (create_iso_definition): Fixed the method to determine
2616 whether the token-pasting operator appears at the beginning or the end
2617 of a macro.
2618
0b4cafec
ILT
26192007-05-21 Ian Lance Taylor <iant@google.com>
2620
2621 * internal.h (struct cpp_reader): Add new fields:
2622 nonexistent_file_hash and nonexistent_file_ob.
2623 * files.c: Include "obstack.h".
2624 (find_file_in_dir): Before trying to open the file, look up the
2625 path name in the hash table of nonexistent files. After failing
2626 to open the file, add the path name to the hash table.
2627 (_cpp_find_file): Cache the results of looking up the file name
2628 starting with the quote and bracket chain heads, if we can.
2629 (nonexistent_file_hash_eq): New static function.
2630 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
2631 pfile->nonexistent_file_ob.
2632 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
2633 pfile->nonexistent_file_ob.
2634
30e04921
JJ
26352007-05-14 Janis Johnson <janis187@us.ibm.com>
2636
19a9ba64 2637 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
5a6bb57e 2638
30e04921
JJ
2639 PR c/31924
2640 * expr.c (interpret_float_suffix): Check for invalid suffix.
2641
22a8a52d
EC
26422007-05-02 Eric Christopher <echristo@apple.com>
2643
2644 * expr.c (num_div_op): Don't overflow if the result is
2645 zero.
2646
fca35e1b
TT
26472007-05-02 Tom Tromey <tromey@redhat.com>
2648
765d600a 2649 PR preprocessor/28709
fca35e1b
TT
2650 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
2651
4cd97075
MM
26522007-03-30 Michael Meissner <michael.meissner@amd.com>
2653
2654 * directives.c (lex_macro_node_from_str): Fix alloca call to be
2655 type correct.
2656
121de39f
RH
26572007-03-30 Richard Henderson <rth@redhat.com>
2658
2659 * directives.c (lex_macro_node_from_str): New.
2660 (cpp_push_definition, cpp_pop_definition): New.
2661 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
2662
4fcb360b
BM
26632007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2664
2665 * Makefile.in: Add dummy install-pdf target.
2666
67e64439
TT
26672007-01-30 Tom Tromey <tromey@redhat.com>
2668
765d600a 2669 PR preprocessor/30468
67e64439
TT
2670 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
2671 './'.
2672
ee380365
TT
26732007-01-30 Tom Tromey <tromey@redhat.com>
2674
765d600a 2675 PR preprocessor/29966
ee380365
TT
2676 * macro.c (lex_expansion_token): Save and restore cpp_reader's
2677 cur_token.
2678 (_cpp_create_definition): Don't restore cur_token here.
2679 * lex.c (_cpp_lex_token): Added assertion.
2680
024abeb3
TT
26812007-01-27 Tom Tromey <tromey@redhat.com>
2682
2683 * configure: Rebuilt.
2684
ee1c2a10
TT
26852007-01-12 Tom Tromey <tromey@redhat.com>
2686
765d600a 2687 PR preprocessor/28227
ee1c2a10
TT
2688 * directives.c (lex_macro_node): Added 'is_def_or_undef'
2689 argument.
2690 (do_define): Update.
2691 (do_undef): Update.
2692 (do_ifdef): Update.
2693 (do_ifndef): Update.
2694
67214c16
PB
26952007-01-11 Paolo Bonzini <bonzini@gnu.org>
2696
2697 * configure: Regenerate.
2698
1aa6ca40
PB
26992007-01-11 Paolo Bonzini <bonzini@gnu.org>
2700
2701 * configure: Regenerate.
2702
705e2d28
TT
27032007-01-04 Tom Tromey <tromey@redhat.com>
2704
765d600a 2705 PR preprocessor/28165
705e2d28
TT
2706 * internal.h (cpp_in_primary_file): New function.
2707 * directives.c (do_include_next): Use cpp_in_primary_file.
2708 (do_pragma_once): Likewise.
2709 (do_pragma_system_header): Likewise.
2710
7af45bd4
ILT
27112006-12-29 Ian Lance Taylor <iant@google.com>
2712
2713 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
2714 look backward at the end of the line unless we saw a backslash.
2715
9d30f270
JJ
27162006-12-29 Jakub Jelinek <jakub@redhat.com>
2717
2718 PR preprocessor/29612
2719 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
2720 only when new_sysp is non-zero.
2721
30b0edc0
TT
27222006-12-28 Tom Tromey <tromey@redhat.com>
2723
765d600a 2724 PR preprocessor/30001
30b0edc0
TT
2725 * charset.c (_cpp_convert_input): Check that to.len is greater
2726 than zero.
2727
85d9c13c
TS
27282006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
2729
2730 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 2731 * configure: Rebuilt.
85d9c13c 2732
dfafdaa6
DG
27332006-11-01 Douglas Gregor <doug.gregor@gmail.com>
2734
2735 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
2736 for experimental C++0x mode.
2737 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
2738 adopted the preprocessor changes introduced in C99.
2739
0f45f0f5
JM
27402006-10-29 Joseph Myers <joseph@codesourcery.com>
2741
2742 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
2743 depending on --enable-targets=all.
2744 * configure: Regenerate.
2745
de000d22
JJ
27462006-10-12 Jakub Jelinek <jakub@redhat.com>
2747
2748 PR preprocessor/28709
2749 * macro.c (paste_tokens): Do error reporting here, use BUF with the
2750 spelled LHS token as opposed to spelling it again.
2751 (paste_all_tokens): Don't report errors here, just break on failure.
2752
b5422ad7
BM
27532006-10-10 Brooks Moses <bmoses@stanford.edu>
2754
2755 * Makefile.in: Added empty "pdf" target.
2756
aaf50ff2
GK
27572006-09-22 Geoffrey Keating <geoffk@apple.com>
2758
2759 * configure.ac: Make need_64_bit_hwint case for x86-darwin
2760 match exactly the glob in gcc/config.gcc.
2761 * configure: Regenerate.
2762
c663e301
JM
27632006-09-13 Joseph S. Myers <joseph@codesourcery.com>
2764
2765 PR c/28768
2766 PR preprocessor/14634
2767 * lex.c (lex_string): Pedwarn for unterminated literals.
2768
f7288899
EC
27692006-09-08 Eric Christopher <echristo@apple.com>
2770
2771 * configure.ac: Add 64-bit HWI support for i?86-darwin.
2772
b52dbbf8
SE
27732006-08-14 Steve Ellcey <sje@cup.hp.com>
2774
2775 PR c++/28288
2776 PR c++/14556
2777 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
2778 (CPP_LAST_EQ): Change.
2779 (CPP_LAST_PUNCTUATOR): Change.
2780 * expr.c (cpp_operator): Remove MIN and MAX.
2781 (reduce): Remove CPP_MIN and CPP_MAX.
2782 (num_binary_op): Ditto.
2783 * lex.c (_cpp_lex_direct): Ditto.
2784 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
2785
1c90c6f9
JJ
27862006-06-09 Jakub Jelinek <jakub@redhat.com>
2787
2788 PR preprocessor/27746
2789 * directives.c (do_pragma): Handle pragma with valid namespace
2790 and invalid name coming from macro expansion.
2791 * directives.c (destringize_and_run): Initialize next field in
2792 context.
2793
2794 PR c/27747
2795 PR c++/27748
2796 * directives.c (destringize_and_run): Set NO_EXPAND on the
2797 tokens.
2798
2799 * macro.c (_cpp_backup_tokens): Fix comment typo.
2800
5c3c3683
DJ
28012006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
2802
2803 * Makefile.in (CATALOGS): Add po/ prefix.
2804 * configure: Regenerated.
2805
b2bd74bc
CD
28062006-05-23 Carlos O'Donell <carlos@codesourcery.com>
2807
2808 * Makefile.in: Add install-html target. Add install-html to .PHONY
2809
be8ac3e2
GZ
28102006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
2811
2812 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
2813 * files.c (_cpp_get_file_stat): New function.
2814 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
2815 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
2816 * internal.h (_cpp_get_file_stat): Prototype.
2817 (struct cpp_buffer): Add timestamp.
2818
83900997
JJ
28192006-01-23 Jakub Jelinek <jakub@redhat.com>
2820
2821 PR preprocessor/25717
2822 * init.c (cpp_init_builtins): If __STDC__ will not change value
2823 between system headers and other sources, define it as a normal
2824 macro rather than a builtin.
2825 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
2826 cpp_in_system_header condition.
2827
28282006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
2829
2830 * Makefile.in: Use -MMD instead of -MD.
2831
bc4071dd
RH
28322006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2833 Richard Henderson <rth@redhat.com>
2834
2835 Merge from gomp branch:
2836 * directives.c (struct pragma_entry): Add is_deferred. Add ident
2837 entry to value union.
2838 (end_directive): Don't eat the line if in_deferred_pragma.
2839 (run_directive): Remove pragma hacks.
2840 (insert_pragma_entry): Remove.
2841 (new_pragma_entry): New.
2842 (register_pragma_1): Split out of register_pragma. Only handle
2843 the lookup tree and return the new entry.
2844 (cpp_register_pragma): Fill in the pragma entry here.
2845 (cpp_register_deferred_pragma): New.
2846 (register_pragma_internal): New.
2847 (_cpp_init_internal_pragmas): Use register_pragma_internal.
2848 (do_pragma): Allow pragma expansion after namespace. For deferred
2849 pragmas, don't slurp the line into a string.
2850 (destringize_and_run): Save tokens for deferred pragmas.
2851 (cpp_handle_deferred_pragma): Remove.
2852 * macro.c (builtin_macro): Remove pragma token hack.
2853 (_cpp_push_token_context): Rename from push_token_context and export.
2854 * internal.h (struct lexer_state): Add pragma_allow_expansion.
2855 (_cpp_push_token_context): Declare.
2856 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
2857 a token. Update the line number correctly if so.
2858 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
2859 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
2860 * include/cpplib.h (PRAGMA_EOL): New.
2861 (CPP_TOKEN_FLD_PRAGMA): New.
2862 (struct cpp_token): Add val.pragma.
2863 (struct cpp_options): Remove defer_pragmas.
2864 (cpp_handle_deferred_pragma): Remove.
2865 (cpp_register_deferred_pragma): Declare.
2866
d09e893f
JJ
28672006-01-01 Jakub Jelinek <jakub@redhat.com>
2868
2869 PR c++/25294
2870 * directives.c (do_pragma): If pragma line ends with multi-line
2871 block comment, end the saved deferred pragma string before that
2872 comment. Handle embedded '\0' chars on the pragma line.
2873
ab84748a
VR
28742005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2875
2876 PR c++/23333
2877 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
2878
ad6ed77e
JG
28792005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
2880 Ben Elliston <bje@au.ibm.com>
2881
2882 * include/cpplib.h (CPP_N_DFLOAT): New.
2883 * expr.c (interpret_float_suffix): Identify df, dd, and dl
2884 suffixes as decimal floating point constants.
2885 (cpp_classify_number): Disallow hexadecimal DFP constants.
2886
ba096620 28872005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 2888 Ian Lance Taylor <ian@airs.com>
ba096620
GP
2889
2890 * include/cpplib.h (struct cpp_callbacks): Annotate error with
2891 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
2892
456b8ce5
UB
28932005-11-09 Per Bothner <per@bothner.com>
2894 Uros Bizjak <uros@kss-loka.si>
f7288899 2895
456b8ce5
UB
2896 PR c/24101
2897 * init.c (read_original_filename): Temporarily set
2898 state.in_directive before calling _cpp_lex_direct for
2899 CPP_HASH tokens.
2900
5571f74f
JW
29012005-11-03 James E Wilson <wilson@specifix.com>
2902
2903 PR preprocessor/24202
2904 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
2905
a63607ed
JM
29062005-11-04 Joseph S. Myers <joseph@codesourcery.com>
2907
2908 * include/cpplib.h (struct cpp_callbacks): Make error take
2909 va_list* parameter.
2910 * errors.c (cpp_error): Update call to callback.
2911
651ed942
AP
29122005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
2913
2914 PR preprocessor/22042
2915 * macro.c (_cpp_builtin_macro_text): Lower the needed max
2916 buffer size.
2917 (cpp_quote_string): Don't octalify non printable
2918 charactors.
2919
178b58b5
JM
29202005-11-03 Joseph S. Myers <joseph@codesourcery.com>
2921
2922 PR c++/17964
2923 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
2924 (struct cpp_callbacks): Add error.
2925 * errors.c (cpp_error): If client_diagnostic, use error callback.
2926 * charset.c (convert_escape): Don't use %03o in diagnostic.
2927
3ee5ed11 29282005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
2929
2930 PR preprocessor/15220
2931 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
2932 callers. Pass to open_file_failed.
2933 (open_file_failed): New parameter angle_brackets. Fix all callers.
2934 Use in print_dep assignment.
2935 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
2936 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 2937
077fc835
KH
29382005-10-08 Kazu Hirata <kazu@codesourcery.com>
2939
2940 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
2941 * configure: Regenerate.
2942
cbc43ae0
ILT
29432005-10-04 Ian Lance Taylor <ian@airs.com>
2944
2945 PR preprocessor/13726
2946 * directives.c (check_eol_return_comments): New static function.
2947 (parse_include): Add buf parameter. Change all callers.
2948 (do_include_common): If not discard comments, turn on
2949 save_comments. Pass collected comments to include callback.
2950 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
2951 include callback: cpp_token list.
2952
af15a2fe
JM
29532005-09-20 Joseph S. Myers <joseph@codesourcery.com>
2954
2955 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
2956 * init.c (struct lang_flags, lang_defaults): Add
2957 extended_identifiers.
2958 (cpp_set_lang): Use it.
2959 * lex.c (forms_identifier_p): Check extended_identifiers.
2960
f5eab47e
JJ
29612005-08-30 Jakub Jelinek <jakub@redhat.com>
2962
2963 PR preprocessor/20348
2964 PR preprocessor/20356
2965 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
2966 2004-06-05 changes.
2967
467129e6
KG
29682005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2969
2970 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
2971 -Wmissing-format-attribute.
2972
2973 * configure: Regenerate.
2974
200031d1
KC
29752005-06-29 Kelley Cook <kcook@gcc.gnu.org>
2976
2977 * all files: Update FSF address in copyright headers.
2978 * makeucnid.c (write_copyright): Update outputted FSF address.
2979
f610dd5f
ZW
29802005-06-13 Zack Weinberg <zack@codesourcery.com>
2981
2982 * configure.ac: Invoke ZW_CREATE_DEPDIR and
2983 ZW_PROG_COMPILER_DEPENDENCIES.
2984 * aclocal.m4, configure: Regenerate.
2985 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
2986 New variables.
2987 (distclean): Clean up $(DEPDIR) and its contents.
2988 (.c.o): Use $(COMPILE).
2989 Include $(DEPDIR)/*.Po for most object->header dependencies.
2990
c3f829c1
GDR
29912005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2992
2993 * configure.ac: Check declarations for asprintf and vasprintf.
2994 * config.in: Regenerate.
2995 * configure: Likewise.
2996
2997 * charset.c (conversion_loop): Use XRESIZEVEC.
2998 (convert_no_conversion): Likewise.
2999 (convert_using_iconv): Likewise.
3000 (init_iconv_desc): Cast return value of alloca.
3001 (cpp_host_to_exec_charset): Use XNEWVEC.
3002 (emit_numeric_escape): Use XRESIZEVEC.
3003 (cpp_interpret_string): Use XNEWVEC.
3004 (cpp_interpret_string): Use XRESIZEVEC.
3005 (_cpp_interpret_identifier): Cast return value of alloca.
3006 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
3007 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
3008 (parse_include): Use XNEWVEC.
3009 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 3010 "new_entry".
c3f829c1
GDR
3011 (save_registered_pragmas): Cast return value of xmemdup.
3012 (destringize_and_run): Same for alloca.
3013 (parse_assertion): Likewise.
3014 (do_assert): Cast allocated storage to proper type.
3015 (cpp_define): Likewise.
3016 (_cpp_define_builtin): Likewise.
3017 (cpp_undef): Likewise.
3018 (handle_assertion): Likewise.
3019 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
3020 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
3021 (CPP_UMINUS): Likewise.
3022 (struct cpp_operator): Rename from struct operator.
3023 (_cpp_expand_op_stack): Use XRESIZEVEC.
3024 * files.c (pch_open_file): Use XNEWVEC.
3025 (pch_open_file): Use XRESIZEVEC.
3026 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
3027 (dir_name_of_file): Use XNEWVEC.
3028 (make_cpp_file): Use XCNEW.
3029 (make_cpp_dir): Likewise.
3030 (allocate_file_hash_entries): USE XNEWVEC.
3031 (cpp_included): Cast return value of htab_find_with_hash.
3032 (append_file_to_dir): Use XNEWVEC.
3033 (read_filename_string): Likewise. Use XRESIZEVEC too.
3034 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
3035 (remap_filename): Use XNEWVEC.
3036 (struct pchf_entry): Move definition out of struct pchf_data.
3037 (_cpp_save_file_entries): Use XCNEWVAR.
3038 (_cpp_read_file_entries): Use XNEWVAR.
3039 * identifiers.c (alloc_node): Use XOBNEW.
3040 * init.c (cpp_create_reader): Use XCNEW.
3041 (cpp_init_builtins): Cast of b->value to enum builtin_type.
3042 (read_original_directory): Cast return value of alloca.
3043 * lex.c (add_line_note): Use XRESIZEVEC.
3044 (warn_about_normalization): Use XNEWVEC.
3045 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
3046 (new_buff): Use XNEWVEC.
3047 * line-map.c (linemap_add): Use XRESIZEVEC.
3048 * macro.c (builtin_macro): Cast return value of alloca.
3049 (paste_tokens): Likewise.
3050 (expand_arg): Use XNEWVEC and XRESIZEVEC.
3051 (_cpp_save_parameter): Use XRESIZEVEC.
3052 (create_iso_definition): Cast allocated storage to proper type.
3053 (_cpp_create_definition): Likewise.
3054 (cpp_macro_definition): Use XRESIZEVEC.
3055 * makedepend.c (add_clm): Use XNEW.
3056 (add_dir): Likewise.
3057 * mkdeps.c (munge): Use XNEWVEC.
3058 (deps_init): Use XCNEW.
3059 (deps_add_target): Use XRESIZEVEC.
3060 (deps_add_default_target): Cast return value of alloca.
3061 (deps_add_dep): Use XRESIZEVEC.
3062 (deps_add_vpath): Likewise. Use XNEWVEC too.
3063 (deps_restore): Likewise.
3064 * pch.c (save_idents): Use XNEW and XNEWVEC.
3065 (cpp_save_state): Use XNEW.
3066 (count_defs): Cast return value of htab_find.
3067 (write_defs): Likewise.
3068 (cpp_write_pch_deps): Use XNEWVEC.
3069 (collect_ht_nodes): Use XRESIZEVEC.
3070 (cpp_valid_state): Use XNEWVEC.
3071 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
3072 * symtab.c (ht_create): Use XCNEW.
3073 (ht_lookup_with_hash): Cast return value of obstack_copy0.
3074 (ht_expand): Use XCNEWVEC.
3075 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
3076 (bool): Do not define if __cplusplus.
3077
1ed17cd5
ZW
30782005-05-12 Zack Weinberg <zack@codesourcery.com>
3079
3080 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
3081 (do_sccs): Delete function definition, #define to do_ident.
3082 (do_ident): Don't hardwire directive name.
3083
5a8c20ce
RK
30842005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
3085
3086 PR bootstrap/21230
3087 * configure: Regenerate.
3088
473c5bc9
AP
30892005-04-27 Andris Pavenis <pavenis@latnet.lv>
3090
3091 * files.c: Include io.h for DJGPP to get prototype of setmode.
3092
c1fc5047
PB
30932005-04-19 Per Bothner <per@bothner.com>
3094
3095 PR preprocessor/20907
3096 * line-map.c (linemap_line_start): Fix bug when we need to increse
3097 column_bits but can re-use the current line_map.
3098
042630ad
KG
30992005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3100
3101 * system.h (fopen, fdopen, freopen): Define these to the unlocked
3102 libiberty functions.
3103
0d667716
KG
31042005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3105
3106 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
3107 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
3108 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
3109 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
3110 _unlocked function.
3111 (fwrite_unlocked): Fix prototype.
1ed17cd5 3112
0d667716
KG
3113 * configure, config.in: Regenerate.
3114
cae064e7
JJ
31152005-04-05 Jakub Jelinek <jakub@redhat.com>
3116
3117 PR preprocessor/19475
3118 * macro.c (create_iso_definition): For < ISO C99, don't
3119 pedwarn if there is no whitespace between macro name and its
3120 replacement, but the replacement starts with a basic character
3121 set character.
3122
cbada204
AJ
31232005-03-28 Andreas Jaeger <aj@suse.de>
3124
3125 * lex.c (warn_about_normalization): Cast field width to int to
3126 avoid warning.
3127
f42eccdb
JM
31282005-03-19 Joseph S. Myers <joseph@codesourcery.com>
3129
3130 * configure.ac: Consistently use solaris2.1[0-9]* instead of
3131 solaris2.1[0-9].
3132 * configure: Regenerate.
3133
c79e602b
GK
31342005-03-15 Geoffrey Keating <geoffk@apple.com>
3135
3136 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
3137 UCN rather than printing an error.
3138
50668cf6
GK
31392005-03-14 Geoffrey Keating <geoffk@apple.com>
3140
6baba9bb
GK
3141 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
3142
31432005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 3144
50668cf6
GK
3145 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
3146 * charset.c: Update for new format of ucnid.h.
3147 (ucn_valid_in_identifier): Update for new format of ucnid.h.
3148 Add NST parameter, and update it; update callers.
3149 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
3150 with cpp_error.
3151 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
3152 * internal.h (struct normalize_state): New.
3153 (INITIAL_NORMALIZE_STATE): New.
3154 (NORMALIZE_STATE_RESULT): New.
3155 (NORMALIZE_STATE_UPDATE_IDNUM): New.
3156 (_cpp_valid_ucn): New.
3157 * lex.c (warn_about_normalization): New.
3158 (forms_identifier_p): Add normalize_state parameter, update callers.
3159 (lex_identifier): Add normalize_state parameter, update callers. Keep
3160 the state current.
3161 (lex_number): Likewise.
3162 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
3163 it with warn_about_normalization.
3164 * makeucnid.c: New.
3165 * ucnid.h: Replace.
3166 * ucnid.pl: Remove.
3167 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
3168 comments about obsolete version of C++.
3169 * include/cpplib.h (enum cpp_normalize_level): New.
3170 (struct cpp_options): Add warn_normalize field.
3171
47e20491
GK
31722005-03-11 Geoffrey Keating <geoffk@apple.com>
3173
3174 * directives.c (glue_header_name): Update call to cpp_spell_token.
3175 * internal.h (_cpp_interpret_identifier): New.
3176 * charset.c (_cpp_interpret_identifier): New.
3177 (_cpp_valid_ucn): Allow UCN version of '$'.
3178 * lex.c (lex_identifier): Add extra parameter to indicate if initial
3179 character was '$' or '\'. Support identifiers with UCNs.
3180 (forms_identifier_p): Allow UCNs.
3181 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
3182 (utf8_to_ucn): New.
3183 (cpp_spell_token): Add FORSTRING parameter. Use it.
3184 (cpp_token_as_text): Update call to cpp_spell_token.
3185 (cpp_output_token): Write UCNs back out.
3186 (stringify_arg): Update call to cpp_spell_token.
3187 (paste_tokens): Likewise.
3188 (cpp_macro_definition): Likewise.
3189 * macro.c (stringify_arg): Likewise.
3190 (paste_tokens): Likewise.
3191 (cpp_macro_definition): Likewise.
3192 * include/cpplib.h: Add parameter to cpp_spell_token.
3193
73096711
JJ
31942005-03-04 Jakub Jelinek <jakub@redhat.com>
3195
3196 PR bootstrap/20282
3197 PR bootstrap/20305
3198 * macro.c (replace_args, cpp_get_token): Copy whole
3199 cpp_token_u instead of just cpp_string field from it.
3200
2203a881
DP
32012005-02-28 Devang Patel <dpatel@apple.com>
3202
3203 * directives.c (do_line): Save sysp early before line table is
3204 realloc'ed.
1ed17cd5 3205
c5ff069d
ZW
32062005-02-20 Zack Weinberg <zack@codesourcery.com>
3207
3208 PR 18785
3209 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
3210 (cpp_host_to_exec_charset): New function.
3211 * include/cpplib.h: Declare cpp_host_to_exec_charset.
3212
04c90eea
DP
32132005-02-19 Devang Patel <dpatel@apple.com>
3214
3215 * charset.c (_cpp_convert_input): Check '\r' before inserting
3216 '\n' at the end.
c5ff069d 3217
6da55c00
EC
32182005-02-15 Eric Christopher <echristo@redhat.com>
3219
3220 PR preprocessor/19077
3221 * macro.c (cpp_macro_definition): Move handling of whitespace
3222 to PREV_WHITE conditional. Remove overloading of len
3223 variable.
3224
31c3e631
KH
32252005-02-14 Kazu Hirata <kazu@cs.umass.edu>
3226
3227 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
3228 traditional.c: Update copyright.
3229
be0f1e54
PB
32302005-02-14 Paolo Bonzini <bonzini@gnu.org>
3231
3232 PR bootstrap/19818
3233 * configure.ac: Check for declaration of basename and getopt.
3234 * config.in: Regenerate.
3235 * configure: Regenerate.
3236 * internal.h (ustrcspn): New.
3237 * macro.c (create_iso_definition): Fix allocation of memory.
3238 (padding_token): Add cast to remove const-ness.
3239 * pch.c (cpp_read_state): Use ustrcspn.
3240
ecddfb39
MS
32412005-02-08 Mike Stump <mrs@apple.com>
3242
3243 * files.c (pchf_adder): Remove.
3244 (struct pchf_adder_info): Likewise.
3245 (_cpp_save_file_entries): Write out all files so that #import works.
3246
9fcdd891
JM
32472005-01-23 Joseph S. Myers <joseph@codesourcery.com>
3248
3249 * configure: Regenerate.
3250
ecfd72e7
TS
32512005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3252
3253 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
3254
6c25a4f7 3255 * include/cpplib.h: Also update copyright years.
c5ff069d 3256
942926ad
GK
32572005-01-03 Geoffrey Keating <geoffk@apple.com>
3258
3259 * files.c (_cpp_find_file): Add files found by search_path_exhausted
3260 to the list of all files.
3261
a2566ae9
GDR
32622005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3263
3264 * internal.h: Update references to Cpp lib filenames.
3265 * directives.c: Likewise.
3266 * init.c: Likewise.
3267 * macro.c: Likewise.
3268 * traditional.c: Likewise.
3269
1b449375
EB
32702004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
3271
3272 PR preprocessor/15167
3273 * files.c (destroy_cpp_file): New function.
3274 (should_stack_file): Make a new file if the
3275 compared file is still stacked.
3276
28303828
NN
32772004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
3278
c5ff069d 3279 PR preprocessor/17610
28303828
NN
3280 * directives.c (do_include_common): Error out if an empty filename
3281 is given for #include (or #include_next or #import).
3282
c812785a
RS
32832004-11-27 Roger Sayle <roger@eyesopen.com>
3284 Zack Weinberg <zack@codesourcery.com>
3285
3286 * internal.h: Replace all uses of uchar with unsigned char.
3287 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
3288 with !IN_GCC, so uchar is only defined whilst building libcpp.
3289
f91eaa01
KC
32902004-11-24 Kelley Cook <kcook@gcc.gnu.org>
3291
3292 * aclocal.m4: Regenerate.
3293
f78ce0c2
RS
32942004-11-24 Roger Sayle <roger@eyesopen.com>
3295
3296 PR preprocessor/15824
3297 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
3298 directly, instead of the non-existant "system.h" and "ansidecl.h".
3299 * configure: Regenerate.
3300
b5b3e36a 33012004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 3302 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
3303
3304 * internal.h (struct lexer_state): Add in_deferred_pragma.
3305 * directives.c (struct pragma_entry): Add allow_expansion.
3306 (insert_pragma_entry): Take allow_expansion flag.
3307 (register_pragma): Likewise.
3308 (cpp_register_pragma): Likewise.
3309 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
3310 (do_pragma): Honor allow_expansion.
3311 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
3312 * include/cpplib.h (cpp_register_pragma): Update prototype.
3313
a8e68029 33142004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 3315 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
3316
3317 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
3318 need_64bit_hwint=yes.
3319 * configure: Regenerate.
3320
50f47ee0
JM
33212004-11-09 Joseph S. Myers <joseph@codesourcery.com>
3322
3323 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
3324 po/$(PACKAGE).pot.
3325 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
3326 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
3327 Remove local srcdir path from generated file.
3328
968e08d6 33292004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 3330 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
3331
3332 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3333 as well.
3334
3da3d587
ZW
33352004-10-27 Zack Weinberg <zack@codesourcery.com>
3336
3337 PR 18075
3338 * directives.c (do_pragma): Do not defer pragmas which are unknown.
3339 (cpp_handle_deferred_pragma): Add cast to silence warning.
3340
ac24fc25
JM
33412004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
3342
3343 * errors.c (_cpp_begin_message): Print "error: " for errors.
3344
7731405b
AJ
33452004-10-10 Andreas Jaeger <aj@suse.de>
3346
3347 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
3348 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
3349
646544e3
AP
33502004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
3351
3352 * pch.c (cpp_write_pch_state): Remove variable z as it is not
3353 used.
3354 (cpp_read_state): Remove unused variables, m, d and mac_count.
3355
67a74146
PB
33562004-09-29 Per Bothner <per@bothner.com>
3357
3358 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
3359 cb.line_change. Otherwise do_pragma will call the line_change
3360 call-back with a meaningless line number.
3361
018a4785
ZW
33622004-09-24 Zack Weinberg <zack@codesourcery.com>
3363
3364 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
3365 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
3366 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
3367 * aclocal.m4, configure: Regenerate.
3368 * init.c: Include localedir.h.
3369 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
3370 (DEFS): Delete.
3371 (.c.o): Use $(ALL_CFLAGS).
3372 (localedir.h, localedir.hs): New rules.
3373 (clean): Use rm -rf to remove directories.
3374 (distclean): Also delete localedir.h and localedir.hs.
3375 (init.o): Update dependencies.
3376
88fa57d7
KC
33772004-09-22 Kelley Cook <kcook@gcc.gnu.org>
3378
3379 * Makefile.in (aclocal.m4): Update dependencies.
3380 * configure.ac (AC_CONFIG_MACRO_DIR): New.
3381 * aclocal.m4, configure: Regenerate.
3382
8f8e9aa5
ZW
33832004-09-17 Zack Weinberg <zack@codesourcery.com>
3384
a29f62d9
ZW
3385 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
3386 (_cpp_convert_input, _cpp_default_encoding): Add comments.
3387 Some other comments in this file also tweaked.
3388
8f8e9aa5
ZW
3389 * directives.c (do_pragma): Save current buffer position
3390 before lexing the pragma keywords; don't call
3391 _cpp_backup_tokens in the defer_pragmas case.
3392
a2981930
PB
33932004-09-15 Per Bothner <per@bothner.com>
3394
3395 * include/line-map.h (line_map_start): Add parameter names so
3396 preceding comment makes sense.
3397 (linemap_add): Remove from comment mention of non-existing parameter.
3398
21b11495
ZW
33992004-09-09 Matt Austern <austern@apple.com>
3400 Zack Weinberg <zack@codesourcery.com>
3401
3402 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
3403 prefixes throughout. Add entry for PRAGMA. Remove
3404 unnecessary "= 0" from EQ.
3405 (enum cpp_ttype): Adjust OP and TK definitions to restore
3406 prefixes, via token-paste.
3407 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
3408 Change from #defines to additional cpp_ttype enumerators.
3409 (struct cpp_options): Add defer_pragmas.
3410 (cpp_handle_deferred_pragma): Prototype new interface.
3411
3412 * internal.h (struct cpp_reader): Add directive_result.
3413 * directives.c (struct pragma_entry): Add is_internal field;
3414 give boolean fields type bool.
3415 (start_directive): Initialize pfile->directive_result.type.
3416 (_cpp_do__Pragma): Likewise.
3417 (run_directive): Do not crash if pfile->buffer->prev is NULL.
3418 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
3419 from it.
3420 (register_pragma): New static function, bulk of former
3421 cpp_register_pragma here; add 'internal' argument, pass along
3422 to insert_pragma_entry.
3423 (cpp_register_pragma): Now a wrapper around register_pragma which
3424 always passes false for 'internal' argument.
3425 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
3426 true for 'internal'.
3427 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
3428 an internal pragma, save text till the end of the line as a CPP_PRAGMA
3429 token instead of executing the pragma.
3430 (cpp_handle_deferred_pragma): New interface.
3431 * lex.c (token_spellings): Adjust OP and TK definitions to
3432 match changes to cpplib.h.
3433 (_cpp_lex_token): Check for a directive-result token and
3434 return it if present.
3435 (cpp_token_val_index): Handle CPP_PRAGMA.
3436 * macro.c (cpp_builtin_macro_text): Correct comment.
3437 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
3438
0fd9e8dd
SB
34392004-09-06 Serge Belyshev <belyshev@lubercy.com>
3440
3441 PR preprocessor/14699
3442 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
3443 from size_t to double.
3444
39b8ce7f
AS
34452004-08-28 Andreas Schwab <schwab@suse.de>
3446 Andreas Jaeger <aj@suse.de>
3447
3448 * configure.ac: Set PACKAGE correctly.
3449 * configure: Regenerated.
3450
5d1f4b27
PB
34512004-08-25 Paolo Bonzini <bonzini@gnu.org>
3452
3453 * Makefile.in: Add back top_builddir.
3454
078e3ffe
PB
34552004-08-25 Paolo Bonzini <bonzini@gnu.org>
3456
3457 * configure.ac: Replace Automake macro invocations
3458 with manual Autoconf checks and substitutions.
3459 * configure: Regenerate.
3460 * aclocal.m4: Regenerate.
3461 * config.in: Regenerate.
3462 * Makefile.am: Removed.
3463 * Makefile.in: Heavy simplification and reorganization.
3464
b3f8d95d
MM
34652004-08-09 Mark Mitchell <mark@codesourcery.com>
3466
3467 * configure.ac (arm*-*-eabi*): New target.
3468 (arm*-*-symbianelf*): Likewise.
3469 * configure: Regenerated.
3470
72bb2c39
BI
34712004-07-24 Bernardo Innocenti <bernie@develer.com>
3472
3473 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
3474 * directives.c: Use XNEW-family macros from libiberty.
3475 * lex.c: Likewise.
3476 * macro.c: Likewise.
3477 * cpplib.h (cpp_deps_style): Export enum with name.
3478
21b11495 34792004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 3480
21b11495 3481 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 3482
a23ee064
AP
34832004-07-16 Andris Pavenis <pavenis@latnet.lv>
3484
3485 PR preprocessor/16366
3486 * internal.h (struct cpp_reader): New field dir_hash.
3487 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
3488 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
3489
a09d4744
NB
34902004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
3491
3492 PR preprocessor/16192
3493 PR preprocessor/15913
3494 PR preprocessor/15572
3495 * expr.c (_cpp_parse_expr): Handle remaining cases where an
3496 expression is missing.
3497 * init.c (post_options): Traditional cpp doesn't do // comments.
3498
f58f7def
PB
34992004-06-30 Per Bothner <per@bothner.com>
3500
3501 * include/line-map.h (fileline): Remove old typedef.
3502 * internal.h (struct cpp_reader): Use source_location typedef instead.
3503
e83d8d43
ZW
35042004-06-26 Zack Weinberg <zack@codesourcery.com>
3505
3506 Partially revert patch of 2004-06-05.
3507 * files.c (search_cache): Remove pfile argument. Don't check
3508 for file that would be found by "" or <> search here...
3509 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
3510 Do not apply directory-of-current-file correction to files
3511 found by this check. Rearrange code slightly.
3512
c0d578e6
GK
35132004-06-21 Geoffrey Keating <geoffk@apple.com>
3514
3515 * files.c (should_stack_file): Correct swapped parameters to call
3516 to cb.read_pch.
3517 * pch.c (cpp_valid_state): Handle -fpreprocessed.
3518
159d5224
PB
35192004-06-15 Paolo Bonzini <bonzini@gnu.org>
3520
3521 * Makefile.in: Regenerate with automake 1.8.5.
3522 * aclocal.m4: Likewise.
3523 * configure: Regenerate.
3524
2fac9c01
ZW
35252004-06-11 Zack Weinberg <zack@codesourcery.com>
3526
3527 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
3528 * configure, config.in: Regenerate.
3529 * system.h: Unconditionally define bool as unsigned char,
3530 BOOL_BITFIELD as unsigned int.
3531 * .cvsignore: New file.
3532
d8044160
GK
35332004-06-09 Geoffrey Keating <geoffk@apple.com>
3534
3535 * traditional.c (push_replacement_text): Set macro->traditional.
3536 (save_replacement_text): Likewise.
3537 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
3538 (struct save_macro_item): Delete.
3539 (struct save_macro_data): Use a character array not the previous
3540 structured format.
3541 (save_macros): Save macro as text not as internal structures.
3542 (cpp_prepare_state): Update for changes to save_macro_data.
3543 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 3544 -D macros as text.
d8044160
GK
3545 * macro.c (create_iso_definition): Honour alloc_subobject.
3546 Clear traditional flag.
3547 (_cpp_create_definition): Honour alloc_subobject.
3548 * lex.c (cpp_token_val_index): New.
3549 * internal.h: Include cpp-id-data.h.
3550 (uchar): Move definition to cpp-id-data.h.
3551 (U): Likewise.
3552 (cpp_macro): Likewise.
3553 * directives.c (struct answer): Move to cpp-id-data.h.
3554 (do_assert): Honour alloc_subobject.
2cf22451
ZW
3555
3556 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
3557 * include/cpplib.h (struct cpp_string): Add GTY marker.
3558 (enum cpp_token_fld_kind): New.
3559 (struct cpp_token): Add GTY markers.
3560 (cpp_token_val_index): Prototype.
3561 (CPP_HASHNODE_VALUE_IDX): New.
3562 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
3563 * include/cpp-id-data.h: New file.
d8044160 3564
0ca8e815
PB
35652004-06-09 Paolo Bonzini <bonzini@gnu.org>
3566
3567 * Makefile.am (all-local): New.
3568 * Makefile.in: Regenerate.
3569
b51fa00f
RS
35702004-06-06 Roger Sayle <roger@eyesopen.com>
3571
3572 * Makefile.am (LIBICONV): Declare.
3573 (makedepend_LDADD): Use LIBICONV.
3574 * Makefile.in: Regenerate.
3575
5e2f3f39
AP
35762004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
3577
3578 * Makefile.am (LIBINTL): Declare
3579 (makedepend_LDADD): Use LIBINTL.
3580 * Makefile.in: Regenerate.
3581
c6e83800
ZW
35822004-06-05 Zack Weinberg <zack@codesourcery.com>
3583
3584 * Makefile.am: Add makedepend.
3585 * Makefile.in, aclocal.m4: Regenerate.
3586 * charset.c: Insert a space to avoid a warning.
3587 * directives.c: Include mkdeps.h.
3588 (_cpp_handle_directive): Reenable macro expander if appropriate.
3589 (undefine_macros): Inline body of _cpp_free_definition for speed.
3590 Do not call undef callback or _cpp_warn_if_unused_macro.
3591 (cpp_get_deps): New interface.
3592 * files.c (search_cache): Add pfile argument. Check for file
3593 that would be found by "" or <> search here...
3594 (_cpp_find_file): ...not here. Correct recorded start_dir of
3595 files found by directory-of-current-file search that would be
3596 found by "" or <> search.
3597 * init.c (cpp_add_dependency_target): Delete.
3598 * internal.h (struct lexer_state): Add discarding_output flag.
3599 * lex.c (lex_identifier): Compute hash function while scanning.
3600 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
3601 directives.
3602 * makedepend.c: New file.
3603 * mkdeps.c (struct deps): Add vpath vector.
3604 (apply_vpath, deps_add_vpath): New function.
3605 (deps_free): Free vpath vector.
3606 (deps_add_dep, deps_add_target): Use apply_vpath.
3607 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
3608 (ht_lookup_with_hash): New function.
3609 * cpplib.h, mkdeps.h: Update prototypes.
3610 * symtab.h: Update prototypes.
3611 (HT_HASHSTEP, HT_FINISH): New macros.
3612
b453c95f
GK
36132004-05-29 Geoffrey Keating <geoffk@apple.com>
3614
3615 * symtab.c (ht_create): Set entries_owned.
3616 (ht_destroy): Honour entries_owned.
3617 (ht_expand): Likewise.
3618 (ht_load): New.
2cf22451
ZW
3619 * include/symtab.h (struct ht): New field 'entries_owned'
3620 (ht_load): New prototype.
b453c95f 3621
963e23c5
PB
36222004-05-26 Paolo Bonzini <bonzini@gnu.org>
3623
3624 PR bootstrap/15651
3625 * configure.ac: Fix m4 quoting when picking
3626 the size of HOST_WIDE_INT.
3627 * configure: Regenerate.
3628
0429bc77
PB
36292004-05-25 Paolo Bonzini <bonzini@gnu.org>
3630
3631 * Makefile.am: the correct directory for
3632 gettext include files is given by @INCINTL@.
3633 * Makefile.in: Regenerate.
3634
c86dd7db
PB
36352004-05-24 Paolo Bonzini <bonzini@gnu.org>
3636
3637 * system.h [!ENABLE_NLS]: dgettext takes two
3638 parameters.
3639
4f4e53dd
PB
36402004-05-23 Paolo Bonzini <bonzini@gnu.org>
3641
3642 Moved libcpp from the gcc subdirectory to the toplevel.
3643 * Makefile.am: New file.
3644 * Makefile.in: Regenerate.
3645 * configure.ac: New file.
3646 * configure: Regenerate.
3647 * config.in: Regenerate.
3648 * charset.c: Moved from gcc/cppcharset.c. Add note about
3649 brokenness of input charset detection. Adjust for change
3650 in name of cppucnid.h.
3651 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
3652 * expr.c: Moved from gcc/cppexp.c.
3653 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
3654 Remove #define of O_BINARY, it is in system.h.
3655 * identifiers.c: Moved from gcc/cpphash.c.
3656 * internal.h: Moved from gcc/cpphash.h. Change header
3657 guard name. All other files adjusted to match name change.
3658 * init.c: Moved from gcc/cppinit.c.
3659 (init_library) [ENABLE_NLS]: Call bindtextdomain.
3660 * lex.c: Moved from gcc/cpplex.c.
3661 * directives.c: Moved from gcc/cpplib.c.
3662 * macro.c: Moved from gcc/cppmacro.c.
3663 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
3664 * traditional.c: Moved from gcc/cpptrad.c.
3665 * ucnid.h: Moved from gcc/cppucnid.h. Change header
3666 guard name.
3667 * ucnid.pl: Moved from gcc/cppucnid.pl.
3668 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
3669 guard name.
3670 * symtab.c: Moved from gcc/hashtable.c.
3671 * line-map.c: Moved from gcc. Do not include intl.h.
3672 * mkdeps.c: Moved from gcc.
3673 * system.h: New file.
2cf22451
ZW
3674 * include/cpplib.h: Moved from gcc. Change header guard name.
3675 * include/line-map.h: Moved from gcc. Change header guard name.
3676 * include/mkdeps.h: Moved from gcc. Change header guard name.
3677 * include/symtab.h: Moved from gcc/hashtable.h. Change header
3678 guard name.