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