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