OSDN Git Service

Add line map statistics to -fmem-report output
[pf3gnuchains/gcc-fork.git] / libcpp / ChangeLog
1 2011-10-15  Tom Tromey  <tromey@redhat.com>
2             Dodji Seketeli  <dodji@redhat.com>
3
4         * line-map.h (struct linemap_stats): Declare new struct.
5         (linemap_get_statistics): Declare ...
6         * line-map.c (linemap_get_statistics):  ... new function.
7         * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
8         Declare new counters.
9         (enter_macro_context, replace_args): Update
10         num_macro_tokens_counter.
11         (cpp_get_token_1): Update num_expanded_macros_counter.
12
13 2011-10-15  Tom Tromey  <tromey@redhat.com>
14             Dodji Seketeli  <dodji@redhat.com>
15
16         * include/cpplib.h (struct cpp_options)<debug>: New struct member.
17         * include/line-map.h (linemap_dump_location): Declare ...
18         * line-map.c (linemap_dump_location): ... new function.
19
20 2011-10-15  Tom Tromey  <tromey@redhat.com>
21             Dodji Seketeli  <dodji@redhat.com>
22
23         * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
24         New option.
25         * internal.h (struct macro_context): New struct.
26         (enum context_tokens_kind): New enum.
27         (struct cpp_context)<tokens_kind>: New member of type enum
28         context_tokens_kind.
29         (struct cpp_context)<macro>: Remove this.  Replace it with an enum
30         of macro and  macro_context.
31         (struct cpp_context)<direct_p>: Remove.
32         (_cpp_remaining_tokens_num_in_context): Declare new function.
33         * directives.c (destringize_and_run): Adjust.
34         * lex.c (_cpp_remaining_tokens_num_in_context)
35         (_cpp_token_from_context_at): Define new functions
36         (cpp_peek_token): Use them.
37         * init.c (cpp_create_reader): Initialize the base context to zero.
38         (_cpp_token_from_context_at): Define new static function.
39         (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
40         _cpp_token_from_context_at.
41         * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
42         members.
43         (enum macro_arg_token_kind): New enum.
44         (struct macro_arg_token_iter): New struct.
45         (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
46         (alloc_expanded_arg_mem, ensure_expanded_arg_room)
47         (delete_macro_args, set_arg_token, get_arg_token_location)
48         (arg_token_ptr_at, macro_arg_token_iter_init)
49         (macro_arg_token_iter_get_token)
50         (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
51         (expanded_token_index, tokens_buff_new, tokens_buff_count)
52         (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
53         (tokens_buff_add_token, tokens_buff_remove_last_token)
54         (reached_end_of_context, consume_next_token_from_context): New
55         static functions.
56         (cpp_get_token_1): New static function. Split and extended from
57         cpp_get_token.  Use reached_end_of_context and
58         consume_next_token_from_context.  Unify its return point.  Move
59         the location tweaking from cpp_get_token_with_location in here.
60         (cpp_get_token): Use cpp_get_token_1
61         (stringify_arg): Use the new arg_token_at.
62         (paste_all_tokens): Support tokens coming from extended tokens
63         contexts.
64         (collect_args): Return the number of collected arguments, by
65         parameter.  Store virtual locations of tokens that constitute the
66         collected args.
67         (funlike_invocation_p): Return the number of collected arguments,
68         by parameter.
69         (enter_macro_context): Add a parameter for macro expansion point.
70         Pass it to replace_args and to the "used" cpp callback.  Get the
71         number of function-like macro arguments from funlike_invocation_p,
72         pass it to the new delete_macro_args to free the memory used by
73         macro args.  When -ftrack-macro-expansion is in effect, for macros
74         that have no arguments, create a macro map for the macro expansion
75         and use it to allocate proper virtual locations for tokens
76         resulting from the expansion.  Push an extended tokens context
77         containing the tokens resulting from macro expansion and their
78         virtual locations.
79         (replace_args): Rename the different variables named 'count' into
80         variables with more meaningful names.  Create a macro map;
81         allocate virtual locations of tokens resulting from this
82         expansion.  Use macro_arg_token_iter to iterate over tokens of a
83         given macro.  Handle the case of the argument of
84         -ftrack-macro-expansion being < 2.  Don't free macro arguments
85         memory resulting from expand_arg here, as these are freed by the
86         caller of replace_arg using delete_macro_args now.  Push extended
87         token context.
88         (next_context, push_ptoken_context, _cpp_push_token_context)
89         (_cpp_push_text_context): Properly initialize the context.
90         (expand_arg): Use the new alloc_expanded_arg_mem,
91         push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
92         (_cpp_pop_context): Really free the memory held by the context.
93         Handle freeing memory used by extended tokens contexts.
94         (cpp_get_token_with_location): Use cpp_get_token_1.
95         (cpp_sys_macro_p): Adjust.
96         (_cpp_backup_tokens): Support the new kinds of token contexts.
97         * traditional.c (recursive_macro): Adjust.
98
99 2011-10-15  Tom Tromey  <tromey@redhat>
100             Dodji Seketeli  <dodji@redhat.com>
101
102         * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
103         member.
104         (MAX_SOURCE_LOCATION): New constant.
105         (struct line_map_ordinary, struct line_map_macro): New structs.
106         (struct line_map): Turn this into a union of the two above.  Add
107         comments.
108         (struct maps_info): New struct.
109         (struct line_maps)<info_ordinary, info_macro>: Two new fields.
110         These now carry the map information that was previously scattered
111         in struct line_maps.
112         (struct map_info::allocated): Fix comment.
113         (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
114         (ORDINARY_MAP_STARTING_LINE_NUMBER)
115         (ORDINARY_MAP_INCLUDER_FILE_INDEX)
116         (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
117         (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
118         (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
119         (MACRO_MAP_EXPANSION_POINT_LOCATION)
120         (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
121         (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
122         (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
123         (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
124         (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
125         (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
126         (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
127         (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
128         (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
129         (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
130         (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
131         information.
132         (linemap_check_ordinary, linemap_assert)
133         (linemap_location_before_p): New macros.
134         (linemap_position_for_line_and_column)
135         (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
136         (linemap_macro_expansion_map_p)
137         (linemap_macro_map_loc_to_def_point)
138         (linemap_macro_map_loc_unwind_once)
139         (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
140         (linemap_get_source_line linemap_get_source_column)
141         (linemap_map_get_macro_name, linemap_get_file_path)
142         (linemap_location_in_system_header_p)
143         (linemap_location_from_macro_expansion_p): Declare new functions.
144         (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
145         (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
146         accessors act on ordinary maps only.
147         (INCLUDED_FROM): Return NULL for main files; use the new
148         accessors.
149         (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
150         (struct expanded_location): Move here from gcc/input.h
151         (linemap_resolve_location, linemap_expand_location)
152         (linemap_expand_location_full): Declare new functions.
153         * line-map.c: Include cpplib.h, internal.h
154         (linemap_enter_macro, linemap_add_macro_token)
155         (linemap_get_expansion_line, linemap_get_expansion_filename): New
156         functions that are private to libcpp.
157         (linemap_assert): New macro.
158         (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
159         (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
160         (linemap_macro_map_loc_unwind_toward_spelling)
161         (linemap_macro_map_loc_to_exp_point)
162         (first_map_in_common_1, first_map_in_common): New static
163         functions.
164         (new_linemap): Define new static functions.  Extracted and
165         enhanced from ...
166         (linemap_add): ... here.  Use linemap_assert in lieu of abort
167         previously.
168         (linemap_tracks_macro_expansion_locs_p)
169         (linemap_add_macro_token, linemap_macro_expansion_map_p)
170         (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
171         (linemap_macro_map_loc_to_def_point)
172         (linemap_macro_map_loc_unwind_once)
173         (linemap_step_out_once, linemap_map_get_index)
174         (linemap_get_source_line,linemap_get_source_column)
175         (linemap_get_file_path, linemap_map_get_macro_name)
176         (linemap_location_in_system_header_p)
177         (linemap_location_originated_from_system_header_p)
178         (linemap_location_from_macro_expansion_p)
179         (linemap_tracks_macro_expansion_locs_p)
180         (linemap_resolve_location, linemap_expand_location)
181         (linemap_expand_location_full)
182         (linemap_tracks_macro_expansion_locs_p)
183         (linemap_position_for_line_and_column, linemap_compare_locations):
184         Define new public functions.
185         (linemap_init): Initialize ordinary and macro maps information in
186         the map set.
187         (linemap_check_files_exited): Use the new accessors.
188         (linemap_free): Remove this dead code.
189         (linemap_line_start): Assert this uses an ordinary map.  Adjust to
190         use the new ordinary map accessors and data structures.  Don't
191         overflow past the lowest possible macro token's location.
192         (linemap_position_for_column): Assert the ordinary maps of the map
193         set are really ordinary.  Use ordinary map accessors.
194         (linemap_lookup): Keep the same logic but generalize to allow
195         lookup of both ordinary and macro maps.  Do not crash when called
196         with an empty line table.
197         * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
198         new API of line-map.h.
199         * directives.c (start_directive, do_line, do_linemarker)
200         (do_linemarker): Likewise.
201         * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
202         (make_cpp_dir, cpp_make_system_header): Likewise.
203         * init.c (cpp_read_main_file): Likewise.
204         * internal.h (CPP_INCREMENT_LINE): Likewise.
205         (linemap_enter_macro, linemap_add_macro_token)
206         (linemap_get_expansion_line, linemap_get_expansion_filename): New
207         functions private to libcpp.
208         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
209         (skip_line_comment, skip_whitespace, lex_raw_string)
210         (_cpp_lex_direct): Likewise.
211         * macro.c (_cpp_builtin_macro_text): Likewise.
212         (_cpp_aligned_alloc): Initialize the new name member of the macro.
213         * traditional.c (copy_comment, _cpp_scan_out_logical_line):
214         Likewise.
215         * errors.c (cpp_diagnostic): Adjust to new linemap API.
216
217 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
218
219         * line-map.c (linemap_add): Assert that reason must not be
220         LC_RENAME when called for the first time on a "main input file".
221
222 2011-08-22  Gabriel Charette  <gchare@google.com>
223
224         * init.c (cpp_create_reader): Inititalize forced_token_location_p.
225         * internal.h (struct cpp_reader): Add field forced_token_location_p.
226         * lex.c (_cpp_lex_direct): Use forced_token_location_p.
227         (cpp_force_token_locations): New.
228         (cpp_stop_forcing_token_locations): New.
229
230 2011-08-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
231
232         PR libstdc++/1773
233         * init.c (cpp_init_builtins): Define __cplusplus 19971L.
234
235 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
236
237         * include/cpplib.h (struct cpp_options): Fix typo.
238
239 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
240
241         * include/cpplib.h (struct cpp_options): Add rliterals.
242         * init.c  (struct lang_flags, lang_defaults): Add rliterals.
243         (cpp_set_lang): Set rliterals option.
244         (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
245         * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
246
247 2011-08-15  Gabriel Charette  <gchare@google.com>
248
249         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
250         Update all users to use linemap_position_for_column instead.
251
252 2011-07-28  Gabriel Charette  <gchare@google.com>
253
254         * include/line-map.h (struct line_maps):
255         Remove unused field last_listed. Update all users.
256
257 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
258
259         * configure.ac: Set need_64bit_hwint to yes for x86 targets.
260         * configure: Regenerated.
261
262 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
263
264         * system.h [__cplusplus]: Wrap C function declarations in extern "C".
265
266 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
267             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
268
269         PR bootstrap/49794
270         * configure.ac: Test AM_ICONV with CXX.
271         * configure: Regenerate.
272         * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
273
274 2011-07-15  Dodji Seketeli  <dodji@redhat.com>
275
276         * directives.c (struct if_stack): Use source_location as type
277         here.
278         * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
279         indent, def_pragma, used_define, used_undef>: Properly use
280         source_location as parameter type, rather than unsigned int.
281
282 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
283
284         PR target/39150
285         * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
286         like i[34567]86-*-solaris2.1[0-9]*.
287         * configure: Regenerate.
288
289 2011-06-16  Jason Merrill  <jason@redhat.com>
290
291         PR c++/45399
292         * lex.c (lex_raw_string): Don't check for embedded NUL.
293
294 2011-06-06  Dodji Seketeli  <dodji@redhat.com>
295
296         PR preprocessor/48532
297         * directives.c (do_pragma): Don't forget the invocation location
298         when parsing the pragma name of a namespaced pragma directive.
299
300 2011-05-29  John Tytgat  <John.Tytgat@aaug.net>
301
302         * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
303
304 2011-05-22  Uros Bizjak  <ubizjak@gmail.com>
305
306         PR target/49104
307         * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
308         is defined.  Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
309
310 2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
311
312         * system.h (ENUM_BITFIELD): Remove.
313
314 2011-04-24  Jakub Jelinek  <jakub@redhat.com>
315
316         PR preprocessor/48740
317         * lex.c (lex_raw_string): When raw string ends with
318         ??) followed by raw prefix and ", ensure it is preprocessed
319         with ??) rather than ??].
320
321 2011-04-20  Jim Meyering  <meyering@redhat.com>
322
323         * files.c (destroy_cpp_file): Remove useless if-before-free.
324         * init.c (cpp_destroy): Likewise.
325         * macro.c (replace_args): Likewise.
326         * pch.c (cpp_valid_state): Likewise.
327
328 2011-03-25  Kai Tietz  <ktietz@redhat.com>
329
330         * files.c (file_hash_eq): Use filename_cmp
331         instead of strcmp.
332         (nonexistent_file_hash_eq): Likewise.
333         (remap_filename): Likewise.
334         Handle absolute DOS-path,
335         (append_file_to_dir): Check for IS_DIR_SEPARATOR
336         instead of slash.
337         (read_name_map): Likewise.
338         * linemap.c (linemap_add): Use filename_cmp
339         instead of strcmp.
340         * mkdeps.c (apply_vpath): Use filename_ncmp
341         instead of strncmp.
342         (deps_restore): Use filename_cmp instead of
343         strcmp.
344         * init.c (read_original_directory): Use
345         IS_DIR_SEPARATOR instead of checking for slash.
346
347 2011-03-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
348
349         PR preprocessor/48192
350         * directives.c (do_ifdef): Do not consider conditional macros as
351         being defined.
352         (do_ifndef): Ditto.
353         * expr.c (parse_defined): Ditto.
354
355 2011-03-18  Richard Henderson  <rth@redhat.com>
356
357         PR bootstrap/45381
358         * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
359
360 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
361             Jakub Jelinek  <jakub@redhat.com>
362
363         PR preprocessor/39213
364         * directives.c (end_directive): Call _cpp_remove_overlay for deferred
365         pragmas as well in traditional mode.
366
367 2010-11-17  Ian Lance Taylor  <iant@google.com>
368
369         PR bootstrap/45538
370         * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS.  Remove switch of
371         AC_LANG based on ENABLE_BUILD_WITH_CXX.
372
373 2010-11-16  Kai Tietz  <kai.tietz@onevision.com>
374
375         PR preprocessor/17349
376         * lex.c (save_comment): Handle in argument passing c++
377         comments special.
378
379 2010-11-02  Ian Lance Taylor  <iant@google.com>
380
381         * configure.ac: Use AC_SYS_LARGEFILE.
382         * configure: Rebuild.
383         * config.in: Rebuild.
384
385 2010-10-19  Basile Starynkevitch  <basile@starynkevitch.net>
386
387         * line-map.h (source_location): Remove obsolete comment
388         mentioning location_s.
389
390 2010-09-29  Kai Tietz  <kai.tietz@onevision.com>
391
392         PR preprocessor/45362
393         * directives.c (cpp_pop_definition): Make static.
394         (do_pragma_push_macro): Reworked to store text
395         definition.
396         (do_pragma_pop_macro): Add free text definition.
397         (cpp_push_definition): Removed.
398         * include/cpplib.h (cpp_push_definition): Removed.
399         (cpp_pop_definition): Likewise.
400         * internal.h (def_pragma_macro): Remove member 'value'
401         and add new members 'definition', 'line',
402         'syshdr', 'sued' and 'is_undef'.
403         * pch.c (_cpp_restore_pushed_macros): Rework to work
404         on text definition and store additional macro flags.
405         (_cpp_save_pushed_macros): Likewise.
406
407 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
408
409         * include/cpplib.h (cpp_options): Rename warn_deprecated,
410         warn_traditional, warn_long_long and pedantic.
411         * directives.c (directive_diagnostics, _cpp_handle_directive):
412         Update names of cpp_options members.
413         * expr.c (cpp_classify_number, eval_token): Update names of
414         cpp_options members.
415         * init.c (cpp_create_reader, post_options): Update names of
416         cpp_options members.
417         * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
418         cpp_options members.
419         * macro.c (parse_params): Update names of cpp_options members.
420
421 2010-09-15  Ian Lance Taylor  <iant@google.com>
422
423         * init.c: Fix type name in comment.
424
425 2010-08-31  Jakub Jelinek  <jakub@redhat.com>
426
427         PR preprocessor/45457
428         * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
429         needed.
430         * directives.c (do_ifdef, do_ifndef): Likewise.
431
432 2010-08-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
433
434         * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
435
436 2010-08-24  Richard Henderson  <rth@redhat.com>
437
438         PR bootstrap/45376
439         * configure.ac (HAVE_SSE4): New check.
440         * configure, config.in: Rebuild.
441         * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
442
443 2010-08-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
444
445         * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
446         etc. on Solaris 2/x86.
447
448 2010-08-21  Richard Henderson  <rth@redhat.com>
449             Andi Kleen <ak@linux.intel.com>
450             David S. Miller  <davem@davemloft.net>
451
452         * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
453         (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
454         (ptrdiff_t): Check via AC_CHECK_TYPE.
455         * config.in, configure: Rebuild.
456         * system.h: Include stdint.h, if available.
457         * lex.c (WORDS_BIGENDIAN): Provide default.
458         (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
459         acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
460         search_line_sse2, search_line_sse42, init_vectorized_lexer,
461         search_line_fast): New.
462         (_cpp_clean_line): Use search_line_fast.  Restructure the fast
463         loop to make it clear when we're leaving the loop.  Stay in the
464         fast loop for non-trigraph '?'.
465
466 2010-06-11  Jakub Jelinek  <jakub@redhat.com>
467
468         * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
469         callback.
470         (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
471         (cpp_macro_definition): Remove const qual from second argument.
472         * macro.c (enter_macro_context): Call user_builtin_macro callback for
473         NODE_BUILTIN !NODE_USED macros.
474         (warn_of_redefinition): Likewise.  Remove const qual from second
475         argument.
476         (cpp_macro_definition): Likewise.
477         * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
478         for NODE_BUILTIN !NODE_USED macros.
479
480 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
481
482         * include/cpplib.h (struct cpp_options): Remove show_column.
483         * init.c (cpp_create_reader, post_options): Don't set show_column.
484
485 2010-06-09  Joern Rennecke  <joern.rennecke@embecosm.com>
486
487         PR bootstrap/44432
488         * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
489         check that C++ compiler works.
490         * configure: Regenerate.
491
492 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
493
494         * include/symtab.h (ht_identifier_ptr): New.
495
496 2010-06-03  Joern Rennecke <joern.rennecke@embecosm.com>
497             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
498
499         PR bootstrap/42798
500         * configure.ac: Check for declaration of 'basename(char *)'.
501         * configure: Regenerate.
502         * config.in: Regenerate.
503
504 2010-04-25  Joseph Myers  <joseph@codesourcery.com>
505
506         * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
507         * init.c (lang_defaults): Add entries for new language variants.
508         (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
509         variants.
510
511 2010-04-09  Manuel López-Ibáñez <manu@gcc.gnu.org>
512
513         PR cpp/43195
514         * files.c (report_missing_guard): Test for #pragma once.
515
516 2010-04-07  Simon Baldwin  <simonb@google.com>
517
518         * directives.c (do_diagnostic): Add warning reason argument,
519         call appropriate error reporting function for code.
520         (directive_diagnostics): Call specific warning functions with
521         warning reason where appropriate.
522         (do_error, do_warning, do_pragma_dependency): Add warning reason
523         argument to do_diagnostic calls.
524         * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
525         _cpp_create_definition): Call specific warning functions with
526         warning reason where appropriate.
527         * Makefile.in: Add new diagnostic functions to gettext translations.
528         * include/cpplib.h (struct cpp_callbacks): Add warning reason code
529         to error callback.
530         (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
531         CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
532         (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
533         CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
534         CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
535         CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
536         CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
537         CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
538         CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
539         warning reason codes.
540         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
541         cpp_warning_with_line, cpp_pedwarning_with_line,
542         cpp_warning_with_line_syshdr): New specific error reporting functions.
543         * pch.c (cpp_valid_state): Call specific warning functions with
544         warning reason where appropriate.
545         * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
546         diagnostic handlers.
547         (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
548         cpp_warning_with_line, cpp_pedwarning_with_line,
549         cpp_warning_with_line_syshdr): New specific error reporting functions.
550         * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
551         specific warning functions with warning reason where appropriate.
552         * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
553         warn_about_normalization, lex_identifier_intern, lex_identifier,
554         _cpp_lex_direct): Ditto.
555         * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
556         narrow_str_to_charconst): Ditto.
557
558 2010-04-06  Jakub Jelinek  <jakub@redhat.com>
559
560         PR preprocessor/43642
561         * lex.c (lex_raw_string): Change type of TYPE variable to
562         unsigned char.
563
564 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
565
566         * aclocal.m4: Regenerate.
567
568 2010-03-29  Jason Merrill  <jason@redhat.com>
569
570         More N3077 raw string changes
571         * charset.c (cpp_interpret_string): Don't transform UCNs in raw
572         strings.
573         * lex.c (bufring_append): Split out from...
574         (lex_raw_string): ...here.  Undo trigraph and line splicing
575         transformations.  Do process line notes in multi-line literals.
576         (_cpp_process_line_notes): Ignore notes that were already handled.
577
578         Some raw string changes from N3077
579         * charset.c (cpp_interpret_string): Change inner delimiters to ().
580         * lex.c (lex_raw_string): Likewise.  Also disallow '\' in delimiter.
581
582 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
583
584         * init.c (read_original_filename): Don't call read_original_directory
585         if _cpp_handle_directive returns 0.
586
587 2010-01-01  Joseph Myers  <joseph@codesourcery.com>
588
589         PR preprocessor/41947
590         * expr.c (cpp_classify_number): Give error for hexadecimal
591         floating-point constant with no digits before or after point.
592
593 2009-11-20  Arnaud Charlet  <charlet@adacore.com>
594
595         * macro.c (enter_macro_context): Call cb.used callback if defined.
596         * directives.c (do_idef, do_ifndef): Ditto.
597         * include/cpplib.h (struct cpp_callbacks): Add used callback.
598
599 2009-11-11  Kai Tietz  <kai.tietz@onevision.com>
600
601         * directives.c (do_pragma_push_macro): New pragma handler.
602         (do_pragma_pop_macro): Likewise.
603         (_cpp_init_internal_pragmas): Add push_macro and
604         pop_macro handler to internal pragmas.
605         (lex_macro_node_from_str): Removed.
606         (cpp_push_definition): Replace lex_macro_node_from_str
607         by _cpp_lex_identifier.
608         (cpp_pop_definition): Likewise.
609         * internal.h (_cpp_lex_identifier): New prototype.
610         (def_pragma_macro): New structure.
611         (cpp_reader): New member pushed_macros.
612         * lex.c (_cpp_lex_identifier): New function.
613         (lex_identifier_intern): New function.
614         * init.c (cpp_create_reader): Initialize pushed_macros
615         member.
616         (cpp_destroy): Free elements in pushed_macros member.
617         * pch.c (_cpp_save_pushed_macros): New function.
618         (_cpp_restore_pushed_macros): Likewise.
619         (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
620         (cpp_read_state): Use _cpp_restore_pushed_macros.
621
622 2009-10-19  Jakub Jelinek  <jakub@redhat.com>
623
624         * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
625         (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
626         and char32_cset_desc.
627         (converter_for_type): Handle CPP_UTF8STRING.
628         (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
629         * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
630         (parse_include): Reject raw strings.
631         * include/cpplib.h (CPP_UTF8STRING): New token type.
632         * internal.h (struct cpp_reader): Add utf8_cset_desc field.
633         * lex.c (lex_raw_string): New function.
634         (lex_string): Handle u8 string literals, call lex_raw_string
635         for raw string literals.
636         (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
637         sequences.
638         * macro.c (stringify_arg): Handle CPP_UTF8STRING.
639
640 2009-10-14  Jakub Jelinek  <jakub@redhat.com>
641
642         PR preprocessor/41543
643         * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
644         * line-map.c (linemap_init): Initialize highest_location and
645         highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
646
647 2009-10-09  Jason Merrill  <jason@redhat.com>
648
649         * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
650
651 2009-10-09  Neil Vachharajani <nvachhar@google.com>
652
653         * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
654         sccs.
655
656 2009-09-23  Loren J. Rittle  <ljrittle@acm.org>
657
658         * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
659         * configure: Rebuilt.
660
661 2009-09-22  Richard Guenther  <rguenther@suse.de>
662
663         PR pch/38987
664         * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
665
666 2009-09-18  Chris Demetriou  <cgd@google.com>
667
668         PR preprocessor/28435:
669         * include/cpplib.h (struct cpp_options): Add new member
670         deps.need_preprocessor_output.
671         * files.c (open_file_failed): If preprocessor output is needed
672         always report an error.
673
674 2009-09-13  Kai Tietz  <kai.tietz@onevision.com>
675
676         * configure.ac: Set for i?86-w64-mingw*
677         need_64bit_hwint to yes.
678         * configure: Regenerated.
679
680 2009-09-10  Jason Merrill  <jason@redhat.com>
681
682         * directives.c (cpp_define): constify.
683
684 2009-09-02  Ian Lance Taylor  <iant@google.com>
685
686         * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
687
688 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
689
690         * configure.ac (AC_PREREQ): Bump to 2.64.
691
692 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
693
694         * aclocal.m4: Regenerate.
695         * config.in: Regenerate.
696         * configure: Regenerate.
697
698 2009-08-17  Tom Tromey  <tromey@redhat.com>
699
700         PR preprocessor/41067:
701         * charset.c (convert_escape): Add missing ":" to error text.
702
703 2009-07-27  Douglas B Rupp  <rupp@gnat.com>
704
705         * include/cpplib.h (INO_T_CPP): New macro.
706         (struct cpp_dir): Use it.
707
708 2009-07-20  Jerry Quinn  <jlquinn@optonline.net>
709
710         PR regression/40800
711         * configure.ac: Use = instead of == for testing
712         ENABLE_BUILD_WITH_CXX.
713         * configure: Rebuild.
714
715 2009-07-17  Jerry Quinn  <jlquinn@optonline.net>
716
717         * directives.c (do_linemarker, do_line): Use CPP_STRING for
718         ignored enum value.
719         * files.c (find_file_in_dir): Add cast from void* to char*.
720         * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
721         * Makefile.in: (WARN_CFLAGS): Use general and C-specific
722         warnings.
723         (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
724         ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
725         COMPILER_FLAGS): New.
726         (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
727         (COMPILE.base): Use COMPILER instead of CC.  Use COMPILER_FLAGS
728         instead of ALL_CFLAGS.
729         * configure.ac: Invoke AC_PROG_CXX.  Separate C-specific warnings
730         from other warnings.  Add -Wc++-compat to C-specific warnings.
731         Check for --enable-build-with-cxx.  Set and substitute
732         ENABLE_BUILD_WITH_CXX.  Invoke ZW_PROG_COMPILER_DEPENDENCIES
733         according to ENABLE_BUILD_WITH_CXX.  Invoke AC_LANG before
734         AC_CHECK_HEADERS.
735         * configure: Rebuild.
736         * include/cpp-id-data.h: Remove extern "C".
737         * include/line-map.h: Likewise.
738         * include/mkdeps.h: Likewise.
739         * include/symtab.h: Likewise.
740         * internal.h: Likewise.
741
742 2009-06-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
743
744         * directives.c (parse_include): Add location argument. Update all
745         calls.
746         (parse_answer): Likewise.
747         (do_include_common): Error with exact location.
748         (parse_assertion): Likewise.
749
750 2009-06-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
751
752         * expr.c (num_div_op): Take explicit location.
753
754 2009-06-17  Ian Lance Taylor  <iant@google.com>
755
756         * include/cpplib.h (progname): Don't declare.
757
758 2009-06-12  Ian Lance Taylor  <iant@google.com>
759
760         * include/cpplib.h (struct cpp_options): Add
761         warn_cxx_operator_names field.
762         (NODE_WARN_OPERATOR): Define.
763         (struct cpp_hashnode): Increase flags field to 10 bits, decrease
764         type to 6 bits.
765         * init.c (mark_named_operators): Add flags parameter.
766         (cpp_post_options): Pick flags value to pass to
767         mark_named_operators.
768         * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
769         identifier is an operator name in C++.
770
771 2009-06-01  Aldy Hernandez  <aldyh@redhat.com>
772
773         * include/line-map.h (LAST_SOURCE_COLUMN): New.
774
775 2009-06-01  Ian Lance Taylor  <iant@google.com>
776
777         * include/cpp-id-data.h: Add extern "C".
778         * include/line-map.h: Likewise.
779         * include/mkdeps.h: Likewise.
780         * include/symtab.h: Likewise.
781         * internal.h: Likewise.
782
783 2009-05-15  Ian Lance Taylor  <iant@google.com>
784
785         * include/cpplib.h (enum cpp_builtin_type): Rename from enum
786         builtin_type.  Change all uses.
787
788 2009-05-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
789
790         PR cpp/36674
791         * directives (do_linemarker): Compensate for the increment in
792         location that occurs when we reach the end of line.
793         * files (_cpp_stack_include): Mention _cpp_find_file in the
794         comment.
795
796 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
797
798         * include/cpplib.h (enum cpp_token_fld_kind): Add
799         CPP_TOKEN_FLD_TOKEN_NO.
800         (struct cpp_macro_arg, struct cpp_identifier): Define.
801         (union cpp_token_u): Use struct cpp_identifier for identifiers.
802         Use struct cpp_macro_arg for macro arguments.  Add token_no for
803         CPP_PASTE token numbers.
804         * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
805         do_pragma_poison, parse_assertion): Use val.node.node in place of
806         val.node.
807         * expr.c (parse_defined, eval_token): Use val.node.node in place
808         of val.node.
809         * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
810         cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
811         cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
812         place of val.arg_no.  Use val.node.node in place of val.node.
813         * macro.c (replace_args, cpp_get_token, parse_params,
814         lex_expansion_token, create_iso_definition, cpp_macro_definition):
815         Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
816         Use val.node.node in place of val.node.
817
818 2009-05-03  Joseph Myers  <joseph@codesourcery.com>
819
820         * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
821         UTF-8 sequences.
822
823 2009-04-25  Joseph Myers  <joseph@codesourcery.com>
824
825         PR preprocessor/39559
826         * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
827         constants larger than intmax_t in C99 mode.
828
829 2009-04-21  Taras Glek <tglek@mozilla.com>
830
831         * include/cpp-id-data.h: Update GTY annotations to new syntax.
832         * include/cpplib.h: Likewise.
833         * include/line-map.h: Likewise.
834         * include/symtab.h: Likewise.
835
836 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
837
838         PR c++/14875
839         * lex.c (cpp_type2name): Take a flags parameter. Call
840         cpp_named_operator2name for named operators and cpp_digraph2name
841         for digraphs.
842         (cpp_digraph2name): New.
843         (cpp_spell_token): Use it.
844         (cpp_output_token): Likewise.
845         * include/cpplib.h (cpp_type2name): Update declaration.
846         * init.c (cpp_named_operator2name): New.
847         * internal.h (cpp_named_operator2name): Declare.
848
849 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
850
851         PR c++/13358
852         * init.c (cpp_create_reader): Wlong_long is disabled by default.
853         * expr.c (cpp_classify_number): Give different messages for C and
854         C++ front-ends.
855
856 2009-04-19  Joseph Myers  <joseph@codesourcery.com>
857
858         PR preprocessor/20078
859         * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
860         field.
861         * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
862         (struct cpp_token): Change flags to unsigned short.
863         * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
864         (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
865         (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
866         tokens.
867         * macro.c (macro_real_token_count): New.
868         (enter_macro_context, replace_args): Use macro_real_token_count.
869         (create_iso_definition): Record whitespace surrounding and digraph
870         spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
871         Set extra_tokens and save CPP_PASTE tokens with arg_no set for
872         multiple consecutive ## tokens.
873         (_cpp_create_definition): Initialize extra_tokens.
874         (cpp_macro_definition): Use macro_real_token_count.
875
876 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
877
878         * directives.c (parse_include): Pass true to check_eol.
879
880 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
881
882         PR preprocessor/39646
883         * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
884         * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
885         * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
886         place of LC_RENAME.
887
888 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
889
890         PR preprocessor/39647
891         * directives.c (check_eol): Add parameter expand.
892         (do_undef, parse_include, do_line, do_linemarker, do_ident,
893         do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
894         do_else, do_endif, do_assert, do_unassert): All callers changed.
895         Pass true from do_line, false elsewhere.
896
897 2009-04-12  Joseph Myers  <joseph@codesourcery.com>
898
899         PR preprocessor/31869
900         * macro.c (stringify_arg): Handle NULL source token in padding
901         token where previous padding token did not have source token with
902         preceding whitespace.
903
904 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
905
906         * Makefile.in: Change copyright header to refer to version
907         3 of the GNU General Public License and to point readers at the
908         COPYING3 file and the FSF's license web page.
909         * charset.c: Likewise.
910         * directives-only.c: Likewise.
911         * directives.c: Likewise.
912         * errors.c: Likewise.
913         * expr.c: Likewise.
914         * files.c: Likewise.
915         * identifiers.c: Likewise.
916         * include/cpp-id-data.h: Likewise.
917         * include/cpplib.h: Likewise.
918         * include/line-map.h: Likewise.
919         * include/mkdeps.h: Likewise.
920         * include/symtab.h: Likewise.
921         * init.c: Likewise.
922         * internal.h: Likewise.
923         * lex.c: Likewise.
924         * line-map.c: Likewise.
925         * macro.c: Likewise.
926         * makeucnid.c: Likewise.
927         * mkdeps.c: Likewise.
928         * pch.c: Likewise.
929         * symtab.c: Likewise.
930         * system.h: Likewise.
931         * traditional.c: Likewise.
932         * ucnid.tab: Likewise.
933         * ucnid.h: Regenerate.
934
935 2009-04-01  Janis Johnson  <janis187@us.ibm.com>
936
937         PR c/39027
938         * include/cpplib.h (CPP_N_DEFAULT): Define.
939         * expr.c (interpret_float_suffix): Recognize d or D for double,
940         return new value for default.
941         (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
942
943         PR c/33466
944         * expr.c (interpret_float_suffix): Reject invalid suffix that uses
945         letters from decimal float and fixed-point suffixes.
946
947 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
948
949         PR preprocessor/15638
950         * files.c (_cpp_find_file): Call open_file_failed after diagnosing
951         invalid PCH.
952         (open_file_failed): Make error for missing file fatal.
953         * include/cpplib.h (CPP_DL_FATAL): Define.
954
955 2009-03-30  Sergiy Vyshnevetskiy  <serg@vostok.net>
956
957         PR preprocessor/31932:
958         * internal.h: Don't mention HAVE_ICONV_H.
959         * configure, config.in: Rebuild.
960         * configure.ac: Don't check for iconv.h.
961
962 2009-03-30  Tom Tromey  <tromey@redhat.com>
963
964         PR preprocessor/39512:
965         * line-map.c (linemap_init): Initialize 'reallocator' field.
966
967 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
968
969         PR target/39558
970         * macro.c (cpp_get_token): If macro_to_expand returns NULL
971         and used some tokens, add CPP_PADDING before next token.
972
973 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
974
975         PR preprocessor/34695
976         * makedepend.c: Remove.
977         * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
978         (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
979         * directives.c (cpp_errors): Remove.
980         * errors.c (print_location, _cpp_begin_message, v_message):
981         Remove.
982         (cpp_error, cpp_error_with_line): Always use error callback.
983         (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
984         * include/cpplib.h (cpp_options): Remove pedantic_errors,
985         inhibit_warnings, warn_system_headers, inhibit_errors,
986         warnings_are_errors, client_diagnostic.
987         (cpp_callbacks): Add extra arguments to error callback; make it
988         return bool.
989         (cpp_finish): Return void.
990         (cpp_destroy): Remove inaccurate comment about return value.
991         (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
992         (CPP_DL_NOTE): Define.
993         * include/line-map.h (linemap_print_containing_files): Remove.
994         * init.c (cpp_finish): Do not check for or return number of
995         errors.
996         * internal.h (cpp_reader): Remove errors field.
997         * line-map.c (linemap_print_containing_files): Remove.
998         * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
999         about previous definition.  Only emit it if previous diagnostic
1000         was emitted.
1001
1002 2009-03-28  Joseph Myers  <joseph@codesourcery.com>
1003
1004         * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1005         mkinstalldirs.
1006
1007 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
1008
1009         * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1010
1011 2009-02-21  Joseph Myers  <joseph@codesourcery.com>
1012
1013         * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1014         header name.
1015         (_cpp_lex_direct): Handle this.
1016
1017 2009-02-15  Richard Guenther  <rguenther@suse.de>
1018
1019         Revert last change.
1020
1021 2009-02-13  Richard Guenther  <rguenther@suse.de>
1022
1023         * configure.ac: Enable LFS.
1024         * configure: Re-generate.
1025         * config.in: Likewise.
1026
1027 2009-01-05  Ben Elliston  <bje@au.ibm.com>
1028
1029         * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1030         (.po.pox): Likewise.
1031         (po/$(PACKAGE).pot): Likewise.
1032
1033 2008-12-10  Alexandre Oliva  <aoliva@redhat.com>
1034
1035         PR target/37033
1036         * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1037         Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1038
1039 2008-11-29  Joseph Myers  <joseph@codesourcery.com>
1040
1041         * lex.c (cpp_token_len): Use 6 as default length.
1042
1043 2008-10-31  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1044
1045         * expr.c (struct op): Add location.
1046         (_cpp_parse_expr): Propagate locations throught the stack
1047         of expressions.
1048         (reduce): Likewise.
1049         (check_promotion): Use explicit location in errors.
1050
1051 2008-10-05  Matthew Gingell  <gingell@adacore.com>
1052             Arnaud Charlet  <charlet@adacore.com>
1053
1054         * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1055         (cpp_get_comments): New function.
1056         * internal.h (struct cpp_reader): Add comments field.
1057         * init.c (cpp_destroy): Free comments.
1058         * lex.c (store_comment, cpp_get_comments): New functions.
1059         (comments): New struct.
1060         (save_comment): Store comments in comments struct.
1061
1062 2008-09-18  Simon Baldwin  <simonb@google.com>
1063
1064         * include/cpplib.h (struct cpp_options): Add new boolean flag
1065         warn_builtin_macro_redefined.
1066         * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1067         * (struct builtin_operator): Split out from previous struct builtin,
1068         enhance extra const correctness.
1069         * (struct builtin_macro): Split out from previous struct builtin, add
1070         new always_warn_if_redefined flag, enhance const correctness.
1071         * (mark_named_operators): Use struct builtin_operator.
1072         * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1073         to builtins selectively.
1074         * macro.c (warn_of_redefinition): Return false if a builtin macro
1075         is not flagged with NODE_WARN.
1076
1077 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
1078
1079         PR preprocessor/36649
1080         * files.c (struct report_missing_guard_data): New type.
1081         (report_missing_guard): Put paths into an array instead of printing
1082         them right away.  Return 1 rather than 0.
1083         (report_missing_guard_cmp): New function.
1084         (_cpp_report_missing_guards): Sort and print paths gathered by
1085         report_missing_guard callback.
1086
1087 2008-07-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1088
1089         PR 28079
1090         * directives.c (strtolinenum): Handle overflow.
1091         (do_line): Give a warning if line number overflowed.
1092         (do_linemarker): Update call to strtolinenum.
1093
1094 2008-07-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1095
1096         * include/line-map.h (linenum_type): New typedef.
1097         (struct line_map): Use it.
1098         (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1099         (SOURCE_COLUMN): Likewise.
1100         * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1101         source_location values in a variable of type linenum_type.
1102         * directives.c (struct if_stack): Use linenum_type.
1103         (strtoul_for_line): Rename as strtolinenum.
1104         (do_line): Use linenum_type.
1105         (do_linemarker): Use linenum_type and strtolinenum.
1106         (_cpp_do_file_change): Use linenum_t.
1107         * line-map.c (linemap_add): Likewise.
1108         (linemap_line_start): Likewise.
1109         * traditional.c (struct fun_macro): 'line' is a source_location.
1110         * errors.c (print_location): Use linenum_type.
1111         * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1112         * internal.h (CPP_INCREMENT_LINE): Likewise.
1113         * lex.c (_cpp_skip_block_comment): Use source_location.
1114         
1115 2008-07-14  Ben Elliston  <bje@au.ibm.com>
1116
1117         * include/cpplib.h (NODE_CONDITIONAL): New.
1118         (struct cpp_callbacks): New macro_to_expand field.
1119         (struct cpp_hashnode): Adjust size of flags and type fields.
1120         (cpp_peek_token): Prototype.
1121         * lex.c (cpp_peek_token): New function.
1122         (_cpp_temp_token): Protect pre-existing lookaheads.
1123         * macro.c (cpp_get_token): Expand any conditional macros.
1124         (_cpp_backup_tokens_direct): New.
1125         (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1126         (warn_of_redefinition): Silently allow redefined conditional
1127         macros.
1128         (_cpp_create_definition): Remove the conditional flag when a user
1129         defines one of the conditional macros.
1130         * internal.h (_cpp_backup_tokens_direct): New prototype.
1131
1132 2008-06-13  Andrew Haley  <aph@redhat.com>
1133
1134         PR preprocessor/33305
1135         * macro.c (replace_args): Print a warning for empty macro
1136         arguments in C89 and C++.
1137
1138 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1139
1140         * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1141         * configure: Regenerate.
1142
1143 2008-06-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1144
1145         * Makefile.in (datarootdir): New variable.
1146
1147 2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1148
1149         PR preprocessor/36479
1150         * charset.c (cpp_interpret_string_notranslate): Also set
1151         narrow_cset_desc.width.
1152
1153 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
1154
1155         * configure.ac (parisc*64*-*-*): Remove.
1156         * configure: Regenerate.
1157
1158 2008-05-30  Tom Tromey  <tromey@redhat.com>
1159
1160         PR preprocessor/36320:
1161         * internal.h (_cpp_parse_expr): Update.
1162         * expr.c (_cpp_parse_expr): Add 'is_if' argument.  Update error
1163         messages.
1164         * directives.c (do_if): Update.
1165         (do_elif): Require expression if processing group.
1166
1167 2008-05-30  Danny Smith  <dannysmith@users.sourceforge.net>
1168
1169         * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1170
1171 2008-05-21  Tom Tromey  <tromey@redhat.com>
1172
1173         PR preprocessor/27777:
1174         * lex.c (cpp_output_line_to_string): New function.
1175         * internal.h (_cpp_begin_message): Don't declare.
1176         * errors.c (_cpp_begin_message): Now static.
1177         * include/cpplib.h (cpp_output_line_to_string): Declare.
1178         * directives.c (do_diagnostic): Rewrote.  Use
1179         cpp_output_line_to_string.  Don't use _cpp_begin_message.
1180
1181 2008-05-21  Tom Tromey  <tromey@redhat.com>
1182
1183         * include/symtab.h (HT_ALLOCED): Remove.
1184         (ht_purge): Declare.
1185         * symtab.c (DELETED): New define.
1186         (ht_lookup): Update comment.
1187         (ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
1188         code.  Use subobject allocator for strings, if it exists.
1189         (ht_expand): Handle deleted entries.
1190         (ht_forall): Likewise.
1191         (ht_purge): New function.
1192         (ht_dump_statistics): Print deletion statistics.
1193
1194 2008-05-13  Tom Tromey  <tromey@redhat.com>
1195
1196         PR preprocessor/22168:
1197         * include/cpplib.h (struct cpp_options) <objc>: Update
1198         documentation.
1199         * expr.c (eval_token): Warn for use of assertions.
1200         * directives.c (directive_diagnostics): Warn about extensions.
1201         (DEPRECATED): New define.
1202         (DIRECTIVE_TABLE): Use it.
1203
1204 2008-05-06  Tom Tromey  <tromey@redhat.com>
1205
1206         PR preprocessor/35313, PR preprocessor/36088:
1207         * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1208         (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1209
1210 2008-05-04  David S. Miller  <davem@davemloft.net>
1211
1212         * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1213         * configure: Regenerate.
1214
1215 2008-04-22  Daniel Franke  <franke.daniel@gmail.com>
1216
1217         * include/cpplib.h (cpp_define_formatted): New.
1218         * directives.c (cpp_define_formatted): New.
1219
1220 2008-04-21  Tom Tromey  <tromey@redhat.com>
1221
1222         PR libcpp/33415:
1223         * charset.c (_cpp_convert_input): Add buffer_start argument.
1224         Ignore UTF-8 BOM if seen.
1225         * internal.h (_cpp_convert_input): Add argument.
1226         * files.c (struct _cpp_file) <buffer_start>: New field.
1227         (destroy_cpp_file): Free buffer_start, not buffer.
1228         (_cpp_pop_file_buffer): Likewise.
1229         (read_file_guts): Update.
1230
1231 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
1232
1233         * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1234         * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1235         (struct cpp_options): Added uliterals.
1236         (cpp_interpret_string): Update prototype.
1237         (cpp_interpret_string_notranslate): Idem.
1238         * charset.c (init_iconv_desc): New width member in cset_converter.
1239         (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1240         (convert_ucn): Idem.
1241         (emit_numeric_escape): Idem.
1242         (convert_hex): Idem.
1243         (convert_oct): Idem.
1244         (convert_escape): Idem.
1245         (converter_for_type): New function.
1246         (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1247         (cpp_interpret_string_notranslate): Match changed prototype.
1248         (wide_str_to_charconst): Use converter_for_type.
1249         (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1250         * directives.c (linemarker_dir): Macro U changed to UC.
1251         (parse_include): Idem.
1252         (register_pragma_1): Idem.
1253         (restore_registered_pragmas): Idem.
1254         (get__Pragma_string): Support CPP_STRING{16,32}.
1255         * expr.c (eval_token): Support CPP_CHAR{16,32}.
1256         * init.c (struct lang_flags): Added uliterals.
1257         (lang_defaults): Idem.
1258         * internal.h (struct cset_converter) <width>: New field.
1259         (struct cpp_reader) <char16_cset_desc>: Idem.
1260         (struct cpp_reader) <char32_cset_desc>: Idem.
1261         * lex.c (digraph_spellings): Macro U changed to UC.
1262         (OP, TK): Idem.
1263         (lex_string): Add support for u'...', U'...', u"..." and U"...".
1264         (_cpp_lex_direct): Idem.
1265         * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1266         (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1267
1268 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
1269
1270         PR bootstrap/35457
1271         * aclocal.m4: Regenerate.
1272         * configure: Regenerate.
1273
1274 2008-04-17  Tom Tromey  <tromey@redhat.com>
1275
1276         PR libcpp/34866:
1277         * errors.c (cpp_error): Don't reference a token before the start
1278         of the current run.
1279
1280 2008-04-16  Tom Tromey  <tromey@redhat.com>
1281
1282         * Makefile.in (TAGS_SOURCES): New variable.
1283         (TAGS): New target.
1284
1285 2008-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
1286
1287         * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1288         and shbe-*-*.
1289         * configure: Rebuilt.
1290
1291 2008-04-02  Joseph Myers  <joseph@codesourcery.com>
1292
1293         * include/cpplib.h (struct cpp_callbacks): Add used_define,
1294         used_undef and before_define.
1295         (NODE_USED): Define.
1296         * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1297         do_ifndef, cpp_pop_definition): Handle new flag and use new
1298         callbacks.
1299         * expr.c (parse_defined): Handle new flag and use new callbacks.
1300         * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1301         flag and use new callbacks.
1302
1303 2008-04-01  Jakub Jelinek  <jakub@redhat.com>
1304
1305         PR pch/13675
1306         * files.c (struct _cpp_file): Remove pch field.
1307         (pch_open_file): Don't set file->pch, just file->pchname.
1308         (should_stack_file): After pfile->cb.read_pch call
1309         free pchname and clear pchname, don't close file->fd.
1310         Test file->pchname instead of file->pch.  Don't close fd after cb.
1311         (_cpp_stack_include): Test file->pchname instead of file->pch.
1312
1313 2008-03-28  Tom Tromey  <tromey@redhat.com>
1314
1315         * Makefile.in (POSTCOMPILE): New variable.
1316         (.c.o): Use it.
1317
1318 2008-03-13  Tom Tromey  <tromey@redhat.com>
1319
1320         PR libcpp/35322:
1321         * directives.c (destringize_and_run): Set pfile->directive.
1322
1323 2008-03-06  Markus Milleder  <markus.milleder@generali.at>
1324
1325         PR preprocessor/35458
1326         * mkdeps.c (munge): Quote '#' with a '\'.
1327
1328 2008-02-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1329
1330         PR preprocessor/35379
1331         * mkdeps.c (deps_write): Ensure the first target always appears
1332         in the first column, without leading backslash newline.  Avoid
1333         some more extra whitespace.
1334
1335 2008-02-25  Thiemo Seufer <ths@mips.com>
1336
1337         * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
1338
1339 2008-02-19  Tom Tromey  <tromey@redhat.com>
1340
1341         * traditional.c (lex_identifier): Use CPP_HASHNODE.
1342         * lex.c (lex_identifier): Use CPP_HASHNODE.
1343         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
1344         do-while.
1345         * identifiers.c (alloc_node): Change return type.
1346         (_cpp_init_hashtable): Don't cast 'alloc_node'.
1347         (proxy_assertion_broken): New declaration.
1348         (cpp_forall_identifiers): Move comment.
1349         * line-map.c (linemap_add): Comment fix.
1350         (linemap_line_start): Indentation fix.
1351
1352 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
1353
1354         PR preprocessor/34692
1355         * macro.c (collect_args): Add pragma_buff argument.  Push
1356         CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1357         than into arguments.  Reset prevent_expansion and parsing_args
1358         state at CPP_PRAGMA_EOL/CPP_EOF.
1359         (funlike_invocation_p): Add pragma_buff argument, pass it through
1360         to collect_args.
1361         (enter_macro_context): Add result argument.  Adjust
1362         funlike_invocation_p caller.  Emit all deferred pragma tokens
1363         gathered during collect_args before the expansion, add a padding
1364         token.  Return 2 instead of 1 if any pragma tokens were prepended.
1365         (cpp_get_token): If enter_macro_context returns 2, don't return
1366         a padding token, instead cycle to grab CPP_PRAGMA token.
1367         * directives.c (_cpp_handle_directive): If was_parsing_args
1368         in deferred pragma, leave parsing_args and prevent_expansion as is.
1369
1370 2008-01-22  Tom Tromey  <tromey@redhat.com>
1371
1372         PR c++/34859
1373         * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1374         __STDC_CONSTANT_MACROS.
1375
1376 2008-01-07  Fred Fish  <fnf@specifix.com>
1377
1378         PR preprocessor/30363
1379         * traditional.c (replace_args_and_push): Add local variable
1380         cxtquote, calculate the replacement text size assuming a 
1381         worst case of every input character quoted with backslash,
1382         and properly handle output quoting of quote characters in
1383         actual arguments used in function-like macros.
1384
1385 2008-01-03  Tom Tromey  <tromey@redhat.com>
1386
1387         PR preprocessor/34602
1388         * directives.c (do_line): Don't try to spell EOF token.
1389         (do_linemarker): Add comment.
1390
1391 2007-12-11  DJ Delorie  <dj@redhat.com>
1392
1393         * charset.c (convert_using_iconv): Close out any shift states,
1394         returning to the initial state.
1395
1396 2007-12-06  Tom Tromey  <tromey@redhat.com>
1397
1398         PR c/29172
1399         * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1400         type.
1401         <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1402         * files.c (FILE_HASH_POOL_SIZE): New macro.
1403         (struct file_hash_entry_pool): New.
1404         (destroy_all_cpp_files): New function.
1405         (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1406         (new_file_hash_entry): Update.
1407         (free_file_hash_entries): New function.
1408         (_cpp_cleanup_files): Call free_file_hash_entries and
1409         destroy_all_cpp_files.
1410         (cpp_clear_file_cache): New function.
1411         * include/cpplib.h (cpp_clear_file_cache): Declare.
1412
1413 2007-12-03  Tom Tromey  <tromey@redhat.com>
1414
1415         PR preprocessor/34288
1416         * configure.ac, config.in: Rebuilt.
1417         * configure.ac: Check for ssize_t.
1418
1419 2007-11-30  Tom Tromey  <tromey@redhat.com>
1420
1421         PR preprocessor/32868
1422         * macro.c (_cpp_create_definition): Special case
1423         __STDC_FORMAT_MACROS.
1424
1425 2007-11-16  Michael Matz  <matz@suse.de>
1426
1427         * files.c (search_path_head): Fix check for absolute paths.
1428
1429 2007-11-11  Tom Tromey  <tromey@redhat.com>
1430
1431         PR c++/17557
1432         * include/cpplib.h (cpp_included_before): Declare.
1433         * files.c (struct file_hash_entry) <location>: New field.
1434         (_cpp_find_file): Initialize new field.
1435         (make_cpp_dir): Likewise.
1436         (cpp_included_before): New function.
1437
1438 2007-11-01  Tom Tromey  <tromey@redhat.com>
1439
1440         PR preprocessor/30805
1441         * macro.c (paste_tokens): Handle padding token.
1442         (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1443
1444 2007-10-31  Tom Tromey  <tromey@redhat.com>
1445
1446         PR preprocessor/30786
1447         * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1448         * directives.c (_cpp_do__Pragma): Return error status.
1449         * internal.h (_cpp_do__Pragma): Update.
1450         * directives.c (get__Pragma_string): Back up if EOF seen.
1451
1452 2007-09-06  Tom Tromey  <tromey@redhat.com>
1453
1454         * internal.h (struct cpp_reader) <invocation_location>: New
1455         field.
1456         (struct cpp_reader) <set_invocation_location>: Likewise.
1457         * init.c (cpp_set_line_map): New function.
1458         * line-map.c (linemap_add): Use linemap's allocator.
1459         * include/line-map.h (GTY): Define.
1460         (line_map_realloc): New typedef.
1461         (struct line_map): Mark with GTY.
1462         (struct line_maps): Likewise.
1463         (struct line_maps) <maps>: Likewise.
1464         (struct line_maps) <reallocator>: New field.
1465         * include/symtab.h (GTY): Conditionally define.
1466         * include/cpplib.h (cpp_set_line_map): Declare.
1467         (cpp_get_token_with_location): Declare.
1468         * macro.c (cpp_get_token): Set invocation_location on the reader.
1469         (cpp_get_token_with_location): New function.
1470
1471 2007-08-30  Chao-ying Fu  <fu@mips.com>
1472
1473         * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1474         ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1475         (cpp_classify_number): Support decimal fixed-point constants without
1476         exponents.
1477         Warn about fixed-point constants when -pedantic.
1478         * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1479         comments to support fixed-point values.
1480         (CPP_N_FRACT, CPP_N_ACCUM): Define.
1481
1482 2007-08-18  Tom Tromey  <tromey@redhat.com>
1483
1484         PR preprocessor/32974
1485         * directives.c (parse_include): Don't check for EOL when
1486         processing #pragma dependency.
1487
1488 2007-07-30  Ollie Wild  <aaw@google.com>
1489
1490         * directives-only.c: New file.
1491         * internal.h (struct _cpp_dir_only_callbacks): New.
1492         (_cpp_preprocess_dir_only): New function.
1493         * directives.c (_cpp_handle_directive): Check directives_only before
1494         disabling execution of indented directives.
1495         * files.c (_cpp_stack_file): Add directives_only check.
1496         * include/cpplib.h (struct cpp_options): Add directives_only.
1497         (cpp_init_special_builtins): New function.
1498         * init.c (cpp_init_special_builtins): New function.
1499         (cpp_init_builtins): Move builtin_array initialization to
1500         cpp_init_special_builtins.
1501         (post_options): Check directives_only before setting
1502         pfile->state.prevent_expansion = 1.
1503         * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1504         is expanded inside a directive while -fdirectives-only is enabled.
1505         * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1506         (libcpp_a_SOURCES): Add directives-only.c.
1507
1508 2007-07-04  Uros Bizjak  <ubizjak@gmail.com>
1509
1510         * traditional.c (_cpp_scan_out_logical_line): Initialize
1511         fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1512         fmacro.args to prevent 'may be used uninitialized' warning.
1513
1514 2007-07-03  Uros Bizjak  <ubizjak@gmail.com>
1515
1516         * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1517         Add new constants.
1518         * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1519         suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1520         for 'q' or 'Q' suffixes.
1521
1522 2007-06-17  Danny Smith  <dannysmith@users.sourceforge.net
1523
1524         * files.c (open_file): Correct typo.
1525
1526 2007-06-16  Vladimir Prus  <vladimir@codesourcery.com>
1527
1528         * files.c (open_file): Prevent the call
1529         for stat from overwriting errno.
1530
1531 2007-06-09  Vladimir Prus  <vladimir@codesourcery.com>
1532
1533         * files.c (open_file): Account for the
1534         fact that on windows, opening a directory gives
1535         EACCES.
1536
1537 2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
1538
1539         PR preprocessor/23479
1540         * expr.c (cpp_classify_number): Implement 0b-prefixed binary
1541         integer constants.
1542         (append_digit): Likewise.
1543         * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
1544         binary integer constants.
1545
1546 2007-05-31  Dave Korn  <dave.korn@artimi.com>
1547
1548         PR preprocessor/14331
1549         * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
1550
1551 2007-05-24  Ollie Wild  <aaw@google.com>
1552
1553         * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
1554         * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
1555         (cpp_write_pch_state): Save __COUNTER__ state.
1556         (cpp_valid_state): Check valid __COUNTER__ state.
1557         (cpp_read_state): Read new __COUNTER__ state.
1558         * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
1559         * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
1560         * internal.h (struct cpp_reader): Add counter member.
1561
1562 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
1563
1564         PR preprocessor/20077
1565         * macro.c (create_iso_definition): Fixed the method to determine
1566         whether the token-pasting operator appears at the beginning or the end
1567         of a macro.
1568
1569 2007-05-21  Ian Lance Taylor  <iant@google.com>
1570
1571         * internal.h (struct cpp_reader): Add new fields:
1572         nonexistent_file_hash and nonexistent_file_ob.
1573         * files.c: Include "obstack.h".
1574         (find_file_in_dir): Before trying to open the file, look up the
1575         path name in the hash table of nonexistent files.  After failing
1576         to open the file, add the path name to the hash table.
1577         (_cpp_find_file): Cache the results of looking up the file name
1578         starting with the quote and bracket chain heads, if we can.
1579         (nonexistent_file_hash_eq): New static function.
1580         (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
1581         pfile->nonexistent_file_ob.
1582         (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
1583         pfile->nonexistent_file_ob.
1584
1585 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
1586
1587         * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
1588
1589         PR c/31924
1590         * expr.c (interpret_float_suffix): Check for invalid suffix.
1591
1592 2007-05-02  Eric Christopher  <echristo@apple.com>
1593
1594         * expr.c (num_div_op): Don't overflow if the result is
1595         zero.
1596
1597 2007-05-02  Tom Tromey  <tromey@redhat.com>
1598
1599         PR preprocessor/28709
1600         * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
1601
1602 2007-03-30  Michael Meissner  <michael.meissner@amd.com>
1603
1604         * directives.c (lex_macro_node_from_str): Fix alloca call to be
1605         type correct.
1606
1607 2007-03-30  Richard Henderson  <rth@redhat.com>
1608
1609         * directives.c (lex_macro_node_from_str): New.
1610         (cpp_push_definition, cpp_pop_definition): New.
1611         * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
1612
1613 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1614
1615         * Makefile.in: Add dummy install-pdf target.
1616
1617 2007-01-30  Tom Tromey  <tromey@redhat.com>
1618
1619         PR preprocessor/30468
1620         * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
1621         './'.
1622
1623 2007-01-30  Tom Tromey  <tromey@redhat.com>
1624
1625         PR preprocessor/29966
1626         * macro.c (lex_expansion_token): Save and restore cpp_reader's
1627         cur_token.
1628         (_cpp_create_definition): Don't restore cur_token here.
1629         * lex.c (_cpp_lex_token): Added assertion.
1630
1631 2007-01-27  Tom Tromey  <tromey@redhat.com>
1632
1633         * configure: Rebuilt.
1634
1635 2007-01-12  Tom Tromey  <tromey@redhat.com>
1636
1637         PR preprocessor/28227
1638         * directives.c (lex_macro_node): Added 'is_def_or_undef'
1639         argument.
1640         (do_define): Update.
1641         (do_undef): Update.
1642         (do_ifdef): Update.
1643         (do_ifndef): Update.
1644
1645 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
1646
1647         * configure: Regenerate.
1648
1649 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
1650
1651         * configure: Regenerate.
1652
1653 2007-01-04  Tom Tromey  <tromey@redhat.com>
1654
1655         PR preprocessor/28165
1656         * internal.h (cpp_in_primary_file): New function.
1657         * directives.c (do_include_next): Use cpp_in_primary_file.
1658         (do_pragma_once): Likewise.
1659         (do_pragma_system_header): Likewise.
1660
1661 2006-12-29  Ian Lance Taylor  <iant@google.com>
1662
1663         * lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
1664         look backward at the end of the line unless we saw a backslash.
1665
1666 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
1667
1668         PR preprocessor/29612
1669         * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
1670         only when new_sysp is non-zero.
1671
1672 2006-12-28  Tom Tromey  <tromey@redhat.com>
1673
1674         PR preprocessor/30001
1675         * charset.c (_cpp_convert_input): Check that to.len is greater
1676         than zero.
1677
1678 2006-11-20  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1679
1680         * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
1681         * configure: Rebuilt.
1682
1683 2006-11-01      Douglas Gregor <doug.gregor@gmail.com>
1684
1685         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
1686         for experimental C++0x mode.
1687         * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
1688         adopted the preprocessor changes introduced in C99.
1689
1690 2006-10-29  Joseph Myers  <joseph@codesourcery.com>
1691
1692         * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
1693         depending on --enable-targets=all.
1694         * configure: Regenerate.
1695
1696 2006-10-12  Jakub Jelinek  <jakub@redhat.com>
1697
1698         PR preprocessor/28709
1699         * macro.c (paste_tokens): Do error reporting here, use BUF with the
1700         spelled LHS token as opposed to spelling it again.
1701         (paste_all_tokens): Don't report errors here, just break on failure.
1702
1703 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1704
1705         * Makefile.in: Added empty "pdf" target.
1706
1707 2006-09-22  Geoffrey Keating  <geoffk@apple.com>
1708
1709         * configure.ac: Make need_64_bit_hwint case for x86-darwin
1710         match exactly the glob in gcc/config.gcc.
1711         * configure: Regenerate.
1712
1713 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
1714
1715         PR c/28768
1716         PR preprocessor/14634
1717         * lex.c (lex_string): Pedwarn for unterminated literals.
1718
1719 2006-09-08  Eric Christopher  <echristo@apple.com>
1720
1721         * configure.ac: Add 64-bit HWI support for i?86-darwin.
1722
1723 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
1724
1725         PR c++/28288
1726         PR c++/14556
1727         * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
1728         (CPP_LAST_EQ): Change.
1729         (CPP_LAST_PUNCTUATOR): Change.
1730         * expr.c (cpp_operator): Remove MIN and MAX.
1731         (reduce): Remove CPP_MIN and CPP_MAX.
1732         (num_binary_op): Ditto.
1733         * lex.c (_cpp_lex_direct): Ditto.
1734         (cpp_avoid_paste): Remove ? as legal symbol after > or <.
1735
1736 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
1737
1738         PR preprocessor/27746
1739         * directives.c (do_pragma): Handle pragma with valid namespace
1740         and invalid name coming from macro expansion.
1741         * directives.c (destringize_and_run): Initialize next field in
1742         context.
1743
1744         PR c/27747
1745         PR c++/27748
1746         * directives.c (destringize_and_run): Set NO_EXPAND on the
1747         tokens.
1748
1749         * macro.c (_cpp_backup_tokens): Fix comment typo.
1750
1751 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
1752
1753         * Makefile.in (CATALOGS): Add po/ prefix.
1754         * configure: Regenerated.
1755
1756 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
1757
1758         * Makefile.in: Add install-html target. Add install-html to .PHONY
1759
1760 2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
1761
1762         * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
1763         * files.c (_cpp_get_file_stat): New function.
1764         * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
1765         * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
1766         * internal.h (_cpp_get_file_stat): Prototype.
1767         (struct cpp_buffer): Add timestamp.
1768
1769 2006-01-23  Jakub Jelinek  <jakub@redhat.com>
1770
1771         PR preprocessor/25717
1772         * init.c (cpp_init_builtins): If __STDC__ will not change value
1773         between system headers and other sources, define it as a normal
1774         macro rather than a builtin.
1775         * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
1776         cpp_in_system_header condition.
1777
1778 2006-01-05  Paolo Bonzini  <bonzini@gnu.org>
1779
1780         * Makefile.in: Use -MMD instead of -MD.
1781
1782 2006-01-04  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
1783             Richard Henderson  <rth@redhat.com>
1784
1785         Merge from gomp branch:
1786         * directives.c (struct pragma_entry): Add is_deferred.  Add ident
1787         entry to value union.
1788         (end_directive): Don't eat the line if in_deferred_pragma.
1789         (run_directive): Remove pragma hacks.
1790         (insert_pragma_entry): Remove.
1791         (new_pragma_entry): New.
1792         (register_pragma_1): Split out of register_pragma.  Only handle
1793         the lookup tree and return the new entry.
1794         (cpp_register_pragma): Fill in the pragma entry here.
1795         (cpp_register_deferred_pragma): New.
1796         (register_pragma_internal): New.
1797         (_cpp_init_internal_pragmas): Use register_pragma_internal.
1798         (do_pragma): Allow pragma expansion after namespace.  For deferred
1799         pragmas, don't slurp the line into a string.
1800         (destringize_and_run): Save tokens for deferred pragmas.
1801         (cpp_handle_deferred_pragma): Remove.
1802         * macro.c (builtin_macro): Remove pragma token hack.
1803         (_cpp_push_token_context): Rename from push_token_context and export.
1804         * internal.h (struct lexer_state): Add pragma_allow_expansion.
1805         (_cpp_push_token_context): Declare.
1806         * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
1807         a token.  Update the line number correctly if so.
1808         (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
1809         (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
1810         * include/cpplib.h (PRAGMA_EOL): New.
1811         (CPP_TOKEN_FLD_PRAGMA): New.
1812         (struct cpp_token): Add val.pragma.
1813         (struct cpp_options): Remove defer_pragmas.
1814         (cpp_handle_deferred_pragma): Remove.
1815         (cpp_register_deferred_pragma): Declare.
1816
1817 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
1818
1819         PR c++/25294
1820         * directives.c (do_pragma): If pragma line ends with multi-line
1821         block comment, end the saved deferred pragma string before that
1822         comment.  Handle embedded '\0' chars on the pragma line.
1823
1824 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1825
1826         PR c++/23333
1827         * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
1828
1829 2005-12-07  Jon Grimm  <jgrimm2@us.ibm.com>
1830             Ben Elliston  <bje@au.ibm.com>
1831
1832         * include/cpplib.h (CPP_N_DFLOAT): New.
1833         * expr.c (interpret_float_suffix): Identify df, dd, and dl
1834         suffixes as decimal floating point constants.
1835         (cpp_classify_number): Disallow hexadecimal DFP constants.
1836
1837 2005-11-14  Gerald Pfeifer  <gerald@pfeifer.com>
1838             Ian Lance Taylor  <ian@airs.com>
1839
1840         * include/cpplib.h (struct cpp_callbacks): Annotate error with
1841         ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
1842
1843 2005-11-09  Per Bothner  <per@bothner.com>
1844             Uros Bizjak  <uros@kss-loka.si>
1845
1846         PR c/24101
1847         * init.c (read_original_filename): Temporarily set
1848         state.in_directive before calling _cpp_lex_direct for
1849         CPP_HASH tokens.
1850
1851 2005-11-03  James E Wilson  <wilson@specifix.com>
1852
1853         PR preprocessor/24202
1854         * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
1855
1856 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
1857
1858         * include/cpplib.h (struct cpp_callbacks): Make error take
1859         va_list* parameter.
1860         * errors.c (cpp_error): Update call to callback.
1861
1862 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
1863
1864         PR preprocessor/22042
1865         * macro.c (_cpp_builtin_macro_text): Lower the needed max
1866         buffer size.
1867         (cpp_quote_string): Don't octalify non printable
1868         charactors.
1869
1870 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
1871
1872         PR c++/17964
1873         * include/cpplib.h (struct cpp_options): Add client_diagnostic.
1874         (struct cpp_callbacks): Add error.
1875         * errors.c (cpp_error): If client_diagnostic, use error callback.
1876         * charset.c (convert_escape): Don't use %03o in diagnostic.
1877
1878 2005-10-21  James E Wilson  <wilson@specifix.com>
1879
1880         PR preprocessor/15220
1881         * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
1882         callers.  Pass to open_file_failed.
1883         (open_file_failed): New parameter angle_brackets.  Fix all callers.
1884         Use in print_dep assignment.
1885         * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
1886         * internal.h (_cpp_find_file): Add new parm to declaration.
1887
1888 2005-10-08  Kazu Hirata  <kazu@codesourcery.com>
1889
1890         * configure.ac: Require 64-bit int for arm*-*-*eabi*.
1891         * configure: Regenerate.
1892
1893 2005-10-04  Ian Lance Taylor  <ian@airs.com>
1894
1895         PR preprocessor/13726
1896         * directives.c (check_eol_return_comments): New static function.
1897         (parse_include): Add buf parameter.  Change all callers.
1898         (do_include_common): If not discard comments, turn on
1899         save_comments.  Pass collected comments to include callback.
1900         * include/cpplib.h (struct cpp_callbacks): Add new parameter to
1901         include callback: cpp_token list.
1902
1903 2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
1904
1905         * include/cpplib.h (struct cpp_options): Add extended_identifiers.
1906         * init.c (struct lang_flags, lang_defaults): Add
1907         extended_identifiers.
1908         (cpp_set_lang): Use it.
1909         * lex.c (forms_identifier_p): Check extended_identifiers.
1910
1911 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
1912
1913         PR preprocessor/20348
1914         PR preprocessor/20356
1915         * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
1916         2004-06-05 changes.
1917
1918 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1919
1920         * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
1921         -Wmissing-format-attribute.
1922
1923         * configure: Regenerate.
1924
1925 2005-06-29  Kelley Cook  <kcook@gcc.gnu.org>
1926
1927         * all files: Update FSF address in copyright headers.
1928         * makeucnid.c (write_copyright): Update outputted FSF address.
1929
1930 2005-06-13  Zack Weinberg  <zack@codesourcery.com>
1931
1932         * configure.ac: Invoke ZW_CREATE_DEPDIR and
1933         ZW_PROG_COMPILER_DEPENDENCIES.
1934         * aclocal.m4, configure: Regenerate.
1935         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
1936         New variables.
1937         (distclean): Clean up $(DEPDIR) and its contents.
1938         (.c.o): Use $(COMPILE).
1939         Include $(DEPDIR)/*.Po for most object->header dependencies.
1940
1941 2005-05-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1942
1943         * configure.ac: Check declarations for asprintf and vasprintf.
1944         * config.in: Regenerate.
1945         * configure: Likewise.
1946
1947         * charset.c (conversion_loop): Use XRESIZEVEC.
1948         (convert_no_conversion): Likewise.
1949         (convert_using_iconv): Likewise.
1950         (init_iconv_desc): Cast return value of alloca.
1951         (cpp_host_to_exec_charset): Use XNEWVEC.
1952         (emit_numeric_escape): Use XRESIZEVEC.
1953         (cpp_interpret_string): Use XNEWVEC.
1954         (cpp_interpret_string): Use XRESIZEVEC.
1955         (_cpp_interpret_identifier): Cast return value of alloca.
1956         (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
1957         * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
1958         (parse_include): Use XNEWVEC.
1959         (insert_pragma_entry): Rename local variable "new" to
1960         "new_entry".
1961         (save_registered_pragmas): Cast return value of xmemdup.
1962         (destringize_and_run): Same for alloca.
1963         (parse_assertion): Likewise.
1964         (do_assert): Cast allocated storage to proper type.
1965         (cpp_define): Likewise.
1966         (_cpp_define_builtin): Likewise.
1967         (cpp_undef): Likewise.
1968         (handle_assertion): Likewise.
1969         (cpp_push_buffer): Rename local variable "new" to "new_buffer".
1970         * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
1971         (CPP_UMINUS): Likewise.
1972         (struct cpp_operator): Rename from struct operator.
1973         (_cpp_expand_op_stack): Use XRESIZEVEC.
1974         * files.c (pch_open_file): Use XNEWVEC.
1975         (pch_open_file): Use XRESIZEVEC.
1976         (read_file_guts): Use XNEWVEC and XRESIZEVEC.
1977         (dir_name_of_file): Use XNEWVEC.
1978         (make_cpp_file): Use XCNEW.
1979         (make_cpp_dir): Likewise.
1980         (allocate_file_hash_entries): USE XNEWVEC.
1981         (cpp_included): Cast return value of htab_find_with_hash.
1982         (append_file_to_dir): Use XNEWVEC.
1983         (read_filename_string): Likewise. Use XRESIZEVEC too.
1984         (read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
1985         (remap_filename): Use XNEWVEC.
1986         (struct pchf_entry): Move definition out of struct pchf_data.
1987         (_cpp_save_file_entries): Use XCNEWVAR.
1988         (_cpp_read_file_entries): Use XNEWVAR.
1989         * identifiers.c (alloc_node): Use XOBNEW.
1990         * init.c (cpp_create_reader): Use XCNEW.
1991         (cpp_init_builtins): Cast of b->value to enum builtin_type.
1992         (read_original_directory): Cast return value of alloca.
1993         * lex.c (add_line_note): Use XRESIZEVEC.
1994         (warn_about_normalization): Use XNEWVEC.
1995         (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
1996         (new_buff): Use XNEWVEC.
1997         * line-map.c (linemap_add): Use XRESIZEVEC.
1998         * macro.c (builtin_macro): Cast return value of alloca.
1999         (paste_tokens): Likewise.
2000         (expand_arg): Use XNEWVEC and XRESIZEVEC.
2001         (_cpp_save_parameter): Use XRESIZEVEC.
2002         (create_iso_definition): Cast allocated storage to proper type.
2003         (_cpp_create_definition): Likewise.
2004         (cpp_macro_definition): Use XRESIZEVEC.
2005         * makedepend.c (add_clm): Use XNEW.
2006         (add_dir): Likewise.
2007         * mkdeps.c (munge): Use XNEWVEC.
2008         (deps_init): Use XCNEW.
2009         (deps_add_target): Use XRESIZEVEC.
2010         (deps_add_default_target): Cast return value of alloca.
2011         (deps_add_dep): Use XRESIZEVEC.
2012         (deps_add_vpath): Likewise.  Use XNEWVEC too.
2013         (deps_restore): Likewise.
2014         * pch.c (save_idents): Use XNEW and XNEWVEC.
2015         (cpp_save_state): Use XNEW.
2016         (count_defs): Cast return value of htab_find.
2017         (write_defs): Likewise.
2018         (cpp_write_pch_deps): Use XNEWVEC.
2019         (collect_ht_nodes): Use XRESIZEVEC.
2020         (cpp_valid_state): Use XNEWVEC.
2021         (save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
2022         * symtab.c (ht_create): Use XCNEW.
2023         (ht_lookup_with_hash): Cast return value of obstack_copy0.
2024         (ht_expand): Use XCNEWVEC.
2025         * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2026         (bool): Do not define if __cplusplus.
2027
2028 2005-05-12  Zack Weinberg  <zack@codesourcery.com>
2029
2030         * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2031         (do_sccs): Delete function definition, #define to do_ident.
2032         (do_ident): Don't hardwire directive name.
2033
2034 2005-05-12  Ryota Kunisawa  <kunisawa@access.co.jp>
2035
2036         PR bootstrap/21230
2037         * configure: Regenerate.
2038
2039 2005-04-27  Andris Pavenis  <pavenis@latnet.lv>
2040
2041         * files.c: Include io.h for DJGPP to get prototype of setmode.
2042
2043 2005-04-19  Per Bothner  <per@bothner.com>
2044
2045         PR preprocessor/20907
2046         * line-map.c (linemap_line_start): Fix bug when we need to increse
2047         column_bits but can re-use the current line_map.
2048
2049 2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2050
2051         * system.h (fopen, fdopen, freopen): Define these to the unlocked
2052         libiberty functions.
2053
2054 2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2055
2056         * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2057         (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2058         * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2059         fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2060         _unlocked function.
2061         (fwrite_unlocked): Fix prototype.
2062
2063         * configure, config.in: Regenerate.
2064
2065 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2066
2067         PR preprocessor/19475
2068         * macro.c (create_iso_definition): For < ISO C99, don't
2069         pedwarn if there is no whitespace between macro name and its
2070         replacement, but the replacement starts with a basic character
2071         set character.
2072
2073 2005-03-28  Andreas Jaeger  <aj@suse.de>
2074
2075         * lex.c (warn_about_normalization): Cast field width to int to
2076         avoid warning.
2077
2078 2005-03-19  Joseph S. Myers  <joseph@codesourcery.com>
2079
2080         * configure.ac: Consistently use solaris2.1[0-9]* instead of
2081         solaris2.1[0-9].
2082         * configure: Regenerate.
2083
2084 2005-03-15  Geoffrey Keating  <geoffk@apple.com>
2085
2086         * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2087         UCN rather than printing an error.
2088
2089 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
2090
2091         * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2092
2093 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
2094
2095         * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2096         * charset.c: Update for new format of ucnid.h.
2097         (ucn_valid_in_identifier): Update for new format of ucnid.h.
2098         Add NST parameter, and update it; update callers.
2099         (cpp_valid_ucn): Add NST parameter, update callers.  Replace abort
2100         with cpp_error.
2101         (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2102         * internal.h (struct normalize_state): New.
2103         (INITIAL_NORMALIZE_STATE): New.
2104         (NORMALIZE_STATE_RESULT): New.
2105         (NORMALIZE_STATE_UPDATE_IDNUM): New.
2106         (_cpp_valid_ucn): New.
2107         * lex.c (warn_about_normalization): New.
2108         (forms_identifier_p): Add normalize_state parameter, update callers.
2109         (lex_identifier): Add normalize_state parameter, update callers.  Keep
2110         the state current.
2111         (lex_number): Likewise.
2112         (_cpp_lex_direct): Pass normalize_state to subroutines.  Check
2113         it with warn_about_normalization.
2114         * makeucnid.c: New.
2115         * ucnid.h: Replace.
2116         * ucnid.pl: Remove.
2117         * ucnid.tab: Make appropriate for input to makeucnid.c.  Remove
2118         comments about obsolete version of C++.
2119         * include/cpplib.h (enum cpp_normalize_level): New.
2120         (struct cpp_options): Add warn_normalize field.
2121
2122 2005-03-11  Geoffrey Keating  <geoffk@apple.com>
2123
2124         * directives.c (glue_header_name): Update call to cpp_spell_token.
2125         * internal.h (_cpp_interpret_identifier): New.
2126         * charset.c (_cpp_interpret_identifier): New.
2127         (_cpp_valid_ucn): Allow UCN version of '$'.
2128         * lex.c (lex_identifier): Add extra parameter to indicate if initial
2129         character was '$' or '\'.  Support identifiers with UCNs.
2130         (forms_identifier_p): Allow UCNs.
2131         (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2132         (utf8_to_ucn): New.
2133         (cpp_spell_token): Add FORSTRING parameter.  Use it.
2134         (cpp_token_as_text): Update call to cpp_spell_token.
2135         (cpp_output_token): Write UCNs back out.
2136         (stringify_arg): Update call to cpp_spell_token.
2137         (paste_tokens): Likewise.
2138         (cpp_macro_definition): Likewise.
2139         * macro.c (stringify_arg): Likewise.
2140         (paste_tokens): Likewise.
2141         (cpp_macro_definition): Likewise.
2142         * include/cpplib.h: Add parameter to cpp_spell_token.
2143
2144 2005-03-04  Jakub Jelinek  <jakub@redhat.com>
2145
2146         PR bootstrap/20282
2147         PR bootstrap/20305
2148         * macro.c (replace_args, cpp_get_token): Copy whole
2149         cpp_token_u instead of just cpp_string field from it.
2150
2151 2005-02-28  Devang Patel  <dpatel@apple.com>
2152
2153         * directives.c (do_line): Save sysp early before line table is
2154         realloc'ed.
2155
2156 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
2157
2158         PR 18785
2159         * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2160         (cpp_host_to_exec_charset): New function.
2161         * include/cpplib.h: Declare cpp_host_to_exec_charset.
2162
2163 2005-02-19  Devang Patel  <dpatel@apple.com>
2164
2165         * charset.c (_cpp_convert_input): Check '\r' before inserting
2166         '\n' at the end.
2167
2168 2005-02-15  Eric Christopher  <echristo@redhat.com>
2169
2170         PR preprocessor/19077
2171         * macro.c (cpp_macro_definition): Move handling of whitespace
2172         to PREV_WHITE conditional. Remove overloading of len
2173         variable.
2174
2175 2005-02-14  Kazu Hirata  <kazu@cs.umass.edu>
2176
2177         * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2178         traditional.c: Update copyright.
2179
2180 2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
2181
2182         PR bootstrap/19818
2183         * configure.ac: Check for declaration of basename and getopt.
2184         * config.in: Regenerate.
2185         * configure: Regenerate.
2186         * internal.h (ustrcspn): New.
2187         * macro.c (create_iso_definition): Fix allocation of memory.
2188         (padding_token): Add cast to remove const-ness.
2189         * pch.c (cpp_read_state): Use ustrcspn.
2190
2191 2005-02-08  Mike Stump  <mrs@apple.com>
2192
2193         * files.c (pchf_adder): Remove.
2194         (struct pchf_adder_info): Likewise.
2195         (_cpp_save_file_entries): Write out all files so that #import works.
2196
2197 2005-01-23  Joseph S. Myers  <joseph@codesourcery.com>
2198
2199         * configure: Regenerate.
2200
2201 2005-01-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2202
2203         * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2204
2205         * include/cpplib.h: Also update copyright years.
2206
2207 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
2208
2209         * files.c (_cpp_find_file): Add files found by search_path_exhausted
2210         to the list of all files.
2211
2212 2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2213
2214         * internal.h: Update references to Cpp lib filenames.
2215         * directives.c: Likewise.
2216         * init.c: Likewise.
2217         * macro.c: Likewise.
2218         * traditional.c: Likewise.
2219
2220 2004-12-15  Eric Botcazou  <ebotcazou@libertysurf.fr>
2221
2222         PR preprocessor/15167
2223         * files.c (destroy_cpp_file): New function.
2224         (should_stack_file): Make a new file if the
2225         compared file is still stacked.
2226
2227 2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>
2228
2229         PR preprocessor/17610
2230         * directives.c (do_include_common): Error out if an empty filename
2231         is given for #include (or #include_next or #import).
2232
2233 2004-11-27  Roger Sayle  <roger@eyesopen.com>
2234             Zack Weinberg  <zack@codesourcery.com>
2235
2236         * internal.h: Replace all uses of uchar with unsigned char.
2237         * include/cpp-id-data.h: Likewise.  Guard typedef of uchar
2238         with !IN_GCC, so uchar is only defined whilst building libcpp.
2239
2240 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
2241
2242         * aclocal.m4: Regenerate.
2243
2244 2004-11-24  Roger Sayle  <roger@eyesopen.com>
2245
2246         PR preprocessor/15824
2247         * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2248         directly, instead of the non-existant "system.h" and "ansidecl.h".
2249         * configure: Regenerate.
2250
2251 2004-11-23  Daniel Jacobowitz  <dan@codesourcery.com>
2252             Joseph Myers  <joseph@codesourcery.com>
2253
2254         * internal.h (struct lexer_state): Add in_deferred_pragma.
2255         * directives.c (struct pragma_entry): Add allow_expansion.
2256         (insert_pragma_entry): Take allow_expansion flag.
2257         (register_pragma): Likewise.
2258         (cpp_register_pragma): Likewise.
2259         (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2260         (do_pragma): Honor allow_expansion.
2261         (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2262         * include/cpplib.h (cpp_register_pragma): Update prototype.
2263
2264 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
2265             Mark Mitchell  <mark@codesourcery.com>
2266
2267         * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2268         need_64bit_hwint=yes.
2269         * configure: Regenerate.
2270
2271 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2272
2273         * Makefile.in ($(PACKAGE).pot): New rule.  Depend on
2274         po/$(PACKAGE).pot.
2275         (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2276         arguments.  Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2277         Remove local srcdir path from generated file.
2278
2279 2004-11-04  Zack Weinberg  <zack@codesourcery.com>
2280             Gerald Pfeifer  <gerald@pfeifer.com>
2281
2282         * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2283         as well.
2284
2285 2004-10-27  Zack Weinberg  <zack@codesourcery.com>
2286
2287         PR 18075
2288         * directives.c (do_pragma): Do not defer pragmas which are unknown.
2289         (cpp_handle_deferred_pragma): Add cast to silence warning.
2290
2291 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
2292
2293         * errors.c (_cpp_begin_message): Print "error: " for errors.
2294
2295 2004-10-10  Andreas Jaeger  <aj@suse.de>
2296
2297         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2298         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2299
2300 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
2301
2302         * pch.c (cpp_write_pch_state): Remove variable z as it is not
2303         used.
2304         (cpp_read_state): Remove unused variables, m, d and mac_count.
2305
2306 2004-09-29  Per Bothner  <per@bothner.com>
2307
2308         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
2309         cb.line_change.  Otherwise do_pragma will call the line_change
2310         call-back with a meaningless line number.
2311
2312 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
2313
2314         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
2315         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
2316         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2317         * aclocal.m4, configure: Regenerate.
2318         * init.c: Include localedir.h.
2319         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
2320         (DEFS): Delete.
2321         (.c.o): Use $(ALL_CFLAGS).
2322         (localedir.h, localedir.hs): New rules.
2323         (clean): Use rm -rf to remove directories.
2324         (distclean): Also delete localedir.h and localedir.hs.
2325         (init.o): Update dependencies.
2326
2327 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
2328
2329         * Makefile.in (aclocal.m4): Update dependencies.
2330         * configure.ac (AC_CONFIG_MACRO_DIR): New.
2331         * aclocal.m4, configure: Regenerate.
2332
2333 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
2334
2335         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
2336         (_cpp_convert_input, _cpp_default_encoding): Add comments.
2337         Some other comments in this file also tweaked.
2338
2339         * directives.c (do_pragma): Save current buffer position
2340         before lexing the pragma keywords; don't call
2341         _cpp_backup_tokens in the defer_pragmas case.
2342
2343 2004-09-15  Per Bothner  <per@bothner.com>
2344
2345         * include/line-map.h (line_map_start):  Add parameter names so
2346         preceding comment makes sense.
2347         (linemap_add):  Remove from comment mention of non-existing parameter.
2348
2349 2004-09-09  Matt Austern  <austern@apple.com>
2350             Zack Weinberg  <zack@codesourcery.com>
2351
2352         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
2353         prefixes throughout.  Add entry for PRAGMA.  Remove
2354         unnecessary "= 0" from EQ.
2355         (enum cpp_ttype): Adjust OP and TK definitions to restore
2356         prefixes, via token-paste.
2357         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2358         Change from #defines to additional cpp_ttype enumerators.
2359         (struct cpp_options): Add defer_pragmas.
2360         (cpp_handle_deferred_pragma): Prototype new interface.
2361
2362         * internal.h (struct cpp_reader): Add directive_result.
2363         * directives.c (struct pragma_entry): Add is_internal field;
2364         give boolean fields type bool.
2365         (start_directive): Initialize pfile->directive_result.type.
2366         (_cpp_do__Pragma): Likewise.
2367         (run_directive): Do not crash if pfile->buffer->prev is NULL.
2368         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2369         from it.
2370         (register_pragma): New static function, bulk of former
2371         cpp_register_pragma here; add 'internal' argument, pass along
2372         to insert_pragma_entry.
2373         (cpp_register_pragma): Now a wrapper around register_pragma which
2374         always passes false for 'internal' argument.
2375         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2376         true for 'internal'.
2377         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2378         an internal pragma, save text till the end of the line as a CPP_PRAGMA
2379         token instead of executing the pragma.
2380         (cpp_handle_deferred_pragma): New interface.
2381         * lex.c (token_spellings): Adjust OP and TK definitions to
2382         match changes to cpplib.h.
2383         (_cpp_lex_token): Check for a directive-result token and
2384         return it if present.
2385         (cpp_token_val_index): Handle CPP_PRAGMA.
2386         * macro.c (cpp_builtin_macro_text): Correct comment.
2387         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2388
2389 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
2390
2391         PR preprocessor/14699
2392         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2393         from size_t to double.
2394
2395 2004-08-28  Andreas Schwab  <schwab@suse.de>
2396             Andreas Jaeger <aj@suse.de>
2397
2398         * configure.ac: Set PACKAGE correctly.
2399         * configure: Regenerated.
2400
2401 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
2402
2403         * Makefile.in: Add back top_builddir.
2404
2405 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
2406
2407         * configure.ac: Replace Automake macro invocations
2408         with manual Autoconf checks and substitutions.
2409         * configure: Regenerate.
2410         * aclocal.m4: Regenerate.
2411         * config.in: Regenerate.
2412         * Makefile.am: Removed.
2413         * Makefile.in: Heavy simplification and reorganization.
2414
2415 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
2416
2417         * configure.ac (arm*-*-eabi*): New target.
2418         (arm*-*-symbianelf*): Likewise.
2419         * configure: Regenerated.
2420
2421 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
2422
2423         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2424         * directives.c: Use XNEW-family macros from libiberty.
2425         * lex.c: Likewise.
2426         * macro.c: Likewise.
2427         * cpplib.h (cpp_deps_style): Export enum with name.
2428
2429 2004-07-23  Matthias Klose  <doko@debian.org>
2430
2431         * init.c (init_library): Use PACKAGE for the text domain.
2432
2433 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
2434
2435         PR preprocessor/16366
2436         * internal.h (struct cpp_reader): New field dir_hash.
2437         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2438         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2439
2440 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
2441
2442         PR preprocessor/16192
2443         PR preprocessor/15913
2444         PR preprocessor/15572
2445         * expr.c (_cpp_parse_expr): Handle remaining cases where an
2446         expression is missing.
2447         * init.c (post_options): Traditional cpp doesn't do // comments.
2448
2449 2004-06-30  Per Bothner  <per@bothner.com>
2450
2451         * include/line-map.h (fileline):  Remove old typedef.
2452         * internal.h (struct cpp_reader):  Use source_location typedef instead.
2453
2454 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
2455
2456         Partially revert patch of 2004-06-05.
2457         * files.c (search_cache): Remove pfile argument.  Don't check
2458         for file that would be found by "" or <> search here...
2459         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2460         Do not apply directory-of-current-file correction to files
2461         found by this check.  Rearrange code slightly.
2462
2463 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
2464
2465         * files.c (should_stack_file): Correct swapped parameters to call
2466         to cb.read_pch.
2467         * pch.c (cpp_valid_state): Handle -fpreprocessed.
2468
2469 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
2470
2471         * Makefile.in: Regenerate with automake 1.8.5.
2472         * aclocal.m4: Likewise.
2473         * configure: Regenerate.
2474
2475 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
2476
2477         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2478         * configure, config.in: Regenerate.
2479         * system.h: Unconditionally define bool as unsigned char,
2480         BOOL_BITFIELD as unsigned int.
2481         * .cvsignore: New file.
2482
2483 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
2484
2485         * traditional.c (push_replacement_text): Set macro->traditional.
2486         (save_replacement_text): Likewise.
2487         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2488         (struct save_macro_item): Delete.
2489         (struct save_macro_data): Use a character array not the previous
2490         structured format.
2491         (save_macros): Save macro as text not as internal structures.
2492         (cpp_prepare_state): Update for changes to save_macro_data.
2493         (cpp_read_state): Don't read macros defined in PCH.  Restore
2494         -D macros as text.
2495         * macro.c (create_iso_definition): Honour alloc_subobject.
2496         Clear traditional flag.
2497         (_cpp_create_definition): Honour alloc_subobject.
2498         * lex.c (cpp_token_val_index): New.
2499         * internal.h: Include cpp-id-data.h.
2500         (uchar): Move definition to cpp-id-data.h.
2501         (U): Likewise.
2502         (cpp_macro): Likewise.
2503         * directives.c (struct answer): Move to cpp-id-data.h.
2504         (do_assert): Honour alloc_subobject.
2505
2506         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2507         * include/cpplib.h (struct cpp_string): Add GTY marker.
2508         (enum cpp_token_fld_kind): New.
2509         (struct cpp_token): Add GTY markers.
2510         (cpp_token_val_index): Prototype.
2511         (CPP_HASHNODE_VALUE_IDX): New.
2512         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2513         * include/cpp-id-data.h: New file.
2514
2515 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
2516
2517         * Makefile.am (all-local): New.
2518         * Makefile.in: Regenerate.
2519
2520 2004-06-06  Roger Sayle  <roger@eyesopen.com>
2521
2522         * Makefile.am (LIBICONV): Declare.
2523         (makedepend_LDADD): Use LIBICONV.
2524         * Makefile.in: Regenerate.
2525
2526 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
2527
2528         * Makefile.am (LIBINTL): Declare
2529         (makedepend_LDADD): Use LIBINTL.
2530         * Makefile.in: Regenerate.
2531
2532 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
2533
2534         * Makefile.am: Add makedepend.
2535         * Makefile.in, aclocal.m4: Regenerate.
2536         * charset.c: Insert a space to avoid a warning.
2537         * directives.c: Include mkdeps.h.
2538         (_cpp_handle_directive): Reenable macro expander if appropriate.
2539         (undefine_macros): Inline body of _cpp_free_definition for speed.
2540         Do not call undef callback or _cpp_warn_if_unused_macro.
2541         (cpp_get_deps): New interface.
2542         * files.c (search_cache): Add pfile argument.  Check for file
2543         that would be found by "" or <> search here...
2544         (_cpp_find_file): ...not here.  Correct recorded start_dir of
2545         files found by directory-of-current-file search that would be
2546         found by "" or <> search.
2547         * init.c (cpp_add_dependency_target): Delete.
2548         * internal.h (struct lexer_state): Add discarding_output flag.
2549         * lex.c (lex_identifier): Compute hash function while scanning.
2550         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
2551         directives.
2552         * makedepend.c: New file.
2553         * mkdeps.c (struct deps): Add vpath vector.
2554         (apply_vpath, deps_add_vpath): New function.
2555         (deps_free): Free vpath vector.
2556         (deps_add_dep, deps_add_target): Use apply_vpath.
2557         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
2558         (ht_lookup_with_hash): New function.
2559         * cpplib.h, mkdeps.h: Update prototypes.
2560         * symtab.h: Update prototypes.
2561         (HT_HASHSTEP, HT_FINISH): New macros.
2562
2563 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
2564
2565         * symtab.c (ht_create): Set entries_owned.
2566         (ht_destroy): Honour entries_owned.
2567         (ht_expand): Likewise.
2568         (ht_load): New.
2569         * include/symtab.h (struct ht): New field 'entries_owned'
2570         (ht_load): New prototype.
2571
2572 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
2573
2574         PR bootstrap/15651
2575         * configure.ac: Fix m4 quoting when picking
2576         the size of HOST_WIDE_INT.
2577         * configure: Regenerate.
2578
2579 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
2580
2581         * Makefile.am: the correct directory for
2582         gettext include files is given by @INCINTL@.
2583         * Makefile.in: Regenerate.
2584
2585 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
2586
2587         * system.h [!ENABLE_NLS]: dgettext takes two
2588         parameters.
2589
2590 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
2591
2592         Moved libcpp from the gcc subdirectory to the toplevel.
2593         * Makefile.am: New file.
2594         * Makefile.in: Regenerate.
2595         * configure.ac: New file.
2596         * configure: Regenerate.
2597         * config.in: Regenerate.
2598         * charset.c: Moved from gcc/cppcharset.c.  Add note about
2599         brokenness of input charset detection.  Adjust for change
2600         in name of cppucnid.h.
2601         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
2602         * expr.c: Moved from gcc/cppexp.c.
2603         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
2604         Remove #define of O_BINARY, it is in system.h.
2605         * identifiers.c: Moved from gcc/cpphash.c.
2606         * internal.h: Moved from gcc/cpphash.h.  Change header
2607         guard name.  All other files adjusted to match name change.
2608         * init.c: Moved from gcc/cppinit.c.
2609         (init_library) [ENABLE_NLS]: Call bindtextdomain.
2610         * lex.c: Moved from gcc/cpplex.c.
2611         * directives.c: Moved from gcc/cpplib.c.
2612         * macro.c: Moved from gcc/cppmacro.c.
2613         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
2614         * traditional.c: Moved from gcc/cpptrad.c.
2615         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
2616         guard name.
2617         * ucnid.pl: Moved from gcc/cppucnid.pl.
2618         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
2619         guard name.
2620         * symtab.c: Moved from gcc/hashtable.c.
2621         * line-map.c: Moved from gcc.  Do not include intl.h.
2622         * mkdeps.c: Moved from gcc.
2623         * system.h: New file.
2624         * include/cpplib.h: Moved from gcc.  Change header guard name.
2625         * include/line-map.h: Moved from gcc.  Change header guard name.
2626         * include/mkdeps.h: Moved from gcc.  Change header guard name.
2627         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
2628         guard name.