OSDN Git Service

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