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