]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
re PR tree-optimization/70138 (wrong code at -O3 on x86_64-linux-gnu)
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
7168133a
DM
12016-02-29 David Malcolm <dmalcolm@redhat.com>
2
3 PR preprocessor/69985
4 (linemap_position_for_loc_and_offset): Rename param from "offset"
5 to "column_offset". Right-shift the column_offset by m_range_bits
6 of the pertinent ordinary map whenever offsetting a
7 source_location. For clarity, offset the column by the column
8 offset, rather than the other way around.
9
196440f8
DM
102016-02-23 David Malcolm <dmalcolm@redhat.com>
11
12 PR preprocessor/69126
13 PR preprocessor/69543
14 * line-map.c (linemap_compare_locations): At the function top,
15 replace inlined bodies of get_location_from_adhoc_loc with calls
16 to get_location_from_adhoc_loc. Add a pair of calls to
17 get_location_from_adhoc_loc at the bottom of the function, to
18 avoid meaningless comparisons of ad-hoc and non-ad-hoc locations.
19
44714d8c
DM
202016-02-08 David Malcolm <dmalcolm@redhat.com>
21
22 PR preprocessor/69664
23 * errors.c (cpp_diagnostic_with_line): Only call
24 rich_location::override_column if the column is non-zero.
25 * line-map.c (rich_location::override_column): Update columns
26 within m_ranges[0]. Add assertions to verify that doing so is
27 sane.
28
b5c1c988
JJ
292016-02-05 Jakub Jelinek <jakub@redhat.com>
30
31 PR c++/69628
32 * charset.c (cpp_interpret_charconst): Clear *PCHARS_SEEN
33 and *UNSIGNEDP if bailing out early due to errors.
34
e2eb5056
JJ
352016-01-28 Jakub Jelinek <jakub@redhat.com>
36
4bda5946
JJ
37 PR pch/68176
38 * files.c (_cpp_find_file): Set file->implicit_preinclude even if
39 included from file->implicit_preinclude header.
40
e2eb5056
JJ
41 * directives.c (destringize_and_run): Adjust prototype.
42
0afff540
DM
432016-01-27 David Malcolm <dmalcolm@redhat.com>
44
45 PR preprocessor/69126
46 * directives.c (destringize_and_run): Add expansion_loc param; use
47 it when handling unexpanded pragmas to fixup the locations of the
48 synthesized tokens.
49 (_cpp_do__Pragma): Add expansion_loc param and use it when calling
50 destringize_and_run.
51 * internal.h (_cpp_do__Pragma): Add expansion_loc param.
52 * macro.c (builtin_macro): Pass expansion location of _Pragma to
53 _cpp_do__Pragma.
54
c7df95d8
DM
552016-01-14 David Malcolm <dmalcolm@redhat.com>
56
57 PR preprocessor/69177
58 * line-map.c (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES): New
59 constant.
60 (LINE_MAP_MAX_LOCATION_WITH_COLS): Add note about unit tests
61 to comment.
62 (can_be_stored_compactly_p): Reduce threshold from
63 LINE_MAP_MAX_LOCATION_WITH_COLS to
64 LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES.
65 (get_combined_adhoc_loc): Likewise.
66 (get_range_from_loc): Likewise.
67 (linemap_line_start): Ensure that a new ordinary map is created
68 when transitioning from range-packing being enabled to disabled,
69 at the LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES threshold. Set
70 range_bits to 0 for new ordinary maps when beyond this limit.
71 Prevent the "increase the column bits of a freshly created map"
72 optimization if the range bits has reduced.
73
53290e07
JJ
742016-01-08 Jakub Jelinek <jakub@redhat.com>
75
76 PR c++/69145
77 * files.c (cpp_included_before): If IS_ADHOC_LOC (location), lookup
78 real location from the line_table.
79
818ab71a
JJ
802016-01-04 Jakub Jelinek <jakub@redhat.com>
81
82 Update copyright years.
83
329590d7
DM
842015-12-22 David Malcolm <dmalcolm@redhat.com>
85
86 * line-map.c (get_combined_adhoc_loc): Remove condition
87 on locus < RESERVED_LOCATION_COUNT when considering
88 whether a caret == start == finish location can be
89 simply stored as the caret location.
90
f79520bb
DM
912015-12-07 David Malcolm <dmalcolm@redhat.com>
92
93 * include/line-map.h (rich_location::set_range): Add line_maps *
94 param; convert param from source_range to source_location. Drop
95 "overwrite_loc_p" param.
96 * line-map.c (rich_location::set_range): Likewise, acting as if
97 "overwrite_loc_p" were true, and getting range from the location.
98
a87a86e1
DM
992015-11-20 David Malcolm <dmalcolm@redhat.com>
100
101 PR 62314
102 * include/line-map.h (source_range::intersects_line_p): New
103 method.
104 (rich_location::~rich_location): New.
105 (rich_location::add_fixit_insert): New method.
106 (rich_location::add_fixit_remove): New method.
107 (rich_location::add_fixit_replace): New method.
108 (rich_location::get_num_fixit_hints): New accessor.
109 (rich_location::get_fixit_hint): New accessor.
110 (rich_location::MAX_FIXIT_HINTS): New constant.
111 (rich_location::m_num_fixit_hints): New field.
112 (rich_location::m_fixit_hints): New field.
113 (class fixit_hint): New class.
114 (class fixit_insert): New class.
115 (class fixit_remove): New class.
116 (class fixit_replace): New class.
117 * line-map.c (source_range::intersects_line_p): New method.
118 (rich_location::rich_location): Add initialization of
119 m_num_fixit_hints to both ctors.
120 (rich_location::~rich_location): New.
121 (rich_location::add_fixit_insert): New method.
122 (rich_location::add_fixit_remove): New method.
123 (rich_location::add_fixit_replace): New method.
124 (fixit_insert::fixit_insert): New.
125 (fixit_insert::~fixit_insert): New.
126 (fixit_insert::affects_line_p): New.
127 (fixit_remove::fixit_remove): New.
128 (fixit_remove::affects_line_p): New.
129 (fixit_replace::fixit_replace): New.
130 (fixit_replace::~fixit_replace): New.
131 (fixit_replace::affects_line_p): New.
132
46ce03de
JJ
1332015-11-19 Jakub Jelinek <jakub@redhat.com>
134
135 PR preprocessor/60736
136 * include/cpplib.h (cpp_errno_filename): New prototype.
137 * errors.c (cpp_errno): Don't handle msgid "" specially, use
138 _(msgid) instead of msgid as argument to cpp_error.
139 (cpp_errno_filename): New function.
140 * files.c (read_file_guts): Use cpp_errno_filename instead of
141 cpp_errno.
142 (open_file_failed): Likewise. Use file->name if file->path is NULL
143 in diagnostics.
144
ebedc9a3
DM
1452015-11-13 David Malcolm <dmalcolm@redhat.com>
146
147 * errors.c (cpp_diagnostic): Pass pfile->line_table to
148 rich_location ctor.
149 (cpp_diagnostic_with_line): Likewise.
150 * include/cpplib.h (struct cpp_token): Update comment for src_loc
151 to indicate that the range of the token is "baked into" the
152 source_location.
153 * include/line-map.h (source_location): Update the descriptive
154 comment to reflect the packing scheme for short ranges, adding
155 worked examples of location encoding.
156 (struct line_map_ordinary): Drop field "column_bits" in favor
157 of field "m_column_and_range_bits"; add field "m_range_bits".
158 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
159 (location_adhoc_data): Add source_range field.
160 (struct line_maps): Add fields "default_range_bits",
161 "num_optimized_ranges" and "num_unoptimized_ranges".
162 (get_combined_adhoc_loc): Add source_range param.
163 (get_range_from_loc): New declaration.
164 (pure_location_p): New prototype.
165 (COMBINE_LOCATION_DATA): Add source_range param.
166 (SOURCE_LINE): Update for renaming of column_bits.
167 (SOURCE_COLUMN): Likewise. Shift the column right by the map's
168 range_bits.
169 (LAST_SOURCE_LINE_LOCATION): Update for renaming of column_bits.
170 (linemap_position_for_line_and_column): Add line_maps * params.
171 (rich_location::rich_location): Likewise.
172 * lex.c (_cpp_lex_direct): Capture the range of the token, baking
173 it into token->src_loc via a call to COMBINE_LOCATION_DATA.
174 * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): Reduce from 1U << 17 to
175 1U << 12.
176 (location_adhoc_data_hash): Add the src_range into
177 the hash value.
178 (location_adhoc_data_eq): Require equality of the src_range
179 values.
180 (can_be_stored_compactly_p): New function.
181 (get_combined_adhoc_loc): Add src_range param, and store it,
182 via a bit-packing scheme for short ranges, otherwise within the
183 lookaside table. Remove the requirement that data is non-NULL.
184 (get_range_from_adhoc_loc): New function.
185 (get_range_from_loc): New function.
186 (pure_location_p): New function.
187 (linemap_add): Ensure that start_location has zero for the
188 range_bits, unless we're past LINE_MAP_MAX_LOCATION_WITH_COLS.
189 Initialize range_bits to zero. Assert that the start_location
190 is "pure".
191 (linemap_line_start): Assert that the
192 column_and_range_bits >= range_bits.
193 Update determinination of whether we need to start a new map
194 using the effective column bits, without the range bits.
195 Use the set's default_range_bits in new maps, apart from
196 those with column_bits == 0, which should also have 0 range_bits.
197 Increase the column bits for new maps by the range bits.
198 When adding lines to an existing map, use set->highest_line
199 directly rather than offsetting highest by SOURCE_COLUMN.
200 Add assertions to sanity-check the return value.
201 (linemap_position_for_column): Offset to_column by range_bits.
202 Update set->highest_location if necessary.
203 (linemap_position_for_line_and_column): Add line_maps * param.
204 Update the calculation to offset the column by range_bits, and
205 conditionalize it on being <= LINE_MAP_MAX_LOCATION_WITH_COLS.
206 Bound it by LINEMAPS_MACRO_LOWEST_LOCATION. Update
207 set->highest_location if necessary.
208 (linemap_position_for_loc_and_offset): Handle ad-hoc locations;
209 pass "set" to linemap_position_for_line_and_column.
210 (linemap_macro_map_loc_unwind_toward_spelling): Add line_maps
211 param. Handle ad-hoc locations.
212 (linemap_location_in_system_header_p): Pass on "set" to call to
213 linemap_macro_map_loc_unwind_toward_spelling.
214 (linemap_macro_loc_to_spelling_point): Retain ad-hoc locations.
215 Pass on "set" to call to
216 linemap_macro_map_loc_unwind_toward_spelling.
217 (linemap_resolve_location): Retain ad-hoc locations. Pass on
218 "set" to call to linemap_macro_map_loc_unwind_toward_spelling.
219 (linemap_unwind_toward_expansion): Pass on "set" to call to
220 linemap_macro_map_loc_unwind_toward_spelling.
221 (linemap_expand_location): Extract the data pointer before
222 extracting the location.
223 (rich_location::rich_location): Add line_maps param; use it to
224 extract the range from the source_location.
225 * location-example.txt: Regenerate, showing new representation.
226
8a645150
DM
2272015-11-06 David Malcolm <dmalcolm@redhat.com>
228
229 * errors.c (cpp_diagnostic): Update for change in signature
230 of "error" callback.
231 (cpp_diagnostic_with_line): Likewise, calling override_column
232 on the rich_location.
233 * include/cpplib.h (struct cpp_callbacks): Within "error"
234 callback, convert param from source_location to rich_location *,
235 and drop column_override param.
236 * include/line-map.h (struct source_range): New struct.
237 (struct location_range): New struct.
238 (class rich_location): New class.
239 (linemap_client_expand_location_to_spelling_point): New declaration.
240 * line-map.c (rich_location::rich_location): New ctors.
241 (rich_location::lazily_expand_location): New method.
242 (rich_location::override_column): New method.
243 (rich_location::add_range): New methods.
244 (rich_location::set_range): New method.
245
ee015909
DM
2462015-11-06 David Malcolm <dmalcolm@redhat.com>
247
248 * include/line-map.h (struct linemap_stats): Add fields
249 "adhoc_table_size" and "adhoc_table_entries_used".
250 * line-map.c (linemap_get_statistics): Populate above fields.
251
a6c764d0
MM
2522015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
253
254 * config.in: Regenerate.
255 * configure: Regenerate.
256 * configure.ac: Remove ENABLE_CHECKING.
257
49445904
UB
2582015-11-03 Uros Bizjak <ubizjak@gmail.com>
259
260 * lex.c (search_line_sse42): Correctly advance the pointer to an
261 aligned address.
262
525ce910
DM
2632015-11-02 David Malcolm <dmalcolm@redhat.com>
264
265 * include/line-map.h (source_location): In the table in the
266 descriptive comment, show UNKNOWN_LOCATION, BUILTINS_LOCATION,
267 LINE_MAP_MAX_LOCATION_WITH_COLS, LINE_MAP_MAX_SOURCE_LOCATION.
268 Add notes about ad-hoc values.
269
7ec491c0
MM
2702015-10-21 Mikhail Maltsev <maltsevm@gmail.com>
271
22d66382
MM
272 * include/line-map.h: Use CHECKING_P instead of ENABLE_CHECKING.
273 * init.c: Likewise.
274 * macro.c (struct macro_arg_token_iter, set_arg_token,
275 macro_arg_token_iter_init, macro_arg_token_iter_forward,
276 macro_arg_token_iter_get_token, macro_arg_token_iter_get_location,
277 alloc_expanded_arg_mem, _cpp_backup_tokens): Likewise.
278
7ec491c0
MM
279 * config.in: Regenerate.
280 * configure: Regenerate.
281 * configure.ac (CHECKING_P): Define.
282 * system.h (fancy_abort): Declare.
283 (abort): Define.
284 (gcc_assert): Define. Use CHECKING_P.
285
179b8d05
MM
2862015-10-13 Mikhail Maltsev <maltsevm@gmail.com>
287
288 * system.h (CHECKING_P, gcc_checking_assert): Define.
289
87b470b3
MLI
2902015-09-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
291
292 PR c/66415
293 * line-map.c (linemap_position_for_loc_and_offset): Handle the
294 case of long lines encoded in multiple maps.
295
85bc8baa
MP
2962015-09-07 Marek Polacek <polacek@redhat.com>
297
298 * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.
299
bf5372e7
YS
3002015-08-06 Yaakov Selkowitz <yselkowi@redhat.com>
301
302 * configure: Regenerate.
303
d17f7d59
TS
3042015-07-08 Thomas Schwinge <thomas@codesourcery.com>
305
306 * include/line-map.h (RESERVED_LOCATION_COUNT): Change type to
307 source_location.
308
fbb22910
PC
3092015-07-02 Paolo Carlini <paolo.carlini@oracle.com>
310
d885793d 311 PR preprocessor/53690
fbb22910
PC
312 * charset.c (_cpp_valid_ucn): Add cppchar_t * parameter and change
313 return type to bool. Fix encoding of \u0000 and \U00000000 in C++.
314 (convert_ucn): Adjust call.
315 * lex.c (forms_identifier_p): Likewise.
316 * internal.h (_cpp_valid_ucn): Adjust declaration.
317
fe95b036
ESR
3182015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
319
320 Implement N4197 - Adding u8 character literals
321 * include/cpplib.h (UTF8CHAR, UTF8CHAR_USERDEF): New cpp tokens;
322 (struct cpp_options): Add utf8_char_literals.
323 * init.c (struct lang_flags): Add utf8_char_literals;
324 (struct lang_flags lang_defaults): Add column for utf8_char_literals.
fbb22910 325 * macro.c (stringify_arg()): Treat CPP_UTF8CHAR token;
fe95b036
ESR
326 * expr.c (cpp_userdef_char_remove_type(), cpp_userdef_char_add_type()):
327 Treat CPP_UTF8CHAR_USERDEF, CPP_UTF8CHAR tokens;
328 (cpp_userdef_char_p()): Treat CPP_UTF8CHAR_USERDEF token;
329 (eval_token(), _cpp_parse_expr()): Treat CPP_UTF8CHAR token.
330 * lex.c (lex_string(), _cpp_lex_direct()): Include CPP_UTF8CHAR tokens.
331 * charset.c (converter_for_type(), cpp_interpret_charconst()):
332 Treat CPP_UTF8CHAR token.
333
dc6bcf52
UB
3342015-06-30 Uros Bizjak <ubizjak@gmail.com>
335
336 * lex.c (search_line_sse42) [__GCC_ASM_FLAG_OUTPUTS__]: New main
337 loop using asm flag outputs.
338
a1661b90
MP
3392015-06-08 Marek Polacek <polacek@redhat.com>
340
341 PR c/66415
342 * line-map.c (linemap_position_for_loc_and_offset): Remove
343 linemap_assert_fails; reverse conditions.
344
815facd3
MLI
3452015-05-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
346
347 * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER
348 LINE_MAP_MAX_LOCATION_WITH_COLS,LINE_MAP_MAX_SOURCE_LOCATION):
349 New constants.
350 (linemap_line_start): Use them.
351 (linemap_position_for_column): Use them.
352
c819ed29
DM
3532015-05-20 David Malcolm <dmalcolm@redhat.com>
354
355 * include/line-map.h (MAP_START_LOCATION): Eliminate the non-const
356 variant, and tweak comment for the const variant.
357 (ORDINARY_MAP_STARTING_LINE_NUMBER): Drop the non-const variant.
358 (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
359 (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
360 (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
361 (ORDINARY_MAP_FILE_NAME): Drop the non-const variant.
362 (MACRO_MAP_MACRO): Likewise.
363 (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
364 (MACRO_MAP_LOCATIONS): Likewise.
365 (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
366 * line-map.c (linemap_add): Replace writes through macros with
367 direct field accesses.
368 (linemap_enter_macro): Likewise.
369 (linemap_line_start): Likewise.
370
0e50b624
DM
3712015-05-19 David Malcolm <dmalcolm@redhat.com>
372
373 * directives.c (do_line): Strengthen local "map" from
374 const line_map * to const line_map_ordinary *.
375 (do_linemarker): Likewise.
376 (_cpp_do_file_change): Assert that we're not dealing with
377 a macro map. Introduce local "ord_map" via a call to
378 linemap_check_ordinary, guarded within the check for
379 non-NULL. Use it for typesafety.
380 * files.c (cpp_make_system_header): Strengthen local "map" from
381 const line_map * to const line_map_ordinary *.
382 * include/cpplib.h (struct cpp_callbacks): Likewise for second
383 parameter of "file_change" callback.
384 * include/line-map.h (struct line_map): Convert from a struct
385 containing a union to a base class.
386 (struct line_map_ordinary): Convert to a subclass of line_map.
387 (struct line_map_macro): Likewise.
388 (linemap_check_ordinary): Strengthen return type from line_map *
389 to line_map_ordinary *, and add a const-variant.
390 (linemap_check_macro): New pair of functions.
391 (ORDINARY_MAP_STARTING_LINE_NUMBER): Strengthen param from
392 const line_map * to const line_map_ordinary *, eliminating call
393 to linemap_check_ordinary. Likewise for the non-const variant.
394 (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
395 (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
396 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Likewise.
397 (ORDINARY_MAP_FILE_NAME): Likewise.
398 (MACRO_MAP_MACRO): Strengthen param from const line_map * to
399 const line_map_macro *. Likewise for the non-const variant.
400 (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
401 (MACRO_MAP_LOCATIONS): Likewise.
402 (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
403 (struct maps_info): Replace with...
404 (struct maps_info_ordinary):...this and...
405 (struct maps_info_macro): ...this.
406 (struct line_maps): Convert fields "info_ordinary" and
407 "info_macro" to the above new structs.
408 (LINEMAPS_MAP_INFO): Delete both functions.
409 (LINEMAPS_MAPS): Likewise.
410 (LINEMAPS_ALLOCATED): Rewrite both variants to avoid using
411 LINEMAPS_MAP_INFO.
412 (LINEMAPS_USED): Likewise.
413 (LINEMAPS_CACHE): Likewise.
414 (LINEMAPS_MAP_AT): Likewise.
415 (LINEMAPS_ORDINARY_MAPS): Strengthen return type from line_map *
416 to line_map_ordinary *.
417 (LINEMAPS_ORDINARY_MAP_AT): Likewise.
418 (LINEMAPS_LAST_ORDINARY_MAP): Likewise.
419 (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise.
420 (LINEMAPS_MACRO_MAPS): Strengthen return type from line_map * to
421 line_map_macro *.
422 (LINEMAPS_MACRO_MAP_AT): Likewise.
423 (LINEMAPS_LAST_MACRO_MAP): Likewise.
424 (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise.
425 (linemap_map_get_macro_name): Strengthen param from
426 const line_map * to const line_map_macro *.
427 (SOURCE_LINE): Strengthen first param from const line_map * to
428 const line_map_ordinary *, removing call to
429 linemap_check_ordinary.
430 (SOURCE_COLUMN): Likewise.
431 (LAST_SOURCE_LINE_LOCATION): Likewise.
432 (LAST_SOURCE_LINE): Strengthen first param from const line_map *
433 to const line_map_ordinary *.
434 (LAST_SOURCE_COLUMN): Likewise.
435 (INCLUDED_FROM): Strengthen return type from line_map * to
436 line_map_ordinary *., and second param from const line_map *
437 to const line_map_ordinary *, removing call to
438 linemap_check_ordinary.
439 (MAIN_FILE_P): Strengthen param from const line_map * to
440 const line_map_ordinary *, removing call to
441 linemap_check_ordinary.
442 (linemap_position_for_line_and_column): Strengthen param from
443 const line_map * to const line_map_ordinary *.
444 (LINEMAP_FILE): Strengthen param from const line_map * to
445 const line_map_ordinary *, removing call to
446 linemap_check_ordinary.
447 (LINEMAP_LINE): Likewise.
448 (LINEMAP_SYSP): Likewise.
449 (linemap_resolve_location): Strengthen final param from
450 const line_map ** to const line_map_ordinary **.
451 * internal.h (CPP_INCREMENT_LINE): Likewise for local "map".
452 (linemap_enter_macro): Strengthen return type from
453 const line_map * to const line_map_macro *.
454 (linemap_add_macro_token): Likewise for first param.
455 * line-map.c (linemap_check_files_exited): Strengthen local "map"
456 from const line_map * to const line_map_ordinary *.
457 (new_linemap): Introduce local "map_size" and use it when
458 calculating how large the buffer should be. Rewrite based
459 on change of info_macro and info_ordinary into distinct types.
460 (linemap_add): Strengthen locals "map" and "from" from line_map *
461 to line_map_ordinary *.
462 (linemap_enter_macro): Strengthen return type from
463 const line_map * to const line_map_macro *, and local "map" from
464 line_map * to line_map_macro *.
465 (linemap_add_macro_token): Strengthen param "map" from
466 const line_map * to const line_map_macro *.
467 (linemap_line_start): Strengthen local "map" from line_map * to
468 line_map_ordinary *.
469 (linemap_position_for_column): Likewise.
470 (linemap_position_for_line_and_column): Strengthen first param
471 from const line_map * to const line_map_ordinary *.
472 (linemap_position_for_loc_and_offset): Strengthen local "map" from
473 const line_map * to const line_map_ordinary *.
474 (linemap_ordinary_map_lookup): Likewise for return type and locals
475 "cached" and "result".
476 (linemap_macro_map_lookup): Strengthen return type and locals
477 "cached" and "result" from const line_map * to
478 const line_map_macro *.
479 (linemap_macro_map_loc_to_exp_point): Likewise for param "map".
480 (linemap_macro_map_loc_to_def_point): Likewise.
481 (linemap_macro_map_loc_unwind_toward_spelling): Likewise.
482 (linemap_get_expansion_line): Strengthen local "map" from
483 const line_map * to const line_map_ordinary *.
484 (linemap_get_expansion_filename): Likewise.
485 (linemap_map_get_macro_name): Strengthen param from
486 const line_map * to const line_map_macro *.
487 (linemap_location_in_system_header_p): Add call to
488 linemap_check_ordinary in region guarded by
489 !linemap_macro_expansion_map_p. Introduce local "macro_map" via
490 linemap_check_macro in other region, using it in place of "map"
491 for typesafety.
492 (first_map_in_common_1): Add calls to linemap_check_macro.
493 (trace_include): Strengthen param "map" from const line_map * to
494 const line_map_ordinary *.
495 (linemap_macro_loc_to_spelling_point): Strengthen final param from
496 const line_map ** to const line_map_ordinary **. Replace a
497 C-style cast with a const_cast, and add calls to
498 linemap_check_macro and linemap_check_ordinary.
499 (linemap_macro_loc_to_def_point): Likewise.
500 (linemap_macro_loc_to_exp_point): Likewise.
501 (linemap_resolve_location): Strengthen final param from
502 const line_map ** to const line_map_ordinary **.
503 (linemap_unwind_toward_expansion): Introduce local "macro_map" via
504 a checked cast and use it in place of *map.
505 (linemap_unwind_to_first_non_reserved_loc): Strengthen local
506 "map1" from const line_map * to const line_map_ordinary *.
507 (linemap_expand_location): Introduce local "ord_map" via a checked
508 cast and use it in place of map.
509 (linemap_dump): Make local "map" const. Strengthen local
510 "includer_map" from line_map * to const line_map_ordinary *.
511 Introduce locals "ord_map" and "macro_map" via checked casts and
512 use them in place of "map" for typesafety.
513 (linemap_dump_location): Strengthen local "map" from
514 const line_map * to const line_map_ordinary *.
515 (linemap_get_file_highest_location): Update for elimination of
516 union.
517 (linemap_get_statistics): Strengthen local "cur_map" from
518 line_map * to const line_map_macro *. Update uses of sizeof to
519 use the appropriate line_map subclasses.
520 * macro.c (_cpp_warn_if_unused_macro): Add call to
521 linemap_check_ordinary.
522 (builtin_macro): Strengthen local "map" from const line_map * to
523 const line_map_macro *.
524 (enter_macro_context): Likewise.
525 (replace_args): Likewise.
526 (tokens_buff_put_token_to): Likewise for param "map".
527 (tokens_buff_add_token): Likewise.
528
ba4ad400
DM
5292015-05-13 David Malcolm <dmalcolm@redhat.com>
530
531 * include/line-map.h (source_location): Add a reference to
532 location-example.txt to the descriptive comment.
533 * location-example.txt: New file.
534
0501dbd9
DM
5352015-05-13 David Malcolm <dmalcolm@redhat.com>
536
537 * include/line-map.h (MAX_SOURCE_LOCATION): Convert from a macro
538 to a const source_location.
539 (RESERVED_LOCATION_COUNT): Likewise.
540 (linemap_check_ordinary): Convert from a macro to a pair of inline
541 functions, for const/non-const arguments.
542 (MAP_START_LOCATION): Likewise.
543 (ORDINARY_MAP_STARTING_LINE_NUMBER): Likewise.
544 (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
545 (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
546 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Convert from a macro to a
547 pair of inline functions, for const/non-const arguments, where the
548 latter is named...
549 (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): New function.
550 (ORDINARY_MAP_FILE_NAME): Convert from a macro to a pair of inline
551 functions, for const/non-const arguments.
552 (MACRO_MAP_MACRO): Likewise.
553 (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
554 (MACRO_MAP_LOCATIONS): Likewise.
555 (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
556 (LINEMAPS_MAP_INFO): Likewise.
557 (LINEMAPS_MAPS): Likewise.
558 (LINEMAPS_ALLOCATED): Likewise.
559 (LINEMAPS_USED): Likewise.
560 (LINEMAPS_CACHE): Likewise.
561 (LINEMAPS_ORDINARY_CACHE): Likewise.
562 (LINEMAPS_MACRO_CACHE): Likewise.
563 (LINEMAPS_MAP_AT): Convert from a macro to an inline function.
564 (LINEMAPS_LAST_MAP): Likewise.
565 (LINEMAPS_LAST_ALLOCATED_MAP): Likewise.
566 (LINEMAPS_ORDINARY_MAPS): Likewise.
567 (LINEMAPS_ORDINARY_MAP_AT): Likewise.
568 (LINEMAPS_ORDINARY_ALLOCATED): Likewise.
569 (LINEMAPS_ORDINARY_USED): Likewise.
570 (LINEMAPS_LAST_ORDINARY_MAP): Likewise.
571 (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise.
572 (LINEMAPS_MACRO_MAPS): Likewise.
573 (LINEMAPS_MACRO_MAP_AT): Likewise.
574 (LINEMAPS_MACRO_ALLOCATED): Likewise.
575 (LINEMAPS_MACRO_USED): Likewise.
576 (LINEMAPS_MACRO_LOWEST_LOCATION): Likewise.
577 (LINEMAPS_LAST_MACRO_MAP): Likewise.
578 (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise.
579 (IS_ADHOC_LOC): Likewise.
580 (COMBINE_LOCATION_DATA): Likewise.
581 (SOURCE_LINE): Likewise.
582 (SOURCE_COLUMN): Likewise.
583 (LAST_SOURCE_LINE_LOCATION): Likewise.
584 (LAST_SOURCE_LINE): Likewise.
585 (LAST_SOURCE_COLUMN): Likewise.
586 (LAST_SOURCE_LINE_LOCATION)
587 (INCLUDED_FROM): Likewise.
588 (MAIN_FILE_P): Likewise.
589 (LINEMAP_FILE): Likewise.
590 (LINEMAP_LINE): Likewise.
591 (LINEMAP_SYSP): Likewise.
592 (linemap_location_before_p): Likewise.
593 * line-map.c (linemap_check_files_exited): Make local "map" const.
594 (linemap_add): Use SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS.
595 (linemap_line_start): Likewise.
596
eb70f327
MH
5972015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
598
599 * aclocal.m4: Regenerated with automake-1.11.6.
600
60c12095
DM
6012015-05-13 David Malcolm <dmalcolm@redhat.com>
602
603 * include/line-map.h (linemap_assert): Move up within the file to
604 before all of the map accessor macros.
605 (linemap_assert_fails): Likewise.
606 (linemap_check_ordinary): Likewise.
607 (linemap_macro_expansion_map_p): Likewise.
608
c3388e62
DM
6092015-05-12 David Malcolm <dmalcolm@redhat.com>
610
611 * directives.c (do_line): Set seen_line_directive on line_table.
612 (do_linemarker): Likewise.
613 * include/line-map.h (struct line_maps): Add new field
614 "seen_line_directive".
615
fe191308
JM
6162015-05-08 Jason Merrill <jason@redhat.com>
617
618 * include/cpplib.h: Add CPP_W_CXX11_COMPAT.
619 (struct cpp_options): Add cpp_warn_cxx11_compat.
620 * init.c (cpp_create_reader): Initialize it.
621 * lex.c (lex_string): Add -Wc++11-compat warning.
622
21c0a521
DM
6232015-05-05 David Malcolm <dmalcolm@redhat.com>
624
625 * pch.c (cpp_valid_state): Fix indentation so that it reflects the
626 block structure.
627
c87b25e6
DM
6282015-05-05 David Malcolm <dmalcolm@redhat.com>
629
630 * include/line-map.h: Fix comment at the top of the file.
631 (source_location): Rewrite and expand the comment for this
632 typedef, adding an ascii-art table to clarify how source_location
633 values are allocated.
634 * line-map.c: Fix comment at the top of the file.
635
ca708025
RB
6362015-04-09 Richard Biener <rguenther@suse.de>
637
638 PR pch/65550
639 * files.c (pch_open_file): Allow main and pre-included files
640 when trying to open a PCH.
641
e4b33ee5
JJ
6422015-04-06 Jakub Jelinek <jakub@redhat.com>
643
644 PR preprocessor/61977
645 * lex.c (cpp_peek_token): If peektok is CPP_EOF, back it up
646 with all tokens peeked by the current function.
647
b8cd77f4
JJ
6482015-04-02 Jakub Jelinek <jakub@redhat.com>
649
650 PR preprocessor/61977
651 * lex.c (cpp_peek_token): Temporarily clear pfile->cb.line_change.
652
fb136e35
JJ
6532015-03-23 Jakub Jelinek <jakub@redhat.com>
654
655 PR preprocessor/65238
656 * internal.h (_cpp_scan_out_logical_line): Add third argument.
657 * directives.c (prepare_directive_trad): Pass false to it.
658 * traditional.c (_cpp_read_logical_line_trad,
659 _cpp_create_trad_definition): Likewise.
660 (struct fun_macro): Add paramc field.
661 (fun_like_macro): New function.
662 (maybe_start_funlike): Handle NODE_BUILTIN macros. Initialize
663 macro->paramc field.
664 (save_argument): Use macro->paramc instead of
665 macro->node->value.macro->paramc.
666 (push_replacement_text): Formatting fix.
667 (recursive_macro): Use fun_like_macro helper.
668 (_cpp_scan_out_logical_line): Likewise. Add BUILTIN_MACRO_ARG
669 argument. Initialize fmacro.paramc field. Handle builtin
670 function-like macros.
671
a5858a3d
ESR
6722015-03-16 Edward Smith-Rowland <3dw4rd@verizon.net>
673
674 PR c++/64626
675 * lex.c (lex_number): If a number ends with digit-seps (') skip back
676 and let lex_string take them.
677
44d95244
MT
6782015-03-02 Markus Trippelsdorf <markus@trippelsdorf.de>
679
680 PR target/65261
681 * lex.c (search_line_fast): Silence ubsan errors.
682
f8abc9ba
DS
6832015-02-03 <dodji@redhat.com>
684
685 PR preprocessor/64803
686 * internal.h (cpp_reader::top_most_macro_node): New data member.
687 * macro.c (enter_macro_context): Pass the location of the end of
688 the top-most invocation of the function-like macro, or the
689 location of the expansion point of the top-most object-like macro.
690 (cpp_get_token_1): Store the top-most macro node in the new
691 pfile->top_most_macro_node data member.
692 (_cpp_pop_context): Clear the new cpp_reader::top_most_macro_node
693 data member.
694
95d0610c
SN
6952015-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
696
697 * lex.c (search_line_fast): Change __ARM_NEON__ to __ARM_NEON.
698
10ef8f28
MP
6992015-01-23 Marek Polacek <polacek@redhat.com>
700
701 DR#412
702 PR preprocessor/60570
703 * directives.c (do_elif): Don't evaluate #elif conditionals
704 when they don't need to be.
705
6e6cb471
JJ
7062015-01-16 Jakub Jelinek <jakub@redhat.com>
707
708 * expr.c (cpp_classify_number): Add N_() around ?: string
709 literals used in cpp_error_with_line call as format string.
710
5624e564
JJ
7112015-01-05 Jakub Jelinek <jakub@redhat.com>
712
713 Update copyright years.
714
1f8d3e84
JJ
7152014-12-19 Jakub Jelinek <jakub@redhat.com>
716
717 PR preprocessor/63831
718 * directives.c (lex_macro_node): Remove __has_attribute__ handling.
719 * internal.h (struct spec_node): Remove n__has_attribute__ field.
720 (struct lexer_state): Remove in__has_attribute__ field.
721 * macro.c (_cpp_builtin_macro_text): Handle BT_HAS_ATTRIBUTE.
722 * identifiers.c (_cpp_init_hashtable): Remove __has_attribute__
723 handling.
724 * init.c (builtin_array): Add __has_attribute and __has_cpp_attribute.
725 (cpp_init_special_builtins): Don't initialize __has_attribute
726 or __has_cpp_attribute if CLK_ASM or pfile->cb.has_attribute is NULL.
727 * traditional.c (enum ls): Remove ls_has_attribute,
728 ls_has_attribute_close.
729 (_cpp_scan_out_logical_line): Remove __has_attribute__ handling.
730 * include/cpplib.h (enum cpp_builtin_type): Add BT_HAS_ATTRIBUTE.
731 * pch.c (cpp_read_state): Remove __has_attribute__ handling.
732 * expr.c (eval_token): Likewise.
733 (parse_has_attribute): Removed.
734
01ca36af
UB
7352014-12-11 Uros Bizjak <ubizjak@gmail.com>
736
737 * directives.c (cpp_define_formatted): Use xvasprintf.
738
b93c0722
MLI
7392014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
740
741 * line-map.c (linemap_position_for_loc_and_offset): Add new
742 linemap_assert_fails.
743
73bd8329
MLI
7442014-12-02 Manuel López-Ibáñez <manu@gcc.gnu.org>
745
746 * include/line-map.h (linemap_assert_fails): Declare.
747 * line-map.c (linemap_position_for_loc_and_offset): Use it.
748
9c320ab1
MLI
7492014-12-02 Manuel López-Ibáñez <manu@gcc.gnu.org>
750
49445904
UB
751 * line-map.c (linemap_add): Fix typo.
752 (linemap_line_start): Fix whitespace.
9c320ab1 753
81fee4a7
JM
7542014-11-29 John Schmerge <jbschmerge@gmail.com>
755
756 PR preprocessor/41698
757 * charset.c (one_utf8_to_utf16): Do not produce surrogate pairs
758 for 0xffff.
759
43ba1c6c
JJ
7602014-11-25 Jakub Jelinek <jakub@redhat.com>
761
762 PR preprocessor/60436
763 * line-map.c (linemap_line_start): If highest is above 0x60000000
764 and we are still tracking columns or highest is above 0x70000000,
765 force add_map.
766
8a23b100
UB
7672014-11-20 Uros Bizjak <ubizjak@gmail.com>
768
769 PR target/63966
1b6b13f3
UB
770 * lex.c [__i386__ || __x86_64__]: Compile special SSE functions
771 only for (__GNUC__ >= 5 || !defined(__PIC__)).
8a23b100 772
d82f1e13
MLI
7732014-11-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
774
775 * include/line-map.h: Include EXPR, so that unused variable warnings
776 do not occur.
777
3aa34c1d
MLI
7782014-11-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
779
780 PR fortran/44054
781 * include/line-map.h (linemap_position_for_loc_and_offset):
782 Declare.
783 * line-map.c (linemap_position_for_loc_and_offset): New.
784
35485da9
DM
7852014-11-11 David Malcolm <dmalcolm@redhat.com>
786
787 * ChangeLog.jit: New.
788
42fd12b1
ESR
7892014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
790
791 * include/cpplib.h (cpp_callbacks): Add has_attribute.
792 * internal.h (lexer_state): Add in__has_attribute__.
793 * directives.c (lex_macro_node): Prevent use of __has_attribute__
794 as a macro.
795 * expr.c (parse_has_attribute): New function; (eval_token): Look for
796 __has_attribute__ and route to parse_has_attribute.
797 * identifiers.c (_cpp_init_hashtable): Initialize n__has_attribute__.
798 * pch.c (cpp_read_state): Initialize n__has_attribute__.
799 * traditional.c (enum ls): Add ls_has_attribute, ls_has_attribute_close;
800 (_cpp_scan_out_logical_line): Attend to __has_attribute__.
801
be5ffc59
JM
8022014-11-06 Joseph Myers <joseph@codesourcery.com>
803
804 * include/cpp-id-data.h (struct cpp_macro): Update comment
805 regarding parameters.
806 * include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier):
807 Add spelling fields.
808 (struct cpp_token): Update comment on macro_arg.
809 * internal.h (_cpp_save_parameter): Add extra argument.
810 (_cpp_spell_ident_ucns): New declaration.
811 * lex.c (lex_identifier): Add SPELLING argument. Set *SPELLING to
812 original spelling of identifier.
813 (_cpp_lex_direct): Update calls to lex_identifier.
814 (_cpp_spell_ident_ucns): New function, factored out of
815 cpp_spell_token.
816 (cpp_spell_token): Adjust FORSTRING argument semantics to return
817 original spelling of identifiers. Use _cpp_spell_ident_ucns in
818 !FORSTRING case.
819 (_cpp_equiv_tokens): Check spellings of identifiers and macro
820 arguments are identical.
821 * macro.c (macro_arg_saved_data): New structure.
822 (paste_tokens): Use original spellings of identifiers from
823 cpp_spell_token.
824 (_cpp_save_parameter): Add argument SPELLING. Save both canonical
825 node and its value.
826 (parse_params): Update calls to _cpp_save_parameter.
827 (lex_expansion_token): Save spelling of macro argument tokens.
828 (_cpp_create_definition): Extract canonical node from saved data.
829 (cpp_macro_definition): Use UCNs in spelling of macro name. Use
830 original spellings of macro argument tokens and identifiers.
831 * traditional.c (scan_parameters): Update call to
832 _cpp_save_parameter.
833
701cade1
JM
8342014-11-05 Joseph Myers <joseph@codesourcery.com>
835
836 PR preprocessor/9449
837 * init.c (lang_defaults): Enable extended identifiers for C++ and
838 C99-based standards.
839
19a9ba64
AM
8402014-10-22 Alan Modra <amodra@gmail.com>
841
842 * symtab.c (ht_create): Use obstack_specify_allocation in place of
843 _obstack_begin.
844 * files.c (_cpp_init_files): Likewise.
845 * init.c (cpp_create_reader): Likewise.
846 * identifiers.c (_cpp_init_hashtable): Likewise.
847
3aac0952
MLI
8482014-10-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
849
850 * include/line-map.h (linemap_location_from_macro_expansion_p):
851 const struct line_maps * argument.
852 (linemap_position_for_line_and_column): const struct line_map *
853 argument.
854 * line-map.c (linemap_add_macro_token): Use correct argument name
855 in comment.
856 (linemap_position_for_line_and_column): const struct line_map *
857 argument.
858 (linemap_macro_map_loc_to_def_point): Fix comment. Make static.
859 (linemap_location_from_macro_expansion_p): const struct line_maps *
860 argument.
861 (linemap_resolve_location): Fix argument names in comment.
862
0ccaaab0
BS
8632014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
864
865 * lex.c (search_line_fast): Add new version to be used for Power8
866 and later targets when Altivec is enabled. Restrict the existing
867 Altivec version to big-endian systems so that lvsr is not used on
868 little endian, where it is deprecated. Remove LE-specific code
869 from the now-BE-only version.
870
dc257367
BE
8712014-10-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
872 Jeff Law <law@redhat.com>
873
874 * charset.c (convert_no_conversion): Reallocate memory with 25%
875 headroom.
876
a15f7cb8
ESR
8772014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
878
879 Implement SD-6: SG10 Feature Test Recommendations
880 * internal.h (lexer_state, spec_nodes): Add in__has_include__.
881 * directives.c: Support __has_include__ builtin.
882 * expr.c (parse_has_include): New function to parse __has_include__
883 builtin; (eval_token()): Use it.
884 * files.c (_cpp_has_header()): New funtion to look for header;
885 (open_file_failed()): Not an error to not find a header file for
886 __has_include__.
887 * identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__.
888 * pch.c (cpp_read_state): Lookup __has_include__.
889 * traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through
890 __has_include__ statements.
891
cc811a8a
BE
8922014-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
893
894 PR preprocessor/58893
895 * errors.c (cpp_diagnostic): Fix possible out of bounds access.
896 * files.c (_cpp_stack_include): Initialize src_loc for IT_CMDLINE.
897
083e891e
MP
8982014-09-24 Marek Polacek <polacek@redhat.com>
899
900 PR c/61405
901 PR c/53874
902 * include/cpplib.h (enum cpp_ttype): Define CPP_KEYWORD.
903
d87fc699
JH
9042014-09-17 Jan Hubicka <hubicka@ucw.cz>
905
906 * charset.c (conversion): Rename to ...
907 (cpp_conversion): ... this one; update.
908 * files.c (file_hash_entry): Rename to ...
909 (cpp_file_hash_entry): ... this one ; update.
910
909eb89c
MP
9112014-09-17 Marek Polacek <polacek@redhat.com>
912
913 PR c/61854
914 * init.c (struct lang_flags): Remove cplusplus_comments.
915 (cpp_set_lang): Likewise.
916 (post_options): Likewise.
917 * lex.c (_cpp_lex_direct): Disallow C++ style comments in C90/C94.
918
1ef33fd4
MLI
9192014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
920
921 * include/cpplib.h (struct cpp_options): Declare warn_normalize as
922 int instead of enum.
923
2b71f4a4
MLI
9242014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
925
926 * macro.c (replace_args): Use cpp_pedwarning, cpp_warning and
927 CPP_W flags.
928 * include/cpplib.h: Add CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
929 * init.c (cpp_create_reader): Do not init to -1 here.
930 * expr.c (num_binary_op): Use cpp_pedwarning.
931
81b5d104
MLI
9322014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
933
934 * directives.c (check_eol_1): New.
935 (check_eol_endif_labels): New.
936 (check_eol): Call check_eol_1.
937 (do_else,do_endif): Call check_eol_endif_labels.
938
b753b37b
MLI
9392014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
940
941 * macro.c (warn_of_redefinition): Suppress warnings for builtins
942 that lack the NODE_WARN flag, unless Wbuiltin-macro-redefined.
943 (_cpp_create_definition): Use Wbuiltin-macro-redefined for
944 builtins that lack the NODE_WARN flag.
945 * directives.c (do_undef): Likewise.
946 * init.c (cpp_init_special_builtins): Do not change flags
947 depending on Wbuiltin-macro-redefined.
948
7c05e50c
ESR
9492014-08-28 Edward Smith-Rowland <3dw4rd@verizon.net>
950
951 PR cpp/23827 - standard C++ should not have hex float preprocessor
952 tokens
953 * libcpp/init.c (lang_flags): Change CXX98 flag for extended numbers
954 from 1 to 0.
955 * libcpp/expr.c (cpp_classify_number): Weite error message for improper
956 use of hex floating literal.
957
e4276ba5
ESR
9582014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
959
960 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z;
961 Rename CLK_GNUCXX1Y, CLK_CXX1Y to CLK_GNUCXX14, CLK_CXX14;
962 * init.c (struct lang_flags lang_defaults): Add column for trigraphs;
963 Add rows for CLK_GNUCXX1Z, CLK_CXX1Z; (cpp_set_lang): Set trigraphs;
964 (cpp_init_builtins): Set __cplusplus to 201402L for C++14;
965 Set __cplusplus to 201500L for C++17.
966 * expr.c (cpp_classify_number): Change C++1y to C++14 in binary
967 constants error message.
968
dd3ff077
MP
9692014-08-20 Marek Polacek <polacek@redhat.com>
970
971 * include/cpplib.h (cpp_options): Use signed char.
972 * lex.c (_cpp_lex_direct): Don't warn in C++ mode.
973
3f4f5c9a
MP
9742014-08-19 Marek Polacek <polacek@redhat.com>
975
976 * lex.c (_cpp_lex_direct): Fix a typo.
977
177cce46
MP
9782014-08-19 Marek Polacek <polacek@redhat.com>
979
980 * charset.c (_cpp_valid_ucn): Warn only if -Wc90-c99-compat.
981 * lex.c (_cpp_lex_direct): Likewise.
982 * macro.c (replace_args): Likewise.
983 (parse_params): Likewise.
984 * include/cpplib.h (cpp_options): Change cpp_warn_c90_c99_compat
985 to char.
986
f3bede71
MP
9872014-08-10 Marek Polacek <polacek@redhat.com>
988
989 PR c/51849
990 * lex.c (_cpp_lex_direct): Warn when -Wc90-c99-compat is in effect.
991 * charset.c (_cpp_valid_ucn): Likewise.
992 * include/cpplib.h (cpp_options): Add cpp_warn_c90_c99_compat.
993 * macro.c (replace_args): Warn when -Wc90-c99-compat is in effect.
994 (parse_params): Likewise.
995
61eb99f6
MP
9962014-07-27 Marek Polacek <polacek@redhat.com>
997
998 PR c/61861
999 * macro.c (builtin_macro): Add location parameter. Set
1000 location of builtin macro to the expansion point.
1001 (enter_macro_context): Pass location to builtin_macro.
1002
c468587a
DS
10032014-07-16 Dodji Seketeli <dodji@redhat.com>
1004
1005 Support location tracking for built-in macro tokens
1006 * include/line-map.h (line_maps::builtin_location): New data
1007 member.
1008 (line_map_init): Add a new parameter to initialize the new
1009 line_maps::builtin_location data member.
1010 * line-map.c (linemap_init): Initialize the
1011 line_maps::builtin_location data member.
1012 * macro.c (builtin_macro): Create a macro map and track the token
1013 resulting from the expansion of a built-in macro.
1014
3976796b
ESR
10152014-07-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1016 Jonathan Wakely <jwakely@redhat.com>
1017
c786fca6 1018 PR preprocessor/61389
3976796b
ESR
1019 * macro.c (_cpp_arguments_ok, parse_params, create_iso_definition):
1020 Warning messages mention C++11 in c++ mode and C99 in c mode.
1021 * lex.c (lex_identifier_intern, lex_identifier): Ditto
1022
7aee8646
ESR
10232014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1024
1025 PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
1026 by preprocessor
1027 * lex.c (lex_raw_string ()): Do not warn about invalid suffix
1028 if skipping. (lex_string ()): Ditto.
1029
98ba7482
ESR
10302014-06-04 Edward Smith-Rowland <3dw4rd@verizon.net>
1031
1032 PR c++/61038
1033 * macro.c (stringify_arg (cpp_reader *, macro_arg *)):
1034 Combine user-defined escape logic with the other string and char logic.
1035
edf6ddf6
RB
10362014-05-26 Richard Biener <rguenther@suse.de>
1037
1038 * configure.ac: Remove long long and __int64 type checks,
1039 add check for uint64_t and fail if that wasn't found.
1040 * include/cpplib.h (cpp_num_part): Use uint64_t.
1041 * config.in: Regenerate.
1042 * configure: Likewise.
1043
28939589
MP
10442014-05-21 Marek Polacek <polacek@redhat.com>
1045
1046 PR c/61212
1047 * files.c (find_file_in_dir): Add parens around &&.
1048
49039169
ESR
10492014-05-20 Edward Smith-Rowland <3dw4rd@verizon.net>
1050
28939589 1051 PR c++/61038
49039169
ESR
1052 * macro.c (stringify_arg (cpp_reader *, macro_arg *)):
1053 Check for user-defined literal strings and user-defined literal chars
1054 to escape necessary characters.
1055
54da09ee
RB
10562014-05-20 Richard Biener <rguenther@suse.de>
1057
1058 * configure.ac: Copy gcc logic of detecting a 64bit type.
1059 Remove HOST_WIDE_INT define.
1060 * include/cpplib.h: typedef cpp_num_part to a 64bit type,
1061 similar to how hwint.h does it.
1062 * config.in: Regenerate.
1063 * configure: Likewise.
1064
eac3e079
JY
10652014-05-09 Joey Ye <joey.ye@arm.com>
1066
1067 * files.c (find_file_in_dir): Always try to shorten for DOS
1068 non-system headers.
1069 * init.c (ENABLE_CANONICAL_SYSTEM_HEADERS): Default enabled for DOS.
1070
f543058d
RB
10712014-05-07 Richard Biener <rguenther@suse.de>
1072
1073 * configure.ac: Always set need_64bit_hwint to yes.
1074 * configure: Regenerated.
1075
d9f069ab
RO
10762014-04-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1077
1078 * lex.c: Remove Solaris 9 reference.
1079
341c653c
WL
10802014-02-24 Walter Lee <walt@tilera.com>
1081
1082 * configure.ac: Change "tilepro" triplet to "tilepro*".
1083 * configure: Regenerate.
1084
179652df
JJ
10852014-02-19 Jakub Jelinek <jakub@redhat.com>
1086
1087 PR preprocessor/58844
1088 * macro.c (enter_macro_context): Only push
1089 macro_real_token_count (macro) tokens rather than
1090 macro->count tokens, regardless of
1091 CPP_OPTION (pfile, track-macro-expansion).
1092
acf601ae
JJ
10932014-02-07 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR preprocessor/56824
1096 * line-map.c (get_combined_adhoc_loc, linemap_get_expansion_line,
1097 linemap_get_expansion_filename, linemap_location_in_system_header_p,
1098 linemap_location_from_macro_expansion_p,
1099 linemap_macro_loc_to_spelling_point, linemap_macro_loc_to_def_point,
1100 linemap_macro_loc_to_exp_point, linemap_expand_location): Fix
1101 formatting.
1102 (linemap_compare_locations): Look through adhoc locations for both
1103 l0 and l1.
1104
7ecc3eb9
DS
11052014-01-23 Dodji Seketeli <dodji@redhat.com>
1106
1107 PR PR preprocessor/58580
1108 * include/line-map.h (linemap_get_file_highest_location): Declare
1109 new function.
1110 * line-map.c (linemap_get_file_highest_location): Define it.
1111
35c3d610
RS
11122014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1113
1114 Update copyright years
1115
3a4efce7
JM
11162013-12-09 Joseph Myers <joseph@codesourcery.com>
1117
1118 PR preprocessor/55715
1119 * expr.c (num_binary_op): Implement subtraction directly rather
1120 than with negation and falling through into addition case.
1121
aadce585
BS
11222013-11-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1123
1124 * lex.c (search_line_fast): Correct for little endian.
1125
d3f4ff8b
JM
11262013-11-15 Joseph Myers <joseph@codesourcery.com>
1127
1128 * ucnid.tab: Add C11 and C11NOSTART data.
1129 * makeucnid.c (digit): Rename enum value to N99.
1130 (C11, N11, all_languages): New enum values.
1131 (NUM_CODE_POINTS, MAX_CODE_POINT): New macros.
1132 (flags, decomp, combining_value): Use NUM_CODE_POINTS as array
1133 size.
1134 (decomp): Use unsigned int as element type.
1135 (all_decomp): New array.
1136 (read_ucnid): Handle C11 and C11NOSTART. Use MAX_CODE_POINT.
1137 (read_table): Use MAX_CODE_POINT. Store all decompositions in
1138 all_decomp.
1139 (read_derived): Use MAX_CODE_POINT.
1140 (write_table): Use NUM_CODE_POINTS. Print N99, C11 and N11
1141 flags. Print whole array variable declaration rather than just
1142 array contents.
1143 (char_id_valid, write_context_switch): New functions.
1144 (main): Call write_context_switch.
1145 * ucnid.h: Regenerate.
1146 * include/cpplib.h (struct cpp_options): Add c11_identifiers.
1147 * init.c (struct lang_flags): Add c11_identifiers.
1148 (cpp_set_lang): Set c11_identifiers option from selected language.
1149 * internal.h (struct normalize_state): Document "previous" as
1150 previous starter character.
1151 (NORMALIZE_STATE_UPDATE_IDNUM): Take character as argument.
1152 * charset.c (DIG): Rename enum value to N99.
1153 (C11, N11): New enum values.
1154 (struct ucnrange): Give name to struct. Use short for flags and
1155 unsigned int for end of range. Include ucnid.h for whole variable
1156 declaration.
1157 (ucn_valid_in_identifier): Allow for characters up to 0x10FFFF.
1158 Allow for C11 in determining valid characters and valid start
1159 characters. Use check_nfc for non-Hangul context-dependent
1160 checks. Only store starter characters in nst->previous.
1161 (_cpp_valid_ucn): Pass new argument to
1162 NORMALIZE_STATE_UPDATE_IDNUM.
1163 * lex.c (lex_identifier): Pass new argument to
1164 NORMALIZE_STATE_UPDATE_IDNUM. Call NORMALIZE_STATE_UPDATE_IDNUM
1165 after initial non-UCN part of identifier.
1166 (lex_number): Pass new argument to NORMALIZE_STATE_UPDATE_IDNUM.
1167
54848ff8
JM
11682013-11-15 Joseph Myers <joseph@codesourcery.com>
1169
1170 * ucnid.tab: Mark C99 digits as [C99DIG].
1171 * makeucnid.c (read_ucnid): Handle [C99DIG].
1172 (read_table): Don't check for digit characters.
1173 * ucnid.h: Regenerate.
1174
5157b91e
TB
11752013-11-06 Tobias Burnus <burnus@net-b.de>
1176
1177 * macro.c (_cpp_builtin_macro_text): Correct
1178 wording of two warnings.
1179
e8ff5196
TB
11802013-11-05 Tobias Burnus <burnus@net-b.de>
1181
1182 * include/cpplib.h (CPP_W_DATE_TIME): Added.
1183 (cpp_options): Add warn_date_time.
1184 * init.c (cpp_create_reader): Init it.
1185 * macro.c (_cpp_builtin_macro_text): Warn when
1186 __DATE__/__TIME__/__TIMESTAMP__ is used.
1187
7057e645
ESR
11882013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
1189
e8ff5196 1190 Implement C++14 digit separators.
7057e645
ESR
1191 * include/cpplib.h (cpp_options): Add digit_separators flag.
1192 * internal.h (DIGIT_SEP(c)): New macro.
1193 * expr.c (cpp_classify_number): Check improper placement of digit sep;
1194 (cpp_interpret_integer): Skip over digit separators.
1195 * init.c (lang_flags): Add digit_separators flag; (lang_defaults): Add
1196 digit separator flags per language; (cpp_set_lang): Set
1197 digit_separators
1198 * lex.c (lex_number): Add digits separator to allowable characters for
1199 C++14.
1200
459260ec
DM
12012013-10-15 David Malcolm <dmalcolm@redhat.com>
1202
1203 * Makefile.in (PICFLAG): New.
1204 (ALL_CFLAGS): Add PICFLAG.
1205 (ALL_CXXFLAGS): Likewise.
1206 * configure.ac: Add --enable-host-shared, setting up new
1207 PICFLAG variable.
1208 * configure: Regenerate.
1209
fd6eea0c
RE
12102013-08-07 Richard Earnshaw <rearnsha@arm.com>
1211
1212 * configure.ac: Set need_64bit_hwint for all arm targets.
1213 * configure: Regenerated.
1214
8cf88735
JJ
12152013-07-20 Jakub Jelinek <jakub@redhat.com>
1216
1217 PR preprocessor/57620
1218 * lex.c (lex_raw_string): Undo phase1 and phase2 transformations
1219 between R" and final " rather than only in between R"del( and )del".
1220
87e356ba
JJ
12212013-07-10 Jakub Jelinek <jakub@redhat.com>
1222
d5e48350
JJ
1223 PR preprocessor/57824
1224 * lex.c (lex_raw_string): Allow reading new-lines if
1225 in_deferred_pragma or if parsing_args and there is still
1226 data in the current buffer.
1227
c26302d5
JJ
1228 * include/cpplib.h (cpp_token_val_index): Change parameter type to
1229 const cpp_token *.
1230 * lex.c (cpp_token_val_index): Likewise.
1231
87e356ba
JJ
1232 PR preprocessor/57757
1233 * lex.c (cpp_avoid_paste): Avoid pasting CPP_{,W,UTF8}STRING
1234 or CPP_STRING{16,32} with CPP_NAME or SPELL_LITERAL token that
1235 starts if a-zA-Z_.
1236
c865f923
ESR
12372013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
1238
1239 * lex.c (lex_raw_string(), lex_string()): Constrain suffixes treated
1240 as concatenated literal and macro to just the patterns found in
1241 inttypes.h; (is_macro()): New.
1242
39953c79
DC
12432013-06-24 Dehao Chen <dehao@google.com>
1244
1245 * files.c (_cpp_stack_include): Fix the highest_location when header
1246 file is guarded by #ifndef and is included twice.
1247
01187df0
JJ
12482013-04-28 Jakub Jelinek <jakub@redhat.com>
1249
1250 N3472 binary constants
1251 * include/cpplib.h (struct cpp_options): Fix a typo in user_literals
1252 field comment. Add binary_constants field.
1253 * init.c (struct lang_flags): Add binary_constants field.
1254 (lang_defaults): Add bin_cst column to the table.
1255 (cpp_set_lang): Initialize CPP_OPTION (pfile, binary_constants).
1256 * expr.c (cpp_classify_number): Talk about C++11 instead of C++0x
1257 in diagnostics. Accept binary constants if
1258 CPP_OPTION (pfile, binary_constants) even when pedantic. Adjust
1259 pedwarn message.
1260
61949153
PC
12612013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1262
1263 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Y and CLK_CXX1Y.
1264 * init.c (lang_defaults): Add defaults for the latter.
1265 (cpp_init_builtins): Define __cplusplus as 201300L for the latter.
1266 * lex.c (_cpp_lex_direct): Update.
1267
994a4cc0
SH
12682013-04-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
1269
1270 PR target/56771
1271 * configure.ac: Require 64-bit int for arm*-*-rtems*.
1272 * configure: Regenerate.
1273
28937f11
JJ
12742013-03-06 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR middle-end/56461
1277 * internal.h (struct cpp_buffer): Add to_free field.
1278 (_cpp_pop_file_buffer): Add third argument.
1279 * files.c (_cpp_stack_file): Set buffer->to_free.
1280 (_cpp_pop_file_buffer): Add to_free argument. Free to_free
1281 if non-NULL, and if equal to file->buffer_start, also clear
1282 file->buffer{,_start,_valid}.
1283 * directives.c (_cpp_pop_buffer): Pass buffer->to_free
1284 to _cpp_pop_file_buffer.
1285
3b8af25b
JJ
12862013-03-01 Jakub Jelinek <jakub@redhat.com>
1287
1288 PR middle-end/56461
1289 * files.c (_cpp_save_file_entries): Free result at the end.
1290 * pch.c (cpp_string_free): New function.
1291 (cpp_save_state): Use it in htab_create call.
1292 (cpp_write_pch_deps): Free ss->defs. Destroy ss->definedhash.
1293
1a80db97
JJ
12942013-02-28 Jakub Jelinek <jakub@redhat.com>
1295
15fd8332
JJ
1296 * files.c (_cpp_find_file): If returning early, before storing
1297 something to *hash_slot and *hash_slot is NULL, call htab_clear_slot
1298 on it. Access *hash_slot using void * type rather than
1299 struct file_hash_entry * to avoid aliasing issues.
1300
1a80db97
JJ
1301 * configure.ac: Don't define ENABLE_CHECKING whenever
1302 --enable-checking is seen, instead use similar --enable-checking=yes
1303 vs. --enable-checking=release default as gcc/ subdir has and
1304 define ENABLE_CHECKING if ENABLE_CHECKING is defined in gcc/.
1305 Define ENABLE_VALGRIND_CHECKING if requested.
1306 * lex.c (new_buff): If ENABLE_VALGRIND_CHECKING, put _cpp_buff
1307 struct first in the allocated buffer and result->base after it.
1308 (_cpp_free_buff): If ENABLE_VALGRIND_CHECKING, free buff itself
1309 instead of buff->base.
1310 * config.in: Regenerated.
1311 * configure: Regenerated.
1312
561f7fc7
ESR
13132013-02-13 Ed Smith-Rowland <3dw4rd@verizon.net>
1314
1315 PR c++/55582
61949153 1316 * lex.c (lex_raw_string): Allow string literal with suffix
561f7fc7
ESR
1317 beginning with 's' to be parsed as a C++11 user-defined literal.
1318
500f3ed9
RS
13192013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1320
1321 Update copyright years.
1322
1582c677
PC
13232013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
1324
1325 PR c++/54526 (again)
1326 * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2.
1327
8ac16127
MG
13282013-01-03 Marc Glisse <marc.glisse@inria.fr>
1329
1330 PR bootstrap/50177
1331 * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type.
1332 (new_linemap): Likewise.
1333 (linemap_enter_macro): Likewise.
1334
f41e5bd1
JJ
13352012-12-03 Jakub Jelinek <jakub@redhat.com>
1336
1337 PR bootstrap/55380
1338 PR other/54691
1339 * files.c (read_file_guts): Allocate extra 16 bytes instead of
1340 1 byte at the end of buf. Pass size + 16 instead of size
1341 to _cpp_convert_input.
1342 * charset.c (_cpp_convert_input): Reallocate if there aren't
1343 at least 16 bytes beyond to.len in the buffer. Clear 16 bytes
1344 at to.text + to.len.
1345
31962032
SE
13462012-11-21 Steve Ellcey <sellcey@mips.com>
1347
1348 PR pch/55399
1349 * files.c (pch_open_file): Fix check for implicit_preinclude.
1350
5dc99c46
SB
13512012-11-16 Simon Baldwin <simonb@google.com>
1352
1353 * include/cpplib.h (struct cpp_options): Add canonical_system_headers.
1354 * files.c (find_file_in_dir): Call maybe_shorter_path() only if
1355 canonical_system_headers is set.
1356 * init.c (cpp_create_reader): Initialize canonical_system_headers.
1357 * configure.ac: Add new --enable-canonical-system-headers.
1358 * configure: Regenerate.
1359 * config.in: Regenerate.
1360
a4a0016d
ESR
13612012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
1362
1363 PR c++/54413
1364 * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg.
1365 (cpp_interpret_int_suffix): Add cpp_reader* arg.
1366 * init.c (cpp_create_reader): Iitialize new flags.
1367 * expr.c (interpret_float_suffix): Use new flags.
1368 (cpp_interpret_float_suffix): Add cpp_reader* arg.
1369 (interpret_int_suffix): Use new flags.
1370 (cpp_interpret_int_suffix): Add cpp_reader* arg.
1371 (cpp_classify_number): Adjust calls to interpret_x_suffix.
1372
04ce690f
IB
13732012-10-23 Ian Bolton <ian.bolton@arm.com>
1374 Jim MacArthur <jim.macarthur@arm.com>
1375 Marcus Shawcroft <marcus.shawcroft@arm.com>
1376 Nigel Stephens <nigel.stephens@arm.com>
1377 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1378 Richard Earnshaw <rearnsha@arm.com>
1379 Sofiane Naci <sofiane.naci@arm.com>
1380 Stephen Thomas <stephen.thomas@arm.com>
1381 Tejas Belagod <tejas.belagod@arm.com>
1382 Yufeng Zhang <yufeng.zhang@arm.com>
1383
1384 * configure.ac: Enable AArch64.
1385 * configure: Regenerate.
1386
1efcb8c6
JM
13872012-10-23 Joseph Myers <joseph@codesourcery.com>
1388
1389 * files.c (struct _cpp_file): Add implicit_preinclude.
1390 (pch_open_file): Allow a previously opened implicitly included
1391 file.
1392 (_cpp_find_file): Add implicit_preinclude argument. Free file and
1393 do not call open_file_failed if implicit_preinclude. Store
1394 implicit_preinclude value.
1395 (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date):
1396 Update calls to _cpp_find_file.
1397 (_cpp_stack_include): Handle IT_DEFAULT.
1398 (cpp_push_default_include): New.
1399 * include/cpplib.h (cpp_push_default_include): Declare.
1400 * init.c (cpp_read_main_file): Update call to _cpp_find_file.
1401 * internal.h (enum include_type): Add IT_DEFAULT.
1402 (_cpp_find_file): Update prototype.
1403
55e7f907
TB
14042012-10-15 Tobias Burnus <burnus@net-b.de>
1405
1406 * files.c (read_file_guts, _cpp_save_file_entries): Free memory
1407 before returning.
1408 * lex.c (warn_about_normalization): Ditto.
1409 * mkdeps.c (deps_save): Ditto.
1410 * pch.c (cpp_valid_state): Ditto.
1411
f591bd8f
FW
14122012-10-04 Florian Weimer <fweimer@redhat.com>
1413
1414 * directives.c (do_pragma_warning_or_error): New.
1415 (do_pragma_warning): New.
1416 (do_pragma_error): New.
1417 (_cpp_init_internal_pragmas): Register new pragmas.
1418
ec6e0399
DC
14192012-09-25 Dehao Chen <dehao@google.com>
1420
1421 PR middle-end/54704
1422 * line-map.c (location_adhoc_data_hash): Fix the hash function.
1423
52187008
DC
14242012-09-25 Dehao Chen <dehao@google.com>
1425
1426 PR middle-end/54645
1427 * include/line-map.h (location_adhoc_data): Move location_adhoc_data
1428 into GC.
1429 (location_adhoc_data_map): Likewise.
1430 (line_maps): Likewise.
1431 (rebuild_location_adhoc_htab): New Function.
1432 * line-map.c (+rebuild_location_adhoc_htab): new Funcion.
1433 (get_combined_adhoc_loc): Move location_adhoc_data into GC.
1434 (location_adhoc_data_fini): Likewise.
1435 (linemap_init): Likewise.
1436 (location_adhoc_data_init): Remove Function.
1437
5368224f
DC
14382012-09-19 Dehao Chen <dehao@google.com>
1439
1440 * include/line-map.h (MAX_SOURCE_LOCATION): New value.
1441 (location_adhoc_data_fini): New.
1442 (get_combined_adhoc_loc): New.
1443 (get_data_from_adhoc_loc): New.
1444 (get_location_from_adhoc_loc): New.
1445 (location_adhoc_data_map): New.
1446 (COMBINE_LOCATION_DATA): New.
1447 (IS_ADHOC_LOC): New.
1448 (expanded_location): New field.
1449 (line_maps): New field.
1450 * line-map.c (location_adhoc_data): New.
1451 (location_adhoc_data_hash): New.
1452 (location_adhoc_data_eq): New.
1453 (location_adhoc_data_update): New.
1454 (get_combined_adhoc_loc): New.
1455 (get_data_from_adhoc_loc): New.
1456 (get_location_from_adhoc_loc): New.
1457 (location_adhoc_data_init): New.
1458 (location_adhoc_data_fini): New.
1459 (linemap_init): Initialize location_adhoc_data.
1460 (linemap_lookup): Change to use new location.
1461 (linemap_ordinary_map_lookup): Likewise.
1462 (linemap_macro_map_lookup): Likewise.
1463 (linemap_macro_map_loc_to_def_point): Likewise.
1464 (linemap_macro_map_loc_unwind_toward_spel): Likewise.
1465 (linemap_get_expansion_line): Likewise.
1466 (linemap_get_expansion_filename): Likewise.
1467 (linemap_location_in_system_header_p): Likewise.
1468 (linemap_location_from_macro_expansion_p): Likewise.
1469 (linemap_macro_loc_to_spelling_point): Likewise.
1470 (linemap_macro_loc_to_def_point): Likewise.
1471 (linemap_macro_loc_to_exp_point): Likewise.
1472 (linemap_resolve_location): Likewise.
1473 (linemap_unwind_toward_expansion): Likewise.
1474 (linemap_unwind_to_first_non_reserved_loc): Likewise.
1475 (linemap_expand_location): Likewise.
1476 (linemap_dump_location): Likewise.
1477 (linemap_line_start): Likewise.
1478
f3d25c65
DS
14792012-05-25 Dodji Seketeli <dodji@redhat.com>
1480
1481 PR preprocessor/53469
1482 * directives.c (do_pragma): Use the virtual location for the
1483 pragma token, instead of its spelling location.
1484
0823efed
DN
14852012-08-14 Diego Novillo <dnovillo@google.com>
1486
1487 Merge from cxx-conversion branch. Configury.
1488
1489 * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
1490 * configure.ac: Likewise.
1491 * configure: Regenerate.
1492
14932012-08-14 Lawrence Crowl <crowl@google.com>
1494
1495 Merge from cxx-conversion branch. New C++ hash table.
1496
1497 * include/symtab.h (typedef struct ht hash_table): Change the typedef
1498 name to cpp_hash_table. Update all users of the typedef.
1499
c0fd3497
LB
15002012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1501
1502 * include/line-map.h (line_map_macro): Use the "atomic" GTY option
1503 for the macro_locations field.
1504
d35d1c0f
UB
15052011-06-19 Uros Bizjak <ubizjak@gmail.com>
1506
1507 * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
1508 __builtin_ia32_pcmpestri128 instead of asm.
1509
d86d2119
DA
15102012-06-04 Dimitrios Apostolou <jimis@gmx.net>
1511
1512 * line-map.c (linemap_enter_macro): Don't zero max_column_hint in
1513 every macro. This improves performance by reducing the number of
1514 reallocations when track-macro-expansion is on.
1515
7ca643e1
DS
15162012-06-04 Dodji Seketeli <dodji@redhat.com>
1517
1518 PR preprocessor/53463
1519 * line-map.c (linemap_location_in_system_header_p): For built-in
1520 macro tokens, check the first expansion point location that is not
1521 for a token coming from a built-in macro.
1522
7d9641cc
JM
15232012-05-29 Joseph Myers <joseph@codesourcery.com>
1524
1525 * directives.c: Fix typos.
1526 * include/line-map.h: Fix typos.
1527 * line-map.c: Fix typos.
1528 * macro.c: Fix typos.
1529
53a103d3
DS
15302012-05-25 Dodji Seketeli <dodji@redhat.com>
1531
1532 PR bootstrap/53459
1533 * lex.c (search_line_fast): Avoid unused local typedefs to simulate
1534 a static assertion.
1535
828a7f76
DS
15362012-05-29 Dodji Seketeli <dodji@redhat.com>
1537
1538 PR preprocessor/53229
1539 * internal.h (cpp_reader::set_invocation_location): Remove.
1540 (cpp_reader::about_to_expand_macro_p): New member flag.
1541 * directives.c (do_pragma): Remove Kludge as
1542 pfile->set_invocation_location is no more.
1543 * macro.c (cpp_get_token_1): Do away with the use of
1544 cpp_reader::set_invocation_location. Just collect the macro
1545 expansion point when we are about to expand the top-most macro.
1546 Do not override cpp_reader::about_to_expand_macro_p.
1547 This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
1548 properly handle locations of expansion points.
1549 (cpp_get_token_with_location): Adjust, as
1550 cpp_reader::set_invocation_location is no more.
1551 (paste_tokens): Take a virtual location parameter for
1552 the LHS of the pasting operator. Use it in diagnostics. Update
1553 comments.
1554 (paste_all_tokens): Tighten the assert. Propagate the location of
1555 the expansion point when no virtual locations are available.
1556 Pass the virtual location to paste_tokens.
1557 (in_macro_expansion_p): New static function.
1558 (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
1559 flag until we really start expanding the macro.
1560
0b2c4be5
DS
15612012-05-16 Dodji Seketeli <dodji@redhat.com>
1562
1563 PR preprocessor/7263
1564 * include/cpplib.h (cpp_classify_number): Take a location
1565 parameter.
1566 * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
1567 macros that take a location parameter.
1568 (cpp_classify_number): Take a (virtual) location parameter. Use
1569 it for diagnostics. Adjust comments.
1570 (eval_token): Take a location parameter. Pass it to
1571 cpp_classify_number and to diagnostic routines.
1572 (_cpp_parse_expr): Use virtual locations of tokens when parsing
1573 expressions. Pass a virtual location to eval_token and to
1574 diagnostic routines.
1575
638d2065
TG
15762012-05-10 Tristan Gingold <gingold@adacore.com>
1577
1578 * expr.c (interpret_float_suffix): Add a guard.
1579
3ad64f53
DS
15802012-05-02 Dodji Seketeli <dodji@redhat.com>
1581
1582 Properly initialize cpp_context in destringize_and_run
1583 * directives.c (destringize_and_run): Properly initialize the new
1584 context.
1585 * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
1586 the initial base context, which has the same life time as the
1587 current instance of cpp_file.
1588
b193dfa8
MLI
15892012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1590 Dodji Seketeli <dodji@seketeli.org>
1591
3efc2959 1592 PR c++/52974
b193dfa8
MLI
1593 * libcpp/files.c (maybe_shorter_path): New.
1594 (find_file_in_dir): Use it.
1595
4e65a470
DS
15962012-04-30 Dodji Seketeli <dodji@redhat.com>
1597
51fce2d3
DS
1598 Switch -ftrack-macro-expansion=2 on by default.
1599 * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
1600 by default. Add comments.
1601
c4ca1a09
DS
1602 Strip "<built-in>" loc from displayed expansion context
1603 * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
1604 in comment.
1605 (linemap_unwind_to_first_non_reserved_loc): Declare new function.
1606 * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
1607 new function.
1608
3600218c
DS
1609 Fix expansion point loc for macro-like tokens
1610 * macro.c (macro_of_context): New static function.
1611 (_cpp_push_token_context, push_extended_tokens_context): If the
1612 macro argument is NULL, it means we are continuing the expansion
1613 of the current macro, if any. Update comments.
1614 (_cpp_pop_context): Re-enable expansion of the macro only when we
1615 are really out of the context of the current expansion.
1616
0ff2b8a0
DS
1617 Fix token pasting with -ftrack-macro-expansion
1618 * macro.c (paste_all_tokens): Put the token resulting from pasting
1619 into an extended token context with -ftrack-macro-location is in
1620 effect.
1621
4e65a470
DS
1622 Fix cpp_sys_macro_p with -ftrack-macro-expansion
1623 * macro.c (cpp_sys_macro_p): Support -ftrack-macro-expansion.
1624
112448b4
DS
16252012-04-29 Dodji Seketeli <dodji@redhat.com>
1626
1627 * lex.c (lex_raw_string): Change C++ style comments into C style
1628 comments.
19a9ba64 1629 (lex_string): Likewise.
112448b4 1630
7f5f5f98
OW
16312012-04-27 Ollie Wild <aaw@google.com>
1632
1633 * include/cpplib.h (struct cpp_options): Add new field,
1634 warn_literal_suffix.
1635 (CPP_W_LITERAL_SUFFIX): New enum.
1636 * init.c (cpp_create_reader): Default initialization of
1637 warn_literal_suffix.
1638 * lex.c (lex_raw_string): Treat user-defined literals which don't
1639 begin with '_' as separate tokens and produce a warning.
1640 (lex_string): Ditto.
1641
1d72e96f
MLI
16422012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1643
1644 * line-map.c (linemap_resolve_location): Synchronize comments with
1645 those in line-map.h.
1646 * include/line-map.h (linemap_resolve_location): Fix spelling in
1647 comment.
1648
e75b54a2
RE
16492012-03-22 Richard Earnshaw <rearnsha@arm.com>
1650
1651 * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
1652
7888f266
RO
16532012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1654
1655 * lex.c: Remove Solaris 8 reference.
1656
dd552284
WL
16572012-02-14 Walter Lee <walt@tilera.com>
1658
1659 * configure.ac: Require 64-bit hwint for tilegx and tilepro.
1660 * configure: Regenerate.
1661
2c5cbc31
RG
16622012-01-09 Richard Guenther <rguenther@suse.de>
1663
1664 * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
1665
b492b686
GF
16662012-01-09 Gary Funck <gary@intrepid.com>
1667
1668 PR preprocessor/33919
1669 * files.c (_cpp_get_file_name): New. Implement file name
1670 access function.
1671 * internal.h (_cpp_get_file_name): New prototype.
1672 * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
1673 to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
1674
75291c57
OH
16752012-01-03 Olivier Hainque <hainque@adacore.com>
1676
1677 * system.h: Prior to #define, #undef fopen and freopen unconditionally.
1678
48b0b196
JM
16792011-12-20 Joseph Myers <joseph@codesourcery.com>
1680
1681 * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
1682 (CLK_STDC1X): Change to CLK_STDC11.
1683 * init.c (lang_defaults): Update comments.
1684 (cpp_init_builtins): Update language tests. Use 201112L for C11
1685 __STDC_VERSION__.
1686
4a5e00ca
AS
16872011-12-20 Andreas Schwab <schwab@linux-m68k.org>
1688
1689 * configure: Regenerate.
1690
095af58f
AS
16912011-12-19 Andreas Schwab <schwab@linux-m68k.org>
1692
1693 * configure: Regenerate.
1694
b0c084b7
JJ
16952011-12-07 Jakub Jelinek <jakub@redhat.com>
1696
1697 PR bootstrap/50237
1698 * internal.h (_cpp_init_lexer): New prototype.
1699 * init.c (init_library): Call it.
1700 * lex.c (init_vectorized_lexer): Remove constructor attribute,
1701 add inline keyword.
1702 (HAVE_init_vectorized_lexer): Define.
1703 (_cpp_init_lexer): New function.
1704
9b554be9
DS
17052011-12-03 Dodji Seketeli <dodji@redhat.com>
1706
1707 * macro.c (tokens_buff_remove_last_token)
1708 (tokens_buff_put_token_to): Add an 'inline' function specifier to
1709 the prototype.
1710
8dcf72a8
DN
17112011-11-22 Diego Novillo <dnovillo@google.com>
1712
1713 * include/line-map.h (linemap_dump): Declare.
1714 (line_table_dump): Declare.
1715 * line-map.c (linemap_dump): New.
1716 (line_table_dump): New.
1717
7e74ce3f
ESR
17182011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
1719
1720 PR c++/50958
1721 * expr.c (cpp_userdef_char_remove_type): Fix typo.
1722
e9411247
MM
17232011-11-03 Michael Matz <matz@suse.de>
1724
1725 PR bootstrap/50857
1726 * configure.ac: Check for -fno-exceptions -fno-rtti.
1727 * configure: Regenerate.
1728 * Makefile.in (NOEXCEPTION_FLAGS): New flag.
1729 (ALL_CXXFLAGS): Use it.
1730
0c1dace3
PC
17312011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
1732
1733 * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
1734
25339f10
JM
17352011-11-02 Jason Merrill <jason@redhat.com>
1736
1737 PR c++/50810
1738 * configure.ac: Add -Wno-narrowing to warning options.
1739
97e3ad20
JM
17402011-10-31 Jason Merrill <jason@redhat.com>
1741
1fb80b0c
JM
1742 PR libstdc++/1773
1743 * init.c (cpp_init_builtins): Set __cplusplus for C++11.
1744
97e3ad20
JM
1745 PR c++/50920
1746 * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
1747 CLK_GNUCXX0X to CLK_GNUCXX11.
1748
3ce4f9e4
ESR
17492011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
1750
1751 Implement C++11 user-defined literals.
1752 * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
1753 cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
1754 cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
1755 cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
1756 (cpp_classify_number): Classify unrecognized tokens as user-defined
1757 literals.
1758 * include/cpplib.h: Add new tokens for user-defined literals.
1759 * init.c: Add new preprocessor flag (cxx11).
1760 * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
1761 including concatenation and promotion with suffixes.
1762
3bb0c8db
DS
17632011-10-24 Dodji Seketeli <dodji@redhat.com>
1764
1765 * line-map.c (linemap_macro_map_lookup): Fix logic.
1766
84756fd4
DS
17672011-10-24 Dodji Seketeli <dodji@redhat.com>
1768
1769 * include/line-map.h (linemap_expand_location): Take a line table
1770 parameter. Update comment.
1771 (linemap_resolve_location): Update comment.
1772 (linemap_expand_location_full): Remove.
1773 * line-map.c (linemap_resolve_location): Handle reserved
1774 locations; return a NULL map in those cases.
1775 (linemap_expand_location): If location is reserved, return a
1776 zeroed expanded location. Update comment. Take a line table to
1777 assert that the function takes non-virtual locations only.
1778 (linemap_expand_location_full): remove.
1779 (linemap_dump_location): Handle the fact that
1780 linemap_resolve_location can return NULL line maps when the
1781 location resolves to a reserved location.
1782
1783 * line-map.c (linemap_macro_map_lookup): Fix logic.
1784
ad2305ad
DS
17852011-10-22 Dodji Seketeli <dodji@redhat.com>
1786
1787 PR bootstrap/50778
1788 * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
1789 context to act upon.
1790 * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update
1791 comment.
1792 (cpp_token_from_context_at): Likewise.
1793 (cpp_peek_token): Use the context to peek tokens from.
1794
cbbcf655
DS
17952011-10-20 Dodji Seketeli <dodji@redhat.com>
1796
1797 PR bootstrap/50801
1798 * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
1799 number of tokens.
1800
d17687f6
DS
18012011-10-18 Dodji Seketeli <dodji@redhat.com>
1802
1803 PR bootstrap/50760
1804 * include/line-map.h (struct linemap_stats): Change the type of
19a9ba64 1805 the members from size_t to long.
d17687f6 1806 * macro.c (macro_arg_token_iter_init): Unconditionally initialize
19a9ba64 1807 iter->location_ptr.
d17687f6 1808
411f92de
DS
18092011-10-17 Dodji Seketeli <dodji@redhat.com>
1810
1811 * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
19a9ba64
AM
1812 variable without using it if ENABLE_CHECKING is not defined. Mark
1813 the LOCATION parameter as being unused.
411f92de 1814
b9bd6f74
TT
18152011-10-15 Tom Tromey <tromey@redhat.com>
1816 Dodji Seketeli <dodji@redhat.com>
1817
1818 * include/line-map.h (struct line_maps::alloced_size_for_request):
1819 New member.
1820 * line-map.c (new_linemap): Use set->alloced_size_for_request to
1821 get the actual allocated size of line maps.
1822
64a1a422
TT
18232011-10-15 Tom Tromey <tromey@redhat.com>
1824 Dodji Seketeli <dodji@redhat.com>
1825
1826 * line-map.h (struct linemap_stats): Declare new struct.
1827 (linemap_get_statistics): Declare ...
1828 * line-map.c (linemap_get_statistics): ... new function.
1829 * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
1830 Declare new counters.
1831 (enter_macro_context, replace_args): Update
1832 num_macro_tokens_counter.
1833 (cpp_get_token_1): Update num_expanded_macros_counter.
1834
847e697a
TT
18352011-10-15 Tom Tromey <tromey@redhat.com>
1836 Dodji Seketeli <dodji@redhat.com>
1837
1838 * include/cpplib.h (struct cpp_options)<debug>: New struct member.
1839 * include/line-map.h (linemap_dump_location): Declare ...
1840 * line-map.c (linemap_dump_location): ... new function.
1841
92582b75
TT
18422011-10-15 Tom Tromey <tromey@redhat.com>
1843 Dodji Seketeli <dodji@redhat.com>
1844
1845 * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
1846 New option.
1847 * internal.h (struct macro_context): New struct.
1848 (enum context_tokens_kind): New enum.
1849 (struct cpp_context)<tokens_kind>: New member of type enum
1850 context_tokens_kind.
1851 (struct cpp_context)<macro>: Remove this. Replace it with an enum
1852 of macro and macro_context.
1853 (struct cpp_context)<direct_p>: Remove.
1854 (_cpp_remaining_tokens_num_in_context): Declare new function.
1855 * directives.c (destringize_and_run): Adjust.
1856 * lex.c (_cpp_remaining_tokens_num_in_context)
1857 (_cpp_token_from_context_at): Define new functions
1858 (cpp_peek_token): Use them.
1859 * init.c (cpp_create_reader): Initialize the base context to zero.
1860 (_cpp_token_from_context_at): Define new static function.
1861 (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
1862 _cpp_token_from_context_at.
1863 * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
1864 members.
1865 (enum macro_arg_token_kind): New enum.
1866 (struct macro_arg_token_iter): New struct.
1867 (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
1868 (alloc_expanded_arg_mem, ensure_expanded_arg_room)
1869 (delete_macro_args, set_arg_token, get_arg_token_location)
1870 (arg_token_ptr_at, macro_arg_token_iter_init)
1871 (macro_arg_token_iter_get_token)
1872 (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
1873 (expanded_token_index, tokens_buff_new, tokens_buff_count)
1874 (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
1875 (tokens_buff_add_token, tokens_buff_remove_last_token)
1876 (reached_end_of_context, consume_next_token_from_context): New
1877 static functions.
1878 (cpp_get_token_1): New static function. Split and extended from
1879 cpp_get_token. Use reached_end_of_context and
1880 consume_next_token_from_context. Unify its return point. Move
1881 the location tweaking from cpp_get_token_with_location in here.
1882 (cpp_get_token): Use cpp_get_token_1
1883 (stringify_arg): Use the new arg_token_at.
1884 (paste_all_tokens): Support tokens coming from extended tokens
1885 contexts.
1886 (collect_args): Return the number of collected arguments, by
1887 parameter. Store virtual locations of tokens that constitute the
1888 collected args.
1889 (funlike_invocation_p): Return the number of collected arguments,
1890 by parameter.
1891 (enter_macro_context): Add a parameter for macro expansion point.
1892 Pass it to replace_args and to the "used" cpp callback. Get the
1893 number of function-like macro arguments from funlike_invocation_p,
1894 pass it to the new delete_macro_args to free the memory used by
1895 macro args. When -ftrack-macro-expansion is in effect, for macros
1896 that have no arguments, create a macro map for the macro expansion
1897 and use it to allocate proper virtual locations for tokens
1898 resulting from the expansion. Push an extended tokens context
1899 containing the tokens resulting from macro expansion and their
1900 virtual locations.
1901 (replace_args): Rename the different variables named 'count' into
1902 variables with more meaningful names. Create a macro map;
1903 allocate virtual locations of tokens resulting from this
1904 expansion. Use macro_arg_token_iter to iterate over tokens of a
1905 given macro. Handle the case of the argument of
1906 -ftrack-macro-expansion being < 2. Don't free macro arguments
1907 memory resulting from expand_arg here, as these are freed by the
1908 caller of replace_arg using delete_macro_args now. Push extended
1909 token context.
1910 (next_context, push_ptoken_context, _cpp_push_token_context)
1911 (_cpp_push_text_context): Properly initialize the context.
1912 (expand_arg): Use the new alloc_expanded_arg_mem,
1913 push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
1914 (_cpp_pop_context): Really free the memory held by the context.
1915 Handle freeing memory used by extended tokens contexts.
1916 (cpp_get_token_with_location): Use cpp_get_token_1.
1917 (cpp_sys_macro_p): Adjust.
1918 (_cpp_backup_tokens): Support the new kinds of token contexts.
1919 * traditional.c (recursive_macro): Adjust.
1920
46427374
TT
19212011-10-15 Tom Tromey <tromey@redhat>
1922 Dodji Seketeli <dodji@redhat.com>
1923
1924 * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
1925 member.
1926 (MAX_SOURCE_LOCATION): New constant.
1927 (struct line_map_ordinary, struct line_map_macro): New structs.
19a9ba64 1928 (struct line_map): Turn this into a union of the two above. Add
46427374
TT
1929 comments.
1930 (struct maps_info): New struct.
1931 (struct line_maps)<info_ordinary, info_macro>: Two new fields.
1932 These now carry the map information that was previously scattered
1933 in struct line_maps.
1934 (struct map_info::allocated): Fix comment.
1935 (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
1936 (ORDINARY_MAP_STARTING_LINE_NUMBER)
1937 (ORDINARY_MAP_INCLUDER_FILE_INDEX)
1938 (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
1939 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
1940 (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
1941 (MACRO_MAP_EXPANSION_POINT_LOCATION)
1942 (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
1943 (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
1944 (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
1945 (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
1946 (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
1947 (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
1948 (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
1949 (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
1950 (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
1951 (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
1952 (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
1953 information.
1954 (linemap_check_ordinary, linemap_assert)
1955 (linemap_location_before_p): New macros.
1956 (linemap_position_for_line_and_column)
1957 (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
1958 (linemap_macro_expansion_map_p)
1959 (linemap_macro_map_loc_to_def_point)
1960 (linemap_macro_map_loc_unwind_once)
1961 (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
1962 (linemap_get_source_line linemap_get_source_column)
1963 (linemap_map_get_macro_name, linemap_get_file_path)
1964 (linemap_location_in_system_header_p)
1965 (linemap_location_from_macro_expansion_p): Declare new functions.
1966 (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
1967 (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
1968 accessors act on ordinary maps only.
1969 (INCLUDED_FROM): Return NULL for main files; use the new
1970 accessors.
1971 (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
1972 (struct expanded_location): Move here from gcc/input.h
1973 (linemap_resolve_location, linemap_expand_location)
1974 (linemap_expand_location_full): Declare new functions.
1975 * line-map.c: Include cpplib.h, internal.h
1976 (linemap_enter_macro, linemap_add_macro_token)
1977 (linemap_get_expansion_line, linemap_get_expansion_filename): New
1978 functions that are private to libcpp.
1979 (linemap_assert): New macro.
1980 (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
1981 (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
1982 (linemap_macro_map_loc_unwind_toward_spelling)
1983 (linemap_macro_map_loc_to_exp_point)
1984 (first_map_in_common_1, first_map_in_common): New static
1985 functions.
1986 (new_linemap): Define new static functions. Extracted and
1987 enhanced from ...
1988 (linemap_add): ... here. Use linemap_assert in lieu of abort
1989 previously.
1990 (linemap_tracks_macro_expansion_locs_p)
1991 (linemap_add_macro_token, linemap_macro_expansion_map_p)
1992 (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
1993 (linemap_macro_map_loc_to_def_point)
1994 (linemap_macro_map_loc_unwind_once)
1995 (linemap_step_out_once, linemap_map_get_index)
1996 (linemap_get_source_line,linemap_get_source_column)
1997 (linemap_get_file_path, linemap_map_get_macro_name)
1998 (linemap_location_in_system_header_p)
1999 (linemap_location_originated_from_system_header_p)
2000 (linemap_location_from_macro_expansion_p)
2001 (linemap_tracks_macro_expansion_locs_p)
2002 (linemap_resolve_location, linemap_expand_location)
2003 (linemap_expand_location_full)
2004 (linemap_tracks_macro_expansion_locs_p)
2005 (linemap_position_for_line_and_column, linemap_compare_locations):
2006 Define new public functions.
2007 (linemap_init): Initialize ordinary and macro maps information in
2008 the map set.
2009 (linemap_check_files_exited): Use the new accessors.
2010 (linemap_free): Remove this dead code.
2011 (linemap_line_start): Assert this uses an ordinary map. Adjust to
2012 use the new ordinary map accessors and data structures. Don't
2013 overflow past the lowest possible macro token's location.
2014 (linemap_position_for_column): Assert the ordinary maps of the map
2015 set are really ordinary. Use ordinary map accessors.
2016 (linemap_lookup): Keep the same logic but generalize to allow
2017 lookup of both ordinary and macro maps. Do not crash when called
2018 with an empty line table.
2019 * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
2020 new API of line-map.h.
2021 * directives.c (start_directive, do_line, do_linemarker)
2022 (do_linemarker): Likewise.
2023 * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
2024 (make_cpp_dir, cpp_make_system_header): Likewise.
2025 * init.c (cpp_read_main_file): Likewise.
2026 * internal.h (CPP_INCREMENT_LINE): Likewise.
2027 (linemap_enter_macro, linemap_add_macro_token)
2028 (linemap_get_expansion_line, linemap_get_expansion_filename): New
2029 functions private to libcpp.
2030 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
2031 (skip_line_comment, skip_whitespace, lex_raw_string)
2032 (_cpp_lex_direct): Likewise.
2033 * macro.c (_cpp_builtin_macro_text): Likewise.
2034 (_cpp_aligned_alloc): Initialize the new name member of the macro.
2035 * traditional.c (copy_comment, _cpp_scan_out_logical_line):
2036 Likewise.
2037 * errors.c (cpp_diagnostic): Adjust to new linemap API.
2038
892a371f
DS
20392011-08-28 Dodji Seketeli <dodji@redhat.com>
2040
2041 * line-map.c (linemap_add): Assert that reason must not be
2042 LC_RENAME when called for the first time on a "main input file".
2043
e3dfef44
GC
20442011-08-22 Gabriel Charette <gchare@google.com>
2045
2046 * init.c (cpp_create_reader): Inititalize forced_token_location_p.
2047 * internal.h (struct cpp_reader): Add field forced_token_location_p.
2048 * lex.c (_cpp_lex_direct): Use forced_token_location_p.
2049 (cpp_force_token_locations): New.
2050 (cpp_stop_forcing_token_locations): New.
2051
32fe396e
RO
20522011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2053
2054 PR libstdc++/1773
2055 * init.c (cpp_init_builtins): Define __cplusplus 19971L.
2056
7c1ffff9
JM
20572011-08-18 Joseph Myers <joseph@codesourcery.com>
2058
2059 * include/cpplib.h (struct cpp_options): Fix typo.
2060
a48e3dd1
JM
20612011-08-18 Joseph Myers <joseph@codesourcery.com>
2062
2063 * include/cpplib.h (struct cpp_options): Add rliterals.
2064 * init.c (struct lang_flags, lang_defaults): Add rliterals.
2065 (cpp_set_lang): Set rliterals option.
2066 (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
2067 * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
2068
3f6ced10
GC
20692011-08-15 Gabriel Charette <gchare@google.com>
2070
2071 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
2072 Update all users to use linemap_position_for_column instead.
2073
0681d04c
GC
20742011-07-28 Gabriel Charette <gchare@google.com>
2075
2076 * include/line-map.h (struct line_maps):
2077 Remove unused field last_listed. Update all users.
2078
5e9627ca
L
20792011-07-28 H.J. Lu <hongjiu.lu@intel.com>
2080
2081 * configure.ac: Set need_64bit_hwint to yes for x86 targets.
2082 * configure: Regenerated.
2083
a024b70f
RO
20842011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2085
2086 * system.h [__cplusplus]: Wrap C function declarations in extern "C".
2087
5b6d595b
RO
20882011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2089 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2090
2091 PR bootstrap/49794
2092 * configure.ac: Test AM_ICONV with CXX.
2093 * configure: Regenerate.
2094 * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
2095
d0a9fbe1
DS
20962011-07-15 Dodji Seketeli <dodji@redhat.com>
2097
2098 * directives.c (struct if_stack): Use source_location as type
2099 here.
2100 * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
2101 indent, def_pragma, used_define, used_undef>: Properly use
2102 source_location as parameter type, rather than unsigned int.
2103
fbdd5d87
RO
21042011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2105
2106 PR target/39150
2107 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
2108 like i[34567]86-*-solaris2.1[0-9]*.
2109 * configure: Regenerate.
2110
8787a05a
JM
21112011-06-16 Jason Merrill <jason@redhat.com>
2112
2113 PR c++/45399
2114 * lex.c (lex_raw_string): Don't check for embedded NUL.
2115
38fbfaf6
DS
21162011-06-06 Dodji Seketeli <dodji@redhat.com>
2117
2118 PR preprocessor/48532
2119 * directives.c (do_pragma): Don't forget the invocation location
2120 when parsing the pragma name of a namespaced pragma directive.
2121
fc0993ac
JT
21222011-05-29 John Tytgat <John.Tytgat@aaug.net>
2123
2124 * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
2125
ef230b38
UB
21262011-05-22 Uros Bizjak <ubizjak@gmail.com>
2127
2128 PR target/49104
2129 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
2130 is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
2131
e5b0dad8
JK
21322011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2133
2134 * system.h (ENUM_BITFIELD): Remove.
2135
6cfae070
JJ
21362011-04-24 Jakub Jelinek <jakub@redhat.com>
2137
2138 PR preprocessor/48740
2139 * lex.c (lex_raw_string): When raw string ends with
2140 ??) followed by raw prefix and ", ensure it is preprocessed
2141 with ??) rather than ??].
2142
04695783
JM
21432011-04-20 Jim Meyering <meyering@redhat.com>
2144
2145 * files.c (destroy_cpp_file): Remove useless if-before-free.
2146 * init.c (cpp_destroy): Likewise.
2147 * macro.c (replace_args): Likewise.
2148 * pch.c (cpp_valid_state): Likewise.
2149
4489800d
KT
21502011-03-25 Kai Tietz <ktietz@redhat.com>
2151
2152 * files.c (file_hash_eq): Use filename_cmp
2153 instead of strcmp.
2154 (nonexistent_file_hash_eq): Likewise.
2155 (remap_filename): Likewise.
2156 Handle absolute DOS-path,
2157 (append_file_to_dir): Check for IS_DIR_SEPARATOR
2158 instead of slash.
2159 (read_name_map): Likewise.
2160 * linemap.c (linemap_add): Use filename_cmp
2161 instead of strcmp.
2162 * mkdeps.c (apply_vpath): Use filename_ncmp
2163 instead of strncmp.
2164 (deps_restore): Use filename_cmp instead of
2165 strcmp.
2166 * init.c (read_original_directory): Use
2167 IS_DIR_SEPARATOR instead of checking for slash.
2168
f3c33d9d
MM
21692011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
2170
2171 PR preprocessor/48192
2172 * directives.c (do_ifdef): Do not consider conditional macros as
2173 being defined.
2174 (do_ifndef): Ditto.
2175 * expr.c (parse_defined): Ditto.
2176
01956319
RH
21772011-03-18 Richard Henderson <rth@redhat.com>
2178
2179 PR bootstrap/45381
2180 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
2181
c5a62c6f 21822011-11-04 Eric Botcazou <ebotcazou@adacore.com>
19a9ba64 2183 Jakub Jelinek <jakub@redhat.com>
c5a62c6f
EB
2184
2185 PR preprocessor/39213
2186 * directives.c (end_directive): Call _cpp_remove_overlay for deferred
2187 pragmas as well in traditional mode.
2188
0e1a989c
ILT
21892010-11-17 Ian Lance Taylor <iant@google.com>
2190
2191 PR bootstrap/45538
2192 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of
2193 AC_LANG based on ENABLE_BUILD_WITH_CXX.
2194
651a20b5
KT
21952010-11-16 Kai Tietz <kai.tietz@onevision.com>
2196
2197 PR preprocessor/17349
2198 * lex.c (save_comment): Handle in argument passing c++
2199 comments special.
2200
480767a9
ILT
22012010-11-02 Ian Lance Taylor <iant@google.com>
2202
2203 * configure.ac: Use AC_SYS_LARGEFILE.
2204 * configure: Rebuild.
2205 * config.in: Rebuild.
2206
078419c9 22072010-10-19 Basile Starynkevitch <basile@starynkevitch.net>
480767a9 2208
078419c9
BS
2209 * line-map.h (source_location): Remove obsolete comment
2210 mentioning location_s.
2211
d6874138
KT
22122010-09-29 Kai Tietz <kai.tietz@onevision.com>
2213
2214 PR preprocessor/45362
2215 * directives.c (cpp_pop_definition): Make static.
2216 (do_pragma_push_macro): Reworked to store text
2217 definition.
2218 (do_pragma_pop_macro): Add free text definition.
2219 (cpp_push_definition): Removed.
2220 * include/cpplib.h (cpp_push_definition): Removed.
2221 (cpp_pop_definition): Likewise.
2222 * internal.h (def_pragma_macro): Remove member 'value'
2223 and add new members 'definition', 'line',
2224 'syshdr', 'sued' and 'is_undef'.
2225 * pch.c (_cpp_restore_pushed_macros): Rework to work
2226 on text definition and store additional macro flags.
2227 (_cpp_save_pushed_macros): Likewise.
2228
e3339d0f
JM
22292010-09-29 Joseph Myers <joseph@codesourcery.com>
2230
2231 * include/cpplib.h (cpp_options): Rename warn_deprecated,
2232 warn_traditional, warn_long_long and pedantic.
2233 * directives.c (directive_diagnostics, _cpp_handle_directive):
2234 Update names of cpp_options members.
2235 * expr.c (cpp_classify_number, eval_token): Update names of
2236 cpp_options members.
2237 * init.c (cpp_create_reader, post_options): Update names of
2238 cpp_options members.
2239 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
2240 cpp_options members.
2241 * macro.c (parse_params): Update names of cpp_options members.
2242
128465e6
ILT
22432010-09-15 Ian Lance Taylor <iant@google.com>
2244
2245 * init.c: Fix type name in comment.
2246
a69d2520
JJ
22472010-08-31 Jakub Jelinek <jakub@redhat.com>
2248
2249 PR preprocessor/45457
2250 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
2251 needed.
2252 * directives.c (do_ifdef, do_ifndef): Likewise.
2253
707bcb7a
RO
22542010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2255
2256 * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
2257
6f173e52
RH
22582010-08-24 Richard Henderson <rth@redhat.com>
2259
2260 PR bootstrap/45376
2261 * configure.ac (HAVE_SSE4): New check.
2262 * configure, config.in: Rebuild.
2263 * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
2264
789d73cb
RO
22652010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2266
2267 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
2268 etc. on Solaris 2/x86.
2269
246a2fcb
RH
22702010-08-21 Richard Henderson <rth@redhat.com>
2271 Andi Kleen <ak@linux.intel.com>
2272 David S. Miller <davem@davemloft.net>
2273
2274 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
2275 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
2276 (ptrdiff_t): Check via AC_CHECK_TYPE.
2277 * config.in, configure: Rebuild.
2278 * system.h: Include stdint.h, if available.
2279 * lex.c (WORDS_BIGENDIAN): Provide default.
2280 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
2281 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
2282 search_line_sse2, search_line_sse42, init_vectorized_lexer,
2283 search_line_fast): New.
2284 (_cpp_clean_line): Use search_line_fast. Restructure the fast
2285 loop to make it clear when we're leaving the loop. Stay in the
2286 fast loop for non-trigraph '?'.
2287
8e680db5
JJ
22882010-06-11 Jakub Jelinek <jakub@redhat.com>
2289
2290 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
2291 callback.
2292 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
2293 (cpp_macro_definition): Remove const qual from second argument.
2294 * macro.c (enter_macro_context): Call user_builtin_macro callback for
2295 NODE_BUILTIN !NODE_USED macros.
2296 (warn_of_redefinition): Likewise. Remove const qual from second
2297 argument.
2298 (cpp_macro_definition): Likewise.
2299 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
2300 for NODE_BUILTIN !NODE_USED macros.
2301
1cb42611
JM
23022010-06-10 Joseph Myers <joseph@codesourcery.com>
2303
2304 * include/cpplib.h (struct cpp_options): Remove show_column.
2305 * init.c (cpp_create_reader, post_options): Don't set show_column.
2306
ff5dfc48
JR
23072010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
2308
2309 PR bootstrap/44432
2310 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
2311 check that C++ compiler works.
2312 * configure: Regenerate.
2313
a9429e29
LB
23142010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2315
2316 * include/symtab.h (ht_identifier_ptr): New.
2317
c3f247f4
RW
23182010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
2319 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2320
2321 PR bootstrap/42798
2322 * configure.ac: Check for declaration of 'basename(char *)'.
2323 * configure: Regenerate.
2324 * config.in: Regenerate.
2325
2778d766
JM
23262010-04-25 Joseph Myers <joseph@codesourcery.com>
2327
2328 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
2329 * init.c (lang_defaults): Add entries for new language variants.
2330 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
2331 variants.
2332
d8a12e84
MLI
23332010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2334
2335 PR cpp/43195
2336 * files.c (report_missing_guard): Test for #pragma once.
2337
87cf0651
SB
23382010-04-07 Simon Baldwin <simonb@google.com>
2339
2340 * directives.c (do_diagnostic): Add warning reason argument,
2341 call appropriate error reporting function for code.
2342 (directive_diagnostics): Call specific warning functions with
2343 warning reason where appropriate.
2344 (do_error, do_warning, do_pragma_dependency): Add warning reason
2345 argument to do_diagnostic calls.
2346 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
2347 _cpp_create_definition): Call specific warning functions with
2348 warning reason where appropriate.
2349 * Makefile.in: Add new diagnostic functions to gettext translations.
2350 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
2351 to error callback.
2352 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
2353 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
2354 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
2355 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
2356 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
2357 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
2358 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
2359 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
2360 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
2361 warning reason codes.
2362 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
2363 cpp_warning_with_line, cpp_pedwarning_with_line,
2364 cpp_warning_with_line_syshdr): New specific error reporting functions.
2365 * pch.c (cpp_valid_state): Call specific warning functions with
2366 warning reason where appropriate.
2367 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
2368 diagnostic handlers.
2369 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
2370 cpp_warning_with_line, cpp_pedwarning_with_line,
2371 cpp_warning_with_line_syshdr): New specific error reporting functions.
2372 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
2373 specific warning functions with warning reason where appropriate.
2374 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
2375 warn_about_normalization, lex_identifier_intern, lex_identifier,
2376 _cpp_lex_direct): Ditto.
2377 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
2378 narrow_str_to_charconst): Ditto.
2379
d947ada0
JJ
23802010-04-06 Jakub Jelinek <jakub@redhat.com>
2381
2382 PR preprocessor/43642
2383 * lex.c (lex_raw_string): Change type of TYPE variable to
2384 unsigned char.
2385
4d9e8446
RW
23862010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2387
2388 * aclocal.m4: Regenerate.
2389
52150625
JM
23902010-03-29 Jason Merrill <jason@redhat.com>
2391
00a81b8b
JM
2392 More N3077 raw string changes
2393 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
2394 strings.
2395 * lex.c (bufring_append): Split out from...
2396 (lex_raw_string): ...here. Undo trigraph and line splicing
2397 transformations. Do process line notes in multi-line literals.
2398 (_cpp_process_line_notes): Ignore notes that were already handled.
2399
52150625
JM
2400 Some raw string changes from N3077
2401 * charset.c (cpp_interpret_string): Change inner delimiters to ().
2402 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
2403
709d7160
JJ
24042010-02-11 Jakub Jelinek <jakub@redhat.com>
2405
2406 * init.c (read_original_filename): Don't call read_original_directory
2407 if _cpp_handle_directive returns 0.
2408
dadab4fd
JM
24092010-01-01 Joseph Myers <joseph@codesourcery.com>
2410
2411 PR preprocessor/41947
2412 * expr.c (cpp_classify_number): Give error for hexadecimal
2413 floating-point constant with no digits before or after point.
2414
3de8a540
AC
24152009-11-20 Arnaud Charlet <charlet@adacore.com>
2416
2417 * macro.c (enter_macro_context): Call cb.used callback if defined.
2418 * directives.c (do_idef, do_ifndef): Ditto.
2419 * include/cpplib.h (struct cpp_callbacks): Add used callback.
2420
17e7cb85
KT
24212009-11-11 Kai Tietz <kai.tietz@onevision.com>
2422
2423 * directives.c (do_pragma_push_macro): New pragma handler.
2424 (do_pragma_pop_macro): Likewise.
2425 (_cpp_init_internal_pragmas): Add push_macro and
2426 pop_macro handler to internal pragmas.
2427 (lex_macro_node_from_str): Removed.
2428 (cpp_push_definition): Replace lex_macro_node_from_str
2429 by _cpp_lex_identifier.
2430 (cpp_pop_definition): Likewise.
2431 * internal.h (_cpp_lex_identifier): New prototype.
2432 (def_pragma_macro): New structure.
2433 (cpp_reader): New member pushed_macros.
2434 * lex.c (_cpp_lex_identifier): New function.
2435 (lex_identifier_intern): New function.
2436 * init.c (cpp_create_reader): Initialize pushed_macros
2437 member.
2438 (cpp_destroy): Free elements in pushed_macros member.
2439 * pch.c (_cpp_save_pushed_macros): New function.
2440 (_cpp_restore_pushed_macros): Likewise.
2441 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
2442 (cpp_read_state): Use _cpp_restore_pushed_macros.
2443
2c6e3f55
JJ
24442009-10-19 Jakub Jelinek <jakub@redhat.com>
2445
2446 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
2447 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
2448 and char32_cset_desc.
2449 (converter_for_type): Handle CPP_UTF8STRING.
2450 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
2451 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
2452 (parse_include): Reject raw strings.
2453 * include/cpplib.h (CPP_UTF8STRING): New token type.
2454 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
2455 * lex.c (lex_raw_string): New function.
2456 (lex_string): Handle u8 string literals, call lex_raw_string
2457 for raw string literals.
2458 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
2459 sequences.
2460 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
2461
96c169e1
JJ
24622009-10-14 Jakub Jelinek <jakub@redhat.com>
2463
2464 PR preprocessor/41543
2465 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
2466 * line-map.c (linemap_init): Initialize highest_location and
2467 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
2468
30c99a9e
JM
24692009-10-09 Jason Merrill <jason@redhat.com>
2470
2471 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
2472
2214382c
NV
24732009-10-09 Neil Vachharajani <nvachhar@google.com>
2474
2475 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
2476 sccs.
2477
e02222d2
LR
24782009-09-23 Loren J. Rittle <ljrittle@acm.org>
2479
2480 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
2481 * configure: Rebuilt.
2482
9a8a2b7a
RG
24832009-09-22 Richard Guenther <rguenther@suse.de>
2484
2485 PR pch/38987
2486 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
2487
74dc6a11
CD
24882009-09-18 Chris Demetriou <cgd@google.com>
2489
2490 PR preprocessor/28435:
2491 * include/cpplib.h (struct cpp_options): Add new member
2492 deps.need_preprocessor_output.
2493 * files.c (open_file_failed): If preprocessor output is needed
2494 always report an error.
2495
933608b7
KT
24962009-09-13 Kai Tietz <kai.tietz@onevision.com>
2497
2498 * configure.ac: Set for i?86-w64-mingw*
2499 need_64bit_hwint to yes.
2500 * configure: Regenerated.
2501
86373e7e
JM
25022009-09-10 Jason Merrill <jason@redhat.com>
2503
2504 * directives.c (cpp_define): constify.
2505
fd2ab214
ILT
25062009-09-02 Ian Lance Taylor <iant@google.com>
2507
2508 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
2509
df58e648
RW
25102009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2511
2512 * configure.ac (AC_PREREQ): Bump to 2.64.
2513
5213506e
RW
25142009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2515
2516 * aclocal.m4: Regenerate.
2517 * config.in: Regenerate.
2518 * configure: Regenerate.
2519
709a22df
TT
25202009-08-17 Tom Tromey <tromey@redhat.com>
2521
2522 PR preprocessor/41067:
2523 * charset.c (convert_escape): Add missing ":" to error text.
2524
0c539b47
DR
25252009-07-27 Douglas B Rupp <rupp@gnat.com>
2526
2527 * include/cpplib.h (INO_T_CPP): New macro.
2528 (struct cpp_dir): Use it.
2529
2b69c841
JQ
25302009-07-20 Jerry Quinn <jlquinn@optonline.net>
2531
2532 PR regression/40800
2533 * configure.ac: Use = instead of == for testing
2534 ENABLE_BUILD_WITH_CXX.
2535 * configure: Rebuild.
2536
f1bf410c
JQ
25372009-07-17 Jerry Quinn <jlquinn@optonline.net>
2538
2539 * directives.c (do_linemarker, do_line): Use CPP_STRING for
2540 ignored enum value.
2541 * files.c (find_file_in_dir): Add cast from void* to char*.
2542 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
2543 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
2544 warnings.
2545 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
2546 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
2547 COMPILER_FLAGS): New.
2548 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
2549 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
2550 instead of ALL_CFLAGS.
2551 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
2552 from other warnings. Add -Wc++-compat to C-specific warnings.
2553 Check for --enable-build-with-cxx. Set and substitute
2554 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
2555 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
2556 AC_CHECK_HEADERS.
2557 * configure: Rebuild.
2558 * include/cpp-id-data.h: Remove extern "C".
2559 * include/line-map.h: Likewise.
2560 * include/mkdeps.h: Likewise.
2561 * include/symtab.h: Likewise.
2562 * internal.h: Likewise.
2563
a28fbdba
MLI
25642009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2565
2566 * directives.c (parse_include): Add location argument. Update all
2567 calls.
2568 (parse_answer): Likewise.
2569 (do_include_common): Error with exact location.
2570 (parse_assertion): Likewise.
2571
b506a5a2
MLI
25722009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2573
2574 * expr.c (num_div_op): Take explicit location.
2575
7d8847a4
ILT
25762009-06-17 Ian Lance Taylor <iant@google.com>
2577
2578 * include/cpplib.h (progname): Don't declare.
2579
3d8b2a98
ILT
25802009-06-12 Ian Lance Taylor <iant@google.com>
2581
2582 * include/cpplib.h (struct cpp_options): Add
2583 warn_cxx_operator_names field.
2584 (NODE_WARN_OPERATOR): Define.
2585 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
2586 type to 6 bits.
2587 * init.c (mark_named_operators): Add flags parameter.
2588 (cpp_post_options): Pick flags value to pass to
2589 mark_named_operators.
2590 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
2591 identifier is an operator name in C++.
2592
e74fe492
AH
25932009-06-01 Aldy Hernandez <aldyh@redhat.com>
2594
2595 * include/line-map.h (LAST_SOURCE_COLUMN): New.
2596
4851089f
ILT
25972009-06-01 Ian Lance Taylor <iant@google.com>
2598
2599 * include/cpp-id-data.h: Add extern "C".
2600 * include/line-map.h: Likewise.
2601 * include/mkdeps.h: Likewise.
2602 * include/symtab.h: Likewise.
2603 * internal.h: Likewise.
2604
7e5487a2
ILT
26052009-05-15 Ian Lance Taylor <iant@google.com>
2606
2607 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
2608 builtin_type. Change all uses.
2609
00b0c19b
MLI
26102009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2611
2612 PR cpp/36674
2613 * directives (do_linemarker): Compensate for the increment in
2614 location that occurs when we reach the end of line.
2615 * files (_cpp_stack_include): Mention _cpp_find_file in the
2616 comment.
2617
9a0c6187
JM
26182009-05-10 Joseph Myers <joseph@codesourcery.com>
2619
2620 * include/cpplib.h (enum cpp_token_fld_kind): Add
2621 CPP_TOKEN_FLD_TOKEN_NO.
2622 (struct cpp_macro_arg, struct cpp_identifier): Define.
2623 (union cpp_token_u): Use struct cpp_identifier for identifiers.
2624 Use struct cpp_macro_arg for macro arguments. Add token_no for
2625 CPP_PASTE token numbers.
2626 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
2627 do_pragma_poison, parse_assertion): Use val.node.node in place of
2628 val.node.
2629 * expr.c (parse_defined, eval_token): Use val.node.node in place
2630 of val.node.
2631 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
2632 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
2633 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
2634 place of val.arg_no. Use val.node.node in place of val.node.
2635 * macro.c (replace_args, cpp_get_token, parse_params,
2636 lex_expansion_token, create_iso_definition, cpp_macro_definition):
2637 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
2638 Use val.node.node in place of val.node.
2639
9e322bc1
JM
26402009-05-03 Joseph Myers <joseph@codesourcery.com>
2641
2642 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
2643 UTF-8 sequences.
2644
f88d0772
JM
26452009-04-25 Joseph Myers <joseph@codesourcery.com>
2646
2647 PR preprocessor/39559
2648 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
2649 constants larger than intmax_t in C99 mode.
2650
d1b38208
TG
26512009-04-21 Taras Glek <tglek@mozilla.com>
2652
2653 * include/cpp-id-data.h: Update GTY annotations to new syntax.
2654 * include/cpplib.h: Likewise.
2655 * include/line-map.h: Likewise.
2656 * include/symtab.h: Likewise.
2657
cfc93532
MLI
26582009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2659
2660 PR c++/14875
2661 * lex.c (cpp_type2name): Take a flags parameter. Call
2662 cpp_named_operator2name for named operators and cpp_digraph2name
2663 for digraphs.
2664 (cpp_digraph2name): New.
2665 (cpp_spell_token): Use it.
2666 (cpp_output_token): Likewise.
2667 * include/cpplib.h (cpp_type2name): Update declaration.
2668 * init.c (cpp_named_operator2name): New.
2669 * internal.h (cpp_named_operator2name): Declare.
2670
9c650d90
MLI
26712009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2672
2673 PR c++/13358
2674 * init.c (cpp_create_reader): Wlong_long is disabled by default.
2675 * expr.c (cpp_classify_number): Give different messages for C and
2676 C++ front-ends.
2677
aa508502
JM
26782009-04-19 Joseph Myers <joseph@codesourcery.com>
2679
2680 PR preprocessor/20078
2681 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
2682 field.
2683 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
2684 (struct cpp_token): Change flags to unsigned short.
2685 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
2686 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
2687 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
2688 tokens.
2689 * macro.c (macro_real_token_count): New.
2690 (enter_macro_context, replace_args): Use macro_real_token_count.
2691 (create_iso_definition): Record whitespace surrounding and digraph
2692 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
2693 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
2694 multiple consecutive ## tokens.
2695 (_cpp_create_definition): Initialize extra_tokens.
2696 (cpp_macro_definition): Use macro_real_token_count.
2697
61cc8223
JM
26982009-04-18 Joseph Myers <joseph@codesourcery.com>
2699
2700 * directives.c (parse_include): Pass true to check_eol.
2701
c7f9c0b9
JM
27022009-04-18 Joseph Myers <joseph@codesourcery.com>
2703
2704 PR preprocessor/39646
2705 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
2706 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
2707 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
2708 place of LC_RENAME.
2709
a5cb563b
JM
27102009-04-18 Joseph Myers <joseph@codesourcery.com>
2711
2712 PR preprocessor/39647
2713 * directives.c (check_eol): Add parameter expand.
2714 (do_undef, parse_include, do_line, do_linemarker, do_ident,
2715 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
2716 do_else, do_endif, do_assert, do_unassert): All callers changed.
2717 Pass true from do_line, false elsewhere.
2718
18f41a1b
JM
27192009-04-12 Joseph Myers <joseph@codesourcery.com>
2720
2721 PR preprocessor/31869
2722 * macro.c (stringify_arg): Handle NULL source token in padding
2723 token where previous padding token did not have source token with
2724 preceding whitespace.
2725
748086b7
JJ
27262009-04-09 Jakub Jelinek <jakub@redhat.com>
2727
2728 * Makefile.in: Change copyright header to refer to version
2729 3 of the GNU General Public License and to point readers at the
2730 COPYING3 file and the FSF's license web page.
2731 * charset.c: Likewise.
2732 * directives-only.c: Likewise.
2733 * directives.c: Likewise.
2734 * errors.c: Likewise.
2735 * expr.c: Likewise.
2736 * files.c: Likewise.
2737 * identifiers.c: Likewise.
2738 * include/cpp-id-data.h: Likewise.
2739 * include/cpplib.h: Likewise.
2740 * include/line-map.h: Likewise.
2741 * include/mkdeps.h: Likewise.
2742 * include/symtab.h: Likewise.
2743 * init.c: Likewise.
2744 * internal.h: Likewise.
2745 * lex.c: Likewise.
2746 * line-map.c: Likewise.
2747 * macro.c: Likewise.
2748 * makeucnid.c: Likewise.
2749 * mkdeps.c: Likewise.
2750 * pch.c: Likewise.
2751 * symtab.c: Likewise.
2752 * system.h: Likewise.
2753 * traditional.c: Likewise.
2754 * ucnid.tab: Likewise.
2755 * ucnid.h: Regenerate.
2756
eec49116
JJ
27572009-04-01 Janis Johnson <janis187@us.ibm.com>
2758
839a3b8a
JJ
2759 PR c/39027
2760 * include/cpplib.h (CPP_N_DEFAULT): Define.
2761 * expr.c (interpret_float_suffix): Recognize d or D for double,
2762 return new value for default.
2763 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
2764
eec49116
JJ
2765 PR c/33466
2766 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
2767 letters from decimal float and fixed-point suffixes.
2768
47580d22
JM
27692009-03-31 Joseph Myers <joseph@codesourcery.com>
2770
2771 PR preprocessor/15638
2772 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
2773 invalid PCH.
2774 (open_file_failed): Make error for missing file fatal.
2775 * include/cpplib.h (CPP_DL_FATAL): Define.
2776
5a2df0fa
SV
27772009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
2778
2779 PR preprocessor/31932:
2780 * internal.h: Don't mention HAVE_ICONV_H.
2781 * configure, config.in: Rebuild.
2782 * configure.ac: Don't check for iconv.h.
2783
c1a8a3c6
TT
27842009-03-30 Tom Tromey <tromey@redhat.com>
2785
2786 PR preprocessor/39512:
2787 * line-map.c (linemap_init): Initialize 'reallocator' field.
2788
a37a7b8a
JJ
27892009-03-30 Jakub Jelinek <jakub@redhat.com>
2790
2791 PR target/39558
2792 * macro.c (cpp_get_token): If macro_to_expand returns NULL
2793 and used some tokens, add CPP_PADDING before next token.
2794
148e4216
JM
27952009-03-29 Joseph Myers <joseph@codesourcery.com>
2796
2797 PR preprocessor/34695
2798 * makedepend.c: Remove.
2799 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
2800 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
2801 * directives.c (cpp_errors): Remove.
2802 * errors.c (print_location, _cpp_begin_message, v_message):
2803 Remove.
2804 (cpp_error, cpp_error_with_line): Always use error callback.
2805 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
2806 * include/cpplib.h (cpp_options): Remove pedantic_errors,
2807 inhibit_warnings, warn_system_headers, inhibit_errors,
2808 warnings_are_errors, client_diagnostic.
2809 (cpp_callbacks): Add extra arguments to error callback; make it
2810 return bool.
2811 (cpp_finish): Return void.
2812 (cpp_destroy): Remove inaccurate comment about return value.
2813 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
2814 (CPP_DL_NOTE): Define.
2815 * include/line-map.h (linemap_print_containing_files): Remove.
2816 * init.c (cpp_finish): Do not check for or return number of
2817 errors.
2818 * internal.h (cpp_reader): Remove errors field.
2819 * line-map.c (linemap_print_containing_files): Remove.
2820 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
2821 about previous definition. Only emit it if previous diagnostic
2822 was emitted.
2823
f1450211
JM
28242009-03-28 Joseph Myers <joseph@codesourcery.com>
2825
2826 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
2827 mkinstalldirs.
2828
8f5929e1
JJ
28292009-03-18 Jakub Jelinek <jakub@redhat.com>
2830
2831 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
2832
4bb09c26
JM
28332009-02-21 Joseph Myers <joseph@codesourcery.com>
2834
2835 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
2836 header name.
2837 (_cpp_lex_direct): Handle this.
2838
68c9ab45
RG
28392009-02-15 Richard Guenther <rguenther@suse.de>
2840
2841 Revert last change.
2842
601b3e1a
RG
28432009-02-13 Richard Guenther <rguenther@suse.de>
2844
2845 * configure.ac: Enable LFS.
2846 * configure: Re-generate.
2847 * config.in: Likewise.
2848
fc0cd180
BE
28492009-01-05 Ben Elliston <bje@au.ibm.com>
2850
2851 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
2852 (.po.pox): Likewise.
2853 (po/$(PACKAGE).pot): Likewise.
2854
db89a3be
AO
28552008-12-10 Alexandre Oliva <aoliva@redhat.com>
2856
2857 PR target/37033
2858 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
2859 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
2860
cc955282
JM
28612008-11-29 Joseph Myers <joseph@codesourcery.com>
2862
2863 * lex.c (cpp_token_len): Use 6 as default length.
2864
47960aaf
MLI
28652008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
2866
2867 * expr.c (struct op): Add location.
2868 (_cpp_parse_expr): Propagate locations throught the stack
2869 of expressions.
2870 (reduce): Likewise.
2871 (check_promotion): Use explicit location in errors.
2872
631d0d36
MG
28732008-10-05 Matthew Gingell <gingell@adacore.com>
2874 Arnaud Charlet <charlet@adacore.com>
2875
2876 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
2877 (cpp_get_comments): New function.
2878 * internal.h (struct cpp_reader): Add comments field.
2879 * init.c (cpp_destroy): Free comments.
2880 * lex.c (store_comment, cpp_get_comments): New functions.
2881 (comments): New struct.
2882 (save_comment): Store comments in comments struct.
2883
c047ce93
SB
28842008-09-18 Simon Baldwin <simonb@google.com>
2885
2886 * include/cpplib.h (struct cpp_options): Add new boolean flag
2887 warn_builtin_macro_redefined.
2888 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
2889 * (struct builtin_operator): Split out from previous struct builtin,
2890 enhance extra const correctness.
2891 * (struct builtin_macro): Split out from previous struct builtin, add
2892 new always_warn_if_redefined flag, enhance const correctness.
2893 * (mark_named_operators): Use struct builtin_operator.
2894 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
2895 to builtins selectively.
2896 * macro.c (warn_of_redefinition): Return false if a builtin macro
2897 is not flagged with NODE_WARN.
2898
affa55c6
JJ
28992008-07-31 Jakub Jelinek <jakub@redhat.com>
2900
2901 PR preprocessor/36649
2902 * files.c (struct report_missing_guard_data): New type.
2903 (report_missing_guard): Put paths into an array instead of printing
2904 them right away. Return 1 rather than 0.
2905 (report_missing_guard_cmp): New function.
2906 (_cpp_report_missing_guards): Sort and print paths gathered by
2907 report_missing_guard callback.
2908
3b8f20a1
MLI
29092008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2910
2911 PR 28079
2912 * directives.c (strtolinenum): Handle overflow.
2913 (do_line): Give a warning if line number overflowed.
2914 (do_linemarker): Update call to strtolinenum.
2915
1bb64668
MLI
29162008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2917
2918 * include/line-map.h (linenum_type): New typedef.
2919 (struct line_map): Use it.
2920 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
2921 (SOURCE_COLUMN): Likewise.
2922 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
2923 source_location values in a variable of type linenum_type.
2924 * directives.c (struct if_stack): Use linenum_type.
2925 (strtoul_for_line): Rename as strtolinenum.
2926 (do_line): Use linenum_type.
2927 (do_linemarker): Use linenum_type and strtolinenum.
2928 (_cpp_do_file_change): Use linenum_t.
2929 * line-map.c (linemap_add): Likewise.
2930 (linemap_line_start): Likewise.
2931 * traditional.c (struct fun_macro): 'line' is a source_location.
2932 * errors.c (print_location): Use linenum_type.
2933 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
2934 * internal.h (CPP_INCREMENT_LINE): Likewise.
2935 * lex.c (_cpp_skip_block_comment): Use source_location.
19a9ba64 2936
5950c3c9
BE
29372008-07-14 Ben Elliston <bje@au.ibm.com>
2938
2939 * include/cpplib.h (NODE_CONDITIONAL): New.
2940 (struct cpp_callbacks): New macro_to_expand field.
2941 (struct cpp_hashnode): Adjust size of flags and type fields.
2942 (cpp_peek_token): Prototype.
2943 * lex.c (cpp_peek_token): New function.
2944 (_cpp_temp_token): Protect pre-existing lookaheads.
2945 * macro.c (cpp_get_token): Expand any conditional macros.
2946 (_cpp_backup_tokens_direct): New.
2947 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
2948 (warn_of_redefinition): Silently allow redefined conditional
2949 macros.
2950 (_cpp_create_definition): Remove the conditional flag when a user
2951 defines one of the conditional macros.
2952 * internal.h (_cpp_backup_tokens_direct): New prototype.
2953
e85edc9e
AH
29542008-06-13 Andrew Haley <aph@redhat.com>
2955
2956 PR preprocessor/33305
2957 * macro.c (replace_args): Print a warning for empty macro
2958 arguments in C89 and C++.
2959
18c04407
RW
29602008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2961
2962 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
2963 * configure: Regenerate.
2964
2d09b640
RW
29652008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2966
2967 * Makefile.in (datarootdir): New variable.
2968
0b7c73cc
L
29692008-06-12 H.J. Lu <hongjiu.lu@intel.com>
2970
2971 PR preprocessor/36479
2972 * charset.c (cpp_interpret_string_notranslate): Also set
2973 narrow_cset_desc.width.
2974
cd985f66
JM
29752008-06-07 Joseph Myers <joseph@codesourcery.com>
2976
2977 * configure.ac (parisc*64*-*-*): Remove.
2978 * configure: Regenerate.
2979
d750887f
TT
29802008-05-30 Tom Tromey <tromey@redhat.com>
2981
2982 PR preprocessor/36320:
2983 * internal.h (_cpp_parse_expr): Update.
2984 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
2985 messages.
2986 * directives.c (do_if): Update.
2987 (do_elif): Require expression if processing group.
2988
c100de59
DS
29892008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
2990
2991 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
2992
5d6342eb
TT
29932008-05-21 Tom Tromey <tromey@redhat.com>
2994
2995 PR preprocessor/27777:
2996 * lex.c (cpp_output_line_to_string): New function.
2997 * internal.h (_cpp_begin_message): Don't declare.
2998 * errors.c (_cpp_begin_message): Now static.
2999 * include/cpplib.h (cpp_output_line_to_string): Declare.
3000 * directives.c (do_diagnostic): Rewrote. Use
3001 cpp_output_line_to_string. Don't use _cpp_begin_message.
3002
dae4174e
TT
30032008-05-21 Tom Tromey <tromey@redhat.com>
3004
3005 * include/symtab.h (HT_ALLOCED): Remove.
3006 (ht_purge): Declare.
3007 * symtab.c (DELETED): New define.
3008 (ht_lookup): Update comment.
3009 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
3010 code. Use subobject allocator for strings, if it exists.
3011 (ht_expand): Handle deleted entries.
3012 (ht_forall): Likewise.
3013 (ht_purge): New function.
3014 (ht_dump_statistics): Print deletion statistics.
3015
899015a0
TT
30162008-05-13 Tom Tromey <tromey@redhat.com>
3017
3018 PR preprocessor/22168:
3019 * include/cpplib.h (struct cpp_options) <objc>: Update
3020 documentation.
3021 * expr.c (eval_token): Warn for use of assertions.
3022 * directives.c (directive_diagnostics): Warn about extensions.
3023 (DEPRECATED): New define.
3024 (DIRECTIVE_TABLE): Use it.
3025
71c10038
TT
30262008-05-06 Tom Tromey <tromey@redhat.com>
3027
3028 PR preprocessor/35313, PR preprocessor/36088:
3029 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
3030 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
3031
2bd0fe3d
DM
30322008-05-04 David S. Miller <davem@davemloft.net>
3033
3034 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
3035 * configure: Regenerate.
3036
28f68625
DF
30372008-04-22 Daniel Franke <franke.daniel@gmail.com>
3038
3039 * include/cpplib.h (cpp_define_formatted): New.
3040 * directives.c (cpp_define_formatted): New.
3041
688e7a53
TT
30422008-04-21 Tom Tromey <tromey@redhat.com>
3043
3044 PR libcpp/33415:
3045 * charset.c (_cpp_convert_input): Add buffer_start argument.
3046 Ignore UTF-8 BOM if seen.
3047 * internal.h (_cpp_convert_input): Add argument.
3048 * files.c (struct _cpp_file) <buffer_start>: New field.
3049 (destroy_cpp_file): Free buffer_start, not buffer.
3050 (_cpp_pop_file_buffer): Likewise.
3051 (read_file_guts): Update.
3052
b6baa67d
KVH
30532008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
3054
3055 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
3056 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
3057 (struct cpp_options): Added uliterals.
3058 (cpp_interpret_string): Update prototype.
3059 (cpp_interpret_string_notranslate): Idem.
3060 * charset.c (init_iconv_desc): New width member in cset_converter.
3061 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
3062 (convert_ucn): Idem.
3063 (emit_numeric_escape): Idem.
3064 (convert_hex): Idem.
3065 (convert_oct): Idem.
3066 (convert_escape): Idem.
3067 (converter_for_type): New function.
3068 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
3069 (cpp_interpret_string_notranslate): Match changed prototype.
3070 (wide_str_to_charconst): Use converter_for_type.
3071 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
3072 * directives.c (linemarker_dir): Macro U changed to UC.
3073 (parse_include): Idem.
3074 (register_pragma_1): Idem.
3075 (restore_registered_pragmas): Idem.
3076 (get__Pragma_string): Support CPP_STRING{16,32}.
3077 * expr.c (eval_token): Support CPP_CHAR{16,32}.
3078 * init.c (struct lang_flags): Added uliterals.
3079 (lang_defaults): Idem.
3080 * internal.h (struct cset_converter) <width>: New field.
3081 (struct cpp_reader) <char16_cset_desc>: Idem.
3082 (struct cpp_reader) <char32_cset_desc>: Idem.
3083 * lex.c (digraph_spellings): Macro U changed to UC.
3084 (OP, TK): Idem.
3085 (lex_string): Add support for u'...', U'...', u"..." and U"...".
3086 (_cpp_lex_direct): Idem.
3087 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
3088 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
3089
deb984e6
PB
30902008-04-18 Paolo Bonzini <bonzini@gnu.org>
3091
3092 PR bootstrap/35457
3093 * aclocal.m4: Regenerate.
3094 * configure: Regenerate.
3095
bf048bea
TT
30962008-04-17 Tom Tromey <tromey@redhat.com>
3097
3098 PR libcpp/34866:
3099 * errors.c (cpp_error): Don't reference a token before the start
3100 of the current run.
3101
7f27b0f8
TT
31022008-04-16 Tom Tromey <tromey@redhat.com>
3103
3104 * Makefile.in (TAGS_SOURCES): New variable.
3105 (TAGS): New target.
3106
a1fcb9a1
KK
31072008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
3108
3109 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
3110 and shbe-*-*.
3111 * configure: Rebuilt.
3112
93d45d9e
JM
31132008-04-02 Joseph Myers <joseph@codesourcery.com>
3114
3115 * include/cpplib.h (struct cpp_callbacks): Add used_define,
3116 used_undef and before_define.
3117 (NODE_USED): Define.
3118 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
3119 do_ifndef, cpp_pop_definition): Handle new flag and use new
3120 callbacks.
3121 * expr.c (parse_defined): Handle new flag and use new callbacks.
3122 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
3123 flag and use new callbacks.
3124
d4c32e1d
JJ
31252008-04-01 Jakub Jelinek <jakub@redhat.com>
3126
3127 PR pch/13675
3128 * files.c (struct _cpp_file): Remove pch field.
3129 (pch_open_file): Don't set file->pch, just file->pchname.
3130 (should_stack_file): After pfile->cb.read_pch call
3131 free pchname and clear pchname, don't close file->fd.
3132 Test file->pchname instead of file->pch. Don't close fd after cb.
3133 (_cpp_stack_include): Test file->pchname instead of file->pch.
3134
161031e3
TT
31352008-03-28 Tom Tromey <tromey@redhat.com>
3136
3137 * Makefile.in (POSTCOMPILE): New variable.
3138 (.c.o): Use it.
3139
14ccf800
TT
31402008-03-13 Tom Tromey <tromey@redhat.com>
3141
3142 PR libcpp/35322:
3143 * directives.c (destringize_and_run): Set pfile->directive.
3144
830465c6
MM
31452008-03-06 Markus Milleder <markus.milleder@generali.at>
3146
3147 PR preprocessor/35458
3148 * mkdeps.c (munge): Quote '#' with a '\'.
3149
d482a073
RW
31502008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3151
3152 PR preprocessor/35379
3153 * mkdeps.c (deps_write): Ensure the first target always appears
3154 in the first column, without leading backslash newline. Avoid
3155 some more extra whitespace.
3156
185a6cc1
TS
31572008-02-25 Thiemo Seufer <ths@mips.com>
3158
d482a073 3159 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 3160
2bf41bf0
TT
31612008-02-19 Tom Tromey <tromey@redhat.com>
3162
3163 * traditional.c (lex_identifier): Use CPP_HASHNODE.
3164 * lex.c (lex_identifier): Use CPP_HASHNODE.
3165 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
3166 do-while.
3167 * identifiers.c (alloc_node): Change return type.
3168 (_cpp_init_hashtable): Don't cast 'alloc_node'.
3169 (proxy_assertion_broken): New declaration.
3170 (cpp_forall_identifiers): Move comment.
3171 * line-map.c (linemap_add): Comment fix.
3172 (linemap_line_start): Indentation fix.
3173
765d600a
JJ
31742008-01-25 Jakub Jelinek <jakub@redhat.com>
3175
3176 PR preprocessor/34692
3177 * macro.c (collect_args): Add pragma_buff argument. Push
3178 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
3179 than into arguments. Reset prevent_expansion and parsing_args
3180 state at CPP_PRAGMA_EOL/CPP_EOF.
3181 (funlike_invocation_p): Add pragma_buff argument, pass it through
3182 to collect_args.
3183 (enter_macro_context): Add result argument. Adjust
3184 funlike_invocation_p caller. Emit all deferred pragma tokens
3185 gathered during collect_args before the expansion, add a padding
3186 token. Return 2 instead of 1 if any pragma tokens were prepended.
3187 (cpp_get_token): If enter_macro_context returns 2, don't return
3188 a padding token, instead cycle to grab CPP_PRAGMA token.
3189 * directives.c (_cpp_handle_directive): If was_parsing_args
3190 in deferred pragma, leave parsing_args and prevent_expansion as is.
3191
ec46053b
TT
31922008-01-22 Tom Tromey <tromey@redhat.com>
3193
765d600a 3194 PR c++/34859
ec46053b
TT
3195 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
3196 __STDC_CONSTANT_MACROS.
3197
681c6ab0
FF
31982008-01-07 Fred Fish <fnf@specifix.com>
3199
765d600a 3200 PR preprocessor/30363
681c6ab0 3201 * traditional.c (replace_args_and_push): Add local variable
19a9ba64 3202 cxtquote, calculate the replacement text size assuming a
681c6ab0
FF
3203 worst case of every input character quoted with backslash,
3204 and properly handle output quoting of quote characters in
3205 actual arguments used in function-like macros.
3206
33ae4837
TT
32072008-01-03 Tom Tromey <tromey@redhat.com>
3208
765d600a 3209 PR preprocessor/34602
33ae4837
TT
3210 * directives.c (do_line): Don't try to spell EOF token.
3211 (do_linemarker): Add comment.
3212
675575f5
DD
32132007-12-11 DJ Delorie <dj@redhat.com>
3214
3215 * charset.c (convert_using_iconv): Close out any shift states,
3216 returning to the initial state.
3217
97f6bd40
TT
32182007-12-06 Tom Tromey <tromey@redhat.com>
3219
765d600a 3220 PR c/29172
97f6bd40
TT
3221 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
3222 type.
3223 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
3224 * files.c (FILE_HASH_POOL_SIZE): New macro.
3225 (struct file_hash_entry_pool): New.
3226 (destroy_all_cpp_files): New function.
3227 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
3228 (new_file_hash_entry): Update.
3229 (free_file_hash_entries): New function.
3230 (_cpp_cleanup_files): Call free_file_hash_entries and
3231 destroy_all_cpp_files.
3232 (cpp_clear_file_cache): New function.
3233 * include/cpplib.h (cpp_clear_file_cache): Declare.
3234
d56a25e1
TT
32352007-12-03 Tom Tromey <tromey@redhat.com>
3236
765d600a 3237 PR preprocessor/34288
d56a25e1
TT
3238 * configure.ac, config.in: Rebuilt.
3239 * configure.ac: Check for ssize_t.
3240
607f74e9
TT
32412007-11-30 Tom Tromey <tromey@redhat.com>
3242
765d600a 3243 PR preprocessor/32868
607f74e9
TT
3244 * macro.c (_cpp_create_definition): Special case
3245 __STDC_FORMAT_MACROS.
3246
b0f4807f
MM
32472007-11-16 Michael Matz <matz@suse.de>
3248
3249 * files.c (search_path_head): Fix check for absolute paths.
3250
f1e20710
TT
32512007-11-11 Tom Tromey <tromey@redhat.com>
3252
765d600a 3253 PR c++/17557
f1e20710
TT
3254 * include/cpplib.h (cpp_included_before): Declare.
3255 * files.c (struct file_hash_entry) <location>: New field.
3256 (_cpp_find_file): Initialize new field.
3257 (make_cpp_dir): Likewise.
3258 (cpp_included_before): New function.
3259
f373b44d
TT
32602007-11-01 Tom Tromey <tromey@redhat.com>
3261
765d600a 3262 PR preprocessor/30805
f373b44d
TT
3263 * macro.c (paste_tokens): Handle padding token.
3264 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
3265
5b9a40df
TT
32662007-10-31 Tom Tromey <tromey@redhat.com>
3267
765d600a 3268 PR preprocessor/30786
5b9a40df
TT
3269 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
3270 * directives.c (_cpp_do__Pragma): Return error status.
3271 * internal.h (_cpp_do__Pragma): Update.
3272 * directives.c (get__Pragma_string): Back up if EOF seen.
3273
5ffeb913
TT
32742007-09-06 Tom Tromey <tromey@redhat.com>
3275
3276 * internal.h (struct cpp_reader) <invocation_location>: New
3277 field.
3278 (struct cpp_reader) <set_invocation_location>: Likewise.
3279 * init.c (cpp_set_line_map): New function.
3280 * line-map.c (linemap_add): Use linemap's allocator.
3281 * include/line-map.h (GTY): Define.
3282 (line_map_realloc): New typedef.
3283 (struct line_map): Mark with GTY.
3284 (struct line_maps): Likewise.
3285 (struct line_maps) <maps>: Likewise.
3286 (struct line_maps) <reallocator>: New field.
3287 * include/symtab.h (GTY): Conditionally define.
3288 * include/cpplib.h (cpp_set_line_map): Declare.
3289 (cpp_get_token_with_location): Declare.
3290 * macro.c (cpp_get_token): Set invocation_location on the reader.
3291 (cpp_get_token_with_location): New function.
3292
ac6b1c67
CF
32932007-08-30 Chao-ying Fu <fu@mips.com>
3294
3295 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
3296 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
3297 (cpp_classify_number): Support decimal fixed-point constants without
3298 exponents.
3299 Warn about fixed-point constants when -pedantic.
3300 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
3301 comments to support fixed-point values.
3302 (CPP_N_FRACT, CPP_N_ACCUM): Define.
3303
cda5e672
TT
33042007-08-18 Tom Tromey <tromey@redhat.com>
3305
765d600a 3306 PR preprocessor/32974
cda5e672
TT
3307 * directives.c (parse_include): Don't check for EOL when
3308 processing #pragma dependency.
3309
ccfc4c91
OW
33102007-07-30 Ollie Wild <aaw@google.com>
3311
3312 * directives-only.c: New file.
3313 * internal.h (struct _cpp_dir_only_callbacks): New.
3314 (_cpp_preprocess_dir_only): New function.
3315 * directives.c (_cpp_handle_directive): Check directives_only before
3316 disabling execution of indented directives.
3317 * files.c (_cpp_stack_file): Add directives_only check.
3318 * include/cpplib.h (struct cpp_options): Add directives_only.
3319 (cpp_init_special_builtins): New function.
3320 * init.c (cpp_init_special_builtins): New function.
3321 (cpp_init_builtins): Move builtin_array initialization to
3322 cpp_init_special_builtins.
3323 (post_options): Check directives_only before setting
3324 pfile->state.prevent_expansion = 1.
3325 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
3326 is expanded inside a directive while -fdirectives-only is enabled.
3327 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
3328 (libcpp_a_SOURCES): Add directives-only.c.
3329
a206413a
UB
33302007-07-04 Uros Bizjak <ubizjak@gmail.com>
3331
3332 * traditional.c (_cpp_scan_out_logical_line): Initialize
3333 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
3334 fmacro.args to prevent 'may be used uninitialized' warning.
3335
c77cd3d1
UB
33362007-07-03 Uros Bizjak <ubizjak@gmail.com>
3337
3338 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
3339 Add new constants.
3340 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
3341 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
3342 for 'q' or 'Q' suffixes.
3343
66938a1d
DS
33442007-06-17 Danny Smith <dannysmith@users.sourceforge.net
3345
e1311401 3346 * files.c (open_file): Correct typo.
66938a1d 3347
71995ede
VP
33482007-06-16 Vladimir Prus <vladimir@codesourcery.com>
3349
e1311401 3350 * files.c (open_file): Prevent the call
71995ede
VP
3351 for stat from overwriting errno.
3352
84152c25
VP
33532007-06-09 Vladimir Prus <vladimir@codesourcery.com>
3354
e1311401 3355 * files.c (open_file): Account for the
19a9ba64
AM
3356 fact that on windows, opening a directory gives
3357 EACCES.
84152c25 3358
f7fd775f
JW
33592007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
3360
3361 PR preprocessor/23479
3362 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
3363 integer constants.
3364 (append_digit): Likewise.
3365 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
3366 binary integer constants.
3367
ed0e74e0
DK
33682007-05-31 Dave Korn <dave.korn@artimi.com>
3369
3370 PR preprocessor/14331
3371 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
3372
a702045a
OW
33732007-05-24 Ollie Wild <aaw@google.com>
3374
3375 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
3376 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
3377 (cpp_write_pch_state): Save __COUNTER__ state.
3378 (cpp_valid_state): Check valid __COUNTER__ state.
3379 (cpp_read_state): Read new __COUNTER__ state.
3380 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
3381 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
3382 * internal.h (struct cpp_reader): Add counter member.
3383
126e073b
SM
33842007-05-23 Simon Martin <simartin@users.sourceforge.net>
3385
3386 PR preprocessor/20077
3387 * macro.c (create_iso_definition): Fixed the method to determine
3388 whether the token-pasting operator appears at the beginning or the end
3389 of a macro.
3390
0b4cafec
ILT
33912007-05-21 Ian Lance Taylor <iant@google.com>
3392
3393 * internal.h (struct cpp_reader): Add new fields:
3394 nonexistent_file_hash and nonexistent_file_ob.
3395 * files.c: Include "obstack.h".
3396 (find_file_in_dir): Before trying to open the file, look up the
3397 path name in the hash table of nonexistent files. After failing
3398 to open the file, add the path name to the hash table.
3399 (_cpp_find_file): Cache the results of looking up the file name
3400 starting with the quote and bracket chain heads, if we can.
3401 (nonexistent_file_hash_eq): New static function.
3402 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
3403 pfile->nonexistent_file_ob.
3404 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
3405 pfile->nonexistent_file_ob.
3406
30e04921
JJ
34072007-05-14 Janis Johnson <janis187@us.ibm.com>
3408
19a9ba64 3409 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
5a6bb57e 3410
30e04921
JJ
3411 PR c/31924
3412 * expr.c (interpret_float_suffix): Check for invalid suffix.
3413
22a8a52d
EC
34142007-05-02 Eric Christopher <echristo@apple.com>
3415
3416 * expr.c (num_div_op): Don't overflow if the result is
3417 zero.
3418
fca35e1b
TT
34192007-05-02 Tom Tromey <tromey@redhat.com>
3420
765d600a 3421 PR preprocessor/28709
fca35e1b
TT
3422 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
3423
4cd97075
MM
34242007-03-30 Michael Meissner <michael.meissner@amd.com>
3425
3426 * directives.c (lex_macro_node_from_str): Fix alloca call to be
3427 type correct.
3428
121de39f
RH
34292007-03-30 Richard Henderson <rth@redhat.com>
3430
3431 * directives.c (lex_macro_node_from_str): New.
3432 (cpp_push_definition, cpp_pop_definition): New.
3433 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
3434
4fcb360b
BM
34352007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
3436
3437 * Makefile.in: Add dummy install-pdf target.
3438
67e64439
TT
34392007-01-30 Tom Tromey <tromey@redhat.com>
3440
765d600a 3441 PR preprocessor/30468
67e64439
TT
3442 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
3443 './'.
3444
ee380365
TT
34452007-01-30 Tom Tromey <tromey@redhat.com>
3446
765d600a 3447 PR preprocessor/29966
ee380365
TT
3448 * macro.c (lex_expansion_token): Save and restore cpp_reader's
3449 cur_token.
3450 (_cpp_create_definition): Don't restore cur_token here.
3451 * lex.c (_cpp_lex_token): Added assertion.
3452
024abeb3
TT
34532007-01-27 Tom Tromey <tromey@redhat.com>
3454
3455 * configure: Rebuilt.
3456
ee1c2a10
TT
34572007-01-12 Tom Tromey <tromey@redhat.com>
3458
765d600a 3459 PR preprocessor/28227
ee1c2a10
TT
3460 * directives.c (lex_macro_node): Added 'is_def_or_undef'
3461 argument.
3462 (do_define): Update.
3463 (do_undef): Update.
3464 (do_ifdef): Update.
3465 (do_ifndef): Update.
3466
67214c16
PB
34672007-01-11 Paolo Bonzini <bonzini@gnu.org>
3468
3469 * configure: Regenerate.
3470
1aa6ca40
PB
34712007-01-11 Paolo Bonzini <bonzini@gnu.org>
3472
3473 * configure: Regenerate.
3474
705e2d28
TT
34752007-01-04 Tom Tromey <tromey@redhat.com>
3476
765d600a 3477 PR preprocessor/28165
705e2d28
TT
3478 * internal.h (cpp_in_primary_file): New function.
3479 * directives.c (do_include_next): Use cpp_in_primary_file.
3480 (do_pragma_once): Likewise.
3481 (do_pragma_system_header): Likewise.
3482
7af45bd4
ILT
34832006-12-29 Ian Lance Taylor <iant@google.com>
3484
3485 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
3486 look backward at the end of the line unless we saw a backslash.
3487
9d30f270
JJ
34882006-12-29 Jakub Jelinek <jakub@redhat.com>
3489
3490 PR preprocessor/29612
3491 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
3492 only when new_sysp is non-zero.
3493
30b0edc0
TT
34942006-12-28 Tom Tromey <tromey@redhat.com>
3495
765d600a 3496 PR preprocessor/30001
30b0edc0
TT
3497 * charset.c (_cpp_convert_input): Check that to.len is greater
3498 than zero.
3499
85d9c13c
TS
35002006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
3501
3502 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 3503 * configure: Rebuilt.
85d9c13c 3504
dfafdaa6
DG
35052006-11-01 Douglas Gregor <doug.gregor@gmail.com>
3506
3507 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
3508 for experimental C++0x mode.
3509 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
3510 adopted the preprocessor changes introduced in C99.
3511
0f45f0f5
JM
35122006-10-29 Joseph Myers <joseph@codesourcery.com>
3513
3514 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
3515 depending on --enable-targets=all.
3516 * configure: Regenerate.
3517
de000d22
JJ
35182006-10-12 Jakub Jelinek <jakub@redhat.com>
3519
3520 PR preprocessor/28709
3521 * macro.c (paste_tokens): Do error reporting here, use BUF with the
3522 spelled LHS token as opposed to spelling it again.
3523 (paste_all_tokens): Don't report errors here, just break on failure.
3524
b5422ad7
BM
35252006-10-10 Brooks Moses <bmoses@stanford.edu>
3526
3527 * Makefile.in: Added empty "pdf" target.
3528
aaf50ff2
GK
35292006-09-22 Geoffrey Keating <geoffk@apple.com>
3530
3531 * configure.ac: Make need_64_bit_hwint case for x86-darwin
3532 match exactly the glob in gcc/config.gcc.
3533 * configure: Regenerate.
3534
c663e301
JM
35352006-09-13 Joseph S. Myers <joseph@codesourcery.com>
3536
3537 PR c/28768
3538 PR preprocessor/14634
3539 * lex.c (lex_string): Pedwarn for unterminated literals.
3540
f7288899
EC
35412006-09-08 Eric Christopher <echristo@apple.com>
3542
3543 * configure.ac: Add 64-bit HWI support for i?86-darwin.
3544
b52dbbf8
SE
35452006-08-14 Steve Ellcey <sje@cup.hp.com>
3546
3547 PR c++/28288
3548 PR c++/14556
3549 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
3550 (CPP_LAST_EQ): Change.
3551 (CPP_LAST_PUNCTUATOR): Change.
3552 * expr.c (cpp_operator): Remove MIN and MAX.
3553 (reduce): Remove CPP_MIN and CPP_MAX.
3554 (num_binary_op): Ditto.
3555 * lex.c (_cpp_lex_direct): Ditto.
3556 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
3557
1c90c6f9
JJ
35582006-06-09 Jakub Jelinek <jakub@redhat.com>
3559
3560 PR preprocessor/27746
3561 * directives.c (do_pragma): Handle pragma with valid namespace
3562 and invalid name coming from macro expansion.
3563 * directives.c (destringize_and_run): Initialize next field in
3564 context.
3565
3566 PR c/27747
3567 PR c++/27748
3568 * directives.c (destringize_and_run): Set NO_EXPAND on the
3569 tokens.
3570
3571 * macro.c (_cpp_backup_tokens): Fix comment typo.
3572
5c3c3683
DJ
35732006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
3574
3575 * Makefile.in (CATALOGS): Add po/ prefix.
3576 * configure: Regenerated.
3577
b2bd74bc
CD
35782006-05-23 Carlos O'Donell <carlos@codesourcery.com>
3579
3580 * Makefile.in: Add install-html target. Add install-html to .PHONY
3581
be8ac3e2
GZ
35822006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
3583
3584 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
3585 * files.c (_cpp_get_file_stat): New function.
3586 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
3587 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
3588 * internal.h (_cpp_get_file_stat): Prototype.
3589 (struct cpp_buffer): Add timestamp.
3590
83900997
JJ
35912006-01-23 Jakub Jelinek <jakub@redhat.com>
3592
3593 PR preprocessor/25717
3594 * init.c (cpp_init_builtins): If __STDC__ will not change value
3595 between system headers and other sources, define it as a normal
3596 macro rather than a builtin.
3597 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
3598 cpp_in_system_header condition.
3599
36002006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
3601
3602 * Makefile.in: Use -MMD instead of -MD.
3603
bc4071dd
RH
36042006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
3605 Richard Henderson <rth@redhat.com>
3606
3607 Merge from gomp branch:
3608 * directives.c (struct pragma_entry): Add is_deferred. Add ident
3609 entry to value union.
3610 (end_directive): Don't eat the line if in_deferred_pragma.
3611 (run_directive): Remove pragma hacks.
3612 (insert_pragma_entry): Remove.
3613 (new_pragma_entry): New.
3614 (register_pragma_1): Split out of register_pragma. Only handle
3615 the lookup tree and return the new entry.
3616 (cpp_register_pragma): Fill in the pragma entry here.
3617 (cpp_register_deferred_pragma): New.
3618 (register_pragma_internal): New.
3619 (_cpp_init_internal_pragmas): Use register_pragma_internal.
3620 (do_pragma): Allow pragma expansion after namespace. For deferred
3621 pragmas, don't slurp the line into a string.
3622 (destringize_and_run): Save tokens for deferred pragmas.
3623 (cpp_handle_deferred_pragma): Remove.
3624 * macro.c (builtin_macro): Remove pragma token hack.
3625 (_cpp_push_token_context): Rename from push_token_context and export.
3626 * internal.h (struct lexer_state): Add pragma_allow_expansion.
3627 (_cpp_push_token_context): Declare.
3628 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
3629 a token. Update the line number correctly if so.
3630 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
3631 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
3632 * include/cpplib.h (PRAGMA_EOL): New.
3633 (CPP_TOKEN_FLD_PRAGMA): New.
3634 (struct cpp_token): Add val.pragma.
3635 (struct cpp_options): Remove defer_pragmas.
3636 (cpp_handle_deferred_pragma): Remove.
3637 (cpp_register_deferred_pragma): Declare.
3638
d09e893f
JJ
36392006-01-01 Jakub Jelinek <jakub@redhat.com>
3640
3641 PR c++/25294
3642 * directives.c (do_pragma): If pragma line ends with multi-line
3643 block comment, end the saved deferred pragma string before that
3644 comment. Handle embedded '\0' chars on the pragma line.
3645
ab84748a
VR
36462005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3647
3648 PR c++/23333
3649 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
3650
ad6ed77e
JG
36512005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
3652 Ben Elliston <bje@au.ibm.com>
3653
3654 * include/cpplib.h (CPP_N_DFLOAT): New.
3655 * expr.c (interpret_float_suffix): Identify df, dd, and dl
3656 suffixes as decimal floating point constants.
3657 (cpp_classify_number): Disallow hexadecimal DFP constants.
3658
ba096620 36592005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 3660 Ian Lance Taylor <ian@airs.com>
ba096620
GP
3661
3662 * include/cpplib.h (struct cpp_callbacks): Annotate error with
3663 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
3664
456b8ce5
UB
36652005-11-09 Per Bothner <per@bothner.com>
3666 Uros Bizjak <uros@kss-loka.si>
f7288899 3667
456b8ce5
UB
3668 PR c/24101
3669 * init.c (read_original_filename): Temporarily set
3670 state.in_directive before calling _cpp_lex_direct for
3671 CPP_HASH tokens.
3672
5571f74f
JW
36732005-11-03 James E Wilson <wilson@specifix.com>
3674
3675 PR preprocessor/24202
3676 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
3677
a63607ed
JM
36782005-11-04 Joseph S. Myers <joseph@codesourcery.com>
3679
3680 * include/cpplib.h (struct cpp_callbacks): Make error take
3681 va_list* parameter.
3682 * errors.c (cpp_error): Update call to callback.
3683
651ed942
AP
36842005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
3685
3686 PR preprocessor/22042
3687 * macro.c (_cpp_builtin_macro_text): Lower the needed max
3688 buffer size.
3689 (cpp_quote_string): Don't octalify non printable
3690 charactors.
3691
178b58b5
JM
36922005-11-03 Joseph S. Myers <joseph@codesourcery.com>
3693
3694 PR c++/17964
3695 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
3696 (struct cpp_callbacks): Add error.
3697 * errors.c (cpp_error): If client_diagnostic, use error callback.
3698 * charset.c (convert_escape): Don't use %03o in diagnostic.
3699
3ee5ed11 37002005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
3701
3702 PR preprocessor/15220
3703 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
3704 callers. Pass to open_file_failed.
3705 (open_file_failed): New parameter angle_brackets. Fix all callers.
3706 Use in print_dep assignment.
3707 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
3708 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 3709
077fc835
KH
37102005-10-08 Kazu Hirata <kazu@codesourcery.com>
3711
3712 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
3713 * configure: Regenerate.
3714
cbc43ae0
ILT
37152005-10-04 Ian Lance Taylor <ian@airs.com>
3716
3717 PR preprocessor/13726
3718 * directives.c (check_eol_return_comments): New static function.
3719 (parse_include): Add buf parameter. Change all callers.
3720 (do_include_common): If not discard comments, turn on
3721 save_comments. Pass collected comments to include callback.
3722 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
3723 include callback: cpp_token list.
3724
af15a2fe
JM
37252005-09-20 Joseph S. Myers <joseph@codesourcery.com>
3726
3727 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
3728 * init.c (struct lang_flags, lang_defaults): Add
3729 extended_identifiers.
3730 (cpp_set_lang): Use it.
3731 * lex.c (forms_identifier_p): Check extended_identifiers.
3732
f5eab47e
JJ
37332005-08-30 Jakub Jelinek <jakub@redhat.com>
3734
3735 PR preprocessor/20348
3736 PR preprocessor/20356
3737 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
3738 2004-06-05 changes.
3739
467129e6
KG
37402005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3741
3742 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
3743 -Wmissing-format-attribute.
3744
3745 * configure: Regenerate.
3746
200031d1
KC
37472005-06-29 Kelley Cook <kcook@gcc.gnu.org>
3748
3749 * all files: Update FSF address in copyright headers.
3750 * makeucnid.c (write_copyright): Update outputted FSF address.
3751
f610dd5f
ZW
37522005-06-13 Zack Weinberg <zack@codesourcery.com>
3753
3754 * configure.ac: Invoke ZW_CREATE_DEPDIR and
3755 ZW_PROG_COMPILER_DEPENDENCIES.
3756 * aclocal.m4, configure: Regenerate.
3757 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
3758 New variables.
3759 (distclean): Clean up $(DEPDIR) and its contents.
3760 (.c.o): Use $(COMPILE).
3761 Include $(DEPDIR)/*.Po for most object->header dependencies.
3762
c3f829c1
GDR
37632005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3764
3765 * configure.ac: Check declarations for asprintf and vasprintf.
3766 * config.in: Regenerate.
3767 * configure: Likewise.
3768
3769 * charset.c (conversion_loop): Use XRESIZEVEC.
3770 (convert_no_conversion): Likewise.
3771 (convert_using_iconv): Likewise.
3772 (init_iconv_desc): Cast return value of alloca.
3773 (cpp_host_to_exec_charset): Use XNEWVEC.
3774 (emit_numeric_escape): Use XRESIZEVEC.
3775 (cpp_interpret_string): Use XNEWVEC.
3776 (cpp_interpret_string): Use XRESIZEVEC.
3777 (_cpp_interpret_identifier): Cast return value of alloca.
3778 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
3779 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
3780 (parse_include): Use XNEWVEC.
3781 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 3782 "new_entry".
c3f829c1
GDR
3783 (save_registered_pragmas): Cast return value of xmemdup.
3784 (destringize_and_run): Same for alloca.
3785 (parse_assertion): Likewise.
3786 (do_assert): Cast allocated storage to proper type.
3787 (cpp_define): Likewise.
3788 (_cpp_define_builtin): Likewise.
3789 (cpp_undef): Likewise.
3790 (handle_assertion): Likewise.
3791 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
3792 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
3793 (CPP_UMINUS): Likewise.
3794 (struct cpp_operator): Rename from struct operator.
3795 (_cpp_expand_op_stack): Use XRESIZEVEC.
3796 * files.c (pch_open_file): Use XNEWVEC.
3797 (pch_open_file): Use XRESIZEVEC.
3798 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
3799 (dir_name_of_file): Use XNEWVEC.
3800 (make_cpp_file): Use XCNEW.
3801 (make_cpp_dir): Likewise.
3802 (allocate_file_hash_entries): USE XNEWVEC.
3803 (cpp_included): Cast return value of htab_find_with_hash.
3804 (append_file_to_dir): Use XNEWVEC.
3805 (read_filename_string): Likewise. Use XRESIZEVEC too.
3806 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
3807 (remap_filename): Use XNEWVEC.
3808 (struct pchf_entry): Move definition out of struct pchf_data.
3809 (_cpp_save_file_entries): Use XCNEWVAR.
3810 (_cpp_read_file_entries): Use XNEWVAR.
3811 * identifiers.c (alloc_node): Use XOBNEW.
3812 * init.c (cpp_create_reader): Use XCNEW.
3813 (cpp_init_builtins): Cast of b->value to enum builtin_type.
3814 (read_original_directory): Cast return value of alloca.
3815 * lex.c (add_line_note): Use XRESIZEVEC.
3816 (warn_about_normalization): Use XNEWVEC.
3817 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
3818 (new_buff): Use XNEWVEC.
3819 * line-map.c (linemap_add): Use XRESIZEVEC.
3820 * macro.c (builtin_macro): Cast return value of alloca.
3821 (paste_tokens): Likewise.
3822 (expand_arg): Use XNEWVEC and XRESIZEVEC.
3823 (_cpp_save_parameter): Use XRESIZEVEC.
3824 (create_iso_definition): Cast allocated storage to proper type.
3825 (_cpp_create_definition): Likewise.
3826 (cpp_macro_definition): Use XRESIZEVEC.
3827 * makedepend.c (add_clm): Use XNEW.
3828 (add_dir): Likewise.
3829 * mkdeps.c (munge): Use XNEWVEC.
3830 (deps_init): Use XCNEW.
3831 (deps_add_target): Use XRESIZEVEC.
3832 (deps_add_default_target): Cast return value of alloca.
3833 (deps_add_dep): Use XRESIZEVEC.
3834 (deps_add_vpath): Likewise. Use XNEWVEC too.
3835 (deps_restore): Likewise.
3836 * pch.c (save_idents): Use XNEW and XNEWVEC.
3837 (cpp_save_state): Use XNEW.
3838 (count_defs): Cast return value of htab_find.
3839 (write_defs): Likewise.
3840 (cpp_write_pch_deps): Use XNEWVEC.
3841 (collect_ht_nodes): Use XRESIZEVEC.
3842 (cpp_valid_state): Use XNEWVEC.
3843 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
3844 * symtab.c (ht_create): Use XCNEW.
3845 (ht_lookup_with_hash): Cast return value of obstack_copy0.
3846 (ht_expand): Use XCNEWVEC.
3847 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
3848 (bool): Do not define if __cplusplus.
3849
1ed17cd5
ZW
38502005-05-12 Zack Weinberg <zack@codesourcery.com>
3851
3852 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
3853 (do_sccs): Delete function definition, #define to do_ident.
3854 (do_ident): Don't hardwire directive name.
3855
5a8c20ce
RK
38562005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
3857
3858 PR bootstrap/21230
3859 * configure: Regenerate.
3860
473c5bc9
AP
38612005-04-27 Andris Pavenis <pavenis@latnet.lv>
3862
3863 * files.c: Include io.h for DJGPP to get prototype of setmode.
3864
c1fc5047
PB
38652005-04-19 Per Bothner <per@bothner.com>
3866
3867 PR preprocessor/20907
3868 * line-map.c (linemap_line_start): Fix bug when we need to increse
3869 column_bits but can re-use the current line_map.
3870
042630ad
KG
38712005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3872
3873 * system.h (fopen, fdopen, freopen): Define these to the unlocked
3874 libiberty functions.
3875
0d667716
KG
38762005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3877
3878 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
3879 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
3880 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
3881 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
3882 _unlocked function.
3883 (fwrite_unlocked): Fix prototype.
1ed17cd5 3884
0d667716
KG
3885 * configure, config.in: Regenerate.
3886
cae064e7
JJ
38872005-04-05 Jakub Jelinek <jakub@redhat.com>
3888
3889 PR preprocessor/19475
3890 * macro.c (create_iso_definition): For < ISO C99, don't
3891 pedwarn if there is no whitespace between macro name and its
3892 replacement, but the replacement starts with a basic character
3893 set character.
3894
cbada204
AJ
38952005-03-28 Andreas Jaeger <aj@suse.de>
3896
3897 * lex.c (warn_about_normalization): Cast field width to int to
3898 avoid warning.
3899
f42eccdb
JM
39002005-03-19 Joseph S. Myers <joseph@codesourcery.com>
3901
3902 * configure.ac: Consistently use solaris2.1[0-9]* instead of
3903 solaris2.1[0-9].
3904 * configure: Regenerate.
3905
c79e602b
GK
39062005-03-15 Geoffrey Keating <geoffk@apple.com>
3907
3908 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
3909 UCN rather than printing an error.
3910
50668cf6
GK
39112005-03-14 Geoffrey Keating <geoffk@apple.com>
3912
6baba9bb
GK
3913 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
3914
39152005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 3916
50668cf6
GK
3917 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
3918 * charset.c: Update for new format of ucnid.h.
3919 (ucn_valid_in_identifier): Update for new format of ucnid.h.
3920 Add NST parameter, and update it; update callers.
3921 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
3922 with cpp_error.
3923 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
3924 * internal.h (struct normalize_state): New.
3925 (INITIAL_NORMALIZE_STATE): New.
3926 (NORMALIZE_STATE_RESULT): New.
3927 (NORMALIZE_STATE_UPDATE_IDNUM): New.
3928 (_cpp_valid_ucn): New.
3929 * lex.c (warn_about_normalization): New.
3930 (forms_identifier_p): Add normalize_state parameter, update callers.
3931 (lex_identifier): Add normalize_state parameter, update callers. Keep
3932 the state current.
3933 (lex_number): Likewise.
3934 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
3935 it with warn_about_normalization.
3936 * makeucnid.c: New.
3937 * ucnid.h: Replace.
3938 * ucnid.pl: Remove.
3939 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
3940 comments about obsolete version of C++.
3941 * include/cpplib.h (enum cpp_normalize_level): New.
3942 (struct cpp_options): Add warn_normalize field.
3943
47e20491
GK
39442005-03-11 Geoffrey Keating <geoffk@apple.com>
3945
3946 * directives.c (glue_header_name): Update call to cpp_spell_token.
3947 * internal.h (_cpp_interpret_identifier): New.
3948 * charset.c (_cpp_interpret_identifier): New.
3949 (_cpp_valid_ucn): Allow UCN version of '$'.
3950 * lex.c (lex_identifier): Add extra parameter to indicate if initial
3951 character was '$' or '\'. Support identifiers with UCNs.
3952 (forms_identifier_p): Allow UCNs.
3953 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
3954 (utf8_to_ucn): New.
3955 (cpp_spell_token): Add FORSTRING parameter. Use it.
3956 (cpp_token_as_text): Update call to cpp_spell_token.
3957 (cpp_output_token): Write UCNs back out.
3958 (stringify_arg): Update call to cpp_spell_token.
3959 (paste_tokens): Likewise.
3960 (cpp_macro_definition): Likewise.
3961 * macro.c (stringify_arg): Likewise.
3962 (paste_tokens): Likewise.
3963 (cpp_macro_definition): Likewise.
3964 * include/cpplib.h: Add parameter to cpp_spell_token.
3965
73096711
JJ
39662005-03-04 Jakub Jelinek <jakub@redhat.com>
3967
3968 PR bootstrap/20282
3969 PR bootstrap/20305
3970 * macro.c (replace_args, cpp_get_token): Copy whole
3971 cpp_token_u instead of just cpp_string field from it.
3972
2203a881
DP
39732005-02-28 Devang Patel <dpatel@apple.com>
3974
3975 * directives.c (do_line): Save sysp early before line table is
3976 realloc'ed.
1ed17cd5 3977
c5ff069d
ZW
39782005-02-20 Zack Weinberg <zack@codesourcery.com>
3979
3980 PR 18785
3981 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
3982 (cpp_host_to_exec_charset): New function.
3983 * include/cpplib.h: Declare cpp_host_to_exec_charset.
3984
04c90eea
DP
39852005-02-19 Devang Patel <dpatel@apple.com>
3986
3987 * charset.c (_cpp_convert_input): Check '\r' before inserting
3988 '\n' at the end.
c5ff069d 3989
6da55c00
EC
39902005-02-15 Eric Christopher <echristo@redhat.com>
3991
3992 PR preprocessor/19077
3993 * macro.c (cpp_macro_definition): Move handling of whitespace
3994 to PREV_WHITE conditional. Remove overloading of len
3995 variable.
3996
31c3e631
KH
39972005-02-14 Kazu Hirata <kazu@cs.umass.edu>
3998
3999 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
4000 traditional.c: Update copyright.
4001
be0f1e54
PB
40022005-02-14 Paolo Bonzini <bonzini@gnu.org>
4003
4004 PR bootstrap/19818
4005 * configure.ac: Check for declaration of basename and getopt.
4006 * config.in: Regenerate.
4007 * configure: Regenerate.
4008 * internal.h (ustrcspn): New.
4009 * macro.c (create_iso_definition): Fix allocation of memory.
4010 (padding_token): Add cast to remove const-ness.
4011 * pch.c (cpp_read_state): Use ustrcspn.
4012
ecddfb39
MS
40132005-02-08 Mike Stump <mrs@apple.com>
4014
4015 * files.c (pchf_adder): Remove.
4016 (struct pchf_adder_info): Likewise.
4017 (_cpp_save_file_entries): Write out all files so that #import works.
4018
9fcdd891
JM
40192005-01-23 Joseph S. Myers <joseph@codesourcery.com>
4020
4021 * configure: Regenerate.
4022
ecfd72e7
TS
40232005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4024
4025 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
4026
6c25a4f7 4027 * include/cpplib.h: Also update copyright years.
c5ff069d 4028
942926ad
GK
40292005-01-03 Geoffrey Keating <geoffk@apple.com>
4030
4031 * files.c (_cpp_find_file): Add files found by search_path_exhausted
4032 to the list of all files.
4033
a2566ae9
GDR
40342005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4035
4036 * internal.h: Update references to Cpp lib filenames.
4037 * directives.c: Likewise.
4038 * init.c: Likewise.
4039 * macro.c: Likewise.
4040 * traditional.c: Likewise.
4041
1b449375
EB
40422004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
4043
4044 PR preprocessor/15167
4045 * files.c (destroy_cpp_file): New function.
4046 (should_stack_file): Make a new file if the
4047 compared file is still stacked.
4048
28303828
NN
40492004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
4050
c5ff069d 4051 PR preprocessor/17610
28303828
NN
4052 * directives.c (do_include_common): Error out if an empty filename
4053 is given for #include (or #include_next or #import).
4054
c812785a
RS
40552004-11-27 Roger Sayle <roger@eyesopen.com>
4056 Zack Weinberg <zack@codesourcery.com>
4057
4058 * internal.h: Replace all uses of uchar with unsigned char.
4059 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
4060 with !IN_GCC, so uchar is only defined whilst building libcpp.
4061
f91eaa01
KC
40622004-11-24 Kelley Cook <kcook@gcc.gnu.org>
4063
4064 * aclocal.m4: Regenerate.
4065
f78ce0c2
RS
40662004-11-24 Roger Sayle <roger@eyesopen.com>
4067
4068 PR preprocessor/15824
4069 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
4070 directly, instead of the non-existant "system.h" and "ansidecl.h".
4071 * configure: Regenerate.
4072
b5b3e36a 40732004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 4074 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
4075
4076 * internal.h (struct lexer_state): Add in_deferred_pragma.
4077 * directives.c (struct pragma_entry): Add allow_expansion.
4078 (insert_pragma_entry): Take allow_expansion flag.
4079 (register_pragma): Likewise.
4080 (cpp_register_pragma): Likewise.
4081 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
4082 (do_pragma): Honor allow_expansion.
4083 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
4084 * include/cpplib.h (cpp_register_pragma): Update prototype.
4085
a8e68029 40862004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 4087 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
4088
4089 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
4090 need_64bit_hwint=yes.
4091 * configure: Regenerate.
4092
50f47ee0
JM
40932004-11-09 Joseph S. Myers <joseph@codesourcery.com>
4094
4095 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
4096 po/$(PACKAGE).pot.
4097 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
4098 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
4099 Remove local srcdir path from generated file.
4100
968e08d6 41012004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 4102 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
4103
4104 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4105 as well.
4106
3da3d587
ZW
41072004-10-27 Zack Weinberg <zack@codesourcery.com>
4108
4109 PR 18075
4110 * directives.c (do_pragma): Do not defer pragmas which are unknown.
4111 (cpp_handle_deferred_pragma): Add cast to silence warning.
4112
ac24fc25
JM
41132004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
4114
4115 * errors.c (_cpp_begin_message): Print "error: " for errors.
4116
7731405b
AJ
41172004-10-10 Andreas Jaeger <aj@suse.de>
4118
4119 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
4120 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
4121
646544e3
AP
41222004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
4123
4124 * pch.c (cpp_write_pch_state): Remove variable z as it is not
4125 used.
4126 (cpp_read_state): Remove unused variables, m, d and mac_count.
4127
67a74146
PB
41282004-09-29 Per Bothner <per@bothner.com>
4129
4130 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
4131 cb.line_change. Otherwise do_pragma will call the line_change
4132 call-back with a meaningless line number.
4133
018a4785
ZW
41342004-09-24 Zack Weinberg <zack@codesourcery.com>
4135
4136 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
4137 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
4138 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
4139 * aclocal.m4, configure: Regenerate.
4140 * init.c: Include localedir.h.
4141 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
4142 (DEFS): Delete.
4143 (.c.o): Use $(ALL_CFLAGS).
4144 (localedir.h, localedir.hs): New rules.
4145 (clean): Use rm -rf to remove directories.
4146 (distclean): Also delete localedir.h and localedir.hs.
4147 (init.o): Update dependencies.
4148
88fa57d7
KC
41492004-09-22 Kelley Cook <kcook@gcc.gnu.org>
4150
4151 * Makefile.in (aclocal.m4): Update dependencies.
4152 * configure.ac (AC_CONFIG_MACRO_DIR): New.
4153 * aclocal.m4, configure: Regenerate.
4154
8f8e9aa5
ZW
41552004-09-17 Zack Weinberg <zack@codesourcery.com>
4156
a29f62d9
ZW
4157 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
4158 (_cpp_convert_input, _cpp_default_encoding): Add comments.
4159 Some other comments in this file also tweaked.
4160
8f8e9aa5
ZW
4161 * directives.c (do_pragma): Save current buffer position
4162 before lexing the pragma keywords; don't call
4163 _cpp_backup_tokens in the defer_pragmas case.
4164
a2981930
PB
41652004-09-15 Per Bothner <per@bothner.com>
4166
4167 * include/line-map.h (line_map_start): Add parameter names so
4168 preceding comment makes sense.
4169 (linemap_add): Remove from comment mention of non-existing parameter.
4170
21b11495
ZW
41712004-09-09 Matt Austern <austern@apple.com>
4172 Zack Weinberg <zack@codesourcery.com>
4173
4174 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
4175 prefixes throughout. Add entry for PRAGMA. Remove
4176 unnecessary "= 0" from EQ.
4177 (enum cpp_ttype): Adjust OP and TK definitions to restore
4178 prefixes, via token-paste.
4179 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
4180 Change from #defines to additional cpp_ttype enumerators.
4181 (struct cpp_options): Add defer_pragmas.
4182 (cpp_handle_deferred_pragma): Prototype new interface.
4183
4184 * internal.h (struct cpp_reader): Add directive_result.
4185 * directives.c (struct pragma_entry): Add is_internal field;
4186 give boolean fields type bool.
4187 (start_directive): Initialize pfile->directive_result.type.
4188 (_cpp_do__Pragma): Likewise.
4189 (run_directive): Do not crash if pfile->buffer->prev is NULL.
4190 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
4191 from it.
4192 (register_pragma): New static function, bulk of former
4193 cpp_register_pragma here; add 'internal' argument, pass along
4194 to insert_pragma_entry.
4195 (cpp_register_pragma): Now a wrapper around register_pragma which
4196 always passes false for 'internal' argument.
4197 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
4198 true for 'internal'.
4199 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
4200 an internal pragma, save text till the end of the line as a CPP_PRAGMA
4201 token instead of executing the pragma.
4202 (cpp_handle_deferred_pragma): New interface.
4203 * lex.c (token_spellings): Adjust OP and TK definitions to
4204 match changes to cpplib.h.
4205 (_cpp_lex_token): Check for a directive-result token and
4206 return it if present.
4207 (cpp_token_val_index): Handle CPP_PRAGMA.
4208 * macro.c (cpp_builtin_macro_text): Correct comment.
4209 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
4210
0fd9e8dd
SB
42112004-09-06 Serge Belyshev <belyshev@lubercy.com>
4212
4213 PR preprocessor/14699
4214 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
4215 from size_t to double.
4216
39b8ce7f
AS
42172004-08-28 Andreas Schwab <schwab@suse.de>
4218 Andreas Jaeger <aj@suse.de>
4219
4220 * configure.ac: Set PACKAGE correctly.
4221 * configure: Regenerated.
4222
5d1f4b27
PB
42232004-08-25 Paolo Bonzini <bonzini@gnu.org>
4224
4225 * Makefile.in: Add back top_builddir.
4226
078e3ffe
PB
42272004-08-25 Paolo Bonzini <bonzini@gnu.org>
4228
4229 * configure.ac: Replace Automake macro invocations
4230 with manual Autoconf checks and substitutions.
4231 * configure: Regenerate.
4232 * aclocal.m4: Regenerate.
4233 * config.in: Regenerate.
4234 * Makefile.am: Removed.
4235 * Makefile.in: Heavy simplification and reorganization.
4236
b3f8d95d
MM
42372004-08-09 Mark Mitchell <mark@codesourcery.com>
4238
4239 * configure.ac (arm*-*-eabi*): New target.
4240 (arm*-*-symbianelf*): Likewise.
4241 * configure: Regenerated.
4242
72bb2c39
BI
42432004-07-24 Bernardo Innocenti <bernie@develer.com>
4244
4245 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
4246 * directives.c: Use XNEW-family macros from libiberty.
4247 * lex.c: Likewise.
4248 * macro.c: Likewise.
4249 * cpplib.h (cpp_deps_style): Export enum with name.
4250
21b11495 42512004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 4252
21b11495 4253 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 4254
a23ee064
AP
42552004-07-16 Andris Pavenis <pavenis@latnet.lv>
4256
4257 PR preprocessor/16366
4258 * internal.h (struct cpp_reader): New field dir_hash.
4259 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
4260 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
4261
a09d4744
NB
42622004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
4263
4264 PR preprocessor/16192
4265 PR preprocessor/15913
4266 PR preprocessor/15572
4267 * expr.c (_cpp_parse_expr): Handle remaining cases where an
4268 expression is missing.
4269 * init.c (post_options): Traditional cpp doesn't do // comments.
4270
f58f7def
PB
42712004-06-30 Per Bothner <per@bothner.com>
4272
4273 * include/line-map.h (fileline): Remove old typedef.
4274 * internal.h (struct cpp_reader): Use source_location typedef instead.
4275
e83d8d43
ZW
42762004-06-26 Zack Weinberg <zack@codesourcery.com>
4277
4278 Partially revert patch of 2004-06-05.
4279 * files.c (search_cache): Remove pfile argument. Don't check
4280 for file that would be found by "" or <> search here...
4281 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
4282 Do not apply directory-of-current-file correction to files
4283 found by this check. Rearrange code slightly.
4284
c0d578e6
GK
42852004-06-21 Geoffrey Keating <geoffk@apple.com>
4286
4287 * files.c (should_stack_file): Correct swapped parameters to call
4288 to cb.read_pch.
4289 * pch.c (cpp_valid_state): Handle -fpreprocessed.
4290
159d5224
PB
42912004-06-15 Paolo Bonzini <bonzini@gnu.org>
4292
4293 * Makefile.in: Regenerate with automake 1.8.5.
4294 * aclocal.m4: Likewise.
4295 * configure: Regenerate.
4296
2fac9c01
ZW
42972004-06-11 Zack Weinberg <zack@codesourcery.com>
4298
4299 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
4300 * configure, config.in: Regenerate.
4301 * system.h: Unconditionally define bool as unsigned char,
4302 BOOL_BITFIELD as unsigned int.
4303 * .cvsignore: New file.
4304
d8044160
GK
43052004-06-09 Geoffrey Keating <geoffk@apple.com>
4306
4307 * traditional.c (push_replacement_text): Set macro->traditional.
4308 (save_replacement_text): Likewise.
4309 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
4310 (struct save_macro_item): Delete.
4311 (struct save_macro_data): Use a character array not the previous
4312 structured format.
4313 (save_macros): Save macro as text not as internal structures.
4314 (cpp_prepare_state): Update for changes to save_macro_data.
4315 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 4316 -D macros as text.
d8044160
GK
4317 * macro.c (create_iso_definition): Honour alloc_subobject.
4318 Clear traditional flag.
4319 (_cpp_create_definition): Honour alloc_subobject.
4320 * lex.c (cpp_token_val_index): New.
4321 * internal.h: Include cpp-id-data.h.
4322 (uchar): Move definition to cpp-id-data.h.
4323 (U): Likewise.
4324 (cpp_macro): Likewise.
4325 * directives.c (struct answer): Move to cpp-id-data.h.
4326 (do_assert): Honour alloc_subobject.
2cf22451
ZW
4327
4328 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
4329 * include/cpplib.h (struct cpp_string): Add GTY marker.
4330 (enum cpp_token_fld_kind): New.
4331 (struct cpp_token): Add GTY markers.
4332 (cpp_token_val_index): Prototype.
4333 (CPP_HASHNODE_VALUE_IDX): New.
4334 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
4335 * include/cpp-id-data.h: New file.
d8044160 4336
0ca8e815
PB
43372004-06-09 Paolo Bonzini <bonzini@gnu.org>
4338
4339 * Makefile.am (all-local): New.
4340 * Makefile.in: Regenerate.
4341
b51fa00f
RS
43422004-06-06 Roger Sayle <roger@eyesopen.com>
4343
4344 * Makefile.am (LIBICONV): Declare.
4345 (makedepend_LDADD): Use LIBICONV.
4346 * Makefile.in: Regenerate.
4347
5e2f3f39
AP
43482004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
4349
4350 * Makefile.am (LIBINTL): Declare
4351 (makedepend_LDADD): Use LIBINTL.
4352 * Makefile.in: Regenerate.
4353
c6e83800
ZW
43542004-06-05 Zack Weinberg <zack@codesourcery.com>
4355
4356 * Makefile.am: Add makedepend.
4357 * Makefile.in, aclocal.m4: Regenerate.
4358 * charset.c: Insert a space to avoid a warning.
4359 * directives.c: Include mkdeps.h.
4360 (_cpp_handle_directive): Reenable macro expander if appropriate.
4361 (undefine_macros): Inline body of _cpp_free_definition for speed.
4362 Do not call undef callback or _cpp_warn_if_unused_macro.
4363 (cpp_get_deps): New interface.
4364 * files.c (search_cache): Add pfile argument. Check for file
4365 that would be found by "" or <> search here...
4366 (_cpp_find_file): ...not here. Correct recorded start_dir of
4367 files found by directory-of-current-file search that would be
4368 found by "" or <> search.
4369 * init.c (cpp_add_dependency_target): Delete.
4370 * internal.h (struct lexer_state): Add discarding_output flag.
4371 * lex.c (lex_identifier): Compute hash function while scanning.
4372 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
4373 directives.
4374 * makedepend.c: New file.
4375 * mkdeps.c (struct deps): Add vpath vector.
4376 (apply_vpath, deps_add_vpath): New function.
4377 (deps_free): Free vpath vector.
4378 (deps_add_dep, deps_add_target): Use apply_vpath.
4379 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
4380 (ht_lookup_with_hash): New function.
4381 * cpplib.h, mkdeps.h: Update prototypes.
4382 * symtab.h: Update prototypes.
4383 (HT_HASHSTEP, HT_FINISH): New macros.
4384
b453c95f
GK
43852004-05-29 Geoffrey Keating <geoffk@apple.com>
4386
4387 * symtab.c (ht_create): Set entries_owned.
4388 (ht_destroy): Honour entries_owned.
4389 (ht_expand): Likewise.
4390 (ht_load): New.
2cf22451
ZW
4391 * include/symtab.h (struct ht): New field 'entries_owned'
4392 (ht_load): New prototype.
b453c95f 4393
963e23c5
PB
43942004-05-26 Paolo Bonzini <bonzini@gnu.org>
4395
4396 PR bootstrap/15651
4397 * configure.ac: Fix m4 quoting when picking
4398 the size of HOST_WIDE_INT.
4399 * configure: Regenerate.
4400
0429bc77
PB
44012004-05-25 Paolo Bonzini <bonzini@gnu.org>
4402
4403 * Makefile.am: the correct directory for
4404 gettext include files is given by @INCINTL@.
4405 * Makefile.in: Regenerate.
4406
c86dd7db
PB
44072004-05-24 Paolo Bonzini <bonzini@gnu.org>
4408
4409 * system.h [!ENABLE_NLS]: dgettext takes two
4410 parameters.
4411
4f4e53dd
PB
44122004-05-23 Paolo Bonzini <bonzini@gnu.org>
4413
4414 Moved libcpp from the gcc subdirectory to the toplevel.
4415 * Makefile.am: New file.
4416 * Makefile.in: Regenerate.
4417 * configure.ac: New file.
4418 * configure: Regenerate.
4419 * config.in: Regenerate.
4420 * charset.c: Moved from gcc/cppcharset.c. Add note about
4421 brokenness of input charset detection. Adjust for change
4422 in name of cppucnid.h.
4423 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
4424 * expr.c: Moved from gcc/cppexp.c.
4425 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
4426 Remove #define of O_BINARY, it is in system.h.
4427 * identifiers.c: Moved from gcc/cpphash.c.
4428 * internal.h: Moved from gcc/cpphash.h. Change header
4429 guard name. All other files adjusted to match name change.
4430 * init.c: Moved from gcc/cppinit.c.
4431 (init_library) [ENABLE_NLS]: Call bindtextdomain.
4432 * lex.c: Moved from gcc/cpplex.c.
4433 * directives.c: Moved from gcc/cpplib.c.
4434 * macro.c: Moved from gcc/cppmacro.c.
4435 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
4436 * traditional.c: Moved from gcc/cpptrad.c.
4437 * ucnid.h: Moved from gcc/cppucnid.h. Change header
4438 guard name.
4439 * ucnid.pl: Moved from gcc/cppucnid.pl.
4440 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
4441 guard name.
4442 * symtab.c: Moved from gcc/hashtable.c.
4443 * line-map.c: Moved from gcc. Do not include intl.h.
4444 * mkdeps.c: Moved from gcc.
4445 * system.h: New file.
2cf22451
ZW
4446 * include/cpplib.h: Moved from gcc. Change header guard name.
4447 * include/line-map.h: Moved from gcc. Change header guard name.
4448 * include/mkdeps.h: Moved from gcc. Change header guard name.
4449 * include/symtab.h: Moved from gcc/hashtable.h. Change header
4450 guard name.
818ab71a
JJ
4451\f
4452Copyright (C) 2004-2016 Free Software Foundation, Inc.
4453
4454Copying and distribution of this file, with or without modification,
4455are permitted in any medium without royalty provided the copyright
4456notice and this notice are preserved.