]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
tree.c (list_equal_p): New function.
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
d1b38208
TG
12009-04-21 Taras Glek <tglek@mozilla.com>
2
3 * include/cpp-id-data.h: Update GTY annotations to new syntax.
4 * include/cpplib.h: Likewise.
5 * include/line-map.h: Likewise.
6 * include/symtab.h: Likewise.
7
cfc93532
MLI
82009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
9
10 PR c++/14875
11 * lex.c (cpp_type2name): Take a flags parameter. Call
12 cpp_named_operator2name for named operators and cpp_digraph2name
13 for digraphs.
14 (cpp_digraph2name): New.
15 (cpp_spell_token): Use it.
16 (cpp_output_token): Likewise.
17 * include/cpplib.h (cpp_type2name): Update declaration.
18 * init.c (cpp_named_operator2name): New.
19 * internal.h (cpp_named_operator2name): Declare.
20
9c650d90
MLI
212009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
22
23 PR c++/13358
24 * init.c (cpp_create_reader): Wlong_long is disabled by default.
25 * expr.c (cpp_classify_number): Give different messages for C and
26 C++ front-ends.
27
aa508502
JM
282009-04-19 Joseph Myers <joseph@codesourcery.com>
29
30 PR preprocessor/20078
31 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
32 field.
33 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
34 (struct cpp_token): Change flags to unsigned short.
35 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
36 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
37 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
38 tokens.
39 * macro.c (macro_real_token_count): New.
40 (enter_macro_context, replace_args): Use macro_real_token_count.
41 (create_iso_definition): Record whitespace surrounding and digraph
42 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
43 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
44 multiple consecutive ## tokens.
45 (_cpp_create_definition): Initialize extra_tokens.
46 (cpp_macro_definition): Use macro_real_token_count.
47
61cc8223
JM
482009-04-18 Joseph Myers <joseph@codesourcery.com>
49
50 * directives.c (parse_include): Pass true to check_eol.
51
c7f9c0b9
JM
522009-04-18 Joseph Myers <joseph@codesourcery.com>
53
54 PR preprocessor/39646
55 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
56 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
57 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
58 place of LC_RENAME.
59
a5cb563b
JM
602009-04-18 Joseph Myers <joseph@codesourcery.com>
61
62 PR preprocessor/39647
63 * directives.c (check_eol): Add parameter expand.
64 (do_undef, parse_include, do_line, do_linemarker, do_ident,
65 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
66 do_else, do_endif, do_assert, do_unassert): All callers changed.
67 Pass true from do_line, false elsewhere.
68
18f41a1b
JM
692009-04-12 Joseph Myers <joseph@codesourcery.com>
70
71 PR preprocessor/31869
72 * macro.c (stringify_arg): Handle NULL source token in padding
73 token where previous padding token did not have source token with
74 preceding whitespace.
75
748086b7
JJ
762009-04-09 Jakub Jelinek <jakub@redhat.com>
77
78 * Makefile.in: Change copyright header to refer to version
79 3 of the GNU General Public License and to point readers at the
80 COPYING3 file and the FSF's license web page.
81 * charset.c: Likewise.
82 * directives-only.c: Likewise.
83 * directives.c: Likewise.
84 * errors.c: Likewise.
85 * expr.c: Likewise.
86 * files.c: Likewise.
87 * identifiers.c: Likewise.
88 * include/cpp-id-data.h: Likewise.
89 * include/cpplib.h: Likewise.
90 * include/line-map.h: Likewise.
91 * include/mkdeps.h: Likewise.
92 * include/symtab.h: Likewise.
93 * init.c: Likewise.
94 * internal.h: Likewise.
95 * lex.c: Likewise.
96 * line-map.c: Likewise.
97 * macro.c: Likewise.
98 * makeucnid.c: Likewise.
99 * mkdeps.c: Likewise.
100 * pch.c: Likewise.
101 * symtab.c: Likewise.
102 * system.h: Likewise.
103 * traditional.c: Likewise.
104 * ucnid.tab: Likewise.
105 * ucnid.h: Regenerate.
106
eec49116
JJ
1072009-04-01 Janis Johnson <janis187@us.ibm.com>
108
839a3b8a
JJ
109 PR c/39027
110 * include/cpplib.h (CPP_N_DEFAULT): Define.
111 * expr.c (interpret_float_suffix): Recognize d or D for double,
112 return new value for default.
113 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
114
eec49116
JJ
115 PR c/33466
116 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
117 letters from decimal float and fixed-point suffixes.
118
47580d22
JM
1192009-03-31 Joseph Myers <joseph@codesourcery.com>
120
121 PR preprocessor/15638
122 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
123 invalid PCH.
124 (open_file_failed): Make error for missing file fatal.
125 * include/cpplib.h (CPP_DL_FATAL): Define.
126
5a2df0fa
SV
1272009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
128
129 PR preprocessor/31932:
130 * internal.h: Don't mention HAVE_ICONV_H.
131 * configure, config.in: Rebuild.
132 * configure.ac: Don't check for iconv.h.
133
c1a8a3c6
TT
1342009-03-30 Tom Tromey <tromey@redhat.com>
135
136 PR preprocessor/39512:
137 * line-map.c (linemap_init): Initialize 'reallocator' field.
138
a37a7b8a
JJ
1392009-03-30 Jakub Jelinek <jakub@redhat.com>
140
141 PR target/39558
142 * macro.c (cpp_get_token): If macro_to_expand returns NULL
143 and used some tokens, add CPP_PADDING before next token.
144
148e4216
JM
1452009-03-29 Joseph Myers <joseph@codesourcery.com>
146
147 PR preprocessor/34695
148 * makedepend.c: Remove.
149 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
150 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
151 * directives.c (cpp_errors): Remove.
152 * errors.c (print_location, _cpp_begin_message, v_message):
153 Remove.
154 (cpp_error, cpp_error_with_line): Always use error callback.
155 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
156 * include/cpplib.h (cpp_options): Remove pedantic_errors,
157 inhibit_warnings, warn_system_headers, inhibit_errors,
158 warnings_are_errors, client_diagnostic.
159 (cpp_callbacks): Add extra arguments to error callback; make it
160 return bool.
161 (cpp_finish): Return void.
162 (cpp_destroy): Remove inaccurate comment about return value.
163 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
164 (CPP_DL_NOTE): Define.
165 * include/line-map.h (linemap_print_containing_files): Remove.
166 * init.c (cpp_finish): Do not check for or return number of
167 errors.
168 * internal.h (cpp_reader): Remove errors field.
169 * line-map.c (linemap_print_containing_files): Remove.
170 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
171 about previous definition. Only emit it if previous diagnostic
172 was emitted.
173
f1450211
JM
1742009-03-28 Joseph Myers <joseph@codesourcery.com>
175
176 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
177 mkinstalldirs.
178
8f5929e1
JJ
1792009-03-18 Jakub Jelinek <jakub@redhat.com>
180
181 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
182
4bb09c26
JM
1832009-02-21 Joseph Myers <joseph@codesourcery.com>
184
185 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
186 header name.
187 (_cpp_lex_direct): Handle this.
188
68c9ab45
RG
1892009-02-15 Richard Guenther <rguenther@suse.de>
190
191 Revert last change.
192
601b3e1a
RG
1932009-02-13 Richard Guenther <rguenther@suse.de>
194
195 * configure.ac: Enable LFS.
196 * configure: Re-generate.
197 * config.in: Likewise.
198
fc0cd180
BE
1992009-01-05 Ben Elliston <bje@au.ibm.com>
200
201 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
202 (.po.pox): Likewise.
203 (po/$(PACKAGE).pot): Likewise.
204
db89a3be
AO
2052008-12-10 Alexandre Oliva <aoliva@redhat.com>
206
207 PR target/37033
208 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
209 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
210
cc955282
JM
2112008-11-29 Joseph Myers <joseph@codesourcery.com>
212
213 * lex.c (cpp_token_len): Use 6 as default length.
214
47960aaf
MLI
2152008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
216
217 * expr.c (struct op): Add location.
218 (_cpp_parse_expr): Propagate locations throught the stack
219 of expressions.
220 (reduce): Likewise.
221 (check_promotion): Use explicit location in errors.
222
631d0d36
MG
2232008-10-05 Matthew Gingell <gingell@adacore.com>
224 Arnaud Charlet <charlet@adacore.com>
225
226 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
227 (cpp_get_comments): New function.
228 * internal.h (struct cpp_reader): Add comments field.
229 * init.c (cpp_destroy): Free comments.
230 * lex.c (store_comment, cpp_get_comments): New functions.
231 (comments): New struct.
232 (save_comment): Store comments in comments struct.
233
c047ce93
SB
2342008-09-18 Simon Baldwin <simonb@google.com>
235
236 * include/cpplib.h (struct cpp_options): Add new boolean flag
237 warn_builtin_macro_redefined.
238 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
239 * (struct builtin_operator): Split out from previous struct builtin,
240 enhance extra const correctness.
241 * (struct builtin_macro): Split out from previous struct builtin, add
242 new always_warn_if_redefined flag, enhance const correctness.
243 * (mark_named_operators): Use struct builtin_operator.
244 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
245 to builtins selectively.
246 * macro.c (warn_of_redefinition): Return false if a builtin macro
247 is not flagged with NODE_WARN.
248
affa55c6
JJ
2492008-07-31 Jakub Jelinek <jakub@redhat.com>
250
251 PR preprocessor/36649
252 * files.c (struct report_missing_guard_data): New type.
253 (report_missing_guard): Put paths into an array instead of printing
254 them right away. Return 1 rather than 0.
255 (report_missing_guard_cmp): New function.
256 (_cpp_report_missing_guards): Sort and print paths gathered by
257 report_missing_guard callback.
258
3b8f20a1
MLI
2592008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
260
261 PR 28079
262 * directives.c (strtolinenum): Handle overflow.
263 (do_line): Give a warning if line number overflowed.
264 (do_linemarker): Update call to strtolinenum.
265
1bb64668
MLI
2662008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
267
268 * include/line-map.h (linenum_type): New typedef.
269 (struct line_map): Use it.
270 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
271 (SOURCE_COLUMN): Likewise.
272 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
273 source_location values in a variable of type linenum_type.
274 * directives.c (struct if_stack): Use linenum_type.
275 (strtoul_for_line): Rename as strtolinenum.
276 (do_line): Use linenum_type.
277 (do_linemarker): Use linenum_type and strtolinenum.
278 (_cpp_do_file_change): Use linenum_t.
279 * line-map.c (linemap_add): Likewise.
280 (linemap_line_start): Likewise.
281 * traditional.c (struct fun_macro): 'line' is a source_location.
282 * errors.c (print_location): Use linenum_type.
283 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
284 * internal.h (CPP_INCREMENT_LINE): Likewise.
285 * lex.c (_cpp_skip_block_comment): Use source_location.
286
5950c3c9
BE
2872008-07-14 Ben Elliston <bje@au.ibm.com>
288
289 * include/cpplib.h (NODE_CONDITIONAL): New.
290 (struct cpp_callbacks): New macro_to_expand field.
291 (struct cpp_hashnode): Adjust size of flags and type fields.
292 (cpp_peek_token): Prototype.
293 * lex.c (cpp_peek_token): New function.
294 (_cpp_temp_token): Protect pre-existing lookaheads.
295 * macro.c (cpp_get_token): Expand any conditional macros.
296 (_cpp_backup_tokens_direct): New.
297 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
298 (warn_of_redefinition): Silently allow redefined conditional
299 macros.
300 (_cpp_create_definition): Remove the conditional flag when a user
301 defines one of the conditional macros.
302 * internal.h (_cpp_backup_tokens_direct): New prototype.
303
e85edc9e
AH
3042008-06-13 Andrew Haley <aph@redhat.com>
305
306 PR preprocessor/33305
307 * macro.c (replace_args): Print a warning for empty macro
308 arguments in C89 and C++.
309
18c04407
RW
3102008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
311
312 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
313 * configure: Regenerate.
314
2d09b640
RW
3152008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
316
317 * Makefile.in (datarootdir): New variable.
318
0b7c73cc
L
3192008-06-12 H.J. Lu <hongjiu.lu@intel.com>
320
321 PR preprocessor/36479
322 * charset.c (cpp_interpret_string_notranslate): Also set
323 narrow_cset_desc.width.
324
cd985f66
JM
3252008-06-07 Joseph Myers <joseph@codesourcery.com>
326
327 * configure.ac (parisc*64*-*-*): Remove.
328 * configure: Regenerate.
329
d750887f
TT
3302008-05-30 Tom Tromey <tromey@redhat.com>
331
332 PR preprocessor/36320:
333 * internal.h (_cpp_parse_expr): Update.
334 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
335 messages.
336 * directives.c (do_if): Update.
337 (do_elif): Require expression if processing group.
338
c100de59
DS
3392008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
340
341 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
342
5d6342eb
TT
3432008-05-21 Tom Tromey <tromey@redhat.com>
344
345 PR preprocessor/27777:
346 * lex.c (cpp_output_line_to_string): New function.
347 * internal.h (_cpp_begin_message): Don't declare.
348 * errors.c (_cpp_begin_message): Now static.
349 * include/cpplib.h (cpp_output_line_to_string): Declare.
350 * directives.c (do_diagnostic): Rewrote. Use
351 cpp_output_line_to_string. Don't use _cpp_begin_message.
352
dae4174e
TT
3532008-05-21 Tom Tromey <tromey@redhat.com>
354
355 * include/symtab.h (HT_ALLOCED): Remove.
356 (ht_purge): Declare.
357 * symtab.c (DELETED): New define.
358 (ht_lookup): Update comment.
359 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
360 code. Use subobject allocator for strings, if it exists.
361 (ht_expand): Handle deleted entries.
362 (ht_forall): Likewise.
363 (ht_purge): New function.
364 (ht_dump_statistics): Print deletion statistics.
365
899015a0
TT
3662008-05-13 Tom Tromey <tromey@redhat.com>
367
368 PR preprocessor/22168:
369 * include/cpplib.h (struct cpp_options) <objc>: Update
370 documentation.
371 * expr.c (eval_token): Warn for use of assertions.
372 * directives.c (directive_diagnostics): Warn about extensions.
373 (DEPRECATED): New define.
374 (DIRECTIVE_TABLE): Use it.
375
71c10038
TT
3762008-05-06 Tom Tromey <tromey@redhat.com>
377
378 PR preprocessor/35313, PR preprocessor/36088:
379 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
380 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
381
2bd0fe3d
DM
3822008-05-04 David S. Miller <davem@davemloft.net>
383
384 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
385 * configure: Regenerate.
386
28f68625
DF
3872008-04-22 Daniel Franke <franke.daniel@gmail.com>
388
389 * include/cpplib.h (cpp_define_formatted): New.
390 * directives.c (cpp_define_formatted): New.
391
688e7a53
TT
3922008-04-21 Tom Tromey <tromey@redhat.com>
393
394 PR libcpp/33415:
395 * charset.c (_cpp_convert_input): Add buffer_start argument.
396 Ignore UTF-8 BOM if seen.
397 * internal.h (_cpp_convert_input): Add argument.
398 * files.c (struct _cpp_file) <buffer_start>: New field.
399 (destroy_cpp_file): Free buffer_start, not buffer.
400 (_cpp_pop_file_buffer): Likewise.
401 (read_file_guts): Update.
402
b6baa67d
KVH
4032008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
404
405 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
406 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
407 (struct cpp_options): Added uliterals.
408 (cpp_interpret_string): Update prototype.
409 (cpp_interpret_string_notranslate): Idem.
410 * charset.c (init_iconv_desc): New width member in cset_converter.
411 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
412 (convert_ucn): Idem.
413 (emit_numeric_escape): Idem.
414 (convert_hex): Idem.
415 (convert_oct): Idem.
416 (convert_escape): Idem.
417 (converter_for_type): New function.
418 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
419 (cpp_interpret_string_notranslate): Match changed prototype.
420 (wide_str_to_charconst): Use converter_for_type.
421 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
422 * directives.c (linemarker_dir): Macro U changed to UC.
423 (parse_include): Idem.
424 (register_pragma_1): Idem.
425 (restore_registered_pragmas): Idem.
426 (get__Pragma_string): Support CPP_STRING{16,32}.
427 * expr.c (eval_token): Support CPP_CHAR{16,32}.
428 * init.c (struct lang_flags): Added uliterals.
429 (lang_defaults): Idem.
430 * internal.h (struct cset_converter) <width>: New field.
431 (struct cpp_reader) <char16_cset_desc>: Idem.
432 (struct cpp_reader) <char32_cset_desc>: Idem.
433 * lex.c (digraph_spellings): Macro U changed to UC.
434 (OP, TK): Idem.
435 (lex_string): Add support for u'...', U'...', u"..." and U"...".
436 (_cpp_lex_direct): Idem.
437 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
438 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
439
deb984e6
PB
4402008-04-18 Paolo Bonzini <bonzini@gnu.org>
441
442 PR bootstrap/35457
443 * aclocal.m4: Regenerate.
444 * configure: Regenerate.
445
bf048bea
TT
4462008-04-17 Tom Tromey <tromey@redhat.com>
447
448 PR libcpp/34866:
449 * errors.c (cpp_error): Don't reference a token before the start
450 of the current run.
451
7f27b0f8
TT
4522008-04-16 Tom Tromey <tromey@redhat.com>
453
454 * Makefile.in (TAGS_SOURCES): New variable.
455 (TAGS): New target.
456
a1fcb9a1
KK
4572008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
458
459 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
460 and shbe-*-*.
461 * configure: Rebuilt.
462
93d45d9e
JM
4632008-04-02 Joseph Myers <joseph@codesourcery.com>
464
465 * include/cpplib.h (struct cpp_callbacks): Add used_define,
466 used_undef and before_define.
467 (NODE_USED): Define.
468 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
469 do_ifndef, cpp_pop_definition): Handle new flag and use new
470 callbacks.
471 * expr.c (parse_defined): Handle new flag and use new callbacks.
472 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
473 flag and use new callbacks.
474
d4c32e1d
JJ
4752008-04-01 Jakub Jelinek <jakub@redhat.com>
476
477 PR pch/13675
478 * files.c (struct _cpp_file): Remove pch field.
479 (pch_open_file): Don't set file->pch, just file->pchname.
480 (should_stack_file): After pfile->cb.read_pch call
481 free pchname and clear pchname, don't close file->fd.
482 Test file->pchname instead of file->pch. Don't close fd after cb.
483 (_cpp_stack_include): Test file->pchname instead of file->pch.
484
161031e3
TT
4852008-03-28 Tom Tromey <tromey@redhat.com>
486
487 * Makefile.in (POSTCOMPILE): New variable.
488 (.c.o): Use it.
489
14ccf800
TT
4902008-03-13 Tom Tromey <tromey@redhat.com>
491
492 PR libcpp/35322:
493 * directives.c (destringize_and_run): Set pfile->directive.
494
830465c6
MM
4952008-03-06 Markus Milleder <markus.milleder@generali.at>
496
497 PR preprocessor/35458
498 * mkdeps.c (munge): Quote '#' with a '\'.
499
d482a073
RW
5002008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
501
502 PR preprocessor/35379
503 * mkdeps.c (deps_write): Ensure the first target always appears
504 in the first column, without leading backslash newline. Avoid
505 some more extra whitespace.
506
185a6cc1
TS
5072008-02-25 Thiemo Seufer <ths@mips.com>
508
d482a073 509 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 510
2bf41bf0
TT
5112008-02-19 Tom Tromey <tromey@redhat.com>
512
513 * traditional.c (lex_identifier): Use CPP_HASHNODE.
514 * lex.c (lex_identifier): Use CPP_HASHNODE.
515 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
516 do-while.
517 * identifiers.c (alloc_node): Change return type.
518 (_cpp_init_hashtable): Don't cast 'alloc_node'.
519 (proxy_assertion_broken): New declaration.
520 (cpp_forall_identifiers): Move comment.
521 * line-map.c (linemap_add): Comment fix.
522 (linemap_line_start): Indentation fix.
523
765d600a
JJ
5242008-01-25 Jakub Jelinek <jakub@redhat.com>
525
526 PR preprocessor/34692
527 * macro.c (collect_args): Add pragma_buff argument. Push
528 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
529 than into arguments. Reset prevent_expansion and parsing_args
530 state at CPP_PRAGMA_EOL/CPP_EOF.
531 (funlike_invocation_p): Add pragma_buff argument, pass it through
532 to collect_args.
533 (enter_macro_context): Add result argument. Adjust
534 funlike_invocation_p caller. Emit all deferred pragma tokens
535 gathered during collect_args before the expansion, add a padding
536 token. Return 2 instead of 1 if any pragma tokens were prepended.
537 (cpp_get_token): If enter_macro_context returns 2, don't return
538 a padding token, instead cycle to grab CPP_PRAGMA token.
539 * directives.c (_cpp_handle_directive): If was_parsing_args
540 in deferred pragma, leave parsing_args and prevent_expansion as is.
541
ec46053b
TT
5422008-01-22 Tom Tromey <tromey@redhat.com>
543
765d600a 544 PR c++/34859
ec46053b
TT
545 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
546 __STDC_CONSTANT_MACROS.
547
681c6ab0
FF
5482008-01-07 Fred Fish <fnf@specifix.com>
549
765d600a 550 PR preprocessor/30363
681c6ab0
FF
551 * traditional.c (replace_args_and_push): Add local variable
552 cxtquote, calculate the replacement text size assuming a
553 worst case of every input character quoted with backslash,
554 and properly handle output quoting of quote characters in
555 actual arguments used in function-like macros.
556
33ae4837
TT
5572008-01-03 Tom Tromey <tromey@redhat.com>
558
765d600a 559 PR preprocessor/34602
33ae4837
TT
560 * directives.c (do_line): Don't try to spell EOF token.
561 (do_linemarker): Add comment.
562
675575f5
DD
5632007-12-11 DJ Delorie <dj@redhat.com>
564
565 * charset.c (convert_using_iconv): Close out any shift states,
566 returning to the initial state.
567
97f6bd40
TT
5682007-12-06 Tom Tromey <tromey@redhat.com>
569
765d600a 570 PR c/29172
97f6bd40
TT
571 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
572 type.
573 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
574 * files.c (FILE_HASH_POOL_SIZE): New macro.
575 (struct file_hash_entry_pool): New.
576 (destroy_all_cpp_files): New function.
577 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
578 (new_file_hash_entry): Update.
579 (free_file_hash_entries): New function.
580 (_cpp_cleanup_files): Call free_file_hash_entries and
581 destroy_all_cpp_files.
582 (cpp_clear_file_cache): New function.
583 * include/cpplib.h (cpp_clear_file_cache): Declare.
584
d56a25e1
TT
5852007-12-03 Tom Tromey <tromey@redhat.com>
586
765d600a 587 PR preprocessor/34288
d56a25e1
TT
588 * configure.ac, config.in: Rebuilt.
589 * configure.ac: Check for ssize_t.
590
607f74e9
TT
5912007-11-30 Tom Tromey <tromey@redhat.com>
592
765d600a 593 PR preprocessor/32868
607f74e9
TT
594 * macro.c (_cpp_create_definition): Special case
595 __STDC_FORMAT_MACROS.
596
b0f4807f
MM
5972007-11-16 Michael Matz <matz@suse.de>
598
599 * files.c (search_path_head): Fix check for absolute paths.
600
f1e20710
TT
6012007-11-11 Tom Tromey <tromey@redhat.com>
602
765d600a 603 PR c++/17557
f1e20710
TT
604 * include/cpplib.h (cpp_included_before): Declare.
605 * files.c (struct file_hash_entry) <location>: New field.
606 (_cpp_find_file): Initialize new field.
607 (make_cpp_dir): Likewise.
608 (cpp_included_before): New function.
609
f373b44d
TT
6102007-11-01 Tom Tromey <tromey@redhat.com>
611
765d600a 612 PR preprocessor/30805
f373b44d
TT
613 * macro.c (paste_tokens): Handle padding token.
614 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
615
5b9a40df
TT
6162007-10-31 Tom Tromey <tromey@redhat.com>
617
765d600a 618 PR preprocessor/30786
5b9a40df
TT
619 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
620 * directives.c (_cpp_do__Pragma): Return error status.
621 * internal.h (_cpp_do__Pragma): Update.
622 * directives.c (get__Pragma_string): Back up if EOF seen.
623
5ffeb913
TT
6242007-09-06 Tom Tromey <tromey@redhat.com>
625
626 * internal.h (struct cpp_reader) <invocation_location>: New
627 field.
628 (struct cpp_reader) <set_invocation_location>: Likewise.
629 * init.c (cpp_set_line_map): New function.
630 * line-map.c (linemap_add): Use linemap's allocator.
631 * include/line-map.h (GTY): Define.
632 (line_map_realloc): New typedef.
633 (struct line_map): Mark with GTY.
634 (struct line_maps): Likewise.
635 (struct line_maps) <maps>: Likewise.
636 (struct line_maps) <reallocator>: New field.
637 * include/symtab.h (GTY): Conditionally define.
638 * include/cpplib.h (cpp_set_line_map): Declare.
639 (cpp_get_token_with_location): Declare.
640 * macro.c (cpp_get_token): Set invocation_location on the reader.
641 (cpp_get_token_with_location): New function.
642
ac6b1c67
CF
6432007-08-30 Chao-ying Fu <fu@mips.com>
644
645 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
646 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
647 (cpp_classify_number): Support decimal fixed-point constants without
648 exponents.
649 Warn about fixed-point constants when -pedantic.
650 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
651 comments to support fixed-point values.
652 (CPP_N_FRACT, CPP_N_ACCUM): Define.
653
cda5e672
TT
6542007-08-18 Tom Tromey <tromey@redhat.com>
655
765d600a 656 PR preprocessor/32974
cda5e672
TT
657 * directives.c (parse_include): Don't check for EOL when
658 processing #pragma dependency.
659
ccfc4c91
OW
6602007-07-30 Ollie Wild <aaw@google.com>
661
662 * directives-only.c: New file.
663 * internal.h (struct _cpp_dir_only_callbacks): New.
664 (_cpp_preprocess_dir_only): New function.
665 * directives.c (_cpp_handle_directive): Check directives_only before
666 disabling execution of indented directives.
667 * files.c (_cpp_stack_file): Add directives_only check.
668 * include/cpplib.h (struct cpp_options): Add directives_only.
669 (cpp_init_special_builtins): New function.
670 * init.c (cpp_init_special_builtins): New function.
671 (cpp_init_builtins): Move builtin_array initialization to
672 cpp_init_special_builtins.
673 (post_options): Check directives_only before setting
674 pfile->state.prevent_expansion = 1.
675 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
676 is expanded inside a directive while -fdirectives-only is enabled.
677 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
678 (libcpp_a_SOURCES): Add directives-only.c.
679
a206413a
UB
6802007-07-04 Uros Bizjak <ubizjak@gmail.com>
681
682 * traditional.c (_cpp_scan_out_logical_line): Initialize
683 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
684 fmacro.args to prevent 'may be used uninitialized' warning.
685
c77cd3d1
UB
6862007-07-03 Uros Bizjak <ubizjak@gmail.com>
687
688 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
689 Add new constants.
690 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
691 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
692 for 'q' or 'Q' suffixes.
693
66938a1d
DS
6942007-06-17 Danny Smith <dannysmith@users.sourceforge.net
695
e1311401 696 * files.c (open_file): Correct typo.
66938a1d 697
71995ede
VP
6982007-06-16 Vladimir Prus <vladimir@codesourcery.com>
699
e1311401 700 * files.c (open_file): Prevent the call
71995ede
VP
701 for stat from overwriting errno.
702
84152c25
VP
7032007-06-09 Vladimir Prus <vladimir@codesourcery.com>
704
e1311401 705 * files.c (open_file): Account for the
84152c25
VP
706 fact that on windows, opening a directory gives
707 EACCES.
708
f7fd775f
JW
7092007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
710
711 PR preprocessor/23479
712 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
713 integer constants.
714 (append_digit): Likewise.
715 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
716 binary integer constants.
717
ed0e74e0
DK
7182007-05-31 Dave Korn <dave.korn@artimi.com>
719
720 PR preprocessor/14331
721 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
722
a702045a
OW
7232007-05-24 Ollie Wild <aaw@google.com>
724
725 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
726 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
727 (cpp_write_pch_state): Save __COUNTER__ state.
728 (cpp_valid_state): Check valid __COUNTER__ state.
729 (cpp_read_state): Read new __COUNTER__ state.
730 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
731 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
732 * internal.h (struct cpp_reader): Add counter member.
733
126e073b
SM
7342007-05-23 Simon Martin <simartin@users.sourceforge.net>
735
736 PR preprocessor/20077
737 * macro.c (create_iso_definition): Fixed the method to determine
738 whether the token-pasting operator appears at the beginning or the end
739 of a macro.
740
0b4cafec
ILT
7412007-05-21 Ian Lance Taylor <iant@google.com>
742
743 * internal.h (struct cpp_reader): Add new fields:
744 nonexistent_file_hash and nonexistent_file_ob.
745 * files.c: Include "obstack.h".
746 (find_file_in_dir): Before trying to open the file, look up the
747 path name in the hash table of nonexistent files. After failing
748 to open the file, add the path name to the hash table.
749 (_cpp_find_file): Cache the results of looking up the file name
750 starting with the quote and bracket chain heads, if we can.
751 (nonexistent_file_hash_eq): New static function.
752 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
753 pfile->nonexistent_file_ob.
754 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
755 pfile->nonexistent_file_ob.
756
30e04921
JJ
7572007-05-14 Janis Johnson <janis187@us.ibm.com>
758
5a6bb57e
JJ
759 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
760
30e04921
JJ
761 PR c/31924
762 * expr.c (interpret_float_suffix): Check for invalid suffix.
763
22a8a52d
EC
7642007-05-02 Eric Christopher <echristo@apple.com>
765
766 * expr.c (num_div_op): Don't overflow if the result is
767 zero.
768
fca35e1b
TT
7692007-05-02 Tom Tromey <tromey@redhat.com>
770
765d600a 771 PR preprocessor/28709
fca35e1b
TT
772 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
773
4cd97075
MM
7742007-03-30 Michael Meissner <michael.meissner@amd.com>
775
776 * directives.c (lex_macro_node_from_str): Fix alloca call to be
777 type correct.
778
121de39f
RH
7792007-03-30 Richard Henderson <rth@redhat.com>
780
781 * directives.c (lex_macro_node_from_str): New.
782 (cpp_push_definition, cpp_pop_definition): New.
783 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
784
4fcb360b
BM
7852007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
786
787 * Makefile.in: Add dummy install-pdf target.
788
67e64439
TT
7892007-01-30 Tom Tromey <tromey@redhat.com>
790
765d600a 791 PR preprocessor/30468
67e64439
TT
792 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
793 './'.
794
ee380365
TT
7952007-01-30 Tom Tromey <tromey@redhat.com>
796
765d600a 797 PR preprocessor/29966
ee380365
TT
798 * macro.c (lex_expansion_token): Save and restore cpp_reader's
799 cur_token.
800 (_cpp_create_definition): Don't restore cur_token here.
801 * lex.c (_cpp_lex_token): Added assertion.
802
024abeb3
TT
8032007-01-27 Tom Tromey <tromey@redhat.com>
804
805 * configure: Rebuilt.
806
ee1c2a10
TT
8072007-01-12 Tom Tromey <tromey@redhat.com>
808
765d600a 809 PR preprocessor/28227
ee1c2a10
TT
810 * directives.c (lex_macro_node): Added 'is_def_or_undef'
811 argument.
812 (do_define): Update.
813 (do_undef): Update.
814 (do_ifdef): Update.
815 (do_ifndef): Update.
816
67214c16
PB
8172007-01-11 Paolo Bonzini <bonzini@gnu.org>
818
819 * configure: Regenerate.
820
1aa6ca40
PB
8212007-01-11 Paolo Bonzini <bonzini@gnu.org>
822
823 * configure: Regenerate.
824
705e2d28
TT
8252007-01-04 Tom Tromey <tromey@redhat.com>
826
765d600a 827 PR preprocessor/28165
705e2d28
TT
828 * internal.h (cpp_in_primary_file): New function.
829 * directives.c (do_include_next): Use cpp_in_primary_file.
830 (do_pragma_once): Likewise.
831 (do_pragma_system_header): Likewise.
832
7af45bd4
ILT
8332006-12-29 Ian Lance Taylor <iant@google.com>
834
835 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
836 look backward at the end of the line unless we saw a backslash.
837
9d30f270
JJ
8382006-12-29 Jakub Jelinek <jakub@redhat.com>
839
840 PR preprocessor/29612
841 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
842 only when new_sysp is non-zero.
843
30b0edc0
TT
8442006-12-28 Tom Tromey <tromey@redhat.com>
845
765d600a 846 PR preprocessor/30001
30b0edc0
TT
847 * charset.c (_cpp_convert_input): Check that to.len is greater
848 than zero.
849
85d9c13c
TS
8502006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
851
852 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 853 * configure: Rebuilt.
85d9c13c 854
dfafdaa6
DG
8552006-11-01 Douglas Gregor <doug.gregor@gmail.com>
856
857 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
858 for experimental C++0x mode.
859 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
860 adopted the preprocessor changes introduced in C99.
861
0f45f0f5
JM
8622006-10-29 Joseph Myers <joseph@codesourcery.com>
863
864 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
865 depending on --enable-targets=all.
866 * configure: Regenerate.
867
de000d22
JJ
8682006-10-12 Jakub Jelinek <jakub@redhat.com>
869
870 PR preprocessor/28709
871 * macro.c (paste_tokens): Do error reporting here, use BUF with the
872 spelled LHS token as opposed to spelling it again.
873 (paste_all_tokens): Don't report errors here, just break on failure.
874
b5422ad7
BM
8752006-10-10 Brooks Moses <bmoses@stanford.edu>
876
877 * Makefile.in: Added empty "pdf" target.
878
aaf50ff2
GK
8792006-09-22 Geoffrey Keating <geoffk@apple.com>
880
881 * configure.ac: Make need_64_bit_hwint case for x86-darwin
882 match exactly the glob in gcc/config.gcc.
883 * configure: Regenerate.
884
c663e301
JM
8852006-09-13 Joseph S. Myers <joseph@codesourcery.com>
886
887 PR c/28768
888 PR preprocessor/14634
889 * lex.c (lex_string): Pedwarn for unterminated literals.
890
f7288899
EC
8912006-09-08 Eric Christopher <echristo@apple.com>
892
893 * configure.ac: Add 64-bit HWI support for i?86-darwin.
894
b52dbbf8
SE
8952006-08-14 Steve Ellcey <sje@cup.hp.com>
896
897 PR c++/28288
898 PR c++/14556
899 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
900 (CPP_LAST_EQ): Change.
901 (CPP_LAST_PUNCTUATOR): Change.
902 * expr.c (cpp_operator): Remove MIN and MAX.
903 (reduce): Remove CPP_MIN and CPP_MAX.
904 (num_binary_op): Ditto.
905 * lex.c (_cpp_lex_direct): Ditto.
906 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
907
1c90c6f9
JJ
9082006-06-09 Jakub Jelinek <jakub@redhat.com>
909
910 PR preprocessor/27746
911 * directives.c (do_pragma): Handle pragma with valid namespace
912 and invalid name coming from macro expansion.
913 * directives.c (destringize_and_run): Initialize next field in
914 context.
915
916 PR c/27747
917 PR c++/27748
918 * directives.c (destringize_and_run): Set NO_EXPAND on the
919 tokens.
920
921 * macro.c (_cpp_backup_tokens): Fix comment typo.
922
5c3c3683
DJ
9232006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
924
925 * Makefile.in (CATALOGS): Add po/ prefix.
926 * configure: Regenerated.
927
b2bd74bc
CD
9282006-05-23 Carlos O'Donell <carlos@codesourcery.com>
929
930 * Makefile.in: Add install-html target. Add install-html to .PHONY
931
be8ac3e2
GZ
9322006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
933
934 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
935 * files.c (_cpp_get_file_stat): New function.
936 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
937 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
938 * internal.h (_cpp_get_file_stat): Prototype.
939 (struct cpp_buffer): Add timestamp.
940
83900997
JJ
9412006-01-23 Jakub Jelinek <jakub@redhat.com>
942
943 PR preprocessor/25717
944 * init.c (cpp_init_builtins): If __STDC__ will not change value
945 between system headers and other sources, define it as a normal
946 macro rather than a builtin.
947 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
948 cpp_in_system_header condition.
949
9502006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
951
952 * Makefile.in: Use -MMD instead of -MD.
953
bc4071dd
RH
9542006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
955 Richard Henderson <rth@redhat.com>
956
957 Merge from gomp branch:
958 * directives.c (struct pragma_entry): Add is_deferred. Add ident
959 entry to value union.
960 (end_directive): Don't eat the line if in_deferred_pragma.
961 (run_directive): Remove pragma hacks.
962 (insert_pragma_entry): Remove.
963 (new_pragma_entry): New.
964 (register_pragma_1): Split out of register_pragma. Only handle
965 the lookup tree and return the new entry.
966 (cpp_register_pragma): Fill in the pragma entry here.
967 (cpp_register_deferred_pragma): New.
968 (register_pragma_internal): New.
969 (_cpp_init_internal_pragmas): Use register_pragma_internal.
970 (do_pragma): Allow pragma expansion after namespace. For deferred
971 pragmas, don't slurp the line into a string.
972 (destringize_and_run): Save tokens for deferred pragmas.
973 (cpp_handle_deferred_pragma): Remove.
974 * macro.c (builtin_macro): Remove pragma token hack.
975 (_cpp_push_token_context): Rename from push_token_context and export.
976 * internal.h (struct lexer_state): Add pragma_allow_expansion.
977 (_cpp_push_token_context): Declare.
978 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
979 a token. Update the line number correctly if so.
980 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
981 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
982 * include/cpplib.h (PRAGMA_EOL): New.
983 (CPP_TOKEN_FLD_PRAGMA): New.
984 (struct cpp_token): Add val.pragma.
985 (struct cpp_options): Remove defer_pragmas.
986 (cpp_handle_deferred_pragma): Remove.
987 (cpp_register_deferred_pragma): Declare.
988
d09e893f
JJ
9892006-01-01 Jakub Jelinek <jakub@redhat.com>
990
991 PR c++/25294
992 * directives.c (do_pragma): If pragma line ends with multi-line
993 block comment, end the saved deferred pragma string before that
994 comment. Handle embedded '\0' chars on the pragma line.
995
ab84748a
VR
9962005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
997
998 PR c++/23333
999 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
1000
ad6ed77e
JG
10012005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
1002 Ben Elliston <bje@au.ibm.com>
1003
1004 * include/cpplib.h (CPP_N_DFLOAT): New.
1005 * expr.c (interpret_float_suffix): Identify df, dd, and dl
1006 suffixes as decimal floating point constants.
1007 (cpp_classify_number): Disallow hexadecimal DFP constants.
1008
ba096620 10092005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 1010 Ian Lance Taylor <ian@airs.com>
ba096620
GP
1011
1012 * include/cpplib.h (struct cpp_callbacks): Annotate error with
1013 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
1014
456b8ce5
UB
10152005-11-09 Per Bothner <per@bothner.com>
1016 Uros Bizjak <uros@kss-loka.si>
f7288899 1017
456b8ce5
UB
1018 PR c/24101
1019 * init.c (read_original_filename): Temporarily set
1020 state.in_directive before calling _cpp_lex_direct for
1021 CPP_HASH tokens.
1022
5571f74f
JW
10232005-11-03 James E Wilson <wilson@specifix.com>
1024
1025 PR preprocessor/24202
1026 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
1027
a63607ed
JM
10282005-11-04 Joseph S. Myers <joseph@codesourcery.com>
1029
1030 * include/cpplib.h (struct cpp_callbacks): Make error take
1031 va_list* parameter.
1032 * errors.c (cpp_error): Update call to callback.
1033
651ed942
AP
10342005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
1035
1036 PR preprocessor/22042
1037 * macro.c (_cpp_builtin_macro_text): Lower the needed max
1038 buffer size.
1039 (cpp_quote_string): Don't octalify non printable
1040 charactors.
1041
178b58b5
JM
10422005-11-03 Joseph S. Myers <joseph@codesourcery.com>
1043
1044 PR c++/17964
1045 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
1046 (struct cpp_callbacks): Add error.
1047 * errors.c (cpp_error): If client_diagnostic, use error callback.
1048 * charset.c (convert_escape): Don't use %03o in diagnostic.
1049
3ee5ed11 10502005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
1051
1052 PR preprocessor/15220
1053 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
1054 callers. Pass to open_file_failed.
1055 (open_file_failed): New parameter angle_brackets. Fix all callers.
1056 Use in print_dep assignment.
1057 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
1058 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 1059
077fc835
KH
10602005-10-08 Kazu Hirata <kazu@codesourcery.com>
1061
1062 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
1063 * configure: Regenerate.
1064
cbc43ae0
ILT
10652005-10-04 Ian Lance Taylor <ian@airs.com>
1066
1067 PR preprocessor/13726
1068 * directives.c (check_eol_return_comments): New static function.
1069 (parse_include): Add buf parameter. Change all callers.
1070 (do_include_common): If not discard comments, turn on
1071 save_comments. Pass collected comments to include callback.
1072 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
1073 include callback: cpp_token list.
1074
af15a2fe
JM
10752005-09-20 Joseph S. Myers <joseph@codesourcery.com>
1076
1077 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
1078 * init.c (struct lang_flags, lang_defaults): Add
1079 extended_identifiers.
1080 (cpp_set_lang): Use it.
1081 * lex.c (forms_identifier_p): Check extended_identifiers.
1082
f5eab47e
JJ
10832005-08-30 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR preprocessor/20348
1086 PR preprocessor/20356
1087 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
1088 2004-06-05 changes.
1089
467129e6
KG
10902005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1091
1092 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
1093 -Wmissing-format-attribute.
1094
1095 * configure: Regenerate.
1096
200031d1
KC
10972005-06-29 Kelley Cook <kcook@gcc.gnu.org>
1098
1099 * all files: Update FSF address in copyright headers.
1100 * makeucnid.c (write_copyright): Update outputted FSF address.
1101
f610dd5f
ZW
11022005-06-13 Zack Weinberg <zack@codesourcery.com>
1103
1104 * configure.ac: Invoke ZW_CREATE_DEPDIR and
1105 ZW_PROG_COMPILER_DEPENDENCIES.
1106 * aclocal.m4, configure: Regenerate.
1107 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
1108 New variables.
1109 (distclean): Clean up $(DEPDIR) and its contents.
1110 (.c.o): Use $(COMPILE).
1111 Include $(DEPDIR)/*.Po for most object->header dependencies.
1112
c3f829c1
GDR
11132005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1114
1115 * configure.ac: Check declarations for asprintf and vasprintf.
1116 * config.in: Regenerate.
1117 * configure: Likewise.
1118
1119 * charset.c (conversion_loop): Use XRESIZEVEC.
1120 (convert_no_conversion): Likewise.
1121 (convert_using_iconv): Likewise.
1122 (init_iconv_desc): Cast return value of alloca.
1123 (cpp_host_to_exec_charset): Use XNEWVEC.
1124 (emit_numeric_escape): Use XRESIZEVEC.
1125 (cpp_interpret_string): Use XNEWVEC.
1126 (cpp_interpret_string): Use XRESIZEVEC.
1127 (_cpp_interpret_identifier): Cast return value of alloca.
1128 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
1129 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
1130 (parse_include): Use XNEWVEC.
1131 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 1132 "new_entry".
c3f829c1
GDR
1133 (save_registered_pragmas): Cast return value of xmemdup.
1134 (destringize_and_run): Same for alloca.
1135 (parse_assertion): Likewise.
1136 (do_assert): Cast allocated storage to proper type.
1137 (cpp_define): Likewise.
1138 (_cpp_define_builtin): Likewise.
1139 (cpp_undef): Likewise.
1140 (handle_assertion): Likewise.
1141 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
1142 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
1143 (CPP_UMINUS): Likewise.
1144 (struct cpp_operator): Rename from struct operator.
1145 (_cpp_expand_op_stack): Use XRESIZEVEC.
1146 * files.c (pch_open_file): Use XNEWVEC.
1147 (pch_open_file): Use XRESIZEVEC.
1148 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
1149 (dir_name_of_file): Use XNEWVEC.
1150 (make_cpp_file): Use XCNEW.
1151 (make_cpp_dir): Likewise.
1152 (allocate_file_hash_entries): USE XNEWVEC.
1153 (cpp_included): Cast return value of htab_find_with_hash.
1154 (append_file_to_dir): Use XNEWVEC.
1155 (read_filename_string): Likewise. Use XRESIZEVEC too.
1156 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
1157 (remap_filename): Use XNEWVEC.
1158 (struct pchf_entry): Move definition out of struct pchf_data.
1159 (_cpp_save_file_entries): Use XCNEWVAR.
1160 (_cpp_read_file_entries): Use XNEWVAR.
1161 * identifiers.c (alloc_node): Use XOBNEW.
1162 * init.c (cpp_create_reader): Use XCNEW.
1163 (cpp_init_builtins): Cast of b->value to enum builtin_type.
1164 (read_original_directory): Cast return value of alloca.
1165 * lex.c (add_line_note): Use XRESIZEVEC.
1166 (warn_about_normalization): Use XNEWVEC.
1167 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
1168 (new_buff): Use XNEWVEC.
1169 * line-map.c (linemap_add): Use XRESIZEVEC.
1170 * macro.c (builtin_macro): Cast return value of alloca.
1171 (paste_tokens): Likewise.
1172 (expand_arg): Use XNEWVEC and XRESIZEVEC.
1173 (_cpp_save_parameter): Use XRESIZEVEC.
1174 (create_iso_definition): Cast allocated storage to proper type.
1175 (_cpp_create_definition): Likewise.
1176 (cpp_macro_definition): Use XRESIZEVEC.
1177 * makedepend.c (add_clm): Use XNEW.
1178 (add_dir): Likewise.
1179 * mkdeps.c (munge): Use XNEWVEC.
1180 (deps_init): Use XCNEW.
1181 (deps_add_target): Use XRESIZEVEC.
1182 (deps_add_default_target): Cast return value of alloca.
1183 (deps_add_dep): Use XRESIZEVEC.
1184 (deps_add_vpath): Likewise. Use XNEWVEC too.
1185 (deps_restore): Likewise.
1186 * pch.c (save_idents): Use XNEW and XNEWVEC.
1187 (cpp_save_state): Use XNEW.
1188 (count_defs): Cast return value of htab_find.
1189 (write_defs): Likewise.
1190 (cpp_write_pch_deps): Use XNEWVEC.
1191 (collect_ht_nodes): Use XRESIZEVEC.
1192 (cpp_valid_state): Use XNEWVEC.
1193 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
1194 * symtab.c (ht_create): Use XCNEW.
1195 (ht_lookup_with_hash): Cast return value of obstack_copy0.
1196 (ht_expand): Use XCNEWVEC.
1197 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
1198 (bool): Do not define if __cplusplus.
1199
1ed17cd5
ZW
12002005-05-12 Zack Weinberg <zack@codesourcery.com>
1201
1202 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
1203 (do_sccs): Delete function definition, #define to do_ident.
1204 (do_ident): Don't hardwire directive name.
1205
5a8c20ce
RK
12062005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
1207
1208 PR bootstrap/21230
1209 * configure: Regenerate.
1210
473c5bc9
AP
12112005-04-27 Andris Pavenis <pavenis@latnet.lv>
1212
1213 * files.c: Include io.h for DJGPP to get prototype of setmode.
1214
c1fc5047
PB
12152005-04-19 Per Bothner <per@bothner.com>
1216
1217 PR preprocessor/20907
1218 * line-map.c (linemap_line_start): Fix bug when we need to increse
1219 column_bits but can re-use the current line_map.
1220
042630ad
KG
12212005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1222
1223 * system.h (fopen, fdopen, freopen): Define these to the unlocked
1224 libiberty functions.
1225
0d667716
KG
12262005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1227
1228 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
1229 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
1230 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
1231 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
1232 _unlocked function.
1233 (fwrite_unlocked): Fix prototype.
1ed17cd5 1234
0d667716
KG
1235 * configure, config.in: Regenerate.
1236
cae064e7
JJ
12372005-04-05 Jakub Jelinek <jakub@redhat.com>
1238
1239 PR preprocessor/19475
1240 * macro.c (create_iso_definition): For < ISO C99, don't
1241 pedwarn if there is no whitespace between macro name and its
1242 replacement, but the replacement starts with a basic character
1243 set character.
1244
cbada204
AJ
12452005-03-28 Andreas Jaeger <aj@suse.de>
1246
1247 * lex.c (warn_about_normalization): Cast field width to int to
1248 avoid warning.
1249
f42eccdb
JM
12502005-03-19 Joseph S. Myers <joseph@codesourcery.com>
1251
1252 * configure.ac: Consistently use solaris2.1[0-9]* instead of
1253 solaris2.1[0-9].
1254 * configure: Regenerate.
1255
c79e602b
GK
12562005-03-15 Geoffrey Keating <geoffk@apple.com>
1257
1258 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
1259 UCN rather than printing an error.
1260
50668cf6
GK
12612005-03-14 Geoffrey Keating <geoffk@apple.com>
1262
6baba9bb
GK
1263 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
1264
12652005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 1266
50668cf6
GK
1267 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
1268 * charset.c: Update for new format of ucnid.h.
1269 (ucn_valid_in_identifier): Update for new format of ucnid.h.
1270 Add NST parameter, and update it; update callers.
1271 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
1272 with cpp_error.
1273 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
1274 * internal.h (struct normalize_state): New.
1275 (INITIAL_NORMALIZE_STATE): New.
1276 (NORMALIZE_STATE_RESULT): New.
1277 (NORMALIZE_STATE_UPDATE_IDNUM): New.
1278 (_cpp_valid_ucn): New.
1279 * lex.c (warn_about_normalization): New.
1280 (forms_identifier_p): Add normalize_state parameter, update callers.
1281 (lex_identifier): Add normalize_state parameter, update callers. Keep
1282 the state current.
1283 (lex_number): Likewise.
1284 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
1285 it with warn_about_normalization.
1286 * makeucnid.c: New.
1287 * ucnid.h: Replace.
1288 * ucnid.pl: Remove.
1289 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
1290 comments about obsolete version of C++.
1291 * include/cpplib.h (enum cpp_normalize_level): New.
1292 (struct cpp_options): Add warn_normalize field.
1293
47e20491
GK
12942005-03-11 Geoffrey Keating <geoffk@apple.com>
1295
1296 * directives.c (glue_header_name): Update call to cpp_spell_token.
1297 * internal.h (_cpp_interpret_identifier): New.
1298 * charset.c (_cpp_interpret_identifier): New.
1299 (_cpp_valid_ucn): Allow UCN version of '$'.
1300 * lex.c (lex_identifier): Add extra parameter to indicate if initial
1301 character was '$' or '\'. Support identifiers with UCNs.
1302 (forms_identifier_p): Allow UCNs.
1303 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
1304 (utf8_to_ucn): New.
1305 (cpp_spell_token): Add FORSTRING parameter. Use it.
1306 (cpp_token_as_text): Update call to cpp_spell_token.
1307 (cpp_output_token): Write UCNs back out.
1308 (stringify_arg): Update call to cpp_spell_token.
1309 (paste_tokens): Likewise.
1310 (cpp_macro_definition): Likewise.
1311 * macro.c (stringify_arg): Likewise.
1312 (paste_tokens): Likewise.
1313 (cpp_macro_definition): Likewise.
1314 * include/cpplib.h: Add parameter to cpp_spell_token.
1315
73096711
JJ
13162005-03-04 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR bootstrap/20282
1319 PR bootstrap/20305
1320 * macro.c (replace_args, cpp_get_token): Copy whole
1321 cpp_token_u instead of just cpp_string field from it.
1322
2203a881
DP
13232005-02-28 Devang Patel <dpatel@apple.com>
1324
1325 * directives.c (do_line): Save sysp early before line table is
1326 realloc'ed.
1ed17cd5 1327
c5ff069d
ZW
13282005-02-20 Zack Weinberg <zack@codesourcery.com>
1329
1330 PR 18785
1331 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1332 (cpp_host_to_exec_charset): New function.
1333 * include/cpplib.h: Declare cpp_host_to_exec_charset.
1334
04c90eea
DP
13352005-02-19 Devang Patel <dpatel@apple.com>
1336
1337 * charset.c (_cpp_convert_input): Check '\r' before inserting
1338 '\n' at the end.
c5ff069d 1339
6da55c00
EC
13402005-02-15 Eric Christopher <echristo@redhat.com>
1341
1342 PR preprocessor/19077
1343 * macro.c (cpp_macro_definition): Move handling of whitespace
1344 to PREV_WHITE conditional. Remove overloading of len
1345 variable.
1346
31c3e631
KH
13472005-02-14 Kazu Hirata <kazu@cs.umass.edu>
1348
1349 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1350 traditional.c: Update copyright.
1351
be0f1e54
PB
13522005-02-14 Paolo Bonzini <bonzini@gnu.org>
1353
1354 PR bootstrap/19818
1355 * configure.ac: Check for declaration of basename and getopt.
1356 * config.in: Regenerate.
1357 * configure: Regenerate.
1358 * internal.h (ustrcspn): New.
1359 * macro.c (create_iso_definition): Fix allocation of memory.
1360 (padding_token): Add cast to remove const-ness.
1361 * pch.c (cpp_read_state): Use ustrcspn.
1362
ecddfb39
MS
13632005-02-08 Mike Stump <mrs@apple.com>
1364
1365 * files.c (pchf_adder): Remove.
1366 (struct pchf_adder_info): Likewise.
1367 (_cpp_save_file_entries): Write out all files so that #import works.
1368
9fcdd891
JM
13692005-01-23 Joseph S. Myers <joseph@codesourcery.com>
1370
1371 * configure: Regenerate.
1372
ecfd72e7
TS
13732005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1374
1375 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1376
6c25a4f7 1377 * include/cpplib.h: Also update copyright years.
c5ff069d 1378
942926ad
GK
13792005-01-03 Geoffrey Keating <geoffk@apple.com>
1380
1381 * files.c (_cpp_find_file): Add files found by search_path_exhausted
1382 to the list of all files.
1383
a2566ae9
GDR
13842005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1385
1386 * internal.h: Update references to Cpp lib filenames.
1387 * directives.c: Likewise.
1388 * init.c: Likewise.
1389 * macro.c: Likewise.
1390 * traditional.c: Likewise.
1391
1b449375
EB
13922004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
1393
1394 PR preprocessor/15167
1395 * files.c (destroy_cpp_file): New function.
1396 (should_stack_file): Make a new file if the
1397 compared file is still stacked.
1398
28303828
NN
13992004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
1400
c5ff069d 1401 PR preprocessor/17610
28303828
NN
1402 * directives.c (do_include_common): Error out if an empty filename
1403 is given for #include (or #include_next or #import).
1404
c812785a
RS
14052004-11-27 Roger Sayle <roger@eyesopen.com>
1406 Zack Weinberg <zack@codesourcery.com>
1407
1408 * internal.h: Replace all uses of uchar with unsigned char.
1409 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
1410 with !IN_GCC, so uchar is only defined whilst building libcpp.
1411
f91eaa01
KC
14122004-11-24 Kelley Cook <kcook@gcc.gnu.org>
1413
1414 * aclocal.m4: Regenerate.
1415
f78ce0c2
RS
14162004-11-24 Roger Sayle <roger@eyesopen.com>
1417
1418 PR preprocessor/15824
1419 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1420 directly, instead of the non-existant "system.h" and "ansidecl.h".
1421 * configure: Regenerate.
1422
b5b3e36a 14232004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1424 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
1425
1426 * internal.h (struct lexer_state): Add in_deferred_pragma.
1427 * directives.c (struct pragma_entry): Add allow_expansion.
1428 (insert_pragma_entry): Take allow_expansion flag.
1429 (register_pragma): Likewise.
1430 (cpp_register_pragma): Likewise.
1431 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1432 (do_pragma): Honor allow_expansion.
1433 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1434 * include/cpplib.h (cpp_register_pragma): Update prototype.
1435
a8e68029 14362004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1437 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
1438
1439 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1440 need_64bit_hwint=yes.
1441 * configure: Regenerate.
1442
50f47ee0
JM
14432004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1444
1445 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1446 po/$(PACKAGE).pot.
1447 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1448 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1449 Remove local srcdir path from generated file.
1450
968e08d6 14512004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 1452 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
1453
1454 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1455 as well.
1456
3da3d587
ZW
14572004-10-27 Zack Weinberg <zack@codesourcery.com>
1458
1459 PR 18075
1460 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1461 (cpp_handle_deferred_pragma): Add cast to silence warning.
1462
ac24fc25
JM
14632004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1464
1465 * errors.c (_cpp_begin_message): Print "error: " for errors.
1466
7731405b
AJ
14672004-10-10 Andreas Jaeger <aj@suse.de>
1468
1469 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1470 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1471
646544e3
AP
14722004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1473
1474 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1475 used.
1476 (cpp_read_state): Remove unused variables, m, d and mac_count.
1477
67a74146
PB
14782004-09-29 Per Bothner <per@bothner.com>
1479
1480 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1481 cb.line_change. Otherwise do_pragma will call the line_change
1482 call-back with a meaningless line number.
1483
018a4785
ZW
14842004-09-24 Zack Weinberg <zack@codesourcery.com>
1485
1486 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1487 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1488 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1489 * aclocal.m4, configure: Regenerate.
1490 * init.c: Include localedir.h.
1491 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1492 (DEFS): Delete.
1493 (.c.o): Use $(ALL_CFLAGS).
1494 (localedir.h, localedir.hs): New rules.
1495 (clean): Use rm -rf to remove directories.
1496 (distclean): Also delete localedir.h and localedir.hs.
1497 (init.o): Update dependencies.
1498
88fa57d7
KC
14992004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1500
1501 * Makefile.in (aclocal.m4): Update dependencies.
1502 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1503 * aclocal.m4, configure: Regenerate.
1504
8f8e9aa5
ZW
15052004-09-17 Zack Weinberg <zack@codesourcery.com>
1506
a29f62d9
ZW
1507 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1508 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1509 Some other comments in this file also tweaked.
1510
8f8e9aa5
ZW
1511 * directives.c (do_pragma): Save current buffer position
1512 before lexing the pragma keywords; don't call
1513 _cpp_backup_tokens in the defer_pragmas case.
1514
a2981930
PB
15152004-09-15 Per Bothner <per@bothner.com>
1516
1517 * include/line-map.h (line_map_start): Add parameter names so
1518 preceding comment makes sense.
1519 (linemap_add): Remove from comment mention of non-existing parameter.
1520
21b11495
ZW
15212004-09-09 Matt Austern <austern@apple.com>
1522 Zack Weinberg <zack@codesourcery.com>
1523
1524 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1525 prefixes throughout. Add entry for PRAGMA. Remove
1526 unnecessary "= 0" from EQ.
1527 (enum cpp_ttype): Adjust OP and TK definitions to restore
1528 prefixes, via token-paste.
1529 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1530 Change from #defines to additional cpp_ttype enumerators.
1531 (struct cpp_options): Add defer_pragmas.
1532 (cpp_handle_deferred_pragma): Prototype new interface.
1533
1534 * internal.h (struct cpp_reader): Add directive_result.
1535 * directives.c (struct pragma_entry): Add is_internal field;
1536 give boolean fields type bool.
1537 (start_directive): Initialize pfile->directive_result.type.
1538 (_cpp_do__Pragma): Likewise.
1539 (run_directive): Do not crash if pfile->buffer->prev is NULL.
1540 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1541 from it.
1542 (register_pragma): New static function, bulk of former
1543 cpp_register_pragma here; add 'internal' argument, pass along
1544 to insert_pragma_entry.
1545 (cpp_register_pragma): Now a wrapper around register_pragma which
1546 always passes false for 'internal' argument.
1547 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1548 true for 'internal'.
1549 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1550 an internal pragma, save text till the end of the line as a CPP_PRAGMA
1551 token instead of executing the pragma.
1552 (cpp_handle_deferred_pragma): New interface.
1553 * lex.c (token_spellings): Adjust OP and TK definitions to
1554 match changes to cpplib.h.
1555 (_cpp_lex_token): Check for a directive-result token and
1556 return it if present.
1557 (cpp_token_val_index): Handle CPP_PRAGMA.
1558 * macro.c (cpp_builtin_macro_text): Correct comment.
1559 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1560
0fd9e8dd
SB
15612004-09-06 Serge Belyshev <belyshev@lubercy.com>
1562
1563 PR preprocessor/14699
1564 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1565 from size_t to double.
1566
39b8ce7f
AS
15672004-08-28 Andreas Schwab <schwab@suse.de>
1568 Andreas Jaeger <aj@suse.de>
1569
1570 * configure.ac: Set PACKAGE correctly.
1571 * configure: Regenerated.
1572
5d1f4b27
PB
15732004-08-25 Paolo Bonzini <bonzini@gnu.org>
1574
1575 * Makefile.in: Add back top_builddir.
1576
078e3ffe
PB
15772004-08-25 Paolo Bonzini <bonzini@gnu.org>
1578
1579 * configure.ac: Replace Automake macro invocations
1580 with manual Autoconf checks and substitutions.
1581 * configure: Regenerate.
1582 * aclocal.m4: Regenerate.
1583 * config.in: Regenerate.
1584 * Makefile.am: Removed.
1585 * Makefile.in: Heavy simplification and reorganization.
1586
b3f8d95d
MM
15872004-08-09 Mark Mitchell <mark@codesourcery.com>
1588
1589 * configure.ac (arm*-*-eabi*): New target.
1590 (arm*-*-symbianelf*): Likewise.
1591 * configure: Regenerated.
1592
72bb2c39
BI
15932004-07-24 Bernardo Innocenti <bernie@develer.com>
1594
1595 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1596 * directives.c: Use XNEW-family macros from libiberty.
1597 * lex.c: Likewise.
1598 * macro.c: Likewise.
1599 * cpplib.h (cpp_deps_style): Export enum with name.
1600
21b11495 16012004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 1602
21b11495 1603 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 1604
a23ee064
AP
16052004-07-16 Andris Pavenis <pavenis@latnet.lv>
1606
1607 PR preprocessor/16366
1608 * internal.h (struct cpp_reader): New field dir_hash.
1609 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1610 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1611
a09d4744
NB
16122004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
1613
1614 PR preprocessor/16192
1615 PR preprocessor/15913
1616 PR preprocessor/15572
1617 * expr.c (_cpp_parse_expr): Handle remaining cases where an
1618 expression is missing.
1619 * init.c (post_options): Traditional cpp doesn't do // comments.
1620
f58f7def
PB
16212004-06-30 Per Bothner <per@bothner.com>
1622
1623 * include/line-map.h (fileline): Remove old typedef.
1624 * internal.h (struct cpp_reader): Use source_location typedef instead.
1625
e83d8d43
ZW
16262004-06-26 Zack Weinberg <zack@codesourcery.com>
1627
1628 Partially revert patch of 2004-06-05.
1629 * files.c (search_cache): Remove pfile argument. Don't check
1630 for file that would be found by "" or <> search here...
1631 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1632 Do not apply directory-of-current-file correction to files
1633 found by this check. Rearrange code slightly.
1634
c0d578e6
GK
16352004-06-21 Geoffrey Keating <geoffk@apple.com>
1636
1637 * files.c (should_stack_file): Correct swapped parameters to call
1638 to cb.read_pch.
1639 * pch.c (cpp_valid_state): Handle -fpreprocessed.
1640
159d5224
PB
16412004-06-15 Paolo Bonzini <bonzini@gnu.org>
1642
1643 * Makefile.in: Regenerate with automake 1.8.5.
1644 * aclocal.m4: Likewise.
1645 * configure: Regenerate.
1646
2fac9c01
ZW
16472004-06-11 Zack Weinberg <zack@codesourcery.com>
1648
1649 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1650 * configure, config.in: Regenerate.
1651 * system.h: Unconditionally define bool as unsigned char,
1652 BOOL_BITFIELD as unsigned int.
1653 * .cvsignore: New file.
1654
d8044160
GK
16552004-06-09 Geoffrey Keating <geoffk@apple.com>
1656
1657 * traditional.c (push_replacement_text): Set macro->traditional.
1658 (save_replacement_text): Likewise.
1659 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1660 (struct save_macro_item): Delete.
1661 (struct save_macro_data): Use a character array not the previous
1662 structured format.
1663 (save_macros): Save macro as text not as internal structures.
1664 (cpp_prepare_state): Update for changes to save_macro_data.
1665 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 1666 -D macros as text.
d8044160
GK
1667 * macro.c (create_iso_definition): Honour alloc_subobject.
1668 Clear traditional flag.
1669 (_cpp_create_definition): Honour alloc_subobject.
1670 * lex.c (cpp_token_val_index): New.
1671 * internal.h: Include cpp-id-data.h.
1672 (uchar): Move definition to cpp-id-data.h.
1673 (U): Likewise.
1674 (cpp_macro): Likewise.
1675 * directives.c (struct answer): Move to cpp-id-data.h.
1676 (do_assert): Honour alloc_subobject.
2cf22451
ZW
1677
1678 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1679 * include/cpplib.h (struct cpp_string): Add GTY marker.
1680 (enum cpp_token_fld_kind): New.
1681 (struct cpp_token): Add GTY markers.
1682 (cpp_token_val_index): Prototype.
1683 (CPP_HASHNODE_VALUE_IDX): New.
1684 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1685 * include/cpp-id-data.h: New file.
d8044160 1686
0ca8e815
PB
16872004-06-09 Paolo Bonzini <bonzini@gnu.org>
1688
1689 * Makefile.am (all-local): New.
1690 * Makefile.in: Regenerate.
1691
b51fa00f
RS
16922004-06-06 Roger Sayle <roger@eyesopen.com>
1693
1694 * Makefile.am (LIBICONV): Declare.
1695 (makedepend_LDADD): Use LIBICONV.
1696 * Makefile.in: Regenerate.
1697
5e2f3f39
AP
16982004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
1699
1700 * Makefile.am (LIBINTL): Declare
1701 (makedepend_LDADD): Use LIBINTL.
1702 * Makefile.in: Regenerate.
1703
c6e83800
ZW
17042004-06-05 Zack Weinberg <zack@codesourcery.com>
1705
1706 * Makefile.am: Add makedepend.
1707 * Makefile.in, aclocal.m4: Regenerate.
1708 * charset.c: Insert a space to avoid a warning.
1709 * directives.c: Include mkdeps.h.
1710 (_cpp_handle_directive): Reenable macro expander if appropriate.
1711 (undefine_macros): Inline body of _cpp_free_definition for speed.
1712 Do not call undef callback or _cpp_warn_if_unused_macro.
1713 (cpp_get_deps): New interface.
1714 * files.c (search_cache): Add pfile argument. Check for file
1715 that would be found by "" or <> search here...
1716 (_cpp_find_file): ...not here. Correct recorded start_dir of
1717 files found by directory-of-current-file search that would be
1718 found by "" or <> search.
1719 * init.c (cpp_add_dependency_target): Delete.
1720 * internal.h (struct lexer_state): Add discarding_output flag.
1721 * lex.c (lex_identifier): Compute hash function while scanning.
1722 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1723 directives.
1724 * makedepend.c: New file.
1725 * mkdeps.c (struct deps): Add vpath vector.
1726 (apply_vpath, deps_add_vpath): New function.
1727 (deps_free): Free vpath vector.
1728 (deps_add_dep, deps_add_target): Use apply_vpath.
1729 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1730 (ht_lookup_with_hash): New function.
1731 * cpplib.h, mkdeps.h: Update prototypes.
1732 * symtab.h: Update prototypes.
1733 (HT_HASHSTEP, HT_FINISH): New macros.
1734
b453c95f
GK
17352004-05-29 Geoffrey Keating <geoffk@apple.com>
1736
1737 * symtab.c (ht_create): Set entries_owned.
1738 (ht_destroy): Honour entries_owned.
1739 (ht_expand): Likewise.
1740 (ht_load): New.
2cf22451
ZW
1741 * include/symtab.h (struct ht): New field 'entries_owned'
1742 (ht_load): New prototype.
b453c95f 1743
963e23c5
PB
17442004-05-26 Paolo Bonzini <bonzini@gnu.org>
1745
1746 PR bootstrap/15651
1747 * configure.ac: Fix m4 quoting when picking
1748 the size of HOST_WIDE_INT.
1749 * configure: Regenerate.
1750
0429bc77
PB
17512004-05-25 Paolo Bonzini <bonzini@gnu.org>
1752
1753 * Makefile.am: the correct directory for
1754 gettext include files is given by @INCINTL@.
1755 * Makefile.in: Regenerate.
1756
c86dd7db
PB
17572004-05-24 Paolo Bonzini <bonzini@gnu.org>
1758
1759 * system.h [!ENABLE_NLS]: dgettext takes two
1760 parameters.
1761
4f4e53dd
PB
17622004-05-23 Paolo Bonzini <bonzini@gnu.org>
1763
1764 Moved libcpp from the gcc subdirectory to the toplevel.
1765 * Makefile.am: New file.
1766 * Makefile.in: Regenerate.
1767 * configure.ac: New file.
1768 * configure: Regenerate.
1769 * config.in: Regenerate.
1770 * charset.c: Moved from gcc/cppcharset.c. Add note about
1771 brokenness of input charset detection. Adjust for change
1772 in name of cppucnid.h.
1773 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
1774 * expr.c: Moved from gcc/cppexp.c.
1775 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
1776 Remove #define of O_BINARY, it is in system.h.
1777 * identifiers.c: Moved from gcc/cpphash.c.
1778 * internal.h: Moved from gcc/cpphash.h. Change header
1779 guard name. All other files adjusted to match name change.
1780 * init.c: Moved from gcc/cppinit.c.
1781 (init_library) [ENABLE_NLS]: Call bindtextdomain.
1782 * lex.c: Moved from gcc/cpplex.c.
1783 * directives.c: Moved from gcc/cpplib.c.
1784 * macro.c: Moved from gcc/cppmacro.c.
1785 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
1786 * traditional.c: Moved from gcc/cpptrad.c.
1787 * ucnid.h: Moved from gcc/cppucnid.h. Change header
1788 guard name.
1789 * ucnid.pl: Moved from gcc/cppucnid.pl.
1790 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
1791 guard name.
1792 * symtab.c: Moved from gcc/hashtable.c.
1793 * line-map.c: Moved from gcc. Do not include intl.h.
1794 * mkdeps.c: Moved from gcc.
1795 * system.h: New file.
2cf22451
ZW
1796 * include/cpplib.h: Moved from gcc. Change header guard name.
1797 * include/line-map.h: Moved from gcc. Change header guard name.
1798 * include/mkdeps.h: Moved from gcc. Change header guard name.
1799 * include/symtab.h: Moved from gcc/hashtable.h. Change header
1800 guard name.