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