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