OSDN Git Service

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