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