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