* lto.c (do_stream_out): Add PART parameter; open dump file.
[official-gcc.git] / libcpp / ChangeLog
blob7412800afc719864ab33d83c0b73523d03b5954f
1 2018-07-03  Nathan Sidwell  <nathan@acm.org>
3         Reorg line_map data structures for better packing.
4         * include/line-map.h (enum lc_reason): Add LC_HWM.
5         (LINE_MAP_MAX_LOCATION): Define here.
6         (struct line_map): Move reason field to line_map_ordinary.  Adjust
7         GTY tagging.
8         (struct line_map_ordinary): Reorder fields for less padding.
9         (struct line_map_macro): Likewise.
10         (MAP_ORDINARY_P): New.
11         (linemap_check_ordinary, linemap_check_macro): Adjust.
12         * line-map.c (LINE_MAP_MAX_SOURCE_LOCATION): Delete.
13         (new_linemap): Take start_location, not reason.  Adjust.
14         (linemap_add, linemap_enter_macro): Adjust.
15         (linemap_line_start): Likewise.
16         (linemap_macro_expansion_map_p): Use MAP_ORDINARY_P.
17         (linemap_macro_loc_to_spelling_point): Likewise.
18         (linemap_macro_loc_to_def_point): Likewise.
19         (linemap_dump): Likewise.
21 2018-05-23  Jason Merrill  <jason@redhat.com>
23         * system.h: #include <new> earlier.
25 2018-05-17  Jason Merrill  <jason@redhat.com>
27         * line-map.c (linemap_init): Use placement new.
28         * system.h: #include <new>.
30 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
32         * include/line-map.h (compare): New function on linenum_type.
34 2018-02-28  Jonathan Wakely  <jwakely@redhat.com>
36         PR preprocessor/84517
37         * lex.c (is_macro_not_literal_suffix): New function.
38         (lex_raw_string, lex_string): Use is_macro_not_literal_suffix to
39         decide when to issue -Wliteral-suffix warnings.
41 2018-02-16  Richard Biener  <rguenther@suse.de>
43         PR bootstrap/82939
44         * line-map.c (linemap_init): Avoid broken value-init when compiling
45         with GCC 4.2.
47 2018-02-15  Jason Merrill  <jason@redhat.com>
48             Jakub Jelinek  <jakub@redhat.com>
50         PR preprocessor/83063 - __VA_OPT__ and ##
51         PR preprocessor/83708
52         * macro.c (vaopt_state): Reorder m_last_was_paste before m_state.
53         (vaopt_state::vaopt_state): Adjust.
54         (vaopt_state::update_flags): Add BEGIN and END.
55         (vaopt_state::update): Return them.
56         (copy_paste_flag): Factor out of replace_args.
57         (last_token_is): New.
58         (replace_args): Handle BEGIN and END.  Avoid padding there.
59         (tokens_buff_last_token_ptr): Return NULL if no tokens.
61 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
63         PR preprocessor/69869
64         * traditional.c (skip_macro_block_comment): Return bool, true if
65         the macro block comment is unterminated.
66         (copy_comment): Use return value from skip_macro_block_comment instead
67         of always false.
69 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
71         * include/cpplib.h (enum cpp_builtin_type): Change BT_LAST_USER from
72         BT_FIRST_USER + 31 to BT_FIRST_USER + 63.
74 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
76         PR other/70268
77         * include/cpplib.h (cpp_callbacks::remap_filename): New callback.
78         * macro.c (_cpp_builtin_macro_text): Call remap_filename for
79         __FILE__ and __BASE_FILE__.
81 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
83         * lex.c (search_line_fast): Remove illegal coercion of an
84         unaligned pointer value to vector pointer type and replace with
85         use of __builtin_vec_vsx_ld () built-in function, which operates
86         on unaligned pointer values.
88 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
90         Update copyright years.
92 2017-12-20  Michael Weiser  <michael.weiser@gmx.de>
94         PR preprocessor/83492
95         * lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
96         Fix selection of big-endian shift parameters by using
97         __ARM_BIG_ENDIAN.
99 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
101         * internal.h (maybe_print_line): Change signature.
103 2017-12-05  Jakub Jelinek  <jakub@redhat.com>
105         PR c++/79228
106         * expr.c (interpret_float_suffix): Avoid memcmp.
107         (interpret_int_suffix): Likewise.  Don't check for if.
109 2017-12-01  Jason Merrill  <jason@redhat.com>
111         PR c++/79228 - extensions hide C++14 complex literal operators
112         * expr.c (interpret_float_suffix): Ignore 'i' in C++14 and up.
113         (interpret_int_suffix): Likewise.
115 2017-11-28  David Malcolm  <dmalcolm@redhat.com>
117         PR c/82050
118         * include/line-map.h (LINE_MAP_MAX_COLUMN_NUMBER): Move here.
119         * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): ...from here.
120         (rich_location::maybe_add_fixit): Reject fix-it hints in which
121         the start column exceeds the next column.
123 2017-11-20  Eric Gallager  <egall@gwmail.gwu.edu>
125         PR preprocessor/81794
126         * macro.c (check_trad_stringification): Have warning be controlled
127         by -Wtraditional.
129 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
131         PR c++/72786
132         * include/cpplib.h (cpp_macro_definition_location): New decl.
133         * macro.c (cpp_macro_definition): New function.
135 2017-11-13  Tom Tromey  <tom@tromey.com>
137         * pch.c (cpp_read_state): Set n__VA_OPT__.
138         * macro.c (vaopt_state): New class.
139         (_cpp_arguments_ok): Check va_opt flag.
140         (replace_args, create_iso_definition): Use vaopt_state.
141         * lex.c (lex_identifier_intern): Possibly issue errors for
142         __VA_OPT__.
143         (lex_identifier): Likewise.
144         (maybe_va_opt_error): New function.
145         * internal.h (struct lexer_state) <va_args_ok>: Update comment.
146         (struct spec_nodes) <n__VA_OPT__>: New field.
147         * init.c (struct lang_flags) <va_opt>: New field.
148         (lang_defaults): Add entries for C++2A.  Update all entries for
149         va_opt.
150         (cpp_set_lang): Initialize va_opt.
151         * include/cpplib.h (struct cpp_options) <va_opt>: New field.
152         * identifiers.c (_cpp_init_hashtable): Initialize n__VA_OPT__.
154 2017-11-13  David Malcolm  <dmalcolm@redhat.com>
156         * include/line-map.h (linenum_type): Move this typedef and the
157         comment describing column numbering to near the top of the file.
159 2017-11-06  Mukesh Kapoor  <mukesh.kapoor@oracle.com>
161         PR c++/80955
162         * lex.c (lex_string): When checking for a valid macro for the
163         warning related to -Wliteral-suffix (CPP_W_LITERAL_SUFFIX),
164         check that the macro name does not start with an underscore
165         before calling is_macro().
167 2017-11-05  Tom de Vries  <tom@codesourcery.com>
169         PR other/82784
170         * lex.c (BUF_APPEND): Remove semicolon after
171         "do {} while (0)".
173 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
175         * directives.c (_cpp_handle_directive): Update for renaming of
176         cpp_error_at_richloc to cpp_error_at.
177         * errors.c (cpp_diagnostic_at_richloc): Rename to...
178         (cpp_diagnostic_at): ...this, dropping the location_t-based
179         implementation.
180         (cpp_diagnostic): Update for removal of location_t-based
181         cpp_diagnostic_at.
182         (cpp_error_at): Likewise.
183         (cpp_error_at_richloc): Rename to...
184         (cpp_error_at): ...this, and update for renaming of
185         cpp_diagnostic_at_richloc.
186         * include/cpplib.h (cpp_error_at_richloc): Rename to...
187         (cpp_error_at): ...this.
189 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
191         * include/cpplib.h (enum c_lang): Add CLK_GNUC17 and CLK_STDC17.
192         * init.c (lang_defaults): Add GNUC17 and STDC17 data.
193         (cpp_init_builtins): Handle C17 value of __STDC_VERSION__.
195 2017-10-10  Nathan Sidwell  <nathan@acm.org>
197         PR preprocessor/82506
198         * macro.c (cpp_quote_string): Escape raw LFs.
200 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
201             Jakub Jelinek  <jakub@redhat.com>
203         Add support for -std=c++2a.
204         * include/cpplib.h (c_lang): Add CXX2A and GNUCXX2A.
205         * init.c (lang_defaults): Add rows for CXX2A and GNUCXX2A.
206         (cpp_init_builtins): Set __cplusplus to 201709L for C++2a.
208 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
210         * include/cpplib.h (enum c_lang): Rename CLK_GNUCXX1Z
211         to CLK_GNUCXX17 and CLK_CXX1Z to CLK_CXX17.
212         * init.c (lang_defaults, cpp_init_builtins): Likewise.
213         * expr.c (cpp_classify_number): Use C++17 instead of C++1z
214         in diagnostics.
216 2017-07-07  David Malcolm  <dmalcolm@redhat.com>
218         PR c++/79300
219         * line-map.c (linemap_macro_loc_to_def_point): Preserve range
220         information for macro expansions by delaying resolving ad-hoc
221         locations until within the loop.
223 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
225         PR c++/79300
226         * include/line-map.h (enum location_aspect): New enum.
227         (linemap_client_expand_location_to_spelling_point): Add
228         enum location_aspect param.
229         * line-map.c (rich_location::get_expanded_location): Update for
230         new param of linemap_client_expand_location_to_spelling_point.
231         (rich_location::maybe_add_fixit): Likewise.
232         (fixit_hint::affects_line_p): Likewise.
234 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
236         * line-map.c (location_adhoc_data_update): Perform addition in
237         uintptr_t type rather than char * type.  Read *data using
238         ptrdiff_t type instead of int64_t.
239         (get_combined_adhoc_loc): Change offset type to ptrdiff_t from
240         int64_t.
242 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
244         * include/line-map.h (class rich_location): Document that attempts
245         to delete or replace a range *affecting* multiple lines will fail.
246         * line-map.c (rich_location::maybe_add_fixit): Implement this
247         restriction.
249 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
251         * include/line-map.h
252         (rich_location::fixits_cannot_be_auto_applied): New method.
253         (rich_location::fixits_can_be_auto_applied_p): New accessor.
254         (rich_location::m_fixits_cannot_be_auto_applied): New field.
255         * line-map.c (rich_location::rich_location): Initialize new field.
257 2017-06-05  David Malcolm  <dmalcolm@redhat.com>
259         * include/cpplib.h (struct cpp_callbacks): Add "comment"
260         callback.
261         * lex.c (_cpp_lex_direct): Call the comment callback if non-NULL.
263 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
265         * include/line-map.h (class rich_location): Update description of
266         newline handling.
267         (class fixit_hint): Likewise.
268         (fixit_hint::ends_with_newline_p): New decl.
269         * line-map.c (rich_location::maybe_add_fixit): Support newlines
270         in fix-it hints that are insertions of single lines at the start
271         of a line.  Don't consolidate into such fix-it hints.
272         (fixit_hint::ends_with_newline_p): New method.
274 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
276         * include/line-map.h (source_range::intersects_line_p): Delete.
277         (rich_location::add_fixit): Delete.
278         (rich_location::maybe_add_fixit): New method.
279         (class fixit_hint): Reimplement in terms of...
280         (class fixit_replace): ...this.
281         (class fixit_insert): Delete.
282         * line-map.c (linemap_position_for_loc_and_offset): Drop overzealous
283         linemap_assert_fails.
284         (source_range::intersects_line_p): Rename to...
285         (fixit_hint::affects_line_p): New function.
286         (rich_location::add_fixit_insert_before): Reimplement in terms of
287         maybe_add_fixit, moving validation there.
288         (rich_location::add_fixit_insert_after): Likewise.
289         (column_before_p): Delete.
290         (rich_location::add_fixit_replace): Reimplement in terms of
291         maybe_add_fixit, moving validation there.  Convert closed input range
292         to half-open range.
293         (rich_location::add_fixit): Delete.
294         (rich_location::maybe_add_fixit): New function.
295         (fixit_insert::fixit_insert): Delete.
296         (fixit_insert::~fixit_insert): Delete.
297         (fixit_insert::affects_line_p): Delete.
298         (fixit_insert::maybe_append_replace): Delete.
299         (fixit_replace::fixit_replace): Rename to...
300         (fixit_hint::fixit_hint): ...this, rewriting as necessary.
301         (fixit_replace::~fixit_replace): Delete.
302         (fixit_replace::affects_line_p): Delete.
303         (fixit_replace::maybe_append_replace): Rename to...
304         (fixit_hint::maybe_append): ...this, rewriting as necessary.
306 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
308         * include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment.
309         * lex.c (search_line_fast): Likewise.
310         * pch.h (cpp_valid_state): Likewise.
312 2017-03-21  Andreas Schwab  <schwab@suse.de>
314         * lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
315         Convert 64-bit value to boolean before passing to
316         __builtin_expect.
318 2017-03-16  Jason Merrill  <jason@redhat.com>
320         * init.c (cpp_init_builtins): Update __cplusplus for C++17.
322 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
324         * Makefile.in (po/$(PACKAGE).pot): Adjust bug reporting URL.
326 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
328         PR c++/77949
329         * line-map.c (linemap_position_for_column): When calling
330         linemap_start_line, detect if a new linemap was created with
331         0 column bits, and bail out early if this is the case.
332         (linemap_position_for_loc_and_offset): Replace overzealous
333         linemap_assert_fails with a simple conditional; use correct
334         bit count.
336 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
338         PR c++/72803
339         * line-map.c (linemap_line_start): When determining if the highest
340         column given out so far will fit into a proposed change to the
341         current map, use the effective number of column bits, rather than
342         the total number of column + range bits.
344 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
346         Update copyright years.
348 2016-12-15  David Malcolm  <dmalcolm@redhat.com>
350         PR preprocessor/78680
351         PR preprocessor/78811
352         * lex.c (_cpp_lex_direct): Only determine the end-location of
353         the token and build a range for non-reserved start locations.
354         Do not do it for EOF tokens.
356 2016-12-12  David Malcolm  <dmalcolm@redhat.com>
358         PR preprocessor/78680
359         * lex.c (_cpp_lex_direct): Ensure line notes are processed before
360         computing the end-point of the token.
362 2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
364         * include/cpplib.h (struct cpp_options): Add new member
365         warn_expansion_to_defined.
366         (CPP_W_EXPANSION_TO_DEFINED): New enum member.
367         * expr.c (parse_defined): Warn for all uses of "defined"
368         in macros, and tie warning to CPP_W_EXPANSION_TO_DEFINED.
369         Make it a pedwarning instead of a warning.
370         * system.h (HAVE_DESIGNATED_INITIALIZERS): Do not use
371         "defined" in macros.
373 2016-11-17  David Malcolm  <dmalcolm@redhat.com>
375         * charset.c (cpp_interpret_string_1): Skip locations from
376         loc_reader when advancing 'p' when handling raw strings.
378 2016-11-16  Jakub Jelinek  <jakub@redhat.com>
380         PR bootstrap/72823
381         * configure.ac (ENABLE_ASSERT_CHECKING): Define if gcc configure
382         would define that macro.
383         * configure: Regenerated.
384         * config.in: Regenerated.
386 2016-11-08  Richard Earnshaw  <rearnsha@arm.com>
388         * lex.c (search_line_fast): New implementation for AArch64.
390 2016-10-25  David Malcolm  <dmalcolm@redhat.com>
392         * files.c (destroy_cpp_file): Free file->path.
394 2016-10-25  David Malcolm  <dmalcolm@redhat.com>
396         * include/line-map.h (line_maps::~line_maps): New dtor.
397         (location_adhoc_data_fini): Delete decl.
398         * line-map.c (line_maps::~line_maps): New dtor.
399         (location_adhoc_data_fini): Delete.
401 2016-10-21  Andris Pavenis  <andris.pavenis@iki.fi>
403         PR preprocessor/71681
404         * files.c (remap_filename): Fix handling -remap in subdirectories.
406 2016-10-12  Jakub Jelinek  <jakub@redhat.com>
408         * include/cpplib.h (struct cpp_options): Add
409         cpp_warn_implicit_fallthrough.
410         * init.c (cpp_create_reader): Initialize it to 0.
411         * lex.c (fallthrough_comment_p): Handle different
412         cpp_warn_implicit_fallthrough levels.  Whitespace fixes.
414 2016-10-08  Jakub Jelinek  <jakub@redhat.com>
416         * lex.c (fallthrough_comment_p): Accept Else, fallthrough.
418         * lex.c (fallthrough_comment_p): Extend to handle more common FALLTHRU
419         comment styles.
421         * lex.c (fallthrough_comment_p): Fix off-by-one size comparison
422         errors, cleanup.
423         (_cpp_lex_direct): Allow arbitrary comments in between
424         fallthrough_comment_p comment and following token.
426 2016-10-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
428         PR target/77847
429         * lex.c (search_line_fast): Add a FALLTHROUGH comment to correct
430         compiler error in the version of this function that is
431         conditionally compiled when GCC_VERSION >= 4005 and both
432         __ALTIVEC__ and __BIG_ENDIAN__ symbols are defined.
434 2016-09-26  Marek Polacek  <polacek@redhat.com>
435             Jakub Jelinek  <jakub@redhat.com>
437         PR c/7652
438         * include/cpplib.h (PREV_FALLTHROUGH): Define.
439         * internal.h (CPP_FALLTHRU): Define.
440         * lex.c (fallthrough_comment_p): New function.
441         (_cpp_lex_direct): Set PREV_FALLTHROUGH on tokens succeeding a falls
442         through comment.
444 2016-09-23  David Malcolm  <dmalcolm@redhat.com>
446         PR preprocessor/77672
447         * charset.c (cpp_interpret_string_1): Add a source_range for the
448         NUL-terminator, using the location of the trailing quote of the
449         final string.
451 2016-09-21  Jason Merrill  <jason@redhat.com>
453         * line-map.c (linemap_location_from_macro_definition_p): New.
454         * line-map.h: Declare it.
456 2016-09-15  David Malcolm  <dmalcolm@redhat.com>
458         * include/line-map.h (class rich_location): Note that newlines
459         aren't supported in fix-it text.
460         * line-map.c (rich_location::add_fixit_insert_before): Reject
461         attempts to add fix-its containing newlines.
462         (rich_location::add_fixit_replace): Likewise.
464 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
466         * include/line-map.h (class rich_location): Add description of
467         fix-it hints to leading comment.
468         (rich_location::add_fixit_insert): Rename both overloaded methods
469         to..
470         (rich_location::add_fixit_insert_before): ...this, updating their
471         comments.
472         (rich_location::add_fixit_insert_after): Two new overloaded
473         methods.
474         (rich_location::stop_supporting_fixits): New method.
475         * line-map.c (rich_location::add_fixit_insert): Rename both
476         overloaded methods to..
477         (rich_location::add_fixit_insert_before): ...this, updating their
478         comments.
479         (rich_location::add_fixit_insert_after): Two new methods.
480         (rich_location::reject_impossible_fixit): Split out
481         failure-handling into...
482         (rich_location::stop_supporting_fixits): New method.
484 2016-09-02  David Malcolm  <dmalcolm@redhat.com>
486         * include/line-map.h (rich_location::seen_impossible_fixit_p): New
487         accessor.
489 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
491         * include/line-map.h (class fixit_remove): Remove stray decl.
492         (fixit_hint::affects_line_p): Make const.
493         (fixit_insert::affects_line_p): Likewise.
494         (fixit_replace::affects_line_p): Likewise.
495         * line-map.c (fixit_insert::affects_line_p): Likewise.
496         (fixit_replace::affects_line_p): Likewise.
498 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
500         * include/line-map.h (class semi_embedded_vec): New class.
501         (semi_embedded_vec<T, NUM_EMBEDDED>::semi_embedded_vec): New ctor.
502         (semi_embedded_vec<T, NUM_EMBEDDED>::~semi_embedded_vec): New
503         dtor.
504         (semi_embedded_vec<T, NUM_EMBEDDED>::operator[]): New methods.
505         (semi_embedded_vec<T, NUM_EMBEDDED>::push): New method.
506         (semi_embedded_vec<T, NUM_EMBEDDED>::truncate): New method.
507         (rich_location::get_num_locations): Reimplement in terms of
508         m_ranges.
509         (rich_location::get_range): Make non-inline.
510         (rich_location::get_num_fixit_hints): Reimplement in terms of
511         m_fixit_hints.
512         (rich_location::add_fixit): New function.
513         (rich_location::MAX_RANGES): Rename to...
514         (rich_location::STATICALLY_ALLOCATED_RANGES): ...this.
515         (rich_location::MAX_FIXIT_HINTS): Rename to...
516         (rich_location::STATICALLY_ALLOCATED_RANGES): ...this, and make
517         private.
518         (rich_location::m_num_ranges): Eliminate in favor of...
519         (rich_location::m_ranges): ...this, converting from a fixed-size
520         array to a semi_embedded_vec.
521         (rich_location::m_num_fixit_hints): Eliminate in favor of...
522         (rich_location::m_fixit_hints): ...this, converting from a
523         fixed-size array to a semi_embedded_vec.
524         * line-map.c (rich_location::rich_location): Update for above
525         changes.
526         (rich_location::~rich_location): Likewise.
527         (rich_location::get_loc): Likewise.
528         (rich_location::get_range): New methods.
529         (rich_location::add_range): Update for above changes.
530         (rich_location::set_range): Likewise.
531         (rich_location::add_fixit_insert): Likewise.
532         (rich_location::add_fixit_replace): Likewise.
533         (rich_location::get_last_fixit_hint): Likewise.
534         (rich_location::reject_impossible_fixit): Likewise.
535         (rich_location::add_fixit): New method.
537 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
539         * include/line-map.h (rich_location::add_fixit_insert): Add
540         comments.  Add overload omitting the source_location param.
541         (rich_location::add_fixit_remove): Add comments.  Add overloads
542         omitting the range, and accepting a source_location.
543         (rich_location::add_fixit_replace): Likewise.
544         * line-map.c (rich_location::add_fixit_insert): Add comments.  Add
545         overload omitting the source_location param.
546         (rich_location::add_fixit_remove): Add comments.  Add overloads
547         omitting the range, and accepting a source_location.
548         (rich_location::add_fixit_replace): Likewise.
550 2016-08-26  David Malcolm  <dmalcolm@redhat.com>
552         * include/line-map.h (get_pure_location): New decl.
553         * line-map.c (get_pure_location): Move here, from gcc/input.c, adding
554         a line_maps * param.
555         (rich_location::add_fixit_insert): Call get_pure_location on "where".
556         (rich_location::add_fixit_replace): Call get_pure_location on the
557         end-points.
559 2016-08-26  David Malcolm  <dmalcolm@redhat.com>
561         * include/line-map.h (rich_location): Eliminate unimplemented
562         constructor based on source_range.
563         (rich_location::get_last_fixit_hint): New method.
564         (rich_location::reject_impossible_fixit): New method.
565         (rich_location): Add fields m_line_table and
566         m_seen_impossible_fixit.
567         (fixit_hint::maybe_append_replace): New pure virtual function.
568         (fixit_insert::maybe_append_replace): New function.
569         (fixit_replace::maybe_append_replace): New function.
570         * line-map.c (rich_location::rich_location): Initialize
571         m_line_table and m_seen_impossible_fixit.
572         (rich_location::add_fixit_insert): Call
573         reject_impossible_fixit and bail out if true.
574         (column_before_p): New function.
575         (rich_location::add_fixit_replace): Call reject_impossible_fixit
576         and bail out if true.  Attempt to consolidate with neighboring
577         fixits.
578         (rich_location::get_last_fixit_hint): New method.
579         (rich_location::reject_impossible_fixit): New method.
580         (fixit_insert::maybe_append_replace): New method.
581         (fixit_replace::maybe_append_replace): New method.
583 2016-08-23  David Malcolm  <dmalcolm@redhat.com>
585         * include/line-map.h (source_range::from_locations): New method.
587 2016-08-19  David Malcolm  <dmalcolm@redhat.com>
589         * include/line-map.h (fixit_hint::kind): Delete REPLACE.
590         (class fixit_remove): Delete.
591         * line-map.c (rich_location::add_fixit_remove): Reimplement
592         by calling add_fixit_replace with an empty string.
593         (fixit_remove::fixit_remove): Delete.
594         (fixit_remove::affects_line_p): Delete.
596 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
598         PR c/32187
599         * include/cpplib.h (CPP_N_FLOATN, CPP_N_FLOATNX)
600         (CPP_N_WIDTH_FLOATN_NX, CPP_FLOATN_SHIFT, CPP_FLOATN_MAX): New
601         macros.
602         * expr.c (interpret_float_suffix): Handle fN, fNx, FN and FNx
603         suffixes.
605 2016-08-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
607         * expr.c (eval_token): Append "evaluates to 0" to Wundef diagnostic.
609 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
611         * directives.c (directive_names): New array.
612         (_cpp_handle_directive): Offer spelling suggestions for misspelled
613         directives.
614         * errors.c (cpp_diagnostic_at_richloc): New function.
615         (cpp_error_at_richloc): New function.
616         * include/cpplib.h (struct cpp_callbacks): Add field
617         "get_suggestion".
618         (cpp_error_at_richloc): New decl.
620 2016-08-18  Marek Polacek  <polacek@redhat.com>
622         PR c/7652
623         * pch.c (write_macdef): Add CPP_FALLTHRU.
625 2016-08-12  Marek Polacek  <polacek@redhat.com>
627         PR c/7652
628         * lex.c (search_line_fast): Add FALLTHRU.
629         (_cpp_lex_direct): Likewise.
630         (cpp_token_val_index): Adjust fall through comment.
631         * macro.c (parse_params): Add FALLTHRU.
632         * pch.c (count_defs): Adjust fall through comment.
633         (write_defs): Likewise.
635 2016-08-06  David Malcolm  <dmalcolm@redhat.com>
637         PR bootstrap/72823
638         * charset.c (_cpp_valid_ucn): Replace overzealous assert with one
639         that allows for char_range to be non-NULL when loc_reader is NULL.
641 2016-08-05  David Malcolm  <dmalcolm@redhat.com>
643         * charset.c (cpp_substring_ranges::cpp_substring_ranges): New
644         constructor.
645         (cpp_substring_ranges::~cpp_substring_ranges): New destructor.
646         (cpp_substring_ranges::add_range): New method.
647         (cpp_substring_ranges::add_n_ranges): New method.
648         (_cpp_valid_ucn): Add "char_range" and "loc_reader" params; if
649         they are non-NULL, read position information from *loc_reader
650         and update char_range->m_finish accordingly.
651         (convert_ucn): Add "char_range", "loc_reader", and "ranges"
652         params.  If loc_reader is non-NULL, read location information from
653         it, and update *ranges accordingly, using char_range.
654         Conditionalize the conversion into tbuf on tbuf being non-NULL.
655         (convert_hex): Likewise, conditionalizing the call to
656         emit_numeric_escape on tbuf.
657         (convert_oct): Likewise.
658         (convert_escape): Add params "loc_reader" and "ranges".  If
659         loc_reader is non-NULL, read location information from it, and
660         update *ranges accordingly.  Conditionalize the conversion into
661         tbuf on tbuf being non-NULL.
662         (cpp_interpret_string): Rename to...
663         (cpp_interpret_string_1): ...this, adding params "loc_readers" and
664         "out".  Use "to" to conditionalize the initialization and usage of
665         "tbuf", such as running the converter.  If "loc_readers" is
666         non-NULL, use the instances within it, reading location
667         information from them, and passing them to convert_escape; likewise
668         write to "out" if loc_readers is non-NULL.  Check for leading
669         quote and issue an error if it is not present.  Update boundary
670         check from "== limit" to ">= limit" to protect against erroneous
671         location values to calls that are not parsing string literals.
672         (cpp_interpret_string): Reimplement in terms to
673         cpp_interpret_string_1.
674         (noop_error_cb): New function.
675         (cpp_interpret_string_ranges): New function.
676         (cpp_string_location_reader::cpp_string_location_reader): New
677         constructor.
678         (cpp_string_location_reader::get_next): New method.
679         * include/cpplib.h (class cpp_string_location_reader): New class.
680         (class cpp_substring_ranges): New class.
681         (cpp_interpret_string_ranges): New prototype.
682         * internal.h (_cpp_valid_ucn): Add params "char_range" and
683         "loc_reader".
684         * lex.c (forms_identifier_p): Pass NULL for new params to
685         _cpp_valid_ucn.
687 2016-08-01  Andreas Schwab  <schwab@suse.de>
689         * include/cpplib.h: Fix comment typo.
691 2016-07-27  David Malcolm  <dmalcolm@redhat.com>
693         * include/line-map.h (source_location): Fix line numbers in
694         comment.
696 2016-07-11  David Malcolm  <dmalcolm@redhat.com>
698         * include/line-map.h (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES):
699         Move here from line-map.c.
700         (LINE_MAP_MAX_LOCATION_WITH_COLS): Likewise.
701         * line-map.c (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES): Move from
702         here to line-map.h.
703         (LINE_MAP_MAX_LOCATION_WITH_COLS): Likewise.
705 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
707         * directives.c (do_include_common): Pass on "location" to
708         _cpp_stack_include.
709         * errors.c (cpp_diagnostic): Reimplement in terms of...
710         (cpp_diagnostic_at): New function.
711         (cpp_error_at): New function.
712         (cpp_errno_filename): Add "loc" param and use it by using
713         cpp_error_at rather than cpp_error.
714         * files.c (find_file_in_dir): Add "loc" param and pass it to
715         open_file_failed.
716         (_cpp_find_file): Add "loc" param.  Use it to convert calls to
717         cpp_error to cpp_error_at, and pass it to find_file_in_dir and
718         open_file_failed.
719         (read_file_guts): Add "loc" param.  Use it to convert calls to
720         cpp_error to cpp_error_at.  Pass it to cpp_errno_filename.
721         (read_file): Add "loc" param.  Pass it to open_file_failed and
722         read_file_guts.
723         (should_stack_file): Add "loc" param.  Pass it to read_file.
724         (_cpp_stack_file): Add "loc" param.  Pass it to should_stack_file.
725         (_cpp_stack_include): Add "loc" param.  Pass it to
726         _cpp_find_file and _cpp_stack_file.
727         (open_file_failed): Add "loc" param.  Pass it to
728         cpp_errno_filename.
729         (_cpp_fake_include): Add 0 as a source_location in call to
730         _cpp_find_file.
731         (_cpp_compare_file_date): Likewise.
732         (cpp_push_include): Likewise for call to _cpp_stack_include.
733         (cpp_push_default_include): Likewise.
734         (_cpp_save_file_entries): Likewise for call to open_file_failed.
735         (_cpp_has_header): Likewise for call to _cpp_find_file.
736         * include/cpplib.h (cpp_errno_filename): Add source_location
737         param.
738         (cpp_error_at): New declaration.
739         * init.c (cpp_read_main_file): Add 0 as a source_location in calls
740         to _cpp_find_file and _cpp_stack_file.
741         * internal.h (_cpp_find_file): Add source_location param.
742         (_cpp_stack_file): Likewise.
743         (_cpp_stack_include): Likewise.
745 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
747         * include/line-map.h (fixit_hint::get_start_loc): New pure virtual
748         function.
749         (fixit_hint::maybe_get_end_loc): Likewise.
750         (fixit_insert::get_start_loc): New function, implementing
751         fixit_hint::get_start_loc.
752         (fixit_insert::maybe_get_end_loc): New function, implementing
753         fixit_hint::maybe_get_end_loc.
754         (fixit_remove::get_start_loc): New function, implementing
755         fixit_hint::get_start_loc.
756         (fixit_remove::maybe_get_end_loc): New function, implementing
757         fixit_hint::maybe_get_end_loc.
758         (fixit_replace::get_start_loc): New function, implementing
759         fixit_hint::get_start_loc.
760         (fixit_replace::maybe_get_end_loc): New function, implementing
761         fixit_hint::maybe_get_end_loc.
763 2016-06-21  John David Anglin  <danglin@gcc.gnu.org>
765         * line-map.c (location_adhoc_data_update): Use int64_t instead of
766         long long.
767         (get_combined_adhoc_loc): Likewise.
769 2016-06-01  Eduard Sanou  <dhole@openmailbox.org>
771         * include/cpplib.h (cpp_callbacks): Add get_source_date_epoch
772         callback.
773         * include/cpplib.h (cpp_init_source_date_epoch): Remove prototype.
774         * init.c (cpp_init_source_date_epoch): Remove function.
775         * init.c (cpp_create_reader): Initialize pfile->source_date_epoch.
776         * internal.h (cpp_reader): Extend comment about source_date_epoch.
777         * macro.c (_cpp_builtin_macro_text): Use get_source_date_epoch
778         callback only once, read pfile->source_date_epoch on future passes.
779         Check that get_source_date_epoch callback is not NULL.
781 2016-05-20  Martin Liska  <mliska@suse.cz>
783         * config.in: Regenerated.
784         * configure: Likewise.
785         * configure.ac: Handle --enable-valgrind-annotations.
786         * lex.c (new_buff): Use ENABLE_VALGRIND_ANNOTATIONS instead
787         of ENABLE_VALGRIND_CHECKING.
788         (_cpp_free_buff): Likewise.
790 2016-04-28  Eduard Sanou  <dhole@openmailbox.org>
791             Matthias Klose  <doko@debian.org>
793         * include/cpplib.h (cpp_init_source_date_epoch): Prototype.
794         * init.c (cpp_init_source_date_epoch): New function.
795         * internal.h: Added source_date_epoch variable to struct
796         cpp_reader to store a reproducible date.
797         * macro.c (_cpp_builtin_macro_text): Set pfile->date timestamp from
798         pfile->source_date_epoch instead of localtime if source_date_epoch is
799         set, to be used for __DATE__ and __TIME__ macros to help reproducible
800         builds.
802 2016-04-13  Bernd Schmidt  <bschmidt@redhat.com>
804         Patch from Roger Orr <rogero@howzatt.demon.co.uk>
805         PR preprocessor/69650
806         * directives.c (do_linemarker): Reread map after calling
807         cpp_get_token.
809 2016-04-06  Richard Henderson  <rth@redhat.com>
811         PR preprocessor/61817
812         PR preprocessor/69391
813         * internal.h (_cpp_builtin_macro_text): Update decl.
814         * macro.c (_cpp_builtin_macro_text): Accept location for __LINE__.
815         (builtin_macro): Accept a second location for __LINE__.
816         (enter_macro_context): Compute both virtual and real expansion
817         locations for the macro.
819 2016-03-25  Bernd Schmidt  <bschmidt@redhat.com>
821         PR lto/69650
822         * directives.c (do_linemarker): Test for file left but not entered
823         here.
824         * line-map.c (linemap_add): Not here.
826 2016-03-21  Jakub Jelinek  <jakub@redhat.com>
828         PR target/70296
829         * include/cpplib.h (cpp_fun_like_macro_p): New prototype.
830         * macro.c (cpp_fun_like_macro_p): New function.
832 2016-03-15  Richard Henderson  <rth@redhat.com>
834         * line-map.c (new_linemap): Make alloc_size a size_t.
836 2016-03-14  Jason Merrill  <jason@redhat.com>
838         * expr.c (cpp_classify_number): Hex floats are new in C++1z.
839         * init.c (lang_defaults): Likewise.
841 2016-03-09  David Malcolm  <dmalcolm@redhat.com>
843         PR c/68473
844         PR c++/70105
845         * line-map.c (linemap_macro_map_loc_unwind_toward_spelling): Move
846         decl...
847         * include/line-map.h
848         (linemap_macro_map_loc_unwind_toward_spelling): ...here,
849         converting from static to extern.
851 2016-03-09  David Malcolm  <dmalcolm@redhat.com>
853         PR c/68473
854         PR c++/70105
855         * include/line-map.h (source_range::debug): Delete.
856         (struct location_range): Update comment.  Replace
857         expanded_location fields "m_start", "m_finish", and "m_caret" with
858         a source_location field: "m_loc".
859         (class rich_location): Reword comment.
860         (rich_location::get_loc): Reimplement in terms of a new overloaded
861         variant which takes an unsigned int.
862         (rich_location::get_loc_addr): Delete.
863         (rich_location::add_range): Drop params "start" and "finish" in
864         favor of param "loc".  Drop overloaded variants taking a
865         source_range or location_range *.
866         (rich_location::lazily_expand_location): Delete in favor of...
867         (rich_location::get_expanded_location): New decl.
868         (rich_location::m_loc): Delete field.
869         (rich_location::m_column_override): New field.
870         * line-map.c (rich_location::rich_location):  Drop name of
871         line_maps * param.  Update initializations for deletion of field
872         "m_loc" and addition of field "m_column_override".  Reimplement
873         body as a call to add_range.  Delete overloaded variant taking a
874         source_range.
875         (rich_location::get_loc): New function.
876         (rich_location::lazily_expand_location): Delete in favor of...
877         (rich_location::get_expanded_location): New function.
878         (rich_location::override_column): Reimplement.
879         (rich_location::add_range): Drop params "start" and "finish" in
880         favor of param "loc".  Eliminate location expansion in favor of
881         simply storing loc.  Drop overloaded variants taking a
882         source_range or location_range *.
883         (rich_location::set_range): Eliminate location expansion.
885 2016-02-29  David Malcolm  <dmalcolm@redhat.com>
887         PR preprocessor/69985
888         (linemap_position_for_loc_and_offset): Rename param from "offset"
889         to "column_offset".  Right-shift the column_offset by m_range_bits
890         of the pertinent ordinary map whenever offsetting a
891         source_location.  For clarity, offset the column by the column
892         offset, rather than the other way around.
894 2016-02-23  David Malcolm  <dmalcolm@redhat.com>
896         PR preprocessor/69126
897         PR preprocessor/69543
898         * line-map.c (linemap_compare_locations): At the function top,
899         replace inlined bodies of get_location_from_adhoc_loc with calls
900         to get_location_from_adhoc_loc.  Add a pair of calls to
901         get_location_from_adhoc_loc at the bottom of the function, to
902         avoid meaningless comparisons of ad-hoc and non-ad-hoc locations.
904 2016-02-08  David Malcolm  <dmalcolm@redhat.com>
906         PR preprocessor/69664
907         * errors.c (cpp_diagnostic_with_line): Only call
908         rich_location::override_column if the column is non-zero.
909         * line-map.c (rich_location::override_column): Update columns
910         within m_ranges[0].  Add assertions to verify that doing so is
911         sane.
913 2016-02-05  Jakub Jelinek  <jakub@redhat.com>
915         PR c++/69628
916         * charset.c (cpp_interpret_charconst): Clear *PCHARS_SEEN
917         and *UNSIGNEDP if bailing out early due to errors.
919 2016-01-28  Jakub Jelinek  <jakub@redhat.com>
921         PR pch/68176
922         * files.c (_cpp_find_file): Set file->implicit_preinclude even if
923         included from file->implicit_preinclude header.
925         * directives.c (destringize_and_run): Adjust prototype.
927 2016-01-27  David Malcolm  <dmalcolm@redhat.com>
929         PR preprocessor/69126
930         * directives.c (destringize_and_run): Add expansion_loc param; use
931         it when handling unexpanded pragmas to fixup the locations of the
932         synthesized tokens.
933         (_cpp_do__Pragma): Add expansion_loc param and use it when calling
934         destringize_and_run.
935         * internal.h (_cpp_do__Pragma): Add expansion_loc param.
936         * macro.c (builtin_macro): Pass expansion location of _Pragma to
937         _cpp_do__Pragma.
939 2016-01-14  David Malcolm  <dmalcolm@redhat.com>
941         PR preprocessor/69177
942         * line-map.c (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES): New
943         constant.
944         (LINE_MAP_MAX_LOCATION_WITH_COLS): Add note about unit tests
945         to comment.
946         (can_be_stored_compactly_p): Reduce threshold from
947         LINE_MAP_MAX_LOCATION_WITH_COLS to
948         LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES.
949         (get_combined_adhoc_loc): Likewise.
950         (get_range_from_loc): Likewise.
951         (linemap_line_start): Ensure that a new ordinary map is created
952         when transitioning from range-packing being enabled to disabled,
953         at the LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES threshold.  Set
954         range_bits to 0 for new ordinary maps when beyond this limit.
955         Prevent the "increase the column bits of a freshly created map"
956         optimization if the range bits has reduced.
958 2016-01-08  Jakub Jelinek  <jakub@redhat.com>
960         PR c++/69145
961         * files.c (cpp_included_before): If IS_ADHOC_LOC (location), lookup
962         real location from the line_table.
964 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
966         Update copyright years.
968 2015-12-22  David Malcolm  <dmalcolm@redhat.com>
970         * line-map.c (get_combined_adhoc_loc): Remove condition
971         on locus < RESERVED_LOCATION_COUNT when considering
972         whether a caret == start == finish location can be
973         simply stored as the caret location.
975 2015-12-07  David Malcolm  <dmalcolm@redhat.com>
977         * include/line-map.h (rich_location::set_range): Add line_maps *
978         param; convert param from source_range to source_location.  Drop
979         "overwrite_loc_p" param.
980         * line-map.c (rich_location::set_range): Likewise, acting as if
981         "overwrite_loc_p" were true, and getting range from the location.
983 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
985         PR 62314
986         * include/line-map.h (source_range::intersects_line_p): New
987         method.
988         (rich_location::~rich_location): New.
989         (rich_location::add_fixit_insert): New method.
990         (rich_location::add_fixit_remove): New method.
991         (rich_location::add_fixit_replace): New method.
992         (rich_location::get_num_fixit_hints): New accessor.
993         (rich_location::get_fixit_hint): New accessor.
994         (rich_location::MAX_FIXIT_HINTS): New constant.
995         (rich_location::m_num_fixit_hints): New field.
996         (rich_location::m_fixit_hints): New field.
997         (class fixit_hint): New class.
998         (class fixit_insert): New class.
999         (class fixit_remove): New class.
1000         (class fixit_replace): New class.
1001         * line-map.c (source_range::intersects_line_p): New method.
1002         (rich_location::rich_location): Add initialization of
1003         m_num_fixit_hints to both ctors.
1004         (rich_location::~rich_location): New.
1005         (rich_location::add_fixit_insert): New method.
1006         (rich_location::add_fixit_remove): New method.
1007         (rich_location::add_fixit_replace): New method.
1008         (fixit_insert::fixit_insert): New.
1009         (fixit_insert::~fixit_insert): New.
1010         (fixit_insert::affects_line_p): New.
1011         (fixit_remove::fixit_remove): New.
1012         (fixit_remove::affects_line_p): New.
1013         (fixit_replace::fixit_replace): New.
1014         (fixit_replace::~fixit_replace): New.
1015         (fixit_replace::affects_line_p): New.
1017 2015-11-19  Jakub Jelinek  <jakub@redhat.com>
1019         PR preprocessor/60736
1020         * include/cpplib.h (cpp_errno_filename): New prototype.
1021         * errors.c (cpp_errno): Don't handle msgid "" specially, use
1022         _(msgid) instead of msgid as argument to cpp_error.
1023         (cpp_errno_filename): New function.
1024         * files.c (read_file_guts): Use cpp_errno_filename instead of
1025         cpp_errno.
1026         (open_file_failed): Likewise.  Use file->name if file->path is NULL
1027         in diagnostics.
1029 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1031         * errors.c (cpp_diagnostic): Pass pfile->line_table to
1032         rich_location ctor.
1033         (cpp_diagnostic_with_line): Likewise.
1034         * include/cpplib.h (struct cpp_token): Update comment for src_loc
1035         to indicate that the range of the token is "baked into" the
1036         source_location.
1037         * include/line-map.h (source_location): Update the descriptive
1038         comment to reflect the packing scheme for short ranges, adding
1039         worked examples of location encoding.
1040         (struct line_map_ordinary): Drop field "column_bits" in favor
1041         of field "m_column_and_range_bits"; add field "m_range_bits".
1042         (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
1043         (location_adhoc_data): Add source_range field.
1044         (struct line_maps): Add fields "default_range_bits",
1045         "num_optimized_ranges" and "num_unoptimized_ranges".
1046         (get_combined_adhoc_loc): Add source_range param.
1047         (get_range_from_loc): New declaration.
1048         (pure_location_p): New prototype.
1049         (COMBINE_LOCATION_DATA):  Add source_range param.
1050         (SOURCE_LINE): Update for renaming of column_bits.
1051         (SOURCE_COLUMN): Likewise.  Shift the column right by the map's
1052         range_bits.
1053         (LAST_SOURCE_LINE_LOCATION): Update for renaming of column_bits.
1054         (linemap_position_for_line_and_column): Add line_maps * params.
1055         (rich_location::rich_location): Likewise.
1056         * lex.c (_cpp_lex_direct): Capture the range of the token, baking
1057         it into token->src_loc via a call to COMBINE_LOCATION_DATA.
1058         * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): Reduce from 1U << 17 to
1059         1U << 12.
1060         (location_adhoc_data_hash): Add the src_range into
1061         the hash value.
1062         (location_adhoc_data_eq): Require equality of the src_range
1063         values.
1064         (can_be_stored_compactly_p): New function.
1065         (get_combined_adhoc_loc): Add src_range param, and store it,
1066         via a bit-packing scheme for short ranges, otherwise within the
1067         lookaside table.  Remove the requirement that data is non-NULL.
1068         (get_range_from_adhoc_loc): New function.
1069         (get_range_from_loc): New function.
1070         (pure_location_p): New function.
1071         (linemap_add): Ensure that start_location has zero for the
1072         range_bits, unless we're past LINE_MAP_MAX_LOCATION_WITH_COLS.
1073         Initialize range_bits to zero.  Assert that the start_location
1074         is "pure".
1075         (linemap_line_start): Assert that the
1076         column_and_range_bits >= range_bits.
1077         Update determinination of whether we need to start a new map
1078         using the effective column bits, without the range bits.
1079         Use the set's default_range_bits in new maps, apart from
1080         those with column_bits == 0, which should also have 0 range_bits.
1081         Increase the column bits for new maps by the range bits.
1082         When adding lines to an existing map, use set->highest_line
1083         directly rather than offsetting highest by SOURCE_COLUMN.
1084         Add assertions to sanity-check the return value.
1085         (linemap_position_for_column): Offset to_column by range_bits.
1086         Update set->highest_location if necessary.
1087         (linemap_position_for_line_and_column): Add line_maps * param.
1088         Update the calculation to offset the column by range_bits, and
1089         conditionalize it on being <= LINE_MAP_MAX_LOCATION_WITH_COLS.
1090         Bound it by LINEMAPS_MACRO_LOWEST_LOCATION.  Update
1091         set->highest_location if necessary.
1092         (linemap_position_for_loc_and_offset): Handle ad-hoc locations;
1093         pass "set" to linemap_position_for_line_and_column.
1094         (linemap_macro_map_loc_unwind_toward_spelling): Add line_maps
1095         param.  Handle ad-hoc locations.
1096         (linemap_location_in_system_header_p): Pass on "set" to call to
1097         linemap_macro_map_loc_unwind_toward_spelling.
1098         (linemap_macro_loc_to_spelling_point): Retain ad-hoc locations.
1099         Pass on "set" to call to
1100         linemap_macro_map_loc_unwind_toward_spelling.
1101         (linemap_resolve_location): Retain ad-hoc locations.  Pass on
1102         "set" to call to linemap_macro_map_loc_unwind_toward_spelling.
1103         (linemap_unwind_toward_expansion):  Pass on "set" to call to
1104         linemap_macro_map_loc_unwind_toward_spelling.
1105         (linemap_expand_location): Extract the data pointer before
1106         extracting the location.
1107         (rich_location::rich_location): Add line_maps param; use it to
1108         extract the range from the source_location.
1109         * location-example.txt: Regenerate, showing new representation.
1111 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
1113         * errors.c (cpp_diagnostic): Update for change in signature
1114         of "error" callback.
1115         (cpp_diagnostic_with_line): Likewise, calling override_column
1116         on the rich_location.
1117         * include/cpplib.h (struct cpp_callbacks): Within "error"
1118         callback, convert param from source_location to rich_location *,
1119         and drop column_override param.
1120         * include/line-map.h (struct source_range): New struct.
1121         (struct location_range): New struct.
1122         (class rich_location): New class.
1123         (linemap_client_expand_location_to_spelling_point): New declaration.
1124         * line-map.c (rich_location::rich_location): New ctors.
1125         (rich_location::lazily_expand_location): New method.
1126         (rich_location::override_column): New method.
1127         (rich_location::add_range): New methods.
1128         (rich_location::set_range): New method.
1130 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
1132         * include/line-map.h (struct linemap_stats): Add fields
1133         "adhoc_table_size" and "adhoc_table_entries_used".
1134         * line-map.c (linemap_get_statistics): Populate above fields.
1136 2015-11-04  Mikhail Maltsev  <maltsevm@gmail.com>
1138         * config.in: Regenerate.
1139         * configure: Regenerate.
1140         * configure.ac: Remove ENABLE_CHECKING.
1142 2015-11-03  Uros Bizjak  <ubizjak@gmail.com>
1144         * lex.c (search_line_sse42): Correctly advance the pointer to an
1145         aligned address.
1147 2015-11-02  David Malcolm  <dmalcolm@redhat.com>
1149         * include/line-map.h (source_location): In the table in the
1150         descriptive comment, show UNKNOWN_LOCATION, BUILTINS_LOCATION,
1151         LINE_MAP_MAX_LOCATION_WITH_COLS, LINE_MAP_MAX_SOURCE_LOCATION.
1152         Add notes about ad-hoc values.
1154 2015-10-21  Mikhail Maltsev  <maltsevm@gmail.com>
1156         * include/line-map.h: Use CHECKING_P instead of ENABLE_CHECKING.
1157         * init.c: Likewise.
1158         * macro.c (struct macro_arg_token_iter, set_arg_token,
1159         macro_arg_token_iter_init, macro_arg_token_iter_forward,
1160         macro_arg_token_iter_get_token, macro_arg_token_iter_get_location,
1161         alloc_expanded_arg_mem, _cpp_backup_tokens): Likewise.
1163         * config.in: Regenerate.
1164         * configure: Regenerate.
1165         * configure.ac (CHECKING_P): Define.
1166         * system.h (fancy_abort): Declare.
1167         (abort): Define.
1168         (gcc_assert): Define. Use CHECKING_P.
1170 2015-10-13  Mikhail Maltsev  <maltsevm@gmail.com>
1172         * system.h (CHECKING_P, gcc_checking_assert): Define.
1174 2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1176         PR c/66415
1177         * line-map.c (linemap_position_for_loc_and_offset): Handle the
1178         case of long lines encoded in multiple maps.
1180 2015-09-07  Marek Polacek  <polacek@redhat.com>
1182         * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.
1184 2015-08-06  Yaakov Selkowitz  <yselkowi@redhat.com>
1186         * configure: Regenerate.
1188 2015-07-08  Thomas Schwinge  <thomas@codesourcery.com>
1190         * include/line-map.h (RESERVED_LOCATION_COUNT): Change type to
1191         source_location.
1193 2015-07-02  Paolo Carlini  <paolo.carlini@oracle.com>
1195         PR preprocessor/53690
1196         * charset.c (_cpp_valid_ucn): Add cppchar_t * parameter and change
1197         return type to bool.  Fix encoding of \u0000 and \U00000000 in C++.
1198         (convert_ucn): Adjust call.
1199         * lex.c (forms_identifier_p): Likewise.
1200         * internal.h (_cpp_valid_ucn): Adjust declaration.
1202 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
1204         Implement N4197 - Adding u8 character literals
1205         * include/cpplib.h (UTF8CHAR, UTF8CHAR_USERDEF): New cpp tokens;
1206         (struct cpp_options): Add utf8_char_literals.
1207         * init.c (struct lang_flags): Add utf8_char_literals;
1208         (struct lang_flags lang_defaults): Add column for utf8_char_literals.
1209         * macro.c (stringify_arg()): Treat CPP_UTF8CHAR token;
1210         * expr.c (cpp_userdef_char_remove_type(), cpp_userdef_char_add_type()):
1211         Treat CPP_UTF8CHAR_USERDEF, CPP_UTF8CHAR tokens;
1212         (cpp_userdef_char_p()): Treat CPP_UTF8CHAR_USERDEF token;
1213         (eval_token(), _cpp_parse_expr()): Treat CPP_UTF8CHAR token.
1214         * lex.c (lex_string(), _cpp_lex_direct()): Include CPP_UTF8CHAR tokens.
1215         * charset.c (converter_for_type(), cpp_interpret_charconst()):
1216         Treat CPP_UTF8CHAR token.
1218 2015-06-30  Uros Bizjak  <ubizjak@gmail.com>
1220         * lex.c (search_line_sse42) [__GCC_ASM_FLAG_OUTPUTS__]: New main
1221         loop using asm flag outputs.
1223 2015-06-08  Marek Polacek  <polacek@redhat.com>
1225         PR c/66415
1226         * line-map.c (linemap_position_for_loc_and_offset): Remove
1227         linemap_assert_fails; reverse conditions.
1229 2015-05-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1231         * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER
1232         LINE_MAP_MAX_LOCATION_WITH_COLS,LINE_MAP_MAX_SOURCE_LOCATION):
1233         New constants.
1234         (linemap_line_start): Use them.
1235         (linemap_position_for_column): Use them.
1237 2015-05-20  David Malcolm  <dmalcolm@redhat.com>
1239         * include/line-map.h (MAP_START_LOCATION): Eliminate the non-const
1240         variant, and tweak comment for the const variant.
1241         (ORDINARY_MAP_STARTING_LINE_NUMBER): Drop the non-const variant.
1242         (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
1243         (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
1244         (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
1245         (ORDINARY_MAP_FILE_NAME): Drop the non-const variant.
1246         (MACRO_MAP_MACRO): Likewise.
1247         (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
1248         (MACRO_MAP_LOCATIONS): Likewise.
1249         (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
1250         * line-map.c (linemap_add): Replace writes through macros with
1251         direct field accesses.
1252         (linemap_enter_macro): Likewise.
1253         (linemap_line_start): Likewise.
1255 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
1257         * directives.c (do_line): Strengthen local "map" from
1258         const line_map * to const line_map_ordinary *.
1259         (do_linemarker): Likewise.
1260         (_cpp_do_file_change): Assert that we're not dealing with
1261         a macro map.  Introduce local "ord_map" via a call to
1262         linemap_check_ordinary, guarded within the check for
1263         non-NULL.  Use it for typesafety.
1264         * files.c (cpp_make_system_header): Strengthen local "map" from
1265         const line_map * to const line_map_ordinary *.
1266         * include/cpplib.h (struct cpp_callbacks): Likewise for second
1267         parameter of "file_change" callback.
1268         * include/line-map.h (struct line_map): Convert from a struct
1269         containing a union to a base class.
1270         (struct line_map_ordinary): Convert to a subclass of line_map.
1271         (struct line_map_macro): Likewise.
1272         (linemap_check_ordinary): Strengthen return type from line_map *
1273         to line_map_ordinary *, and add a const-variant.
1274         (linemap_check_macro): New pair of functions.
1275         (ORDINARY_MAP_STARTING_LINE_NUMBER): Strengthen param from
1276         const line_map * to const line_map_ordinary *, eliminating call
1277         to linemap_check_ordinary.  Likewise for the non-const variant.
1278         (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
1279         (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
1280         (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Likewise.
1281         (ORDINARY_MAP_FILE_NAME): Likewise.
1282         (MACRO_MAP_MACRO): Strengthen param from const line_map * to
1283         const line_map_macro *.  Likewise for the non-const variant.
1284         (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
1285         (MACRO_MAP_LOCATIONS): Likewise.
1286         (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
1287         (struct maps_info): Replace with...
1288         (struct maps_info_ordinary):...this and...
1289         (struct maps_info_macro): ...this.
1290         (struct line_maps): Convert fields "info_ordinary" and
1291         "info_macro" to the above new structs.
1292         (LINEMAPS_MAP_INFO): Delete both functions.
1293         (LINEMAPS_MAPS): Likewise.
1294         (LINEMAPS_ALLOCATED): Rewrite both variants to avoid using
1295         LINEMAPS_MAP_INFO.
1296         (LINEMAPS_USED): Likewise.
1297         (LINEMAPS_CACHE): Likewise.
1298         (LINEMAPS_MAP_AT): Likewise.
1299         (LINEMAPS_ORDINARY_MAPS): Strengthen return type from line_map *
1300         to line_map_ordinary *.
1301         (LINEMAPS_ORDINARY_MAP_AT): Likewise.
1302         (LINEMAPS_LAST_ORDINARY_MAP): Likewise.
1303         (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise.
1304         (LINEMAPS_MACRO_MAPS): Strengthen return type from line_map * to
1305         line_map_macro *.
1306         (LINEMAPS_MACRO_MAP_AT): Likewise.
1307         (LINEMAPS_LAST_MACRO_MAP): Likewise.
1308         (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise.
1309         (linemap_map_get_macro_name): Strengthen param from
1310         const line_map * to const line_map_macro *.
1311         (SOURCE_LINE): Strengthen first param from const line_map * to
1312         const line_map_ordinary *, removing call to
1313         linemap_check_ordinary.
1314         (SOURCE_COLUMN): Likewise.
1315         (LAST_SOURCE_LINE_LOCATION): Likewise.
1316         (LAST_SOURCE_LINE): Strengthen first param from const line_map *
1317         to const line_map_ordinary *.
1318         (LAST_SOURCE_COLUMN): Likewise.
1319         (INCLUDED_FROM): Strengthen return type from line_map * to
1320         line_map_ordinary *., and second param from const line_map *
1321         to const line_map_ordinary *, removing call to
1322         linemap_check_ordinary.
1323         (MAIN_FILE_P): Strengthen param from const line_map * to
1324         const line_map_ordinary *, removing call to
1325         linemap_check_ordinary.
1326         (linemap_position_for_line_and_column): Strengthen param from
1327         const line_map * to const line_map_ordinary *.
1328         (LINEMAP_FILE): Strengthen param from const line_map * to
1329         const line_map_ordinary *, removing call to
1330         linemap_check_ordinary.
1331         (LINEMAP_LINE): Likewise.
1332         (LINEMAP_SYSP): Likewise.
1333         (linemap_resolve_location): Strengthen final param from
1334         const line_map ** to const line_map_ordinary **.
1335         * internal.h (CPP_INCREMENT_LINE): Likewise for local "map".
1336         (linemap_enter_macro): Strengthen return type from
1337         const line_map * to const line_map_macro *.
1338         (linemap_add_macro_token): Likewise for first param.
1339         * line-map.c (linemap_check_files_exited): Strengthen local "map"
1340         from const line_map * to const line_map_ordinary *.
1341         (new_linemap): Introduce local "map_size" and use it when
1342         calculating how large the buffer should be.  Rewrite based
1343         on change of info_macro and info_ordinary into distinct types.
1344         (linemap_add): Strengthen locals "map" and "from" from line_map *
1345         to line_map_ordinary *.
1346         (linemap_enter_macro): Strengthen return type from
1347         const line_map * to const line_map_macro *, and local "map" from
1348         line_map * to line_map_macro *.
1349         (linemap_add_macro_token): Strengthen param "map" from
1350         const line_map * to const line_map_macro *.
1351         (linemap_line_start): Strengthen local "map" from line_map * to
1352         line_map_ordinary *.
1353         (linemap_position_for_column): Likewise.
1354         (linemap_position_for_line_and_column): Strengthen first param
1355         from const line_map * to const line_map_ordinary *.
1356         (linemap_position_for_loc_and_offset): Strengthen local "map" from
1357         const line_map * to const line_map_ordinary *.
1358         (linemap_ordinary_map_lookup): Likewise for return type and locals
1359         "cached" and "result".
1360         (linemap_macro_map_lookup): Strengthen return type and locals
1361         "cached" and "result" from const line_map * to
1362         const line_map_macro *.
1363         (linemap_macro_map_loc_to_exp_point): Likewise for param "map".
1364         (linemap_macro_map_loc_to_def_point): Likewise.
1365         (linemap_macro_map_loc_unwind_toward_spelling): Likewise.
1366         (linemap_get_expansion_line): Strengthen local "map" from
1367         const line_map * to const line_map_ordinary *.
1368         (linemap_get_expansion_filename): Likewise.
1369         (linemap_map_get_macro_name): Strengthen param from
1370         const line_map * to const line_map_macro *.
1371         (linemap_location_in_system_header_p): Add call to
1372         linemap_check_ordinary in region guarded by
1373         !linemap_macro_expansion_map_p.  Introduce local "macro_map" via
1374         linemap_check_macro in other region, using it in place of "map"
1375         for typesafety.
1376         (first_map_in_common_1): Add calls to linemap_check_macro.
1377         (trace_include): Strengthen param "map" from const line_map * to
1378         const line_map_ordinary *.
1379         (linemap_macro_loc_to_spelling_point): Strengthen final param from
1380         const line_map ** to const line_map_ordinary **.  Replace a
1381         C-style cast with a const_cast, and add calls to
1382         linemap_check_macro and linemap_check_ordinary.
1383         (linemap_macro_loc_to_def_point): Likewise.
1384         (linemap_macro_loc_to_exp_point): Likewise.
1385         (linemap_resolve_location): Strengthen final param from
1386         const line_map ** to const line_map_ordinary **.
1387         (linemap_unwind_toward_expansion): Introduce local "macro_map" via
1388         a checked cast and use it in place of *map.
1389         (linemap_unwind_to_first_non_reserved_loc): Strengthen local
1390         "map1" from const line_map * to const line_map_ordinary *.
1391         (linemap_expand_location): Introduce local "ord_map" via a checked
1392         cast and use it in place of map.
1393         (linemap_dump): Make local "map" const.  Strengthen local
1394         "includer_map" from line_map * to const line_map_ordinary *.
1395         Introduce locals "ord_map" and "macro_map" via checked casts and
1396         use them in place of "map" for typesafety.
1397         (linemap_dump_location): Strengthen local "map" from
1398         const line_map * to const line_map_ordinary *.
1399         (linemap_get_file_highest_location): Update for elimination of
1400         union.
1401         (linemap_get_statistics): Strengthen local "cur_map" from
1402         line_map * to const line_map_macro *.  Update uses of sizeof to
1403         use the appropriate line_map subclasses.
1404         * macro.c (_cpp_warn_if_unused_macro): Add call to
1405         linemap_check_ordinary.
1406         (builtin_macro): Strengthen local "map" from const line_map * to
1407         const line_map_macro *.
1408         (enter_macro_context): Likewise.
1409         (replace_args): Likewise.
1410         (tokens_buff_put_token_to): Likewise for param "map".
1411         (tokens_buff_add_token): Likewise.
1413 2015-05-13  David Malcolm  <dmalcolm@redhat.com>
1415         * include/line-map.h (source_location): Add a reference to
1416         location-example.txt to the descriptive comment.
1417         * location-example.txt: New file.
1419 2015-05-13  David Malcolm  <dmalcolm@redhat.com>
1421         * include/line-map.h (MAX_SOURCE_LOCATION): Convert from a macro
1422         to a const source_location.
1423         (RESERVED_LOCATION_COUNT): Likewise.
1424         (linemap_check_ordinary): Convert from a macro to a pair of inline
1425         functions, for const/non-const arguments.
1426         (MAP_START_LOCATION): Likewise.
1427         (ORDINARY_MAP_STARTING_LINE_NUMBER): Likewise.
1428         (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
1429         (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
1430         (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Convert from a macro to a
1431         pair of inline functions, for const/non-const arguments, where the
1432         latter is named...
1433         (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): New function.
1434         (ORDINARY_MAP_FILE_NAME): Convert from a macro to a pair of inline
1435         functions, for const/non-const arguments.
1436         (MACRO_MAP_MACRO): Likewise.
1437         (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
1438         (MACRO_MAP_LOCATIONS): Likewise.
1439         (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
1440         (LINEMAPS_MAP_INFO): Likewise.
1441         (LINEMAPS_MAPS): Likewise.
1442         (LINEMAPS_ALLOCATED): Likewise.
1443         (LINEMAPS_USED): Likewise.
1444         (LINEMAPS_CACHE): Likewise.
1445         (LINEMAPS_ORDINARY_CACHE): Likewise.
1446         (LINEMAPS_MACRO_CACHE): Likewise.
1447         (LINEMAPS_MAP_AT): Convert from a macro to an inline function.
1448         (LINEMAPS_LAST_MAP): Likewise.
1449         (LINEMAPS_LAST_ALLOCATED_MAP): Likewise.
1450         (LINEMAPS_ORDINARY_MAPS): Likewise.
1451         (LINEMAPS_ORDINARY_MAP_AT): Likewise.
1452         (LINEMAPS_ORDINARY_ALLOCATED): Likewise.
1453         (LINEMAPS_ORDINARY_USED): Likewise.
1454         (LINEMAPS_LAST_ORDINARY_MAP): Likewise.
1455         (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise.
1456         (LINEMAPS_MACRO_MAPS): Likewise.
1457         (LINEMAPS_MACRO_MAP_AT): Likewise.
1458         (LINEMAPS_MACRO_ALLOCATED): Likewise.
1459         (LINEMAPS_MACRO_USED): Likewise.
1460         (LINEMAPS_MACRO_LOWEST_LOCATION): Likewise.
1461         (LINEMAPS_LAST_MACRO_MAP): Likewise.
1462         (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise.
1463         (IS_ADHOC_LOC): Likewise.
1464         (COMBINE_LOCATION_DATA): Likewise.
1465         (SOURCE_LINE): Likewise.
1466         (SOURCE_COLUMN): Likewise.
1467         (LAST_SOURCE_LINE_LOCATION): Likewise.
1468         (LAST_SOURCE_LINE): Likewise.
1469         (LAST_SOURCE_COLUMN): Likewise.
1470         (LAST_SOURCE_LINE_LOCATION)
1471         (INCLUDED_FROM): Likewise.
1472         (MAIN_FILE_P): Likewise.
1473         (LINEMAP_FILE): Likewise.
1474         (LINEMAP_LINE): Likewise.
1475         (LINEMAP_SYSP): Likewise.
1476         (linemap_location_before_p): Likewise.
1477         * line-map.c (linemap_check_files_exited): Make local "map" const.
1478         (linemap_add): Use SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS.
1479         (linemap_line_start): Likewise.
1481 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
1483         * aclocal.m4: Regenerated with automake-1.11.6.
1485 2015-05-13  David Malcolm  <dmalcolm@redhat.com>
1487         * include/line-map.h (linemap_assert): Move up within the file to
1488         before all of the map accessor macros.
1489         (linemap_assert_fails): Likewise.
1490         (linemap_check_ordinary): Likewise.
1491         (linemap_macro_expansion_map_p): Likewise.
1493 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1495         * directives.c (do_line): Set seen_line_directive on line_table.
1496         (do_linemarker): Likewise.
1497         * include/line-map.h (struct line_maps): Add new field
1498         "seen_line_directive".
1500 2015-05-08  Jason Merrill  <jason@redhat.com>
1502         * include/cpplib.h: Add CPP_W_CXX11_COMPAT.
1503         (struct cpp_options): Add cpp_warn_cxx11_compat.
1504         * init.c (cpp_create_reader): Initialize it.
1505         * lex.c (lex_string): Add -Wc++11-compat warning.
1507 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
1509         * pch.c (cpp_valid_state): Fix indentation so that it reflects the
1510         block structure.
1512 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
1514         * include/line-map.h: Fix comment at the top of the file.
1515         (source_location): Rewrite and expand the comment for this
1516         typedef, adding an ascii-art table to clarify how source_location
1517         values are allocated.
1518         * line-map.c: Fix comment at the top of the file.
1520 2015-04-09  Richard Biener  <rguenther@suse.de>
1522         PR pch/65550
1523         * files.c (pch_open_file): Allow main and pre-included files
1524         when trying to open a PCH.
1526 2015-04-06  Jakub Jelinek  <jakub@redhat.com>
1528         PR preprocessor/61977
1529         * lex.c (cpp_peek_token): If peektok is CPP_EOF, back it up
1530         with all tokens peeked by the current function.
1532 2015-04-02  Jakub Jelinek  <jakub@redhat.com>
1534         PR preprocessor/61977
1535         * lex.c (cpp_peek_token): Temporarily clear pfile->cb.line_change.
1537 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
1539         PR preprocessor/65238
1540         * internal.h (_cpp_scan_out_logical_line): Add third argument.
1541         * directives.c (prepare_directive_trad): Pass false to it.
1542         * traditional.c (_cpp_read_logical_line_trad,
1543         _cpp_create_trad_definition): Likewise.
1544         (struct fun_macro): Add paramc field.
1545         (fun_like_macro): New function.
1546         (maybe_start_funlike): Handle NODE_BUILTIN macros.  Initialize
1547         macro->paramc field.
1548         (save_argument): Use macro->paramc instead of
1549         macro->node->value.macro->paramc.
1550         (push_replacement_text): Formatting fix.
1551         (recursive_macro): Use fun_like_macro helper.
1552         (_cpp_scan_out_logical_line): Likewise.  Add BUILTIN_MACRO_ARG
1553         argument.  Initialize fmacro.paramc field.  Handle builtin
1554         function-like macros.
1556 2015-03-16  Edward Smith-Rowland  <3dw4rd@verizon.net>
1558         PR c++/64626
1559         * lex.c (lex_number): If a number ends with digit-seps (') skip back
1560         and let lex_string take them.
1562 2015-03-02  Markus Trippelsdorf  <markus@trippelsdorf.de>
1564         PR target/65261
1565         * lex.c (search_line_fast): Silence ubsan errors.
1567 2015-02-03    <dodji@redhat.com>
1569         PR preprocessor/64803
1570         * internal.h (cpp_reader::top_most_macro_node): New data member.
1571         * macro.c (enter_macro_context): Pass the location of the end of
1572         the top-most invocation of the function-like macro, or the
1573         location of the expansion point of the top-most object-like macro.
1574         (cpp_get_token_1): Store the top-most macro node in the new
1575         pfile->top_most_macro_node data member.
1576         (_cpp_pop_context): Clear the new cpp_reader::top_most_macro_node
1577         data member.
1579 2015-01-30  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1581         * lex.c (search_line_fast): Change __ARM_NEON__ to __ARM_NEON.
1583 2015-01-23  Marek Polacek  <polacek@redhat.com>
1585         DR#412
1586         PR preprocessor/60570
1587         * directives.c (do_elif): Don't evaluate #elif conditionals
1588         when they don't need to be.
1590 2015-01-16  Jakub Jelinek  <jakub@redhat.com>
1592         * expr.c (cpp_classify_number): Add N_() around ?: string
1593         literals used in cpp_error_with_line call as format string.
1595 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1597         Update copyright years.
1599 2014-12-19  Jakub Jelinek  <jakub@redhat.com>
1601         PR preprocessor/63831
1602         * directives.c (lex_macro_node): Remove __has_attribute__ handling.
1603         * internal.h (struct spec_node): Remove n__has_attribute__ field.
1604         (struct lexer_state): Remove in__has_attribute__ field.
1605         * macro.c (_cpp_builtin_macro_text): Handle BT_HAS_ATTRIBUTE.
1606         * identifiers.c (_cpp_init_hashtable): Remove __has_attribute__
1607         handling.
1608         * init.c (builtin_array): Add __has_attribute and __has_cpp_attribute.
1609         (cpp_init_special_builtins): Don't initialize __has_attribute
1610         or __has_cpp_attribute if CLK_ASM or pfile->cb.has_attribute is NULL.
1611         * traditional.c (enum ls): Remove ls_has_attribute,
1612         ls_has_attribute_close.
1613         (_cpp_scan_out_logical_line): Remove __has_attribute__ handling.
1614         * include/cpplib.h (enum cpp_builtin_type): Add BT_HAS_ATTRIBUTE.
1615         * pch.c (cpp_read_state): Remove __has_attribute__ handling.
1616         * expr.c (eval_token): Likewise.
1617         (parse_has_attribute): Removed.
1619 2014-12-11  Uros Bizjak  <ubizjak@gmail.com>
1621         * directives.c (cpp_define_formatted): Use xvasprintf.
1623 2014-12-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1625         * line-map.c (linemap_position_for_loc_and_offset): Add new
1626         linemap_assert_fails.
1628 2014-12-02  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1630         * include/line-map.h (linemap_assert_fails): Declare.
1631         * line-map.c (linemap_position_for_loc_and_offset): Use it.
1633 2014-12-02  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1635         * line-map.c (linemap_add): Fix typo.
1636         (linemap_line_start): Fix whitespace.
1638 2014-11-29  John Schmerge  <jbschmerge@gmail.com>
1640         PR preprocessor/41698
1641         * charset.c (one_utf8_to_utf16): Do not produce surrogate pairs
1642         for 0xffff.
1644 2014-11-25  Jakub Jelinek  <jakub@redhat.com>
1646         PR preprocessor/60436
1647         * line-map.c (linemap_line_start): If highest is above 0x60000000
1648         and we are still tracking columns or highest is above 0x70000000,
1649         force add_map.
1651 2014-11-20  Uros Bizjak  <ubizjak@gmail.com>
1653         PR target/63966
1654         * lex.c [__i386__ || __x86_64__]: Compile special SSE functions
1655         only for (__GNUC__ >= 5 || !defined(__PIC__)).
1657 2014-11-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1659         * include/line-map.h: Include EXPR, so that unused variable warnings
1660         do not occur.
1662 2014-11-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1664         PR fortran/44054
1665         * include/line-map.h (linemap_position_for_loc_and_offset):
1666         Declare.
1667         * line-map.c (linemap_position_for_loc_and_offset): New.
1669 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
1671         * ChangeLog.jit: New.
1673 2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
1675         * include/cpplib.h (cpp_callbacks): Add has_attribute.
1676         * internal.h (lexer_state): Add in__has_attribute__.
1677         * directives.c (lex_macro_node): Prevent use of __has_attribute__
1678         as a macro.
1679         * expr.c (parse_has_attribute): New function; (eval_token): Look for
1680         __has_attribute__ and route to parse_has_attribute.
1681         * identifiers.c (_cpp_init_hashtable): Initialize n__has_attribute__.
1682         * pch.c (cpp_read_state): Initialize n__has_attribute__.
1683         * traditional.c (enum ls): Add ls_has_attribute, ls_has_attribute_close;
1684         (_cpp_scan_out_logical_line): Attend to __has_attribute__.
1686 2014-11-06  Joseph Myers  <joseph@codesourcery.com>
1688         * include/cpp-id-data.h (struct cpp_macro): Update comment
1689         regarding parameters.
1690         * include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier):
1691         Add spelling fields.
1692         (struct cpp_token): Update comment on macro_arg.
1693         * internal.h (_cpp_save_parameter): Add extra argument.
1694         (_cpp_spell_ident_ucns): New declaration.
1695         * lex.c (lex_identifier): Add SPELLING argument.  Set *SPELLING to
1696         original spelling of identifier.
1697         (_cpp_lex_direct): Update calls to lex_identifier.
1698         (_cpp_spell_ident_ucns): New function, factored out of
1699         cpp_spell_token.
1700         (cpp_spell_token): Adjust FORSTRING argument semantics to return
1701         original spelling of identifiers.  Use _cpp_spell_ident_ucns in
1702         !FORSTRING case.
1703         (_cpp_equiv_tokens): Check spellings of identifiers and macro
1704         arguments are identical.
1705         * macro.c (macro_arg_saved_data): New structure.
1706         (paste_tokens): Use original spellings of identifiers from
1707         cpp_spell_token.
1708         (_cpp_save_parameter): Add argument SPELLING.  Save both canonical
1709         node and its value.
1710         (parse_params): Update calls to _cpp_save_parameter.
1711         (lex_expansion_token): Save spelling of macro argument tokens.
1712         (_cpp_create_definition): Extract canonical node from saved data.
1713         (cpp_macro_definition): Use UCNs in spelling of macro name.  Use
1714         original spellings of macro argument tokens and identifiers.
1715         * traditional.c (scan_parameters): Update call to
1716         _cpp_save_parameter.
1718 2014-11-05  Joseph Myers  <joseph@codesourcery.com>
1720         PR preprocessor/9449
1721         * init.c (lang_defaults): Enable extended identifiers for C++ and
1722         C99-based standards.
1724 2014-10-22  Alan Modra  <amodra@gmail.com>
1726         * symtab.c (ht_create): Use obstack_specify_allocation in place of
1727         _obstack_begin.
1728         * files.c (_cpp_init_files): Likewise.
1729         * init.c (cpp_create_reader): Likewise.
1730         * identifiers.c (_cpp_init_hashtable): Likewise.
1732 2014-10-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1734         * include/line-map.h (linemap_location_from_macro_expansion_p):
1735         const struct line_maps * argument.
1736         (linemap_position_for_line_and_column): const struct line_map *
1737         argument.
1738         * line-map.c (linemap_add_macro_token): Use correct argument name
1739         in comment.
1740         (linemap_position_for_line_and_column): const struct line_map *
1741         argument.
1742         (linemap_macro_map_loc_to_def_point): Fix comment. Make static.
1743         (linemap_location_from_macro_expansion_p): const struct line_maps *
1744         argument.
1745         (linemap_resolve_location): Fix argument names in comment.
1747 2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1749         * lex.c (search_line_fast): Add new version to be used for Power8
1750         and later targets when Altivec is enabled.  Restrict the existing
1751         Altivec version to big-endian systems so that lvsr is not used on
1752         little endian, where it is deprecated.  Remove LE-specific code
1753         from the now-BE-only version.
1755 2014-10-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1756             Jeff Law  <law@redhat.com>
1758         * charset.c (convert_no_conversion): Reallocate memory with 25%
1759         headroom.
1761 2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
1763         Implement SD-6: SG10 Feature Test Recommendations
1764         * internal.h (lexer_state, spec_nodes): Add in__has_include__.
1765         * directives.c: Support __has_include__ builtin.
1766         * expr.c (parse_has_include): New function to parse __has_include__
1767         builtin; (eval_token()): Use it.
1768         * files.c (_cpp_has_header()): New funtion to look for header;
1769         (open_file_failed()): Not an error to not find a header file for
1770         __has_include__.
1771         * identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__.
1772         * pch.c (cpp_read_state): Lookup __has_include__.
1773         * traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through
1774         __has_include__ statements.
1776 2014-09-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1778         PR preprocessor/58893
1779         * errors.c (cpp_diagnostic): Fix possible out of bounds access.
1780         * files.c (_cpp_stack_include): Initialize src_loc for IT_CMDLINE.
1782 2014-09-24  Marek Polacek  <polacek@redhat.com>
1784         PR c/61405
1785         PR c/53874
1786         * include/cpplib.h (enum cpp_ttype): Define CPP_KEYWORD.
1788 2014-09-17  Jan Hubicka  <hubicka@ucw.cz>
1790         * charset.c (conversion): Rename to ...
1791         (cpp_conversion): ... this one; update.
1792         * files.c (file_hash_entry): Rename to ...
1793         (cpp_file_hash_entry): ... this one ; update.
1795 2014-09-17  Marek Polacek  <polacek@redhat.com>
1797         PR c/61854
1798         * init.c (struct lang_flags): Remove cplusplus_comments.
1799         (cpp_set_lang): Likewise.
1800         (post_options): Likewise.
1801         * lex.c (_cpp_lex_direct): Disallow C++ style comments in C90/C94.
1803 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1805         * include/cpplib.h (struct cpp_options): Declare warn_normalize as
1806         int instead of enum.
1808 2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1810         * macro.c (replace_args): Use cpp_pedwarning, cpp_warning and
1811         CPP_W flags.
1812         * include/cpplib.h: Add CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
1813         * init.c (cpp_create_reader): Do not init to -1 here.
1814         * expr.c (num_binary_op): Use cpp_pedwarning.
1816 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1818         * directives.c (check_eol_1): New.
1819         (check_eol_endif_labels): New.
1820         (check_eol): Call check_eol_1.
1821         (do_else,do_endif): Call check_eol_endif_labels.
1823 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1825         * macro.c (warn_of_redefinition): Suppress warnings for builtins
1826         that lack the NODE_WARN flag, unless Wbuiltin-macro-redefined.
1827         (_cpp_create_definition): Use Wbuiltin-macro-redefined for
1828         builtins that lack the NODE_WARN flag.
1829         * directives.c (do_undef): Likewise.
1830         * init.c (cpp_init_special_builtins): Do not change flags
1831         depending on Wbuiltin-macro-redefined.
1833 2014-08-28  Edward Smith-Rowland  <3dw4rd@verizon.net>
1835         PR cpp/23827 - standard C++ should not have hex float preprocessor
1836         tokens
1837         * libcpp/init.c (lang_flags): Change CXX98 flag for extended numbers
1838         from 1 to 0.
1839         * libcpp/expr.c (cpp_classify_number): Weite error message for improper
1840         use of hex floating literal.
1842 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
1844         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z;
1845         Rename CLK_GNUCXX1Y, CLK_CXX1Y to CLK_GNUCXX14, CLK_CXX14;
1846         * init.c (struct lang_flags lang_defaults): Add column for trigraphs;
1847         Add rows for CLK_GNUCXX1Z, CLK_CXX1Z; (cpp_set_lang): Set trigraphs;
1848         (cpp_init_builtins): Set __cplusplus to 201402L for C++14;
1849         Set __cplusplus to 201500L for C++17.
1850         * expr.c (cpp_classify_number): Change C++1y to C++14 in binary
1851         constants error message.
1853 2014-08-20  Marek Polacek  <polacek@redhat.com>
1855         * include/cpplib.h (cpp_options): Use signed char.
1856         * lex.c (_cpp_lex_direct): Don't warn in C++ mode.
1858 2014-08-19  Marek Polacek  <polacek@redhat.com>
1860         * lex.c (_cpp_lex_direct): Fix a typo.
1862 2014-08-19  Marek Polacek  <polacek@redhat.com>
1864         * charset.c (_cpp_valid_ucn): Warn only if -Wc90-c99-compat.
1865         * lex.c (_cpp_lex_direct): Likewise.
1866         * macro.c (replace_args): Likewise.
1867         (parse_params): Likewise.
1868         * include/cpplib.h (cpp_options): Change cpp_warn_c90_c99_compat
1869         to char.
1871 2014-08-10 Marek Polacek  <polacek@redhat.com>
1873         PR c/51849
1874         * lex.c (_cpp_lex_direct): Warn when -Wc90-c99-compat is in effect.
1875         * charset.c (_cpp_valid_ucn): Likewise.
1876         * include/cpplib.h (cpp_options): Add cpp_warn_c90_c99_compat.
1877         * macro.c (replace_args): Warn when -Wc90-c99-compat is in effect.
1878         (parse_params): Likewise.
1880 2014-07-27  Marek Polacek  <polacek@redhat.com>
1882         PR c/61861
1883         * macro.c (builtin_macro): Add location parameter.  Set
1884         location of builtin macro to the expansion point.
1885         (enter_macro_context): Pass location to builtin_macro.
1887 2014-07-16  Dodji Seketeli  <dodji@redhat.com>
1889         Support location tracking for built-in macro tokens
1890         * include/line-map.h (line_maps::builtin_location): New data
1891         member.
1892         (line_map_init): Add a new parameter to initialize the new
1893         line_maps::builtin_location data member.
1894         * line-map.c (linemap_init): Initialize the
1895         line_maps::builtin_location data member.
1896         * macro.c (builtin_macro): Create a macro map and track the token
1897         resulting from the expansion of a built-in macro.
1899 2014-07-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
1900             Jonathan Wakely  <jwakely@redhat.com>
1902         PR preprocessor/61389
1903         * macro.c (_cpp_arguments_ok, parse_params, create_iso_definition):
1904         Warning messages mention C++11 in c++ mode and C99 in c mode.
1905         * lex.c (lex_identifier_intern, lex_identifier): Ditto
1907 2014-07-09  Edward Smith-Rowland  <3dw4rd@verizon.net>
1909         PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
1910         by preprocessor
1911         * lex.c (lex_raw_string ()): Do not warn about invalid suffix
1912         if skipping. (lex_string ()): Ditto.
1914 2014-06-04  Edward Smith-Rowland  <3dw4rd@verizon.net>
1916         PR c++/61038
1917         * macro.c (stringify_arg (cpp_reader *, macro_arg *)):
1918         Combine user-defined escape logic with the other string and char logic.
1920 2014-05-26  Richard Biener  <rguenther@suse.de>
1922         * configure.ac: Remove long long and __int64 type checks,
1923         add check for uint64_t and fail if that wasn't found.
1924         * include/cpplib.h (cpp_num_part): Use uint64_t.
1925         * config.in: Regenerate.
1926         * configure: Likewise.
1928 2014-05-21  Marek Polacek  <polacek@redhat.com>
1930         PR c/61212
1931         * files.c (find_file_in_dir): Add parens around &&.
1933 2014-05-20  Edward Smith-Rowland  <3dw4rd@verizon.net>
1935         PR c++/61038
1936         * macro.c (stringify_arg (cpp_reader *, macro_arg *)):
1937         Check for user-defined literal strings and user-defined literal chars
1938         to escape necessary characters.
1940 2014-05-20  Richard Biener  <rguenther@suse.de>
1942         * configure.ac: Copy gcc logic of detecting a 64bit type.
1943         Remove HOST_WIDE_INT define.
1944         * include/cpplib.h: typedef cpp_num_part to a 64bit type,
1945         similar to how hwint.h does it.
1946         * config.in: Regenerate.
1947         * configure: Likewise.
1949 2014-05-09  Joey Ye  <joey.ye@arm.com>
1951         * files.c (find_file_in_dir): Always try to shorten for DOS
1952         non-system headers.
1953         * init.c (ENABLE_CANONICAL_SYSTEM_HEADERS): Default enabled for DOS.
1955 2014-05-07  Richard Biener  <rguenther@suse.de>
1957         * configure.ac: Always set need_64bit_hwint to yes.
1958         * configure: Regenerated.
1960 2014-04-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1962         * lex.c: Remove Solaris 9 reference.
1964 2014-02-24  Walter Lee  <walt@tilera.com>
1966         * configure.ac: Change "tilepro" triplet to "tilepro*".
1967         * configure: Regenerate.
1969 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
1971         PR preprocessor/58844
1972         * macro.c (enter_macro_context): Only push
1973         macro_real_token_count (macro) tokens rather than
1974         macro->count tokens, regardless of
1975         CPP_OPTION (pfile, track-macro-expansion).
1977 2014-02-07  Jakub Jelinek  <jakub@redhat.com>
1979         PR preprocessor/56824
1980         * line-map.c (get_combined_adhoc_loc, linemap_get_expansion_line,
1981         linemap_get_expansion_filename, linemap_location_in_system_header_p,
1982         linemap_location_from_macro_expansion_p,
1983         linemap_macro_loc_to_spelling_point, linemap_macro_loc_to_def_point,
1984         linemap_macro_loc_to_exp_point, linemap_expand_location): Fix
1985         formatting.
1986         (linemap_compare_locations): Look through adhoc locations for both
1987         l0 and l1.
1989 2014-01-23  Dodji Seketeli  <dodji@redhat.com>
1991         PR PR preprocessor/58580
1992         * include/line-map.h (linemap_get_file_highest_location): Declare
1993         new function.
1994         * line-map.c (linemap_get_file_highest_location): Define it.
1996 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1998         Update copyright years
2000 2013-12-09  Joseph Myers  <joseph@codesourcery.com>
2002         PR preprocessor/55715
2003         * expr.c (num_binary_op): Implement subtraction directly rather
2004         than with negation and falling through into addition case.
2006 2013-11-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2008         * lex.c (search_line_fast): Correct for little endian.
2010 2013-11-15  Joseph Myers  <joseph@codesourcery.com>
2012         * ucnid.tab: Add C11 and C11NOSTART data.
2013         * makeucnid.c (digit): Rename enum value to N99.
2014         (C11, N11, all_languages): New enum values.
2015         (NUM_CODE_POINTS, MAX_CODE_POINT): New macros.
2016         (flags, decomp, combining_value): Use NUM_CODE_POINTS as array
2017         size.
2018         (decomp): Use unsigned int as element type.
2019         (all_decomp): New array.
2020         (read_ucnid): Handle C11 and C11NOSTART.  Use MAX_CODE_POINT.
2021         (read_table): Use MAX_CODE_POINT.  Store all decompositions in
2022         all_decomp.
2023         (read_derived): Use MAX_CODE_POINT.
2024         (write_table): Use NUM_CODE_POINTS.  Print N99, C11 and N11
2025         flags.  Print whole array variable declaration rather than just
2026         array contents.
2027         (char_id_valid, write_context_switch): New functions.
2028         (main): Call write_context_switch.
2029         * ucnid.h: Regenerate.
2030         * include/cpplib.h (struct cpp_options): Add c11_identifiers.
2031         * init.c (struct lang_flags): Add c11_identifiers.
2032         (cpp_set_lang): Set c11_identifiers option from selected language.
2033         * internal.h (struct normalize_state): Document "previous" as
2034         previous starter character.
2035         (NORMALIZE_STATE_UPDATE_IDNUM): Take character as argument.
2036         * charset.c (DIG): Rename enum value to N99.
2037         (C11, N11): New enum values.
2038         (struct ucnrange): Give name to struct.  Use short for flags and
2039         unsigned int for end of range.  Include ucnid.h for whole variable
2040         declaration.
2041         (ucn_valid_in_identifier): Allow for characters up to 0x10FFFF.
2042         Allow for C11 in determining valid characters and valid start
2043         characters.  Use check_nfc for non-Hangul context-dependent
2044         checks.  Only store starter characters in nst->previous.
2045         (_cpp_valid_ucn): Pass new argument to
2046         NORMALIZE_STATE_UPDATE_IDNUM.
2047         * lex.c (lex_identifier): Pass new argument to
2048         NORMALIZE_STATE_UPDATE_IDNUM.  Call NORMALIZE_STATE_UPDATE_IDNUM
2049         after initial non-UCN part of identifier.
2050         (lex_number): Pass new argument to NORMALIZE_STATE_UPDATE_IDNUM.
2052 2013-11-15  Joseph Myers  <joseph@codesourcery.com>
2054         * ucnid.tab: Mark C99 digits as [C99DIG].
2055         * makeucnid.c (read_ucnid): Handle [C99DIG].
2056         (read_table): Don't check for digit characters.
2057         * ucnid.h: Regenerate.
2059 2013-11-06  Tobias Burnus  <burnus@net-b.de>
2061         * macro.c (_cpp_builtin_macro_text): Correct
2062         wording of two warnings.
2064 2013-11-05  Tobias Burnus  <burnus@net-b.de>
2066         * include/cpplib.h (CPP_W_DATE_TIME): Added.
2067         (cpp_options): Add warn_date_time.
2068         * init.c (cpp_create_reader): Init it.
2069         * macro.c (_cpp_builtin_macro_text): Warn when
2070         __DATE__/__TIME__/__TIMESTAMP__ is used.
2072 2013-10-31  Edward Smith-Rowland  <3dw4rd@verizon.net>
2074         Implement C++14 digit separators.
2075         * include/cpplib.h (cpp_options): Add digit_separators flag.
2076         * internal.h (DIGIT_SEP(c)): New macro.
2077         * expr.c (cpp_classify_number): Check improper placement of digit sep;
2078         (cpp_interpret_integer): Skip over digit separators.
2079         * init.c (lang_flags): Add digit_separators flag; (lang_defaults): Add
2080         digit separator flags per language; (cpp_set_lang): Set
2081         digit_separators
2082         * lex.c (lex_number): Add digits separator to allowable characters for
2083         C++14.
2085 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
2087         * Makefile.in (PICFLAG): New.
2088         (ALL_CFLAGS): Add PICFLAG.
2089         (ALL_CXXFLAGS): Likewise.
2090         * configure.ac: Add --enable-host-shared, setting up new
2091         PICFLAG variable.
2092         * configure: Regenerate.
2094 2013-08-07  Richard Earnshaw  <rearnsha@arm.com>
2096         * configure.ac: Set need_64bit_hwint for all arm targets.
2097         * configure: Regenerated.
2099 2013-07-20  Jakub Jelinek  <jakub@redhat.com>
2101         PR preprocessor/57620
2102         * lex.c (lex_raw_string): Undo phase1 and phase2 transformations
2103         between R" and final " rather than only in between R"del( and )del".
2105 2013-07-10  Jakub Jelinek  <jakub@redhat.com>
2107         PR preprocessor/57824
2108         * lex.c (lex_raw_string): Allow reading new-lines if
2109         in_deferred_pragma or if parsing_args and there is still
2110         data in the current buffer.
2112         * include/cpplib.h (cpp_token_val_index): Change parameter type to
2113         const cpp_token *.
2114         * lex.c (cpp_token_val_index): Likewise.
2116         PR preprocessor/57757
2117         * lex.c (cpp_avoid_paste): Avoid pasting CPP_{,W,UTF8}STRING
2118         or CPP_STRING{16,32} with CPP_NAME or SPELL_LITERAL token that
2119         starts if a-zA-Z_.
2121 2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
2123         * lex.c (lex_raw_string(), lex_string()): Constrain suffixes treated
2124         as concatenated literal and macro to just the patterns found in
2125         inttypes.h; (is_macro()): New.
2127 2013-06-24  Dehao Chen  <dehao@google.com>
2129         * files.c (_cpp_stack_include): Fix the highest_location when header
2130         file is guarded by #ifndef and is included twice.
2132 2013-04-28  Jakub Jelinek  <jakub@redhat.com>
2134         N3472 binary constants
2135         * include/cpplib.h (struct cpp_options): Fix a typo in user_literals
2136         field comment.  Add binary_constants field.
2137         * init.c (struct lang_flags): Add binary_constants field.
2138         (lang_defaults): Add bin_cst column to the table.
2139         (cpp_set_lang): Initialize CPP_OPTION (pfile, binary_constants).
2140         * expr.c (cpp_classify_number): Talk about C++11 instead of C++0x
2141         in diagnostics.  Accept binary constants if
2142         CPP_OPTION (pfile, binary_constants) even when pedantic.  Adjust
2143         pedwarn message.
2145 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
2147         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Y and CLK_CXX1Y.
2148         * init.c (lang_defaults): Add defaults for the latter.
2149         (cpp_init_builtins): Define __cplusplus as 201300L for the latter.
2150         * lex.c (_cpp_lex_direct): Update.
2152 2013-04-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2154         PR target/56771
2155         * configure.ac: Require 64-bit int for arm*-*-rtems*.
2156         * configure: Regenerate.
2158 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
2160         PR middle-end/56461
2161         * internal.h (struct cpp_buffer): Add to_free field.
2162         (_cpp_pop_file_buffer): Add third argument.
2163         * files.c (_cpp_stack_file): Set buffer->to_free.
2164         (_cpp_pop_file_buffer): Add to_free argument.  Free to_free
2165         if non-NULL, and if equal to file->buffer_start, also clear
2166         file->buffer{,_start,_valid}.
2167         * directives.c (_cpp_pop_buffer): Pass buffer->to_free
2168         to _cpp_pop_file_buffer.
2170 2013-03-01  Jakub Jelinek  <jakub@redhat.com>
2172         PR middle-end/56461
2173         * files.c (_cpp_save_file_entries): Free result at the end.
2174         * pch.c (cpp_string_free): New function.
2175         (cpp_save_state): Use it in htab_create call.
2176         (cpp_write_pch_deps): Free ss->defs.  Destroy ss->definedhash.
2178 2013-02-28  Jakub Jelinek  <jakub@redhat.com>
2180         * files.c (_cpp_find_file): If returning early, before storing
2181         something to *hash_slot and *hash_slot is NULL, call htab_clear_slot
2182         on it.  Access *hash_slot using void * type rather than
2183         struct file_hash_entry * to avoid aliasing issues.
2185         * configure.ac: Don't define ENABLE_CHECKING whenever
2186         --enable-checking is seen, instead use similar --enable-checking=yes
2187         vs. --enable-checking=release default as gcc/ subdir has and
2188         define ENABLE_CHECKING if ENABLE_CHECKING is defined in gcc/.
2189         Define ENABLE_VALGRIND_CHECKING if requested.
2190         * lex.c (new_buff): If ENABLE_VALGRIND_CHECKING, put _cpp_buff
2191         struct first in the allocated buffer and result->base after it.
2192         (_cpp_free_buff): If ENABLE_VALGRIND_CHECKING, free buff itself
2193         instead of buff->base.
2194         * config.in: Regenerated.
2195         * configure: Regenerated.
2197 2013-02-13  Ed Smith-Rowland  <3dw4rd@verizon.net>
2199         PR c++/55582
2200         * lex.c (lex_raw_string): Allow string literal with suffix
2201         beginning with 's' to be parsed as a C++11 user-defined literal.
2203 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
2205         Update copyright years.
2207 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
2209         PR c++/54526 (again)
2210         * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2.
2212 2013-01-03  Marc Glisse  <marc.glisse@inria.fr>
2214         PR bootstrap/50177
2215         * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type.
2216         (new_linemap): Likewise.
2217         (linemap_enter_macro): Likewise.
2219 2012-12-03  Jakub Jelinek  <jakub@redhat.com>
2221         PR bootstrap/55380
2222         PR other/54691
2223         * files.c (read_file_guts): Allocate extra 16 bytes instead of
2224         1 byte at the end of buf.  Pass size + 16 instead of size
2225         to _cpp_convert_input.
2226         * charset.c (_cpp_convert_input): Reallocate if there aren't
2227         at least 16 bytes beyond to.len in the buffer.  Clear 16 bytes
2228         at to.text + to.len.
2230 2012-11-21  Steve Ellcey  <sellcey@mips.com>
2232         PR pch/55399
2233         * files.c (pch_open_file): Fix check for implicit_preinclude.
2235 2012-11-16  Simon Baldwin  <simonb@google.com>
2237         * include/cpplib.h (struct cpp_options): Add canonical_system_headers.
2238         * files.c (find_file_in_dir): Call maybe_shorter_path() only if
2239         canonical_system_headers is set.
2240         * init.c (cpp_create_reader): Initialize canonical_system_headers.
2241         * configure.ac: Add new --enable-canonical-system-headers.
2242         * configure: Regenerate.
2243         * config.in: Regenerate.
2245 2012-11-09  Ed Smith-Rowland  <3dw4rd@verizon.net>
2247         PR c++/54413
2248         * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg.
2249         (cpp_interpret_int_suffix): Add cpp_reader* arg.
2250         * init.c (cpp_create_reader): Iitialize new flags.
2251         * expr.c (interpret_float_suffix): Use new flags.
2252         (cpp_interpret_float_suffix): Add cpp_reader* arg.
2253         (interpret_int_suffix): Use new flags.
2254         (cpp_interpret_int_suffix): Add cpp_reader* arg.
2255         (cpp_classify_number): Adjust calls to interpret_x_suffix.
2257 2012-10-23  Ian Bolton  <ian.bolton@arm.com>
2258             Jim MacArthur  <jim.macarthur@arm.com>
2259             Marcus Shawcroft  <marcus.shawcroft@arm.com>
2260             Nigel Stephens  <nigel.stephens@arm.com>
2261             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2262             Richard Earnshaw  <rearnsha@arm.com>
2263             Sofiane Naci  <sofiane.naci@arm.com>
2264             Stephen Thomas  <stephen.thomas@arm.com>
2265             Tejas Belagod  <tejas.belagod@arm.com>
2266             Yufeng Zhang  <yufeng.zhang@arm.com>
2268         * configure.ac: Enable AArch64.
2269         * configure: Regenerate.
2271 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
2273         * files.c (struct _cpp_file): Add implicit_preinclude.
2274         (pch_open_file): Allow a previously opened implicitly included
2275         file.
2276         (_cpp_find_file): Add implicit_preinclude argument.  Free file and
2277         do not call open_file_failed if implicit_preinclude.  Store
2278         implicit_preinclude value.
2279         (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date):
2280         Update calls to _cpp_find_file.
2281         (_cpp_stack_include): Handle IT_DEFAULT.
2282         (cpp_push_default_include): New.
2283         * include/cpplib.h (cpp_push_default_include): Declare.
2284         * init.c (cpp_read_main_file): Update call to _cpp_find_file.
2285         * internal.h (enum include_type): Add IT_DEFAULT.
2286         (_cpp_find_file): Update prototype.
2288 2012-10-15  Tobias Burnus  <burnus@net-b.de>
2290         * files.c (read_file_guts, _cpp_save_file_entries): Free memory
2291         before returning.
2292         * lex.c (warn_about_normalization): Ditto.
2293         * mkdeps.c (deps_save): Ditto.
2294         * pch.c (cpp_valid_state): Ditto.
2296 2012-10-04  Florian Weimer  <fweimer@redhat.com>
2298         * directives.c (do_pragma_warning_or_error): New.
2299         (do_pragma_warning): New.
2300         (do_pragma_error): New.
2301         (_cpp_init_internal_pragmas): Register new pragmas.
2303 2012-09-25  Dehao Chen  <dehao@google.com>
2305         PR middle-end/54704
2306         * line-map.c (location_adhoc_data_hash): Fix the hash function.
2308 2012-09-25  Dehao Chen  <dehao@google.com>
2310         PR middle-end/54645
2311         * include/line-map.h (location_adhoc_data): Move location_adhoc_data
2312         into GC.
2313         (location_adhoc_data_map): Likewise.
2314         (line_maps): Likewise.
2315         (rebuild_location_adhoc_htab): New Function.
2316         * line-map.c (+rebuild_location_adhoc_htab): new Funcion.
2317         (get_combined_adhoc_loc): Move location_adhoc_data into GC.
2318         (location_adhoc_data_fini): Likewise.
2319         (linemap_init): Likewise.
2320         (location_adhoc_data_init): Remove Function.
2322 2012-09-19  Dehao Chen  <dehao@google.com>
2324         * include/line-map.h (MAX_SOURCE_LOCATION): New value.
2325         (location_adhoc_data_fini): New.
2326         (get_combined_adhoc_loc): New.
2327         (get_data_from_adhoc_loc): New.
2328         (get_location_from_adhoc_loc): New.
2329         (location_adhoc_data_map): New.
2330         (COMBINE_LOCATION_DATA): New.
2331         (IS_ADHOC_LOC): New.
2332         (expanded_location): New field.
2333         (line_maps): New field.
2334         * line-map.c (location_adhoc_data): New.
2335         (location_adhoc_data_hash): New.
2336         (location_adhoc_data_eq): New.
2337         (location_adhoc_data_update): New.
2338         (get_combined_adhoc_loc): New.
2339         (get_data_from_adhoc_loc): New.
2340         (get_location_from_adhoc_loc): New.
2341         (location_adhoc_data_init): New.
2342         (location_adhoc_data_fini): New.
2343         (linemap_init): Initialize location_adhoc_data.
2344         (linemap_lookup): Change to use new location.
2345         (linemap_ordinary_map_lookup): Likewise.
2346         (linemap_macro_map_lookup): Likewise.
2347         (linemap_macro_map_loc_to_def_point): Likewise.
2348         (linemap_macro_map_loc_unwind_toward_spel): Likewise.
2349         (linemap_get_expansion_line): Likewise.
2350         (linemap_get_expansion_filename): Likewise.
2351         (linemap_location_in_system_header_p): Likewise.
2352         (linemap_location_from_macro_expansion_p): Likewise.
2353         (linemap_macro_loc_to_spelling_point): Likewise.
2354         (linemap_macro_loc_to_def_point): Likewise.
2355         (linemap_macro_loc_to_exp_point): Likewise.
2356         (linemap_resolve_location): Likewise.
2357         (linemap_unwind_toward_expansion): Likewise.
2358         (linemap_unwind_to_first_non_reserved_loc): Likewise.
2359         (linemap_expand_location): Likewise.
2360         (linemap_dump_location): Likewise.
2361         (linemap_line_start): Likewise.
2363 2012-05-25  Dodji Seketeli  <dodji@redhat.com>
2365         PR preprocessor/53469
2366         * directives.c (do_pragma): Use the virtual location for the
2367         pragma token, instead of its spelling location.
2369 2012-08-14   Diego Novillo  <dnovillo@google.com>
2371         Merge from cxx-conversion branch.  Configury.
2373         * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
2374         * configure.ac: Likewise.
2375         * configure: Regenerate.
2377 2012-08-14   Lawrence Crowl  <crowl@google.com>
2379         Merge from cxx-conversion branch.  New C++ hash table.
2381         * include/symtab.h (typedef struct ht hash_table): Change the typedef
2382         name to cpp_hash_table.  Update all users of the typedef.
2384 2012-07-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
2386         * include/line-map.h (line_map_macro): Use the "atomic" GTY option
2387         for the macro_locations field.
2389 2011-06-19  Uros Bizjak  <ubizjak@gmail.com>
2391         * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
2392         __builtin_ia32_pcmpestri128 instead of asm.
2394 2012-06-04  Dimitrios Apostolou <jimis@gmx.net>
2396         * line-map.c (linemap_enter_macro): Don't zero max_column_hint in
2397         every macro. This improves performance by reducing the number of
2398         reallocations when track-macro-expansion is on.
2400 2012-06-04  Dodji Seketeli  <dodji@redhat.com>
2402         PR preprocessor/53463
2403         * line-map.c (linemap_location_in_system_header_p): For built-in
2404         macro tokens, check the first expansion point location that is not
2405         for a token coming from a built-in macro.
2407 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
2409         * directives.c: Fix typos.
2410         * include/line-map.h: Fix typos.
2411         * line-map.c: Fix typos.
2412         * macro.c: Fix typos.
2414 2012-05-25  Dodji Seketeli  <dodji@redhat.com>
2416         PR bootstrap/53459
2417         * lex.c (search_line_fast): Avoid unused local typedefs to simulate
2418         a static assertion.
2420 2012-05-29  Dodji Seketeli  <dodji@redhat.com>
2422         PR preprocessor/53229
2423         * internal.h (cpp_reader::set_invocation_location): Remove.
2424         (cpp_reader::about_to_expand_macro_p): New member flag.
2425         * directives.c (do_pragma):  Remove Kludge as
2426         pfile->set_invocation_location is no more.
2427         * macro.c (cpp_get_token_1): Do away with the use of
2428         cpp_reader::set_invocation_location.  Just collect the macro
2429         expansion point when we are about to expand the top-most macro.
2430         Do not override cpp_reader::about_to_expand_macro_p.
2431         This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding
2432         properly handle locations of expansion points.
2433         (cpp_get_token_with_location): Adjust, as
2434         cpp_reader::set_invocation_location is no more.
2435         (paste_tokens): Take a virtual location parameter for
2436         the LHS of the pasting operator.  Use it in diagnostics.  Update
2437         comments.
2438         (paste_all_tokens): Tighten the assert.  Propagate the location of
2439         the expansion point when no virtual locations are available.
2440         Pass the virtual location to paste_tokens.
2441         (in_macro_expansion_p): New static function.
2442         (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p
2443         flag until we really start expanding the macro.
2445 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
2447         PR preprocessor/7263
2448         * include/cpplib.h (cpp_classify_number): Take a location
2449         parameter.
2450         * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic
2451         macros that take a location parameter.
2452         (cpp_classify_number): Take a (virtual) location parameter.  Use
2453         it for diagnostics.  Adjust comments.
2454         (eval_token): Take a location parameter.  Pass it to
2455         cpp_classify_number and to diagnostic routines.
2456         (_cpp_parse_expr): Use virtual locations of tokens when parsing
2457         expressions.  Pass a virtual location to eval_token and to
2458         diagnostic routines.
2460 2012-05-10  Tristan Gingold  <gingold@adacore.com>
2462         * expr.c (interpret_float_suffix): Add a guard.
2464 2012-05-02  Dodji Seketeli  <dodji@redhat.com>
2466         Properly initialize cpp_context in destringize_and_run
2467         * directives.c (destringize_and_run): Properly initialize the new
2468         context.
2469         * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
2470         the initial base context, which has the same life time as the
2471         current instance of cpp_file.
2473 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2474             Dodji Seketeli  <dodji@seketeli.org>
2476         PR c++/52974
2477         * libcpp/files.c (maybe_shorter_path): New.
2478         (find_file_in_dir): Use it.
2480 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
2482         Switch -ftrack-macro-expansion=2 on by default.
2483         * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
2484         by default.  Add comments.
2486         Strip "<built-in>" loc from displayed expansion context
2487         * include/line-map.h (linemap_unwind_toward_expansion): Fix typo
2488         in comment.
2489         (linemap_unwind_to_first_non_reserved_loc): Declare new function.
2490         * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define
2491         new function.
2493         Fix expansion point loc for macro-like tokens
2494         * macro.c (macro_of_context): New static function.
2495         (_cpp_push_token_context, push_extended_tokens_context): If the
2496         macro argument is NULL, it means we are continuing the expansion
2497         of the current macro, if any.  Update comments.
2498         (_cpp_pop_context): Re-enable expansion of the macro only when we
2499         are really out of the context of the current expansion.
2501         Fix token pasting with -ftrack-macro-expansion
2502         * macro.c (paste_all_tokens): Put the token resulting from pasting
2503         into an extended token context with -ftrack-macro-location is in
2504         effect.
2506         Fix cpp_sys_macro_p with -ftrack-macro-expansion
2507         * macro.c (cpp_sys_macro_p):  Support -ftrack-macro-expansion.
2509 2012-04-29  Dodji Seketeli  <dodji@redhat.com>
2511         * lex.c (lex_raw_string): Change C++ style comments into C style
2512         comments.
2513         (lex_string): Likewise.
2515 2012-04-27   Ollie Wild  <aaw@google.com>
2517         * include/cpplib.h (struct cpp_options): Add new field,
2518         warn_literal_suffix.
2519         (CPP_W_LITERAL_SUFFIX): New enum.
2520         * init.c (cpp_create_reader): Default initialization of
2521         warn_literal_suffix.
2522         * lex.c (lex_raw_string): Treat user-defined literals which don't
2523         begin with '_' as separate tokens and produce a warning.
2524         (lex_string): Ditto.
2526 2012-04-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2528         * line-map.c (linemap_resolve_location): Synchronize comments with
2529         those in line-map.h.
2530         * include/line-map.h (linemap_resolve_location): Fix spelling in
2531         comment.
2533 2012-03-22  Richard Earnshaw  <rearnsha@arm.com>
2535         * lex.c (search_line_fast): Provide Neon-optimized version for ARM.
2537 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2539         * lex.c: Remove Solaris 8 reference.
2541 2012-02-14  Walter Lee  <walt@tilera.com>
2543         * configure.ac: Require 64-bit hwint for tilegx and tilepro.
2544         * configure: Regenerate.
2546 2012-01-09  Richard Guenther  <rguenther@suse.de>
2548         * macro.c (_cpp_builtin_macro_text): Remove unused variable map.
2550 2012-01-09  Gary Funck  <gary@intrepid.com>
2552         PR preprocessor/33919
2553         * files.c (_cpp_get_file_name): New. Implement file name
2554         access function.
2555         * internal.h (_cpp_get_file_name): New prototype.
2556         * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
2557         to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
2559 2012-01-03  Olivier Hainque  <hainque@adacore.com>
2561         * system.h: Prior to #define, #undef fopen and freopen unconditionally.
2563 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
2565         * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
2566         (CLK_STDC1X): Change to CLK_STDC11.
2567         * init.c (lang_defaults): Update comments.
2568         (cpp_init_builtins): Update language tests.  Use 201112L for C11
2569         __STDC_VERSION__.
2571 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
2573         * configure: Regenerate.
2575 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
2577         * configure: Regenerate.
2579 2011-12-07  Jakub Jelinek  <jakub@redhat.com>
2581         PR bootstrap/50237
2582         * internal.h (_cpp_init_lexer): New prototype.
2583         * init.c (init_library): Call it.
2584         * lex.c (init_vectorized_lexer): Remove constructor attribute,
2585         add inline keyword.
2586         (HAVE_init_vectorized_lexer): Define.
2587         (_cpp_init_lexer): New function.
2589 2011-12-03  Dodji Seketeli  <dodji@redhat.com>
2591         * macro.c (tokens_buff_remove_last_token)
2592         (tokens_buff_put_token_to): Add an 'inline' function specifier to
2593         the prototype.
2595 2011-11-22   Diego Novillo  <dnovillo@google.com>
2597         * include/line-map.h (linemap_dump): Declare.
2598         (line_table_dump): Declare.
2599         * line-map.c (linemap_dump): New.
2600         (line_table_dump): New.
2602 2011-11-21  Ed Smith-Rowland  <3dw4rd@verizon.net>
2604         PR c++/50958
2605         * expr.c (cpp_userdef_char_remove_type): Fix typo.
2607 2011-11-03  Michael Matz  <matz@suse.de>
2609         PR bootstrap/50857
2610         * configure.ac: Check for -fno-exceptions -fno-rtti.
2611         * configure: Regenerate.
2612         * Makefile.in (NOEXCEPTION_FLAGS): New flag.
2613         (ALL_CXXFLAGS): Use it.
2615 2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
2617         * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
2619 2011-11-02  Jason Merrill  <jason@redhat.com>
2621         PR c++/50810
2622         * configure.ac: Add -Wno-narrowing to warning options.
2624 2011-10-31  Jason Merrill  <jason@redhat.com>
2626         PR libstdc++/1773
2627         * init.c (cpp_init_builtins): Set __cplusplus for C++11.
2629         PR c++/50920
2630         * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
2631         CLK_GNUCXX0X to CLK_GNUCXX11.
2633 2011-10-26  Ed Smith-Rowland  <3dw4rd@verizon.net>
2635         Implement C++11 user-defined literals.
2636         * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
2637         cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
2638         cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
2639         cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
2640         (cpp_classify_number): Classify unrecognized tokens as user-defined
2641         literals.
2642         * include/cpplib.h: Add new tokens for user-defined literals.
2643         * init.c: Add new preprocessor flag (cxx11).
2644         * lex.c: (lex_string, lex_raw_string): Handle user-defined literals
2645         including concatenation and promotion with suffixes.
2647 2011-10-24  Dodji Seketeli  <dodji@redhat.com>
2649         * line-map.c (linemap_macro_map_lookup): Fix logic.
2651 2011-10-24  Dodji Seketeli  <dodji@redhat.com>
2653         * include/line-map.h (linemap_expand_location): Take a line table
2654         parameter.  Update comment.
2655         (linemap_resolve_location): Update comment.
2656         (linemap_expand_location_full): Remove.
2657         * line-map.c (linemap_resolve_location):  Handle reserved
2658         locations; return a NULL map in those cases.
2659         (linemap_expand_location): If location is reserved, return a
2660         zeroed expanded location.  Update comment.  Take a line table to
2661         assert that the function takes non-virtual locations only.
2662         (linemap_expand_location_full): remove.
2663         (linemap_dump_location): Handle the fact that
2664         linemap_resolve_location can return NULL line maps when the
2665         location resolves to a reserved location.
2667         * line-map.c (linemap_macro_map_lookup): Fix logic.
2669 2011-10-22  Dodji Seketeli  <dodji@redhat.com>
2671         PR bootstrap/50778
2672         * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the
2673         context to act upon.
2674         * lex.c (_cpp_remaining_tokens_num_in_context): Likewise.  Update
2675         comment.
2676         (cpp_token_from_context_at): Likewise.
2677         (cpp_peek_token): Use the context to peek tokens from.
2679 2011-10-20  Dodji Seketeli  <dodji@redhat.com>
2681         PR bootstrap/50801
2682         * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
2683         number of tokens.
2685 2011-10-18  Dodji Seketeli  <dodji@redhat.com>
2687         PR bootstrap/50760
2688         * include/line-map.h (struct linemap_stats): Change the type of
2689         the members from size_t to long.
2690         * macro.c (macro_arg_token_iter_init): Unconditionally initialize
2691         iter->location_ptr.
2693 2011-10-17  Dodji Seketeli  <dodji@redhat.com>
2695         * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
2696         variable without using it if ENABLE_CHECKING is not defined.  Mark
2697         the LOCATION parameter as being unused.
2699 2011-10-15  Tom Tromey  <tromey@redhat.com>
2700             Dodji Seketeli  <dodji@redhat.com>
2702         * include/line-map.h (struct line_maps::alloced_size_for_request):
2703         New member.
2704         * line-map.c (new_linemap): Use set->alloced_size_for_request to
2705         get the actual allocated size of line maps.
2707 2011-10-15  Tom Tromey  <tromey@redhat.com>
2708             Dodji Seketeli  <dodji@redhat.com>
2710         * line-map.h (struct linemap_stats): Declare new struct.
2711         (linemap_get_statistics): Declare ...
2712         * line-map.c (linemap_get_statistics):  ... new function.
2713         * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
2714         Declare new counters.
2715         (enter_macro_context, replace_args): Update
2716         num_macro_tokens_counter.
2717         (cpp_get_token_1): Update num_expanded_macros_counter.
2719 2011-10-15  Tom Tromey  <tromey@redhat.com>
2720             Dodji Seketeli  <dodji@redhat.com>
2722         * include/cpplib.h (struct cpp_options)<debug>: New struct member.
2723         * include/line-map.h (linemap_dump_location): Declare ...
2724         * line-map.c (linemap_dump_location): ... new function.
2726 2011-10-15  Tom Tromey  <tromey@redhat.com>
2727             Dodji Seketeli  <dodji@redhat.com>
2729         * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
2730         New option.
2731         * internal.h (struct macro_context): New struct.
2732         (enum context_tokens_kind): New enum.
2733         (struct cpp_context)<tokens_kind>: New member of type enum
2734         context_tokens_kind.
2735         (struct cpp_context)<macro>: Remove this.  Replace it with an enum
2736         of macro and  macro_context.
2737         (struct cpp_context)<direct_p>: Remove.
2738         (_cpp_remaining_tokens_num_in_context): Declare new function.
2739         * directives.c (destringize_and_run): Adjust.
2740         * lex.c (_cpp_remaining_tokens_num_in_context)
2741         (_cpp_token_from_context_at): Define new functions
2742         (cpp_peek_token): Use them.
2743         * init.c (cpp_create_reader): Initialize the base context to zero.
2744         (_cpp_token_from_context_at): Define new static function.
2745         (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
2746         _cpp_token_from_context_at.
2747         * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
2748         members.
2749         (enum macro_arg_token_kind): New enum.
2750         (struct macro_arg_token_iter): New struct.
2751         (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
2752         (alloc_expanded_arg_mem, ensure_expanded_arg_room)
2753         (delete_macro_args, set_arg_token, get_arg_token_location)
2754         (arg_token_ptr_at, macro_arg_token_iter_init)
2755         (macro_arg_token_iter_get_token)
2756         (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
2757         (expanded_token_index, tokens_buff_new, tokens_buff_count)
2758         (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
2759         (tokens_buff_add_token, tokens_buff_remove_last_token)
2760         (reached_end_of_context, consume_next_token_from_context): New
2761         static functions.
2762         (cpp_get_token_1): New static function. Split and extended from
2763         cpp_get_token.  Use reached_end_of_context and
2764         consume_next_token_from_context.  Unify its return point.  Move
2765         the location tweaking from cpp_get_token_with_location in here.
2766         (cpp_get_token): Use cpp_get_token_1
2767         (stringify_arg): Use the new arg_token_at.
2768         (paste_all_tokens): Support tokens coming from extended tokens
2769         contexts.
2770         (collect_args): Return the number of collected arguments, by
2771         parameter.  Store virtual locations of tokens that constitute the
2772         collected args.
2773         (funlike_invocation_p): Return the number of collected arguments,
2774         by parameter.
2775         (enter_macro_context): Add a parameter for macro expansion point.
2776         Pass it to replace_args and to the "used" cpp callback.  Get the
2777         number of function-like macro arguments from funlike_invocation_p,
2778         pass it to the new delete_macro_args to free the memory used by
2779         macro args.  When -ftrack-macro-expansion is in effect, for macros
2780         that have no arguments, create a macro map for the macro expansion
2781         and use it to allocate proper virtual locations for tokens
2782         resulting from the expansion.  Push an extended tokens context
2783         containing the tokens resulting from macro expansion and their
2784         virtual locations.
2785         (replace_args): Rename the different variables named 'count' into
2786         variables with more meaningful names.  Create a macro map;
2787         allocate virtual locations of tokens resulting from this
2788         expansion.  Use macro_arg_token_iter to iterate over tokens of a
2789         given macro.  Handle the case of the argument of
2790         -ftrack-macro-expansion being < 2.  Don't free macro arguments
2791         memory resulting from expand_arg here, as these are freed by the
2792         caller of replace_arg using delete_macro_args now.  Push extended
2793         token context.
2794         (next_context, push_ptoken_context, _cpp_push_token_context)
2795         (_cpp_push_text_context): Properly initialize the context.
2796         (expand_arg): Use the new alloc_expanded_arg_mem,
2797         push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
2798         (_cpp_pop_context): Really free the memory held by the context.
2799         Handle freeing memory used by extended tokens contexts.
2800         (cpp_get_token_with_location): Use cpp_get_token_1.
2801         (cpp_sys_macro_p): Adjust.
2802         (_cpp_backup_tokens): Support the new kinds of token contexts.
2803         * traditional.c (recursive_macro): Adjust.
2805 2011-10-15  Tom Tromey  <tromey@redhat>
2806             Dodji Seketeli  <dodji@redhat.com>
2808         * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
2809         member.
2810         (MAX_SOURCE_LOCATION): New constant.
2811         (struct line_map_ordinary, struct line_map_macro): New structs.
2812         (struct line_map): Turn this into a union of the two above.  Add
2813         comments.
2814         (struct maps_info): New struct.
2815         (struct line_maps)<info_ordinary, info_macro>: Two new fields.
2816         These now carry the map information that was previously scattered
2817         in struct line_maps.
2818         (struct map_info::allocated): Fix comment.
2819         (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
2820         (ORDINARY_MAP_STARTING_LINE_NUMBER)
2821         (ORDINARY_MAP_INCLUDER_FILE_INDEX)
2822         (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
2823         (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
2824         (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
2825         (MACRO_MAP_EXPANSION_POINT_LOCATION)
2826         (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
2827         (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
2828         (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
2829         (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
2830         (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
2831         (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
2832         (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
2833         (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
2834         (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
2835         (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
2836         (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
2837         information.
2838         (linemap_check_ordinary, linemap_assert)
2839         (linemap_location_before_p): New macros.
2840         (linemap_position_for_line_and_column)
2841         (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
2842         (linemap_macro_expansion_map_p)
2843         (linemap_macro_map_loc_to_def_point)
2844         (linemap_macro_map_loc_unwind_once)
2845         (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
2846         (linemap_get_source_line linemap_get_source_column)
2847         (linemap_map_get_macro_name, linemap_get_file_path)
2848         (linemap_location_in_system_header_p)
2849         (linemap_location_from_macro_expansion_p): Declare new functions.
2850         (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
2851         (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
2852         accessors act on ordinary maps only.
2853         (INCLUDED_FROM): Return NULL for main files; use the new
2854         accessors.
2855         (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
2856         (struct expanded_location): Move here from gcc/input.h
2857         (linemap_resolve_location, linemap_expand_location)
2858         (linemap_expand_location_full): Declare new functions.
2859         * line-map.c: Include cpplib.h, internal.h
2860         (linemap_enter_macro, linemap_add_macro_token)
2861         (linemap_get_expansion_line, linemap_get_expansion_filename): New
2862         functions that are private to libcpp.
2863         (linemap_assert): New macro.
2864         (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
2865         (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
2866         (linemap_macro_map_loc_unwind_toward_spelling)
2867         (linemap_macro_map_loc_to_exp_point)
2868         (first_map_in_common_1, first_map_in_common): New static
2869         functions.
2870         (new_linemap): Define new static functions.  Extracted and
2871         enhanced from ...
2872         (linemap_add): ... here.  Use linemap_assert in lieu of abort
2873         previously.
2874         (linemap_tracks_macro_expansion_locs_p)
2875         (linemap_add_macro_token, linemap_macro_expansion_map_p)
2876         (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
2877         (linemap_macro_map_loc_to_def_point)
2878         (linemap_macro_map_loc_unwind_once)
2879         (linemap_step_out_once, linemap_map_get_index)
2880         (linemap_get_source_line,linemap_get_source_column)
2881         (linemap_get_file_path, linemap_map_get_macro_name)
2882         (linemap_location_in_system_header_p)
2883         (linemap_location_originated_from_system_header_p)
2884         (linemap_location_from_macro_expansion_p)
2885         (linemap_tracks_macro_expansion_locs_p)
2886         (linemap_resolve_location, linemap_expand_location)
2887         (linemap_expand_location_full)
2888         (linemap_tracks_macro_expansion_locs_p)
2889         (linemap_position_for_line_and_column, linemap_compare_locations):
2890         Define new public functions.
2891         (linemap_init): Initialize ordinary and macro maps information in
2892         the map set.
2893         (linemap_check_files_exited): Use the new accessors.
2894         (linemap_free): Remove this dead code.
2895         (linemap_line_start): Assert this uses an ordinary map.  Adjust to
2896         use the new ordinary map accessors and data structures.  Don't
2897         overflow past the lowest possible macro token's location.
2898         (linemap_position_for_column): Assert the ordinary maps of the map
2899         set are really ordinary.  Use ordinary map accessors.
2900         (linemap_lookup): Keep the same logic but generalize to allow
2901         lookup of both ordinary and macro maps.  Do not crash when called
2902         with an empty line table.
2903         * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
2904         new API of line-map.h.
2905         * directives.c (start_directive, do_line, do_linemarker)
2906         (do_linemarker): Likewise.
2907         * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
2908         (make_cpp_dir, cpp_make_system_header): Likewise.
2909         * init.c (cpp_read_main_file): Likewise.
2910         * internal.h (CPP_INCREMENT_LINE): Likewise.
2911         (linemap_enter_macro, linemap_add_macro_token)
2912         (linemap_get_expansion_line, linemap_get_expansion_filename): New
2913         functions private to libcpp.
2914         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
2915         (skip_line_comment, skip_whitespace, lex_raw_string)
2916         (_cpp_lex_direct): Likewise.
2917         * macro.c (_cpp_builtin_macro_text): Likewise.
2918         (_cpp_aligned_alloc): Initialize the new name member of the macro.
2919         * traditional.c (copy_comment, _cpp_scan_out_logical_line):
2920         Likewise.
2921         * errors.c (cpp_diagnostic): Adjust to new linemap API.
2923 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
2925         * line-map.c (linemap_add): Assert that reason must not be
2926         LC_RENAME when called for the first time on a "main input file".
2928 2011-08-22  Gabriel Charette  <gchare@google.com>
2930         * init.c (cpp_create_reader): Inititalize forced_token_location_p.
2931         * internal.h (struct cpp_reader): Add field forced_token_location_p.
2932         * lex.c (_cpp_lex_direct): Use forced_token_location_p.
2933         (cpp_force_token_locations): New.
2934         (cpp_stop_forcing_token_locations): New.
2936 2011-08-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2938         PR libstdc++/1773
2939         * init.c (cpp_init_builtins): Define __cplusplus 19971L.
2941 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
2943         * include/cpplib.h (struct cpp_options): Fix typo.
2945 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
2947         * include/cpplib.h (struct cpp_options): Add rliterals.
2948         * init.c  (struct lang_flags, lang_defaults): Add rliterals.
2949         (cpp_set_lang): Set rliterals option.
2950         (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
2951         * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
2953 2011-08-15  Gabriel Charette  <gchare@google.com>
2955         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
2956         Update all users to use linemap_position_for_column instead.
2958 2011-07-28  Gabriel Charette  <gchare@google.com>
2960         * include/line-map.h (struct line_maps):
2961         Remove unused field last_listed. Update all users.
2963 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
2965         * configure.ac: Set need_64bit_hwint to yes for x86 targets.
2966         * configure: Regenerated.
2968 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2970         * system.h [__cplusplus]: Wrap C function declarations in extern "C".
2972 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2973             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2975         PR bootstrap/49794
2976         * configure.ac: Test AM_ICONV with CXX.
2977         * configure: Regenerate.
2978         * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
2980 2011-07-15  Dodji Seketeli  <dodji@redhat.com>
2982         * directives.c (struct if_stack): Use source_location as type
2983         here.
2984         * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
2985         indent, def_pragma, used_define, used_undef>: Properly use
2986         source_location as parameter type, rather than unsigned int.
2988 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2990         PR target/39150
2991         * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
2992         like i[34567]86-*-solaris2.1[0-9]*.
2993         * configure: Regenerate.
2995 2011-06-16  Jason Merrill  <jason@redhat.com>
2997         PR c++/45399
2998         * lex.c (lex_raw_string): Don't check for embedded NUL.
3000 2011-06-06  Dodji Seketeli  <dodji@redhat.com>
3002         PR preprocessor/48532
3003         * directives.c (do_pragma): Don't forget the invocation location
3004         when parsing the pragma name of a namespaced pragma directive.
3006 2011-05-29  John Tytgat  <John.Tytgat@aaug.net>
3008         * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
3010 2011-05-22  Uros Bizjak  <ubizjak@gmail.com>
3012         PR target/49104
3013         * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
3014         is defined.  Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
3016 2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
3018         * system.h (ENUM_BITFIELD): Remove.
3020 2011-04-24  Jakub Jelinek  <jakub@redhat.com>
3022         PR preprocessor/48740
3023         * lex.c (lex_raw_string): When raw string ends with
3024         ??) followed by raw prefix and ", ensure it is preprocessed
3025         with ??) rather than ??].
3027 2011-04-20  Jim Meyering  <meyering@redhat.com>
3029         * files.c (destroy_cpp_file): Remove useless if-before-free.
3030         * init.c (cpp_destroy): Likewise.
3031         * macro.c (replace_args): Likewise.
3032         * pch.c (cpp_valid_state): Likewise.
3034 2011-03-25  Kai Tietz  <ktietz@redhat.com>
3036         * files.c (file_hash_eq): Use filename_cmp
3037         instead of strcmp.
3038         (nonexistent_file_hash_eq): Likewise.
3039         (remap_filename): Likewise.
3040         Handle absolute DOS-path,
3041         (append_file_to_dir): Check for IS_DIR_SEPARATOR
3042         instead of slash.
3043         (read_name_map): Likewise.
3044         * linemap.c (linemap_add): Use filename_cmp
3045         instead of strcmp.
3046         * mkdeps.c (apply_vpath): Use filename_ncmp
3047         instead of strncmp.
3048         (deps_restore): Use filename_cmp instead of
3049         strcmp.
3050         * init.c (read_original_directory): Use
3051         IS_DIR_SEPARATOR instead of checking for slash.
3053 2011-03-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
3055         PR preprocessor/48192
3056         * directives.c (do_ifdef): Do not consider conditional macros as
3057         being defined.
3058         (do_ifndef): Ditto.
3059         * expr.c (parse_defined): Ditto.
3061 2011-03-18  Richard Henderson  <rth@redhat.com>
3063         PR bootstrap/45381
3064         * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
3066 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
3067             Jakub Jelinek  <jakub@redhat.com>
3069         PR preprocessor/39213
3070         * directives.c (end_directive): Call _cpp_remove_overlay for deferred
3071         pragmas as well in traditional mode.
3073 2010-11-17  Ian Lance Taylor  <iant@google.com>
3075         PR bootstrap/45538
3076         * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS.  Remove switch of
3077         AC_LANG based on ENABLE_BUILD_WITH_CXX.
3079 2010-11-16  Kai Tietz  <kai.tietz@onevision.com>
3081         PR preprocessor/17349
3082         * lex.c (save_comment): Handle in argument passing c++
3083         comments special.
3085 2010-11-02  Ian Lance Taylor  <iant@google.com>
3087         * configure.ac: Use AC_SYS_LARGEFILE.
3088         * configure: Rebuild.
3089         * config.in: Rebuild.
3091 2010-10-19  Basile Starynkevitch  <basile@starynkevitch.net>
3093         * line-map.h (source_location): Remove obsolete comment
3094         mentioning location_s.
3096 2010-09-29  Kai Tietz  <kai.tietz@onevision.com>
3098         PR preprocessor/45362
3099         * directives.c (cpp_pop_definition): Make static.
3100         (do_pragma_push_macro): Reworked to store text
3101         definition.
3102         (do_pragma_pop_macro): Add free text definition.
3103         (cpp_push_definition): Removed.
3104         * include/cpplib.h (cpp_push_definition): Removed.
3105         (cpp_pop_definition): Likewise.
3106         * internal.h (def_pragma_macro): Remove member 'value'
3107         and add new members 'definition', 'line',
3108         'syshdr', 'sued' and 'is_undef'.
3109         * pch.c (_cpp_restore_pushed_macros): Rework to work
3110         on text definition and store additional macro flags.
3111         (_cpp_save_pushed_macros): Likewise.
3113 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
3115         * include/cpplib.h (cpp_options): Rename warn_deprecated,
3116         warn_traditional, warn_long_long and pedantic.
3117         * directives.c (directive_diagnostics, _cpp_handle_directive):
3118         Update names of cpp_options members.
3119         * expr.c (cpp_classify_number, eval_token): Update names of
3120         cpp_options members.
3121         * init.c (cpp_create_reader, post_options): Update names of
3122         cpp_options members.
3123         * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
3124         cpp_options members.
3125         * macro.c (parse_params): Update names of cpp_options members.
3127 2010-09-15  Ian Lance Taylor  <iant@google.com>
3129         * init.c: Fix type name in comment.
3131 2010-08-31  Jakub Jelinek  <jakub@redhat.com>
3133         PR preprocessor/45457
3134         * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
3135         needed.
3136         * directives.c (do_ifdef, do_ifndef): Likewise.
3138 2010-08-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3140         * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
3142 2010-08-24  Richard Henderson  <rth@redhat.com>
3144         PR bootstrap/45376
3145         * configure.ac (HAVE_SSE4): New check.
3146         * configure, config.in: Rebuild.
3147         * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
3149 2010-08-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3151         * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
3152         etc. on Solaris 2/x86.
3154 2010-08-21  Richard Henderson  <rth@redhat.com>
3155             Andi Kleen <ak@linux.intel.com>
3156             David S. Miller  <davem@davemloft.net>
3158         * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
3159         (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
3160         (ptrdiff_t): Check via AC_CHECK_TYPE.
3161         * config.in, configure: Rebuild.
3162         * system.h: Include stdint.h, if available.
3163         * lex.c (WORDS_BIGENDIAN): Provide default.
3164         (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
3165         acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
3166         search_line_sse2, search_line_sse42, init_vectorized_lexer,
3167         search_line_fast): New.
3168         (_cpp_clean_line): Use search_line_fast.  Restructure the fast
3169         loop to make it clear when we're leaving the loop.  Stay in the
3170         fast loop for non-trigraph '?'.
3172 2010-06-11  Jakub Jelinek  <jakub@redhat.com>
3174         * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
3175         callback.
3176         (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
3177         (cpp_macro_definition): Remove const qual from second argument.
3178         * macro.c (enter_macro_context): Call user_builtin_macro callback for
3179         NODE_BUILTIN !NODE_USED macros.
3180         (warn_of_redefinition): Likewise.  Remove const qual from second
3181         argument.
3182         (cpp_macro_definition): Likewise.
3183         * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
3184         for NODE_BUILTIN !NODE_USED macros.
3186 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
3188         * include/cpplib.h (struct cpp_options): Remove show_column.
3189         * init.c (cpp_create_reader, post_options): Don't set show_column.
3191 2010-06-09  Joern Rennecke  <joern.rennecke@embecosm.com>
3193         PR bootstrap/44432
3194         * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
3195         check that C++ compiler works.
3196         * configure: Regenerate.
3198 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
3200         * include/symtab.h (ht_identifier_ptr): New.
3202 2010-06-03  Joern Rennecke <joern.rennecke@embecosm.com>
3203             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3205         PR bootstrap/42798
3206         * configure.ac: Check for declaration of 'basename(char *)'.
3207         * configure: Regenerate.
3208         * config.in: Regenerate.
3210 2010-04-25  Joseph Myers  <joseph@codesourcery.com>
3212         * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
3213         * init.c (lang_defaults): Add entries for new language variants.
3214         (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
3215         variants.
3217 2010-04-09  Manuel López-Ibáñez <manu@gcc.gnu.org>
3219         PR cpp/43195
3220         * files.c (report_missing_guard): Test for #pragma once.
3222 2010-04-07  Simon Baldwin  <simonb@google.com>
3224         * directives.c (do_diagnostic): Add warning reason argument,
3225         call appropriate error reporting function for code.
3226         (directive_diagnostics): Call specific warning functions with
3227         warning reason where appropriate.
3228         (do_error, do_warning, do_pragma_dependency): Add warning reason
3229         argument to do_diagnostic calls.
3230         * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
3231         _cpp_create_definition): Call specific warning functions with
3232         warning reason where appropriate.
3233         * Makefile.in: Add new diagnostic functions to gettext translations.
3234         * include/cpplib.h (struct cpp_callbacks): Add warning reason code
3235         to error callback.
3236         (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
3237         CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
3238         (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
3239         CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
3240         CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
3241         CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
3242         CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
3243         CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
3244         CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
3245         warning reason codes.
3246         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
3247         cpp_warning_with_line, cpp_pedwarning_with_line,
3248         cpp_warning_with_line_syshdr): New specific error reporting functions.
3249         * pch.c (cpp_valid_state): Call specific warning functions with
3250         warning reason where appropriate.
3251         * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
3252         diagnostic handlers.
3253         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
3254         cpp_warning_with_line, cpp_pedwarning_with_line,
3255         cpp_warning_with_line_syshdr): New specific error reporting functions.
3256         * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
3257         specific warning functions with warning reason where appropriate.
3258         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
3259         warn_about_normalization, lex_identifier_intern, lex_identifier,
3260         _cpp_lex_direct): Ditto.
3261         * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
3262         narrow_str_to_charconst): Ditto.
3264 2010-04-06  Jakub Jelinek  <jakub@redhat.com>
3266         PR preprocessor/43642
3267         * lex.c (lex_raw_string): Change type of TYPE variable to
3268         unsigned char.
3270 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3272         * aclocal.m4: Regenerate.
3274 2010-03-29  Jason Merrill  <jason@redhat.com>
3276         More N3077 raw string changes
3277         * charset.c (cpp_interpret_string): Don't transform UCNs in raw
3278         strings.
3279         * lex.c (bufring_append): Split out from...
3280         (lex_raw_string): ...here.  Undo trigraph and line splicing
3281         transformations.  Do process line notes in multi-line literals.
3282         (_cpp_process_line_notes): Ignore notes that were already handled.
3284         Some raw string changes from N3077
3285         * charset.c (cpp_interpret_string): Change inner delimiters to ().
3286         * lex.c (lex_raw_string): Likewise.  Also disallow '\' in delimiter.
3288 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
3290         * init.c (read_original_filename): Don't call read_original_directory
3291         if _cpp_handle_directive returns 0.
3293 2010-01-01  Joseph Myers  <joseph@codesourcery.com>
3295         PR preprocessor/41947
3296         * expr.c (cpp_classify_number): Give error for hexadecimal
3297         floating-point constant with no digits before or after point.
3299 2009-11-20  Arnaud Charlet  <charlet@adacore.com>
3301         * macro.c (enter_macro_context): Call cb.used callback if defined.
3302         * directives.c (do_idef, do_ifndef): Ditto.
3303         * include/cpplib.h (struct cpp_callbacks): Add used callback.
3305 2009-11-11  Kai Tietz  <kai.tietz@onevision.com>
3307         * directives.c (do_pragma_push_macro): New pragma handler.
3308         (do_pragma_pop_macro): Likewise.
3309         (_cpp_init_internal_pragmas): Add push_macro and
3310         pop_macro handler to internal pragmas.
3311         (lex_macro_node_from_str): Removed.
3312         (cpp_push_definition): Replace lex_macro_node_from_str
3313         by _cpp_lex_identifier.
3314         (cpp_pop_definition): Likewise.
3315         * internal.h (_cpp_lex_identifier): New prototype.
3316         (def_pragma_macro): New structure.
3317         (cpp_reader): New member pushed_macros.
3318         * lex.c (_cpp_lex_identifier): New function.
3319         (lex_identifier_intern): New function.
3320         * init.c (cpp_create_reader): Initialize pushed_macros
3321         member.
3322         (cpp_destroy): Free elements in pushed_macros member.
3323         * pch.c (_cpp_save_pushed_macros): New function.
3324         (_cpp_restore_pushed_macros): Likewise.
3325         (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
3326         (cpp_read_state): Use _cpp_restore_pushed_macros.
3328 2009-10-19  Jakub Jelinek  <jakub@redhat.com>
3330         * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
3331         (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
3332         and char32_cset_desc.
3333         (converter_for_type): Handle CPP_UTF8STRING.
3334         (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
3335         * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
3336         (parse_include): Reject raw strings.
3337         * include/cpplib.h (CPP_UTF8STRING): New token type.
3338         * internal.h (struct cpp_reader): Add utf8_cset_desc field.
3339         * lex.c (lex_raw_string): New function.
3340         (lex_string): Handle u8 string literals, call lex_raw_string
3341         for raw string literals.
3342         (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
3343         sequences.
3344         * macro.c (stringify_arg): Handle CPP_UTF8STRING.
3346 2009-10-14  Jakub Jelinek  <jakub@redhat.com>
3348         PR preprocessor/41543
3349         * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
3350         * line-map.c (linemap_init): Initialize highest_location and
3351         highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
3353 2009-10-09  Jason Merrill  <jason@redhat.com>
3355         * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
3357 2009-10-09  Neil Vachharajani <nvachhar@google.com>
3359         * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
3360         sccs.
3362 2009-09-23  Loren J. Rittle  <ljrittle@acm.org>
3364         * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
3365         * configure: Rebuilt.
3367 2009-09-22  Richard Guenther  <rguenther@suse.de>
3369         PR pch/38987
3370         * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
3372 2009-09-18  Chris Demetriou  <cgd@google.com>
3374         PR preprocessor/28435:
3375         * include/cpplib.h (struct cpp_options): Add new member
3376         deps.need_preprocessor_output.
3377         * files.c (open_file_failed): If preprocessor output is needed
3378         always report an error.
3380 2009-09-13  Kai Tietz  <kai.tietz@onevision.com>
3382         * configure.ac: Set for i?86-w64-mingw*
3383         need_64bit_hwint to yes.
3384         * configure: Regenerated.
3386 2009-09-10  Jason Merrill  <jason@redhat.com>
3388         * directives.c (cpp_define): constify.
3390 2009-09-02  Ian Lance Taylor  <iant@google.com>
3392         * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
3394 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3396         * configure.ac (AC_PREREQ): Bump to 2.64.
3398 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3400         * aclocal.m4: Regenerate.
3401         * config.in: Regenerate.
3402         * configure: Regenerate.
3404 2009-08-17  Tom Tromey  <tromey@redhat.com>
3406         PR preprocessor/41067:
3407         * charset.c (convert_escape): Add missing ":" to error text.
3409 2009-07-27  Douglas B Rupp  <rupp@gnat.com>
3411         * include/cpplib.h (INO_T_CPP): New macro.
3412         (struct cpp_dir): Use it.
3414 2009-07-20  Jerry Quinn  <jlquinn@optonline.net>
3416         PR regression/40800
3417         * configure.ac: Use = instead of == for testing
3418         ENABLE_BUILD_WITH_CXX.
3419         * configure: Rebuild.
3421 2009-07-17  Jerry Quinn  <jlquinn@optonline.net>
3423         * directives.c (do_linemarker, do_line): Use CPP_STRING for
3424         ignored enum value.
3425         * files.c (find_file_in_dir): Add cast from void* to char*.
3426         * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
3427         * Makefile.in: (WARN_CFLAGS): Use general and C-specific
3428         warnings.
3429         (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
3430         ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
3431         COMPILER_FLAGS): New.
3432         (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
3433         (COMPILE.base): Use COMPILER instead of CC.  Use COMPILER_FLAGS
3434         instead of ALL_CFLAGS.
3435         * configure.ac: Invoke AC_PROG_CXX.  Separate C-specific warnings
3436         from other warnings.  Add -Wc++-compat to C-specific warnings.
3437         Check for --enable-build-with-cxx.  Set and substitute
3438         ENABLE_BUILD_WITH_CXX.  Invoke ZW_PROG_COMPILER_DEPENDENCIES
3439         according to ENABLE_BUILD_WITH_CXX.  Invoke AC_LANG before
3440         AC_CHECK_HEADERS.
3441         * configure: Rebuild.
3442         * include/cpp-id-data.h: Remove extern "C".
3443         * include/line-map.h: Likewise.
3444         * include/mkdeps.h: Likewise.
3445         * include/symtab.h: Likewise.
3446         * internal.h: Likewise.
3448 2009-06-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3450         * directives.c (parse_include): Add location argument. Update all
3451         calls.
3452         (parse_answer): Likewise.
3453         (do_include_common): Error with exact location.
3454         (parse_assertion): Likewise.
3456 2009-06-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3458         * expr.c (num_div_op): Take explicit location.
3460 2009-06-17  Ian Lance Taylor  <iant@google.com>
3462         * include/cpplib.h (progname): Don't declare.
3464 2009-06-12  Ian Lance Taylor  <iant@google.com>
3466         * include/cpplib.h (struct cpp_options): Add
3467         warn_cxx_operator_names field.
3468         (NODE_WARN_OPERATOR): Define.
3469         (struct cpp_hashnode): Increase flags field to 10 bits, decrease
3470         type to 6 bits.
3471         * init.c (mark_named_operators): Add flags parameter.
3472         (cpp_post_options): Pick flags value to pass to
3473         mark_named_operators.
3474         * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
3475         identifier is an operator name in C++.
3477 2009-06-01  Aldy Hernandez  <aldyh@redhat.com>
3479         * include/line-map.h (LAST_SOURCE_COLUMN): New.
3481 2009-06-01  Ian Lance Taylor  <iant@google.com>
3483         * include/cpp-id-data.h: Add extern "C".
3484         * include/line-map.h: Likewise.
3485         * include/mkdeps.h: Likewise.
3486         * include/symtab.h: Likewise.
3487         * internal.h: Likewise.
3489 2009-05-15  Ian Lance Taylor  <iant@google.com>
3491         * include/cpplib.h (enum cpp_builtin_type): Rename from enum
3492         builtin_type.  Change all uses.
3494 2009-05-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3496         PR cpp/36674
3497         * directives (do_linemarker): Compensate for the increment in
3498         location that occurs when we reach the end of line.
3499         * files (_cpp_stack_include): Mention _cpp_find_file in the
3500         comment.
3502 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
3504         * include/cpplib.h (enum cpp_token_fld_kind): Add
3505         CPP_TOKEN_FLD_TOKEN_NO.
3506         (struct cpp_macro_arg, struct cpp_identifier): Define.
3507         (union cpp_token_u): Use struct cpp_identifier for identifiers.
3508         Use struct cpp_macro_arg for macro arguments.  Add token_no for
3509         CPP_PASTE token numbers.
3510         * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
3511         do_pragma_poison, parse_assertion): Use val.node.node in place of
3512         val.node.
3513         * expr.c (parse_defined, eval_token): Use val.node.node in place
3514         of val.node.
3515         * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
3516         cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
3517         cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
3518         place of val.arg_no.  Use val.node.node in place of val.node.
3519         * macro.c (replace_args, cpp_get_token, parse_params,
3520         lex_expansion_token, create_iso_definition, cpp_macro_definition):
3521         Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
3522         Use val.node.node in place of val.node.
3524 2009-05-03  Joseph Myers  <joseph@codesourcery.com>
3526         * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
3527         UTF-8 sequences.
3529 2009-04-25  Joseph Myers  <joseph@codesourcery.com>
3531         PR preprocessor/39559
3532         * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
3533         constants larger than intmax_t in C99 mode.
3535 2009-04-21  Taras Glek <tglek@mozilla.com>
3537         * include/cpp-id-data.h: Update GTY annotations to new syntax.
3538         * include/cpplib.h: Likewise.
3539         * include/line-map.h: Likewise.
3540         * include/symtab.h: Likewise.
3542 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3544         PR c++/14875
3545         * lex.c (cpp_type2name): Take a flags parameter. Call
3546         cpp_named_operator2name for named operators and cpp_digraph2name
3547         for digraphs.
3548         (cpp_digraph2name): New.
3549         (cpp_spell_token): Use it.
3550         (cpp_output_token): Likewise.
3551         * include/cpplib.h (cpp_type2name): Update declaration.
3552         * init.c (cpp_named_operator2name): New.
3553         * internal.h (cpp_named_operator2name): Declare.
3555 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3557         PR c++/13358
3558         * init.c (cpp_create_reader): Wlong_long is disabled by default.
3559         * expr.c (cpp_classify_number): Give different messages for C and
3560         C++ front-ends.
3562 2009-04-19  Joseph Myers  <joseph@codesourcery.com>
3564         PR preprocessor/20078
3565         * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
3566         field.
3567         * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
3568         (struct cpp_token): Change flags to unsigned short.
3569         * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
3570         (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
3571         (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
3572         tokens.
3573         * macro.c (macro_real_token_count): New.
3574         (enter_macro_context, replace_args): Use macro_real_token_count.
3575         (create_iso_definition): Record whitespace surrounding and digraph
3576         spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
3577         Set extra_tokens and save CPP_PASTE tokens with arg_no set for
3578         multiple consecutive ## tokens.
3579         (_cpp_create_definition): Initialize extra_tokens.
3580         (cpp_macro_definition): Use macro_real_token_count.
3582 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
3584         * directives.c (parse_include): Pass true to check_eol.
3586 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
3588         PR preprocessor/39646
3589         * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
3590         * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
3591         * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
3592         place of LC_RENAME.
3594 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
3596         PR preprocessor/39647
3597         * directives.c (check_eol): Add parameter expand.
3598         (do_undef, parse_include, do_line, do_linemarker, do_ident,
3599         do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
3600         do_else, do_endif, do_assert, do_unassert): All callers changed.
3601         Pass true from do_line, false elsewhere.
3603 2009-04-12  Joseph Myers  <joseph@codesourcery.com>
3605         PR preprocessor/31869
3606         * macro.c (stringify_arg): Handle NULL source token in padding
3607         token where previous padding token did not have source token with
3608         preceding whitespace.
3610 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
3612         * Makefile.in: Change copyright header to refer to version
3613         3 of the GNU General Public License and to point readers at the
3614         COPYING3 file and the FSF's license web page.
3615         * charset.c: Likewise.
3616         * directives-only.c: Likewise.
3617         * directives.c: Likewise.
3618         * errors.c: Likewise.
3619         * expr.c: Likewise.
3620         * files.c: Likewise.
3621         * identifiers.c: Likewise.
3622         * include/cpp-id-data.h: Likewise.
3623         * include/cpplib.h: Likewise.
3624         * include/line-map.h: Likewise.
3625         * include/mkdeps.h: Likewise.
3626         * include/symtab.h: Likewise.
3627         * init.c: Likewise.
3628         * internal.h: Likewise.
3629         * lex.c: Likewise.
3630         * line-map.c: Likewise.
3631         * macro.c: Likewise.
3632         * makeucnid.c: Likewise.
3633         * mkdeps.c: Likewise.
3634         * pch.c: Likewise.
3635         * symtab.c: Likewise.
3636         * system.h: Likewise.
3637         * traditional.c: Likewise.
3638         * ucnid.tab: Likewise.
3639         * ucnid.h: Regenerate.
3641 2009-04-01  Janis Johnson  <janis187@us.ibm.com>
3643         PR c/39027
3644         * include/cpplib.h (CPP_N_DEFAULT): Define.
3645         * expr.c (interpret_float_suffix): Recognize d or D for double,
3646         return new value for default.
3647         (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
3649         PR c/33466
3650         * expr.c (interpret_float_suffix): Reject invalid suffix that uses
3651         letters from decimal float and fixed-point suffixes.
3653 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
3655         PR preprocessor/15638
3656         * files.c (_cpp_find_file): Call open_file_failed after diagnosing
3657         invalid PCH.
3658         (open_file_failed): Make error for missing file fatal.
3659         * include/cpplib.h (CPP_DL_FATAL): Define.
3661 2009-03-30  Sergiy Vyshnevetskiy  <serg@vostok.net>
3663         PR preprocessor/31932:
3664         * internal.h: Don't mention HAVE_ICONV_H.
3665         * configure, config.in: Rebuild.
3666         * configure.ac: Don't check for iconv.h.
3668 2009-03-30  Tom Tromey  <tromey@redhat.com>
3670         PR preprocessor/39512:
3671         * line-map.c (linemap_init): Initialize 'reallocator' field.
3673 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
3675         PR target/39558
3676         * macro.c (cpp_get_token): If macro_to_expand returns NULL
3677         and used some tokens, add CPP_PADDING before next token.
3679 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
3681         PR preprocessor/34695
3682         * makedepend.c: Remove.
3683         * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
3684         (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
3685         * directives.c (cpp_errors): Remove.
3686         * errors.c (print_location, _cpp_begin_message, v_message):
3687         Remove.
3688         (cpp_error, cpp_error_with_line): Always use error callback.
3689         (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
3690         * include/cpplib.h (cpp_options): Remove pedantic_errors,
3691         inhibit_warnings, warn_system_headers, inhibit_errors,
3692         warnings_are_errors, client_diagnostic.
3693         (cpp_callbacks): Add extra arguments to error callback; make it
3694         return bool.
3695         (cpp_finish): Return void.
3696         (cpp_destroy): Remove inaccurate comment about return value.
3697         (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
3698         (CPP_DL_NOTE): Define.
3699         * include/line-map.h (linemap_print_containing_files): Remove.
3700         * init.c (cpp_finish): Do not check for or return number of
3701         errors.
3702         * internal.h (cpp_reader): Remove errors field.
3703         * line-map.c (linemap_print_containing_files): Remove.
3704         * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
3705         about previous definition.  Only emit it if previous diagnostic
3706         was emitted.
3708 2009-03-28  Joseph Myers  <joseph@codesourcery.com>
3710         * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
3711         mkinstalldirs.
3713 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
3715         * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
3717 2009-02-21  Joseph Myers  <joseph@codesourcery.com>
3719         * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
3720         header name.
3721         (_cpp_lex_direct): Handle this.
3723 2009-02-15  Richard Guenther  <rguenther@suse.de>
3725         Revert last change.
3727 2009-02-13  Richard Guenther  <rguenther@suse.de>
3729         * configure.ac: Enable LFS.
3730         * configure: Re-generate.
3731         * config.in: Likewise.
3733 2009-01-05  Ben Elliston  <bje@au.ibm.com>
3735         * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
3736         (.po.pox): Likewise.
3737         (po/$(PACKAGE).pot): Likewise.
3739 2008-12-10  Alexandre Oliva  <aoliva@redhat.com>
3741         PR target/37033
3742         * pch.c (cpp_valid_state): Improve message for poisoned symbols.
3743         Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
3745 2008-11-29  Joseph Myers  <joseph@codesourcery.com>
3747         * lex.c (cpp_token_len): Use 6 as default length.
3749 2008-10-31  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3751         * expr.c (struct op): Add location.
3752         (_cpp_parse_expr): Propagate locations throught the stack
3753         of expressions.
3754         (reduce): Likewise.
3755         (check_promotion): Use explicit location in errors.
3757 2008-10-05  Matthew Gingell  <gingell@adacore.com>
3758             Arnaud Charlet  <charlet@adacore.com>
3760         * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
3761         (cpp_get_comments): New function.
3762         * internal.h (struct cpp_reader): Add comments field.
3763         * init.c (cpp_destroy): Free comments.
3764         * lex.c (store_comment, cpp_get_comments): New functions.
3765         (comments): New struct.
3766         (save_comment): Store comments in comments struct.
3768 2008-09-18  Simon Baldwin  <simonb@google.com>
3770         * include/cpplib.h (struct cpp_options): Add new boolean flag
3771         warn_builtin_macro_redefined.
3772         * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
3773         * (struct builtin_operator): Split out from previous struct builtin,
3774         enhance extra const correctness.
3775         * (struct builtin_macro): Split out from previous struct builtin, add
3776         new always_warn_if_redefined flag, enhance const correctness.
3777         * (mark_named_operators): Use struct builtin_operator.
3778         * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
3779         to builtins selectively.
3780         * macro.c (warn_of_redefinition): Return false if a builtin macro
3781         is not flagged with NODE_WARN.
3783 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
3785         PR preprocessor/36649
3786         * files.c (struct report_missing_guard_data): New type.
3787         (report_missing_guard): Put paths into an array instead of printing
3788         them right away.  Return 1 rather than 0.
3789         (report_missing_guard_cmp): New function.
3790         (_cpp_report_missing_guards): Sort and print paths gathered by
3791         report_missing_guard callback.
3793 2008-07-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3795         PR 28079
3796         * directives.c (strtolinenum): Handle overflow.
3797         (do_line): Give a warning if line number overflowed.
3798         (do_linemarker): Update call to strtolinenum.
3800 2008-07-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3802         * include/line-map.h (linenum_type): New typedef.
3803         (struct line_map): Use it.
3804         (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
3805         (SOURCE_COLUMN): Likewise.
3806         * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
3807         source_location values in a variable of type linenum_type.
3808         * directives.c (struct if_stack): Use linenum_type.
3809         (strtoul_for_line): Rename as strtolinenum.
3810         (do_line): Use linenum_type.
3811         (do_linemarker): Use linenum_type and strtolinenum.
3812         (_cpp_do_file_change): Use linenum_t.
3813         * line-map.c (linemap_add): Likewise.
3814         (linemap_line_start): Likewise.
3815         * traditional.c (struct fun_macro): 'line' is a source_location.
3816         * errors.c (print_location): Use linenum_type.
3817         * directives-only.c (_cpp_preprocess_dir_only): Likewise.
3818         * internal.h (CPP_INCREMENT_LINE): Likewise.
3819         * lex.c (_cpp_skip_block_comment): Use source_location.
3821 2008-07-14  Ben Elliston  <bje@au.ibm.com>
3823         * include/cpplib.h (NODE_CONDITIONAL): New.
3824         (struct cpp_callbacks): New macro_to_expand field.
3825         (struct cpp_hashnode): Adjust size of flags and type fields.
3826         (cpp_peek_token): Prototype.
3827         * lex.c (cpp_peek_token): New function.
3828         (_cpp_temp_token): Protect pre-existing lookaheads.
3829         * macro.c (cpp_get_token): Expand any conditional macros.
3830         (_cpp_backup_tokens_direct): New.
3831         (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
3832         (warn_of_redefinition): Silently allow redefined conditional
3833         macros.
3834         (_cpp_create_definition): Remove the conditional flag when a user
3835         defines one of the conditional macros.
3836         * internal.h (_cpp_backup_tokens_direct): New prototype.
3838 2008-06-13  Andrew Haley  <aph@redhat.com>
3840         PR preprocessor/33305
3841         * macro.c (replace_args): Print a warning for empty macro
3842         arguments in C89 and C++.
3844 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3846         * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
3847         * configure: Regenerate.
3849 2008-06-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3851         * Makefile.in (datarootdir): New variable.
3853 2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>
3855         PR preprocessor/36479
3856         * charset.c (cpp_interpret_string_notranslate): Also set
3857         narrow_cset_desc.width.
3859 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
3861         * configure.ac (parisc*64*-*-*): Remove.
3862         * configure: Regenerate.
3864 2008-05-30  Tom Tromey  <tromey@redhat.com>
3866         PR preprocessor/36320:
3867         * internal.h (_cpp_parse_expr): Update.
3868         * expr.c (_cpp_parse_expr): Add 'is_if' argument.  Update error
3869         messages.
3870         * directives.c (do_if): Update.
3871         (do_elif): Require expression if processing group.
3873 2008-05-30  Danny Smith  <dannysmith@users.sourceforge.net>
3875         * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
3877 2008-05-21  Tom Tromey  <tromey@redhat.com>
3879         PR preprocessor/27777:
3880         * lex.c (cpp_output_line_to_string): New function.
3881         * internal.h (_cpp_begin_message): Don't declare.
3882         * errors.c (_cpp_begin_message): Now static.
3883         * include/cpplib.h (cpp_output_line_to_string): Declare.
3884         * directives.c (do_diagnostic): Rewrote.  Use
3885         cpp_output_line_to_string.  Don't use _cpp_begin_message.
3887 2008-05-21  Tom Tromey  <tromey@redhat.com>
3889         * include/symtab.h (HT_ALLOCED): Remove.
3890         (ht_purge): Declare.
3891         * symtab.c (DELETED): New define.
3892         (ht_lookup): Update comment.
3893         (ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
3894         code.  Use subobject allocator for strings, if it exists.
3895         (ht_expand): Handle deleted entries.
3896         (ht_forall): Likewise.
3897         (ht_purge): New function.
3898         (ht_dump_statistics): Print deletion statistics.
3900 2008-05-13  Tom Tromey  <tromey@redhat.com>
3902         PR preprocessor/22168:
3903         * include/cpplib.h (struct cpp_options) <objc>: Update
3904         documentation.
3905         * expr.c (eval_token): Warn for use of assertions.
3906         * directives.c (directive_diagnostics): Warn about extensions.
3907         (DEPRECATED): New define.
3908         (DIRECTIVE_TABLE): Use it.
3910 2008-05-06  Tom Tromey  <tromey@redhat.com>
3912         PR preprocessor/35313, PR preprocessor/36088:
3913         * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
3914         (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
3916 2008-05-04  David S. Miller  <davem@davemloft.net>
3918         * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
3919         * configure: Regenerate.
3921 2008-04-22  Daniel Franke  <franke.daniel@gmail.com>
3923         * include/cpplib.h (cpp_define_formatted): New.
3924         * directives.c (cpp_define_formatted): New.
3926 2008-04-21  Tom Tromey  <tromey@redhat.com>
3928         PR libcpp/33415:
3929         * charset.c (_cpp_convert_input): Add buffer_start argument.
3930         Ignore UTF-8 BOM if seen.
3931         * internal.h (_cpp_convert_input): Add argument.
3932         * files.c (struct _cpp_file) <buffer_start>: New field.
3933         (destroy_cpp_file): Free buffer_start, not buffer.
3934         (_cpp_pop_file_buffer): Likewise.
3935         (read_file_guts): Update.
3937 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
3939         * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
3940         * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
3941         (struct cpp_options): Added uliterals.
3942         (cpp_interpret_string): Update prototype.
3943         (cpp_interpret_string_notranslate): Idem.
3944         * charset.c (init_iconv_desc): New width member in cset_converter.
3945         (cpp_init_iconv): Add support for char{16,32}_cset_desc.
3946         (convert_ucn): Idem.
3947         (emit_numeric_escape): Idem.
3948         (convert_hex): Idem.
3949         (convert_oct): Idem.
3950         (convert_escape): Idem.
3951         (converter_for_type): New function.
3952         (cpp_interpret_string): Use converter_for_type, support u and U prefix.
3953         (cpp_interpret_string_notranslate): Match changed prototype.
3954         (wide_str_to_charconst): Use converter_for_type.
3955         (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
3956         * directives.c (linemarker_dir): Macro U changed to UC.
3957         (parse_include): Idem.
3958         (register_pragma_1): Idem.
3959         (restore_registered_pragmas): Idem.
3960         (get__Pragma_string): Support CPP_STRING{16,32}.
3961         * expr.c (eval_token): Support CPP_CHAR{16,32}.
3962         * init.c (struct lang_flags): Added uliterals.
3963         (lang_defaults): Idem.
3964         * internal.h (struct cset_converter) <width>: New field.
3965         (struct cpp_reader) <char16_cset_desc>: Idem.
3966         (struct cpp_reader) <char32_cset_desc>: Idem.
3967         * lex.c (digraph_spellings): Macro U changed to UC.
3968         (OP, TK): Idem.
3969         (lex_string): Add support for u'...', U'...', u"..." and U"...".
3970         (_cpp_lex_direct): Idem.
3971         * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
3972         (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
3974 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
3976         PR bootstrap/35457
3977         * aclocal.m4: Regenerate.
3978         * configure: Regenerate.
3980 2008-04-17  Tom Tromey  <tromey@redhat.com>
3982         PR libcpp/34866:
3983         * errors.c (cpp_error): Don't reference a token before the start
3984         of the current run.
3986 2008-04-16  Tom Tromey  <tromey@redhat.com>
3988         * Makefile.in (TAGS_SOURCES): New variable.
3989         (TAGS): New target.
3991 2008-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
3993         * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
3994         and shbe-*-*.
3995         * configure: Rebuilt.
3997 2008-04-02  Joseph Myers  <joseph@codesourcery.com>
3999         * include/cpplib.h (struct cpp_callbacks): Add used_define,
4000         used_undef and before_define.
4001         (NODE_USED): Define.
4002         * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
4003         do_ifndef, cpp_pop_definition): Handle new flag and use new
4004         callbacks.
4005         * expr.c (parse_defined): Handle new flag and use new callbacks.
4006         * macro.c (enter_macro_context, _cpp_free_definition): Handle new
4007         flag and use new callbacks.
4009 2008-04-01  Jakub Jelinek  <jakub@redhat.com>
4011         PR pch/13675
4012         * files.c (struct _cpp_file): Remove pch field.
4013         (pch_open_file): Don't set file->pch, just file->pchname.
4014         (should_stack_file): After pfile->cb.read_pch call
4015         free pchname and clear pchname, don't close file->fd.
4016         Test file->pchname instead of file->pch.  Don't close fd after cb.
4017         (_cpp_stack_include): Test file->pchname instead of file->pch.
4019 2008-03-28  Tom Tromey  <tromey@redhat.com>
4021         * Makefile.in (POSTCOMPILE): New variable.
4022         (.c.o): Use it.
4024 2008-03-13  Tom Tromey  <tromey@redhat.com>
4026         PR libcpp/35322:
4027         * directives.c (destringize_and_run): Set pfile->directive.
4029 2008-03-06  Markus Milleder  <markus.milleder@generali.at>
4031         PR preprocessor/35458
4032         * mkdeps.c (munge): Quote '#' with a '\'.
4034 2008-02-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4036         PR preprocessor/35379
4037         * mkdeps.c (deps_write): Ensure the first target always appears
4038         in the first column, without leading backslash newline.  Avoid
4039         some more extra whitespace.
4041 2008-02-25  Thiemo Seufer <ths@mips.com>
4043         * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
4045 2008-02-19  Tom Tromey  <tromey@redhat.com>
4047         * traditional.c (lex_identifier): Use CPP_HASHNODE.
4048         * lex.c (lex_identifier): Use CPP_HASHNODE.
4049         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
4050         do-while.
4051         * identifiers.c (alloc_node): Change return type.
4052         (_cpp_init_hashtable): Don't cast 'alloc_node'.
4053         (proxy_assertion_broken): New declaration.
4054         (cpp_forall_identifiers): Move comment.
4055         * line-map.c (linemap_add): Comment fix.
4056         (linemap_line_start): Indentation fix.
4058 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
4060         PR preprocessor/34692
4061         * macro.c (collect_args): Add pragma_buff argument.  Push
4062         CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
4063         than into arguments.  Reset prevent_expansion and parsing_args
4064         state at CPP_PRAGMA_EOL/CPP_EOF.
4065         (funlike_invocation_p): Add pragma_buff argument, pass it through
4066         to collect_args.
4067         (enter_macro_context): Add result argument.  Adjust
4068         funlike_invocation_p caller.  Emit all deferred pragma tokens
4069         gathered during collect_args before the expansion, add a padding
4070         token.  Return 2 instead of 1 if any pragma tokens were prepended.
4071         (cpp_get_token): If enter_macro_context returns 2, don't return
4072         a padding token, instead cycle to grab CPP_PRAGMA token.
4073         * directives.c (_cpp_handle_directive): If was_parsing_args
4074         in deferred pragma, leave parsing_args and prevent_expansion as is.
4076 2008-01-22  Tom Tromey  <tromey@redhat.com>
4078         PR c++/34859
4079         * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
4080         __STDC_CONSTANT_MACROS.
4082 2008-01-07  Fred Fish  <fnf@specifix.com>
4084         PR preprocessor/30363
4085         * traditional.c (replace_args_and_push): Add local variable
4086         cxtquote, calculate the replacement text size assuming a
4087         worst case of every input character quoted with backslash,
4088         and properly handle output quoting of quote characters in
4089         actual arguments used in function-like macros.
4091 2008-01-03  Tom Tromey  <tromey@redhat.com>
4093         PR preprocessor/34602
4094         * directives.c (do_line): Don't try to spell EOF token.
4095         (do_linemarker): Add comment.
4097 2007-12-11  DJ Delorie  <dj@redhat.com>
4099         * charset.c (convert_using_iconv): Close out any shift states,
4100         returning to the initial state.
4102 2007-12-06  Tom Tromey  <tromey@redhat.com>
4104         PR c/29172
4105         * internal.h (struct cpp_reader) <file_hash_entries>: Changed
4106         type.
4107         <file_hash_entries_allocated, file_hash_entries_used>: Removed.
4108         * files.c (FILE_HASH_POOL_SIZE): New macro.
4109         (struct file_hash_entry_pool): New.
4110         (destroy_all_cpp_files): New function.
4111         (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
4112         (new_file_hash_entry): Update.
4113         (free_file_hash_entries): New function.
4114         (_cpp_cleanup_files): Call free_file_hash_entries and
4115         destroy_all_cpp_files.
4116         (cpp_clear_file_cache): New function.
4117         * include/cpplib.h (cpp_clear_file_cache): Declare.
4119 2007-12-03  Tom Tromey  <tromey@redhat.com>
4121         PR preprocessor/34288
4122         * configure.ac, config.in: Rebuilt.
4123         * configure.ac: Check for ssize_t.
4125 2007-11-30  Tom Tromey  <tromey@redhat.com>
4127         PR preprocessor/32868
4128         * macro.c (_cpp_create_definition): Special case
4129         __STDC_FORMAT_MACROS.
4131 2007-11-16  Michael Matz  <matz@suse.de>
4133         * files.c (search_path_head): Fix check for absolute paths.
4135 2007-11-11  Tom Tromey  <tromey@redhat.com>
4137         PR c++/17557
4138         * include/cpplib.h (cpp_included_before): Declare.
4139         * files.c (struct file_hash_entry) <location>: New field.
4140         (_cpp_find_file): Initialize new field.
4141         (make_cpp_dir): Likewise.
4142         (cpp_included_before): New function.
4144 2007-11-01  Tom Tromey  <tromey@redhat.com>
4146         PR preprocessor/30805
4147         * macro.c (paste_tokens): Handle padding token.
4148         (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
4150 2007-10-31  Tom Tromey  <tromey@redhat.com>
4152         PR preprocessor/30786
4153         * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
4154         * directives.c (_cpp_do__Pragma): Return error status.
4155         * internal.h (_cpp_do__Pragma): Update.
4156         * directives.c (get__Pragma_string): Back up if EOF seen.
4158 2007-09-06  Tom Tromey  <tromey@redhat.com>
4160         * internal.h (struct cpp_reader) <invocation_location>: New
4161         field.
4162         (struct cpp_reader) <set_invocation_location>: Likewise.
4163         * init.c (cpp_set_line_map): New function.
4164         * line-map.c (linemap_add): Use linemap's allocator.
4165         * include/line-map.h (GTY): Define.
4166         (line_map_realloc): New typedef.
4167         (struct line_map): Mark with GTY.
4168         (struct line_maps): Likewise.
4169         (struct line_maps) <maps>: Likewise.
4170         (struct line_maps) <reallocator>: New field.
4171         * include/symtab.h (GTY): Conditionally define.
4172         * include/cpplib.h (cpp_set_line_map): Declare.
4173         (cpp_get_token_with_location): Declare.
4174         * macro.c (cpp_get_token): Set invocation_location on the reader.
4175         (cpp_get_token_with_location): New function.
4177 2007-08-30  Chao-ying Fu  <fu@mips.com>
4179         * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
4180         ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
4181         (cpp_classify_number): Support decimal fixed-point constants without
4182         exponents.
4183         Warn about fixed-point constants when -pedantic.
4184         * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
4185         comments to support fixed-point values.
4186         (CPP_N_FRACT, CPP_N_ACCUM): Define.
4188 2007-08-18  Tom Tromey  <tromey@redhat.com>
4190         PR preprocessor/32974
4191         * directives.c (parse_include): Don't check for EOL when
4192         processing #pragma dependency.
4194 2007-07-30  Ollie Wild  <aaw@google.com>
4196         * directives-only.c: New file.
4197         * internal.h (struct _cpp_dir_only_callbacks): New.
4198         (_cpp_preprocess_dir_only): New function.
4199         * directives.c (_cpp_handle_directive): Check directives_only before
4200         disabling execution of indented directives.
4201         * files.c (_cpp_stack_file): Add directives_only check.
4202         * include/cpplib.h (struct cpp_options): Add directives_only.
4203         (cpp_init_special_builtins): New function.
4204         * init.c (cpp_init_special_builtins): New function.
4205         (cpp_init_builtins): Move builtin_array initialization to
4206         cpp_init_special_builtins.
4207         (post_options): Check directives_only before setting
4208         pfile->state.prevent_expansion = 1.
4209         * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
4210         is expanded inside a directive while -fdirectives-only is enabled.
4211         * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
4212         (libcpp_a_SOURCES): Add directives-only.c.
4214 2007-07-04  Uros Bizjak  <ubizjak@gmail.com>
4216         * traditional.c (_cpp_scan_out_logical_line): Initialize
4217         fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
4218         fmacro.args to prevent 'may be used uninitialized' warning.
4220 2007-07-03  Uros Bizjak  <ubizjak@gmail.com>
4222         * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
4223         Add new constants.
4224         * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
4225         suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
4226         for 'q' or 'Q' suffixes.
4228 2007-06-17  Danny Smith  <dannysmith@users.sourceforge.net
4230         * files.c (open_file): Correct typo.
4232 2007-06-16  Vladimir Prus  <vladimir@codesourcery.com>
4234         * files.c (open_file): Prevent the call
4235         for stat from overwriting errno.
4237 2007-06-09  Vladimir Prus  <vladimir@codesourcery.com>
4239         * files.c (open_file): Account for the
4240         fact that on windows, opening a directory gives
4241         EACCES.
4243 2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
4245         PR preprocessor/23479
4246         * expr.c (cpp_classify_number): Implement 0b-prefixed binary
4247         integer constants.
4248         (append_digit): Likewise.
4249         * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
4250         binary integer constants.
4252 2007-05-31  Dave Korn  <dave.korn@artimi.com>
4254         PR preprocessor/14331
4255         * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
4257 2007-05-24  Ollie Wild  <aaw@google.com>
4259         * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
4260         * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
4261         (cpp_write_pch_state): Save __COUNTER__ state.
4262         (cpp_valid_state): Check valid __COUNTER__ state.
4263         (cpp_read_state): Read new __COUNTER__ state.
4264         * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
4265         * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
4266         * internal.h (struct cpp_reader): Add counter member.
4268 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
4270         PR preprocessor/20077
4271         * macro.c (create_iso_definition): Fixed the method to determine
4272         whether the token-pasting operator appears at the beginning or the end
4273         of a macro.
4275 2007-05-21  Ian Lance Taylor  <iant@google.com>
4277         * internal.h (struct cpp_reader): Add new fields:
4278         nonexistent_file_hash and nonexistent_file_ob.
4279         * files.c: Include "obstack.h".
4280         (find_file_in_dir): Before trying to open the file, look up the
4281         path name in the hash table of nonexistent files.  After failing
4282         to open the file, add the path name to the hash table.
4283         (_cpp_find_file): Cache the results of looking up the file name
4284         starting with the quote and bracket chain heads, if we can.
4285         (nonexistent_file_hash_eq): New static function.
4286         (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
4287         pfile->nonexistent_file_ob.
4288         (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
4289         pfile->nonexistent_file_ob.
4291 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
4293         * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
4295         PR c/31924
4296         * expr.c (interpret_float_suffix): Check for invalid suffix.
4298 2007-05-02  Eric Christopher  <echristo@apple.com>
4300         * expr.c (num_div_op): Don't overflow if the result is
4301         zero.
4303 2007-05-02  Tom Tromey  <tromey@redhat.com>
4305         PR preprocessor/28709
4306         * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
4308 2007-03-30  Michael Meissner  <michael.meissner@amd.com>
4310         * directives.c (lex_macro_node_from_str): Fix alloca call to be
4311         type correct.
4313 2007-03-30  Richard Henderson  <rth@redhat.com>
4315         * directives.c (lex_macro_node_from_str): New.
4316         (cpp_push_definition, cpp_pop_definition): New.
4317         * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
4319 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
4321         * Makefile.in: Add dummy install-pdf target.
4323 2007-01-30  Tom Tromey  <tromey@redhat.com>
4325         PR preprocessor/30468
4326         * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
4327         './'.
4329 2007-01-30  Tom Tromey  <tromey@redhat.com>
4331         PR preprocessor/29966
4332         * macro.c (lex_expansion_token): Save and restore cpp_reader's
4333         cur_token.
4334         (_cpp_create_definition): Don't restore cur_token here.
4335         * lex.c (_cpp_lex_token): Added assertion.
4337 2007-01-27  Tom Tromey  <tromey@redhat.com>
4339         * configure: Rebuilt.
4341 2007-01-12  Tom Tromey  <tromey@redhat.com>
4343         PR preprocessor/28227
4344         * directives.c (lex_macro_node): Added 'is_def_or_undef'
4345         argument.
4346         (do_define): Update.
4347         (do_undef): Update.
4348         (do_ifdef): Update.
4349         (do_ifndef): Update.
4351 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
4353         * configure: Regenerate.
4355 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
4357         * configure: Regenerate.
4359 2007-01-04  Tom Tromey  <tromey@redhat.com>
4361         PR preprocessor/28165
4362         * internal.h (cpp_in_primary_file): New function.
4363         * directives.c (do_include_next): Use cpp_in_primary_file.
4364         (do_pragma_once): Likewise.
4365         (do_pragma_system_header): Likewise.
4367 2006-12-29  Ian Lance Taylor  <iant@google.com>
4369         * lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
4370         look backward at the end of the line unless we saw a backslash.
4372 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
4374         PR preprocessor/29612
4375         * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
4376         only when new_sysp is non-zero.
4378 2006-12-28  Tom Tromey  <tromey@redhat.com>
4380         PR preprocessor/30001
4381         * charset.c (_cpp_convert_input): Check that to.len is greater
4382         than zero.
4384 2006-11-20  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
4386         * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
4387         * configure: Rebuilt.
4389 2006-11-01      Douglas Gregor <doug.gregor@gmail.com>
4391         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
4392         for experimental C++0x mode.
4393         * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
4394         adopted the preprocessor changes introduced in C99.
4396 2006-10-29  Joseph Myers  <joseph@codesourcery.com>
4398         * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
4399         depending on --enable-targets=all.
4400         * configure: Regenerate.
4402 2006-10-12  Jakub Jelinek  <jakub@redhat.com>
4404         PR preprocessor/28709
4405         * macro.c (paste_tokens): Do error reporting here, use BUF with the
4406         spelled LHS token as opposed to spelling it again.
4407         (paste_all_tokens): Don't report errors here, just break on failure.
4409 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
4411         * Makefile.in: Added empty "pdf" target.
4413 2006-09-22  Geoffrey Keating  <geoffk@apple.com>
4415         * configure.ac: Make need_64_bit_hwint case for x86-darwin
4416         match exactly the glob in gcc/config.gcc.
4417         * configure: Regenerate.
4419 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
4421         PR c/28768
4422         PR preprocessor/14634
4423         * lex.c (lex_string): Pedwarn for unterminated literals.
4425 2006-09-08  Eric Christopher  <echristo@apple.com>
4427         * configure.ac: Add 64-bit HWI support for i?86-darwin.
4429 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
4431         PR c++/28288
4432         PR c++/14556
4433         * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
4434         (CPP_LAST_EQ): Change.
4435         (CPP_LAST_PUNCTUATOR): Change.
4436         * expr.c (cpp_operator): Remove MIN and MAX.
4437         (reduce): Remove CPP_MIN and CPP_MAX.
4438         (num_binary_op): Ditto.
4439         * lex.c (_cpp_lex_direct): Ditto.
4440         (cpp_avoid_paste): Remove ? as legal symbol after > or <.
4442 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
4444         PR preprocessor/27746
4445         * directives.c (do_pragma): Handle pragma with valid namespace
4446         and invalid name coming from macro expansion.
4447         * directives.c (destringize_and_run): Initialize next field in
4448         context.
4450         PR c/27747
4451         PR c++/27748
4452         * directives.c (destringize_and_run): Set NO_EXPAND on the
4453         tokens.
4455         * macro.c (_cpp_backup_tokens): Fix comment typo.
4457 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
4459         * Makefile.in (CATALOGS): Add po/ prefix.
4460         * configure: Regenerated.
4462 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
4464         * Makefile.in: Add install-html target. Add install-html to .PHONY
4466 2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
4468         * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
4469         * files.c (_cpp_get_file_stat): New function.
4470         * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
4471         * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
4472         * internal.h (_cpp_get_file_stat): Prototype.
4473         (struct cpp_buffer): Add timestamp.
4475 2006-01-23  Jakub Jelinek  <jakub@redhat.com>
4477         PR preprocessor/25717
4478         * init.c (cpp_init_builtins): If __STDC__ will not change value
4479         between system headers and other sources, define it as a normal
4480         macro rather than a builtin.
4481         * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
4482         cpp_in_system_header condition.
4484 2006-01-05  Paolo Bonzini  <bonzini@gnu.org>
4486         * Makefile.in: Use -MMD instead of -MD.
4488 2006-01-04  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
4489             Richard Henderson  <rth@redhat.com>
4491         Merge from gomp branch:
4492         * directives.c (struct pragma_entry): Add is_deferred.  Add ident
4493         entry to value union.
4494         (end_directive): Don't eat the line if in_deferred_pragma.
4495         (run_directive): Remove pragma hacks.
4496         (insert_pragma_entry): Remove.
4497         (new_pragma_entry): New.
4498         (register_pragma_1): Split out of register_pragma.  Only handle
4499         the lookup tree and return the new entry.
4500         (cpp_register_pragma): Fill in the pragma entry here.
4501         (cpp_register_deferred_pragma): New.
4502         (register_pragma_internal): New.
4503         (_cpp_init_internal_pragmas): Use register_pragma_internal.
4504         (do_pragma): Allow pragma expansion after namespace.  For deferred
4505         pragmas, don't slurp the line into a string.
4506         (destringize_and_run): Save tokens for deferred pragmas.
4507         (cpp_handle_deferred_pragma): Remove.
4508         * macro.c (builtin_macro): Remove pragma token hack.
4509         (_cpp_push_token_context): Rename from push_token_context and export.
4510         * internal.h (struct lexer_state): Add pragma_allow_expansion.
4511         (_cpp_push_token_context): Declare.
4512         * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
4513         a token.  Update the line number correctly if so.
4514         (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
4515         (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
4516         * include/cpplib.h (PRAGMA_EOL): New.
4517         (CPP_TOKEN_FLD_PRAGMA): New.
4518         (struct cpp_token): Add val.pragma.
4519         (struct cpp_options): Remove defer_pragmas.
4520         (cpp_handle_deferred_pragma): Remove.
4521         (cpp_register_deferred_pragma): Declare.
4523 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
4525         PR c++/25294
4526         * directives.c (do_pragma): If pragma line ends with multi-line
4527         block comment, end the saved deferred pragma string before that
4528         comment.  Handle embedded '\0' chars on the pragma line.
4530 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4532         PR c++/23333
4533         * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
4535 2005-12-07  Jon Grimm  <jgrimm2@us.ibm.com>
4536             Ben Elliston  <bje@au.ibm.com>
4538         * include/cpplib.h (CPP_N_DFLOAT): New.
4539         * expr.c (interpret_float_suffix): Identify df, dd, and dl
4540         suffixes as decimal floating point constants.
4541         (cpp_classify_number): Disallow hexadecimal DFP constants.
4543 2005-11-14  Gerald Pfeifer  <gerald@pfeifer.com>
4544             Ian Lance Taylor  <ian@airs.com>
4546         * include/cpplib.h (struct cpp_callbacks): Annotate error with
4547         ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
4549 2005-11-09  Per Bothner  <per@bothner.com>
4550             Uros Bizjak  <uros@kss-loka.si>
4552         PR c/24101
4553         * init.c (read_original_filename): Temporarily set
4554         state.in_directive before calling _cpp_lex_direct for
4555         CPP_HASH tokens.
4557 2005-11-03  James E Wilson  <wilson@specifix.com>
4559         PR preprocessor/24202
4560         * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
4562 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
4564         * include/cpplib.h (struct cpp_callbacks): Make error take
4565         va_list* parameter.
4566         * errors.c (cpp_error): Update call to callback.
4568 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
4570         PR preprocessor/22042
4571         * macro.c (_cpp_builtin_macro_text): Lower the needed max
4572         buffer size.
4573         (cpp_quote_string): Don't octalify non printable
4574         charactors.
4576 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
4578         PR c++/17964
4579         * include/cpplib.h (struct cpp_options): Add client_diagnostic.
4580         (struct cpp_callbacks): Add error.
4581         * errors.c (cpp_error): If client_diagnostic, use error callback.
4582         * charset.c (convert_escape): Don't use %03o in diagnostic.
4584 2005-10-21  James E Wilson  <wilson@specifix.com>
4586         PR preprocessor/15220
4587         * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
4588         callers.  Pass to open_file_failed.
4589         (open_file_failed): New parameter angle_brackets.  Fix all callers.
4590         Use in print_dep assignment.
4591         * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
4592         * internal.h (_cpp_find_file): Add new parm to declaration.
4594 2005-10-08  Kazu Hirata  <kazu@codesourcery.com>
4596         * configure.ac: Require 64-bit int for arm*-*-*eabi*.
4597         * configure: Regenerate.
4599 2005-10-04  Ian Lance Taylor  <ian@airs.com>
4601         PR preprocessor/13726
4602         * directives.c (check_eol_return_comments): New static function.
4603         (parse_include): Add buf parameter.  Change all callers.
4604         (do_include_common): If not discard comments, turn on
4605         save_comments.  Pass collected comments to include callback.
4606         * include/cpplib.h (struct cpp_callbacks): Add new parameter to
4607         include callback: cpp_token list.
4609 2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
4611         * include/cpplib.h (struct cpp_options): Add extended_identifiers.
4612         * init.c (struct lang_flags, lang_defaults): Add
4613         extended_identifiers.
4614         (cpp_set_lang): Use it.
4615         * lex.c (forms_identifier_p): Check extended_identifiers.
4617 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
4619         PR preprocessor/20348
4620         PR preprocessor/20356
4621         * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
4622         2004-06-05 changes.
4624 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4626         * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
4627         -Wmissing-format-attribute.
4629         * configure: Regenerate.
4631 2005-06-29  Kelley Cook  <kcook@gcc.gnu.org>
4633         * all files: Update FSF address in copyright headers.
4634         * makeucnid.c (write_copyright): Update outputted FSF address.
4636 2005-06-13  Zack Weinberg  <zack@codesourcery.com>
4638         * configure.ac: Invoke ZW_CREATE_DEPDIR and
4639         ZW_PROG_COMPILER_DEPENDENCIES.
4640         * aclocal.m4, configure: Regenerate.
4641         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
4642         New variables.
4643         (distclean): Clean up $(DEPDIR) and its contents.
4644         (.c.o): Use $(COMPILE).
4645         Include $(DEPDIR)/*.Po for most object->header dependencies.
4647 2005-05-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4649         * configure.ac: Check declarations for asprintf and vasprintf.
4650         * config.in: Regenerate.
4651         * configure: Likewise.
4653         * charset.c (conversion_loop): Use XRESIZEVEC.
4654         (convert_no_conversion): Likewise.
4655         (convert_using_iconv): Likewise.
4656         (init_iconv_desc): Cast return value of alloca.
4657         (cpp_host_to_exec_charset): Use XNEWVEC.
4658         (emit_numeric_escape): Use XRESIZEVEC.
4659         (cpp_interpret_string): Use XNEWVEC.
4660         (cpp_interpret_string): Use XRESIZEVEC.
4661         (_cpp_interpret_identifier): Cast return value of alloca.
4662         (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
4663         * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
4664         (parse_include): Use XNEWVEC.
4665         (insert_pragma_entry): Rename local variable "new" to
4666         "new_entry".
4667         (save_registered_pragmas): Cast return value of xmemdup.
4668         (destringize_and_run): Same for alloca.
4669         (parse_assertion): Likewise.
4670         (do_assert): Cast allocated storage to proper type.
4671         (cpp_define): Likewise.
4672         (_cpp_define_builtin): Likewise.
4673         (cpp_undef): Likewise.
4674         (handle_assertion): Likewise.
4675         (cpp_push_buffer): Rename local variable "new" to "new_buffer".
4676         * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
4677         (CPP_UMINUS): Likewise.
4678         (struct cpp_operator): Rename from struct operator.
4679         (_cpp_expand_op_stack): Use XRESIZEVEC.
4680         * files.c (pch_open_file): Use XNEWVEC.
4681         (pch_open_file): Use XRESIZEVEC.
4682         (read_file_guts): Use XNEWVEC and XRESIZEVEC.
4683         (dir_name_of_file): Use XNEWVEC.
4684         (make_cpp_file): Use XCNEW.
4685         (make_cpp_dir): Likewise.
4686         (allocate_file_hash_entries): USE XNEWVEC.
4687         (cpp_included): Cast return value of htab_find_with_hash.
4688         (append_file_to_dir): Use XNEWVEC.
4689         (read_filename_string): Likewise. Use XRESIZEVEC too.
4690         (read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
4691         (remap_filename): Use XNEWVEC.
4692         (struct pchf_entry): Move definition out of struct pchf_data.
4693         (_cpp_save_file_entries): Use XCNEWVAR.
4694         (_cpp_read_file_entries): Use XNEWVAR.
4695         * identifiers.c (alloc_node): Use XOBNEW.
4696         * init.c (cpp_create_reader): Use XCNEW.
4697         (cpp_init_builtins): Cast of b->value to enum builtin_type.
4698         (read_original_directory): Cast return value of alloca.
4699         * lex.c (add_line_note): Use XRESIZEVEC.
4700         (warn_about_normalization): Use XNEWVEC.
4701         (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
4702         (new_buff): Use XNEWVEC.
4703         * line-map.c (linemap_add): Use XRESIZEVEC.
4704         * macro.c (builtin_macro): Cast return value of alloca.
4705         (paste_tokens): Likewise.
4706         (expand_arg): Use XNEWVEC and XRESIZEVEC.
4707         (_cpp_save_parameter): Use XRESIZEVEC.
4708         (create_iso_definition): Cast allocated storage to proper type.
4709         (_cpp_create_definition): Likewise.
4710         (cpp_macro_definition): Use XRESIZEVEC.
4711         * makedepend.c (add_clm): Use XNEW.
4712         (add_dir): Likewise.
4713         * mkdeps.c (munge): Use XNEWVEC.
4714         (deps_init): Use XCNEW.
4715         (deps_add_target): Use XRESIZEVEC.
4716         (deps_add_default_target): Cast return value of alloca.
4717         (deps_add_dep): Use XRESIZEVEC.
4718         (deps_add_vpath): Likewise.  Use XNEWVEC too.
4719         (deps_restore): Likewise.
4720         * pch.c (save_idents): Use XNEW and XNEWVEC.
4721         (cpp_save_state): Use XNEW.
4722         (count_defs): Cast return value of htab_find.
4723         (write_defs): Likewise.
4724         (cpp_write_pch_deps): Use XNEWVEC.
4725         (collect_ht_nodes): Use XRESIZEVEC.
4726         (cpp_valid_state): Use XNEWVEC.
4727         (save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
4728         * symtab.c (ht_create): Use XCNEW.
4729         (ht_lookup_with_hash): Cast return value of obstack_copy0.
4730         (ht_expand): Use XCNEWVEC.
4731         * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
4732         (bool): Do not define if __cplusplus.
4734 2005-05-12  Zack Weinberg  <zack@codesourcery.com>
4736         * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
4737         (do_sccs): Delete function definition, #define to do_ident.
4738         (do_ident): Don't hardwire directive name.
4740 2005-05-12  Ryota Kunisawa  <kunisawa@access.co.jp>
4742         PR bootstrap/21230
4743         * configure: Regenerate.
4745 2005-04-27  Andris Pavenis  <pavenis@latnet.lv>
4747         * files.c: Include io.h for DJGPP to get prototype of setmode.
4749 2005-04-19  Per Bothner  <per@bothner.com>
4751         PR preprocessor/20907
4752         * line-map.c (linemap_line_start): Fix bug when we need to increse
4753         column_bits but can re-use the current line_map.
4755 2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4757         * system.h (fopen, fdopen, freopen): Define these to the unlocked
4758         libiberty functions.
4760 2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4762         * configure.ac (libcpp_UNLOCKED_FUNCS): New.
4763         (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
4764         * system.h (putchar, getc, getchar, clearerr, feof, fileno,
4765         fflush, fgetc, fgets, ferror, fread): Redefine to the associated
4766         _unlocked function.
4767         (fwrite_unlocked): Fix prototype.
4769         * configure, config.in: Regenerate.
4771 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
4773         PR preprocessor/19475
4774         * macro.c (create_iso_definition): For < ISO C99, don't
4775         pedwarn if there is no whitespace between macro name and its
4776         replacement, but the replacement starts with a basic character
4777         set character.
4779 2005-03-28  Andreas Jaeger  <aj@suse.de>
4781         * lex.c (warn_about_normalization): Cast field width to int to
4782         avoid warning.
4784 2005-03-19  Joseph S. Myers  <joseph@codesourcery.com>
4786         * configure.ac: Consistently use solaris2.1[0-9]* instead of
4787         solaris2.1[0-9].
4788         * configure: Regenerate.
4790 2005-03-15  Geoffrey Keating  <geoffk@apple.com>
4792         * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
4793         UCN rather than printing an error.
4795 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
4797         * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
4799 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
4801         * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
4802         * charset.c: Update for new format of ucnid.h.
4803         (ucn_valid_in_identifier): Update for new format of ucnid.h.
4804         Add NST parameter, and update it; update callers.
4805         (cpp_valid_ucn): Add NST parameter, update callers.  Replace abort
4806         with cpp_error.
4807         (convert_ucn): Pass normalize_state to cpp_valid_ucn.
4808         * internal.h (struct normalize_state): New.
4809         (INITIAL_NORMALIZE_STATE): New.
4810         (NORMALIZE_STATE_RESULT): New.
4811         (NORMALIZE_STATE_UPDATE_IDNUM): New.
4812         (_cpp_valid_ucn): New.
4813         * lex.c (warn_about_normalization): New.
4814         (forms_identifier_p): Add normalize_state parameter, update callers.
4815         (lex_identifier): Add normalize_state parameter, update callers.  Keep
4816         the state current.
4817         (lex_number): Likewise.
4818         (_cpp_lex_direct): Pass normalize_state to subroutines.  Check
4819         it with warn_about_normalization.
4820         * makeucnid.c: New.
4821         * ucnid.h: Replace.
4822         * ucnid.pl: Remove.
4823         * ucnid.tab: Make appropriate for input to makeucnid.c.  Remove
4824         comments about obsolete version of C++.
4825         * include/cpplib.h (enum cpp_normalize_level): New.
4826         (struct cpp_options): Add warn_normalize field.
4828 2005-03-11  Geoffrey Keating  <geoffk@apple.com>
4830         * directives.c (glue_header_name): Update call to cpp_spell_token.
4831         * internal.h (_cpp_interpret_identifier): New.
4832         * charset.c (_cpp_interpret_identifier): New.
4833         (_cpp_valid_ucn): Allow UCN version of '$'.
4834         * lex.c (lex_identifier): Add extra parameter to indicate if initial
4835         character was '$' or '\'.  Support identifiers with UCNs.
4836         (forms_identifier_p): Allow UCNs.
4837         (_cpp_lex_direct): Pass extra parameter to lex_identifier.
4838         (utf8_to_ucn): New.
4839         (cpp_spell_token): Add FORSTRING parameter.  Use it.
4840         (cpp_token_as_text): Update call to cpp_spell_token.
4841         (cpp_output_token): Write UCNs back out.
4842         (stringify_arg): Update call to cpp_spell_token.
4843         (paste_tokens): Likewise.
4844         (cpp_macro_definition): Likewise.
4845         * macro.c (stringify_arg): Likewise.
4846         (paste_tokens): Likewise.
4847         (cpp_macro_definition): Likewise.
4848         * include/cpplib.h: Add parameter to cpp_spell_token.
4850 2005-03-04  Jakub Jelinek  <jakub@redhat.com>
4852         PR bootstrap/20282
4853         PR bootstrap/20305
4854         * macro.c (replace_args, cpp_get_token): Copy whole
4855         cpp_token_u instead of just cpp_string field from it.
4857 2005-02-28  Devang Patel  <dpatel@apple.com>
4859         * directives.c (do_line): Save sysp early before line table is
4860         realloc'ed.
4862 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
4864         PR 18785
4865         * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
4866         (cpp_host_to_exec_charset): New function.
4867         * include/cpplib.h: Declare cpp_host_to_exec_charset.
4869 2005-02-19  Devang Patel  <dpatel@apple.com>
4871         * charset.c (_cpp_convert_input): Check '\r' before inserting
4872         '\n' at the end.
4874 2005-02-15  Eric Christopher  <echristo@redhat.com>
4876         PR preprocessor/19077
4877         * macro.c (cpp_macro_definition): Move handling of whitespace
4878         to PREV_WHITE conditional. Remove overloading of len
4879         variable.
4881 2005-02-14  Kazu Hirata  <kazu@cs.umass.edu>
4883         * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
4884         traditional.c: Update copyright.
4886 2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
4888         PR bootstrap/19818
4889         * configure.ac: Check for declaration of basename and getopt.
4890         * config.in: Regenerate.
4891         * configure: Regenerate.
4892         * internal.h (ustrcspn): New.
4893         * macro.c (create_iso_definition): Fix allocation of memory.
4894         (padding_token): Add cast to remove const-ness.
4895         * pch.c (cpp_read_state): Use ustrcspn.
4897 2005-02-08  Mike Stump  <mrs@apple.com>
4899         * files.c (pchf_adder): Remove.
4900         (struct pchf_adder_info): Likewise.
4901         (_cpp_save_file_entries): Write out all files so that #import works.
4903 2005-01-23  Joseph S. Myers  <joseph@codesourcery.com>
4905         * configure: Regenerate.
4907 2005-01-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4909         * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
4911         * include/cpplib.h: Also update copyright years.
4913 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
4915         * files.c (_cpp_find_file): Add files found by search_path_exhausted
4916         to the list of all files.
4918 2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4920         * internal.h: Update references to Cpp lib filenames.
4921         * directives.c: Likewise.
4922         * init.c: Likewise.
4923         * macro.c: Likewise.
4924         * traditional.c: Likewise.
4926 2004-12-15  Eric Botcazou  <ebotcazou@libertysurf.fr>
4928         PR preprocessor/15167
4929         * files.c (destroy_cpp_file): New function.
4930         (should_stack_file): Make a new file if the
4931         compared file is still stacked.
4933 2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>
4935         PR preprocessor/17610
4936         * directives.c (do_include_common): Error out if an empty filename
4937         is given for #include (or #include_next or #import).
4939 2004-11-27  Roger Sayle  <roger@eyesopen.com>
4940             Zack Weinberg  <zack@codesourcery.com>
4942         * internal.h: Replace all uses of uchar with unsigned char.
4943         * include/cpp-id-data.h: Likewise.  Guard typedef of uchar
4944         with !IN_GCC, so uchar is only defined whilst building libcpp.
4946 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
4948         * aclocal.m4: Regenerate.
4950 2004-11-24  Roger Sayle  <roger@eyesopen.com>
4952         PR preprocessor/15824
4953         * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
4954         directly, instead of the non-existant "system.h" and "ansidecl.h".
4955         * configure: Regenerate.
4957 2004-11-23  Daniel Jacobowitz  <dan@codesourcery.com>
4958             Joseph Myers  <joseph@codesourcery.com>
4960         * internal.h (struct lexer_state): Add in_deferred_pragma.
4961         * directives.c (struct pragma_entry): Add allow_expansion.
4962         (insert_pragma_entry): Take allow_expansion flag.
4963         (register_pragma): Likewise.
4964         (cpp_register_pragma): Likewise.
4965         (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
4966         (do_pragma): Honor allow_expansion.
4967         (cpp_handle_deferred_pragma): Set in_deferred_pragma.
4968         * include/cpplib.h (cpp_register_pragma): Update prototype.
4970 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
4971             Mark Mitchell  <mark@codesourcery.com>
4973         * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
4974         need_64bit_hwint=yes.
4975         * configure: Regenerate.
4977 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
4979         * Makefile.in ($(PACKAGE).pot): New rule.  Depend on
4980         po/$(PACKAGE).pot.
4981         (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
4982         arguments.  Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
4983         Remove local srcdir path from generated file.
4985 2004-11-04  Zack Weinberg  <zack@codesourcery.com>
4986             Gerald Pfeifer  <gerald@pfeifer.com>
4988         * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4989         as well.
4991 2004-10-27  Zack Weinberg  <zack@codesourcery.com>
4993         PR 18075
4994         * directives.c (do_pragma): Do not defer pragmas which are unknown.
4995         (cpp_handle_deferred_pragma): Add cast to silence warning.
4997 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
4999         * errors.c (_cpp_begin_message): Print "error: " for errors.
5001 2004-10-10  Andreas Jaeger  <aj@suse.de>
5003         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
5004         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
5006 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
5008         * pch.c (cpp_write_pch_state): Remove variable z as it is not
5009         used.
5010         (cpp_read_state): Remove unused variables, m, d and mac_count.
5012 2004-09-29  Per Bothner  <per@bothner.com>
5014         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
5015         cb.line_change.  Otherwise do_pragma will call the line_change
5016         call-back with a meaningless line number.
5018 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
5020         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
5021         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
5022         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
5023         * aclocal.m4, configure: Regenerate.
5024         * init.c: Include localedir.h.
5025         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
5026         (DEFS): Delete.
5027         (.c.o): Use $(ALL_CFLAGS).
5028         (localedir.h, localedir.hs): New rules.
5029         (clean): Use rm -rf to remove directories.
5030         (distclean): Also delete localedir.h and localedir.hs.
5031         (init.o): Update dependencies.
5033 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
5035         * Makefile.in (aclocal.m4): Update dependencies.
5036         * configure.ac (AC_CONFIG_MACRO_DIR): New.
5037         * aclocal.m4, configure: Regenerate.
5039 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
5041         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
5042         (_cpp_convert_input, _cpp_default_encoding): Add comments.
5043         Some other comments in this file also tweaked.
5045         * directives.c (do_pragma): Save current buffer position
5046         before lexing the pragma keywords; don't call
5047         _cpp_backup_tokens in the defer_pragmas case.
5049 2004-09-15  Per Bothner  <per@bothner.com>
5051         * include/line-map.h (line_map_start):  Add parameter names so
5052         preceding comment makes sense.
5053         (linemap_add):  Remove from comment mention of non-existing parameter.
5055 2004-09-09  Matt Austern  <austern@apple.com>
5056             Zack Weinberg  <zack@codesourcery.com>
5058         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
5059         prefixes throughout.  Add entry for PRAGMA.  Remove
5060         unnecessary "= 0" from EQ.
5061         (enum cpp_ttype): Adjust OP and TK definitions to restore
5062         prefixes, via token-paste.
5063         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
5064         Change from #defines to additional cpp_ttype enumerators.
5065         (struct cpp_options): Add defer_pragmas.
5066         (cpp_handle_deferred_pragma): Prototype new interface.
5068         * internal.h (struct cpp_reader): Add directive_result.
5069         * directives.c (struct pragma_entry): Add is_internal field;
5070         give boolean fields type bool.
5071         (start_directive): Initialize pfile->directive_result.type.
5072         (_cpp_do__Pragma): Likewise.
5073         (run_directive): Do not crash if pfile->buffer->prev is NULL.
5074         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
5075         from it.
5076         (register_pragma): New static function, bulk of former
5077         cpp_register_pragma here; add 'internal' argument, pass along
5078         to insert_pragma_entry.
5079         (cpp_register_pragma): Now a wrapper around register_pragma which
5080         always passes false for 'internal' argument.
5081         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
5082         true for 'internal'.
5083         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
5084         an internal pragma, save text till the end of the line as a CPP_PRAGMA
5085         token instead of executing the pragma.
5086         (cpp_handle_deferred_pragma): New interface.
5087         * lex.c (token_spellings): Adjust OP and TK definitions to
5088         match changes to cpplib.h.
5089         (_cpp_lex_token): Check for a directive-result token and
5090         return it if present.
5091         (cpp_token_val_index): Handle CPP_PRAGMA.
5092         * macro.c (cpp_builtin_macro_text): Correct comment.
5093         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
5095 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
5097         PR preprocessor/14699
5098         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
5099         from size_t to double.
5101 2004-08-28  Andreas Schwab  <schwab@suse.de>
5102             Andreas Jaeger <aj@suse.de>
5104         * configure.ac: Set PACKAGE correctly.
5105         * configure: Regenerated.
5107 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
5109         * Makefile.in: Add back top_builddir.
5111 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
5113         * configure.ac: Replace Automake macro invocations
5114         with manual Autoconf checks and substitutions.
5115         * configure: Regenerate.
5116         * aclocal.m4: Regenerate.
5117         * config.in: Regenerate.
5118         * Makefile.am: Removed.
5119         * Makefile.in: Heavy simplification and reorganization.
5121 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
5123         * configure.ac (arm*-*-eabi*): New target.
5124         (arm*-*-symbianelf*): Likewise.
5125         * configure: Regenerated.
5127 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
5129         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
5130         * directives.c: Use XNEW-family macros from libiberty.
5131         * lex.c: Likewise.
5132         * macro.c: Likewise.
5133         * cpplib.h (cpp_deps_style): Export enum with name.
5135 2004-07-23  Matthias Klose  <doko@debian.org>
5137         * init.c (init_library): Use PACKAGE for the text domain.
5139 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
5141         PR preprocessor/16366
5142         * internal.h (struct cpp_reader): New field dir_hash.
5143         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
5144         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
5146 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
5148         PR preprocessor/16192
5149         PR preprocessor/15913
5150         PR preprocessor/15572
5151         * expr.c (_cpp_parse_expr): Handle remaining cases where an
5152         expression is missing.
5153         * init.c (post_options): Traditional cpp doesn't do // comments.
5155 2004-06-30  Per Bothner  <per@bothner.com>
5157         * include/line-map.h (fileline):  Remove old typedef.
5158         * internal.h (struct cpp_reader):  Use source_location typedef instead.
5160 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
5162         Partially revert patch of 2004-06-05.
5163         * files.c (search_cache): Remove pfile argument.  Don't check
5164         for file that would be found by "" or <> search here...
5165         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
5166         Do not apply directory-of-current-file correction to files
5167         found by this check.  Rearrange code slightly.
5169 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
5171         * files.c (should_stack_file): Correct swapped parameters to call
5172         to cb.read_pch.
5173         * pch.c (cpp_valid_state): Handle -fpreprocessed.
5175 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5177         * Makefile.in: Regenerate with automake 1.8.5.
5178         * aclocal.m4: Likewise.
5179         * configure: Regenerate.
5181 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
5183         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
5184         * configure, config.in: Regenerate.
5185         * system.h: Unconditionally define bool as unsigned char,
5186         BOOL_BITFIELD as unsigned int.
5187         * .cvsignore: New file.
5189 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
5191         * traditional.c (push_replacement_text): Set macro->traditional.
5192         (save_replacement_text): Likewise.
5193         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
5194         (struct save_macro_item): Delete.
5195         (struct save_macro_data): Use a character array not the previous
5196         structured format.
5197         (save_macros): Save macro as text not as internal structures.
5198         (cpp_prepare_state): Update for changes to save_macro_data.
5199         (cpp_read_state): Don't read macros defined in PCH.  Restore
5200         -D macros as text.
5201         * macro.c (create_iso_definition): Honour alloc_subobject.
5202         Clear traditional flag.
5203         (_cpp_create_definition): Honour alloc_subobject.
5204         * lex.c (cpp_token_val_index): New.
5205         * internal.h: Include cpp-id-data.h.
5206         (uchar): Move definition to cpp-id-data.h.
5207         (U): Likewise.
5208         (cpp_macro): Likewise.
5209         * directives.c (struct answer): Move to cpp-id-data.h.
5210         (do_assert): Honour alloc_subobject.
5212         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
5213         * include/cpplib.h (struct cpp_string): Add GTY marker.
5214         (enum cpp_token_fld_kind): New.
5215         (struct cpp_token): Add GTY markers.
5216         (cpp_token_val_index): Prototype.
5217         (CPP_HASHNODE_VALUE_IDX): New.
5218         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
5219         * include/cpp-id-data.h: New file.
5221 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
5223         * Makefile.am (all-local): New.
5224         * Makefile.in: Regenerate.
5226 2004-06-06  Roger Sayle  <roger@eyesopen.com>
5228         * Makefile.am (LIBICONV): Declare.
5229         (makedepend_LDADD): Use LIBICONV.
5230         * Makefile.in: Regenerate.
5232 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
5234         * Makefile.am (LIBINTL): Declare
5235         (makedepend_LDADD): Use LIBINTL.
5236         * Makefile.in: Regenerate.
5238 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
5240         * Makefile.am: Add makedepend.
5241         * Makefile.in, aclocal.m4: Regenerate.
5242         * charset.c: Insert a space to avoid a warning.
5243         * directives.c: Include mkdeps.h.
5244         (_cpp_handle_directive): Reenable macro expander if appropriate.
5245         (undefine_macros): Inline body of _cpp_free_definition for speed.
5246         Do not call undef callback or _cpp_warn_if_unused_macro.
5247         (cpp_get_deps): New interface.
5248         * files.c (search_cache): Add pfile argument.  Check for file
5249         that would be found by "" or <> search here...
5250         (_cpp_find_file): ...not here.  Correct recorded start_dir of
5251         files found by directory-of-current-file search that would be
5252         found by "" or <> search.
5253         * init.c (cpp_add_dependency_target): Delete.
5254         * internal.h (struct lexer_state): Add discarding_output flag.
5255         * lex.c (lex_identifier): Compute hash function while scanning.
5256         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
5257         directives.
5258         * makedepend.c: New file.
5259         * mkdeps.c (struct deps): Add vpath vector.
5260         (apply_vpath, deps_add_vpath): New function.
5261         (deps_free): Free vpath vector.
5262         (deps_add_dep, deps_add_target): Use apply_vpath.
5263         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
5264         (ht_lookup_with_hash): New function.
5265         * cpplib.h, mkdeps.h: Update prototypes.
5266         * symtab.h: Update prototypes.
5267         (HT_HASHSTEP, HT_FINISH): New macros.
5269 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
5271         * symtab.c (ht_create): Set entries_owned.
5272         (ht_destroy): Honour entries_owned.
5273         (ht_expand): Likewise.
5274         (ht_load): New.
5275         * include/symtab.h (struct ht): New field 'entries_owned'
5276         (ht_load): New prototype.
5278 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
5280         PR bootstrap/15651
5281         * configure.ac: Fix m4 quoting when picking
5282         the size of HOST_WIDE_INT.
5283         * configure: Regenerate.
5285 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
5287         * Makefile.am: the correct directory for
5288         gettext include files is given by @INCINTL@.
5289         * Makefile.in: Regenerate.
5291 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
5293         * system.h [!ENABLE_NLS]: dgettext takes two
5294         parameters.
5296 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
5298         Moved libcpp from the gcc subdirectory to the toplevel.
5299         * Makefile.am: New file.
5300         * Makefile.in: Regenerate.
5301         * configure.ac: New file.
5302         * configure: Regenerate.
5303         * config.in: Regenerate.
5304         * charset.c: Moved from gcc/cppcharset.c.  Add note about
5305         brokenness of input charset detection.  Adjust for change
5306         in name of cppucnid.h.
5307         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
5308         * expr.c: Moved from gcc/cppexp.c.
5309         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
5310         Remove #define of O_BINARY, it is in system.h.
5311         * identifiers.c: Moved from gcc/cpphash.c.
5312         * internal.h: Moved from gcc/cpphash.h.  Change header
5313         guard name.  All other files adjusted to match name change.
5314         * init.c: Moved from gcc/cppinit.c.
5315         (init_library) [ENABLE_NLS]: Call bindtextdomain.
5316         * lex.c: Moved from gcc/cpplex.c.
5317         * directives.c: Moved from gcc/cpplib.c.
5318         * macro.c: Moved from gcc/cppmacro.c.
5319         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
5320         * traditional.c: Moved from gcc/cpptrad.c.
5321         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
5322         guard name.
5323         * ucnid.pl: Moved from gcc/cppucnid.pl.
5324         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
5325         guard name.
5326         * symtab.c: Moved from gcc/hashtable.c.
5327         * line-map.c: Moved from gcc.  Do not include intl.h.
5328         * mkdeps.c: Moved from gcc.
5329         * system.h: New file.
5330         * include/cpplib.h: Moved from gcc.  Change header guard name.
5331         * include/line-map.h: Moved from gcc.  Change header guard name.
5332         * include/mkdeps.h: Moved from gcc.  Change header guard name.
5333         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
5334         guard name.
5336 Copyright (C) 2004-2018 Free Software Foundation, Inc.
5338 Copying and distribution of this file, with or without modification,
5339 are permitted in any medium without royalty provided the copyright
5340 notice and this notice are preserved.