]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
[multiple changes]
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
deb984e6
PB
12008-04-18 Paolo Bonzini <bonzini@gnu.org>
2
3 PR bootstrap/35457
4 * aclocal.m4: Regenerate.
5 * configure: Regenerate.
6
bf048bea
TT
72008-04-17 Tom Tromey <tromey@redhat.com>
8
9 PR libcpp/34866:
10 * errors.c (cpp_error): Don't reference a token before the start
11 of the current run.
12
7f27b0f8
TT
132008-04-16 Tom Tromey <tromey@redhat.com>
14
15 * Makefile.in (TAGS_SOURCES): New variable.
16 (TAGS): New target.
17
a1fcb9a1
KK
182008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
19
20 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
21 and shbe-*-*.
22 * configure: Rebuilt.
23
93d45d9e
JM
242008-04-02 Joseph Myers <joseph@codesourcery.com>
25
26 * include/cpplib.h (struct cpp_callbacks): Add used_define,
27 used_undef and before_define.
28 (NODE_USED): Define.
29 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
30 do_ifndef, cpp_pop_definition): Handle new flag and use new
31 callbacks.
32 * expr.c (parse_defined): Handle new flag and use new callbacks.
33 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
34 flag and use new callbacks.
35
d4c32e1d
JJ
362008-04-01 Jakub Jelinek <jakub@redhat.com>
37
38 PR pch/13675
39 * files.c (struct _cpp_file): Remove pch field.
40 (pch_open_file): Don't set file->pch, just file->pchname.
41 (should_stack_file): After pfile->cb.read_pch call
42 free pchname and clear pchname, don't close file->fd.
43 Test file->pchname instead of file->pch. Don't close fd after cb.
44 (_cpp_stack_include): Test file->pchname instead of file->pch.
45
161031e3
TT
462008-03-28 Tom Tromey <tromey@redhat.com>
47
48 * Makefile.in (POSTCOMPILE): New variable.
49 (.c.o): Use it.
50
14ccf800
TT
512008-03-13 Tom Tromey <tromey@redhat.com>
52
53 PR libcpp/35322:
54 * directives.c (destringize_and_run): Set pfile->directive.
55
830465c6
MM
562008-03-06 Markus Milleder <markus.milleder@generali.at>
57
58 PR preprocessor/35458
59 * mkdeps.c (munge): Quote '#' with a '\'.
60
d482a073
RW
612008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
62
63 PR preprocessor/35379
64 * mkdeps.c (deps_write): Ensure the first target always appears
65 in the first column, without leading backslash newline. Avoid
66 some more extra whitespace.
67
185a6cc1
TS
682008-02-25 Thiemo Seufer <ths@mips.com>
69
d482a073 70 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 71
2bf41bf0
TT
722008-02-19 Tom Tromey <tromey@redhat.com>
73
74 * traditional.c (lex_identifier): Use CPP_HASHNODE.
75 * lex.c (lex_identifier): Use CPP_HASHNODE.
76 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
77 do-while.
78 * identifiers.c (alloc_node): Change return type.
79 (_cpp_init_hashtable): Don't cast 'alloc_node'.
80 (proxy_assertion_broken): New declaration.
81 (cpp_forall_identifiers): Move comment.
82 * line-map.c (linemap_add): Comment fix.
83 (linemap_line_start): Indentation fix.
84
765d600a
JJ
852008-01-25 Jakub Jelinek <jakub@redhat.com>
86
87 PR preprocessor/34692
88 * macro.c (collect_args): Add pragma_buff argument. Push
89 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
90 than into arguments. Reset prevent_expansion and parsing_args
91 state at CPP_PRAGMA_EOL/CPP_EOF.
92 (funlike_invocation_p): Add pragma_buff argument, pass it through
93 to collect_args.
94 (enter_macro_context): Add result argument. Adjust
95 funlike_invocation_p caller. Emit all deferred pragma tokens
96 gathered during collect_args before the expansion, add a padding
97 token. Return 2 instead of 1 if any pragma tokens were prepended.
98 (cpp_get_token): If enter_macro_context returns 2, don't return
99 a padding token, instead cycle to grab CPP_PRAGMA token.
100 * directives.c (_cpp_handle_directive): If was_parsing_args
101 in deferred pragma, leave parsing_args and prevent_expansion as is.
102
ec46053b
TT
1032008-01-22 Tom Tromey <tromey@redhat.com>
104
765d600a 105 PR c++/34859
ec46053b
TT
106 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
107 __STDC_CONSTANT_MACROS.
108
681c6ab0
FF
1092008-01-07 Fred Fish <fnf@specifix.com>
110
765d600a 111 PR preprocessor/30363
681c6ab0
FF
112 * traditional.c (replace_args_and_push): Add local variable
113 cxtquote, calculate the replacement text size assuming a
114 worst case of every input character quoted with backslash,
115 and properly handle output quoting of quote characters in
116 actual arguments used in function-like macros.
117
33ae4837
TT
1182008-01-03 Tom Tromey <tromey@redhat.com>
119
765d600a 120 PR preprocessor/34602
33ae4837
TT
121 * directives.c (do_line): Don't try to spell EOF token.
122 (do_linemarker): Add comment.
123
675575f5
DD
1242007-12-11 DJ Delorie <dj@redhat.com>
125
126 * charset.c (convert_using_iconv): Close out any shift states,
127 returning to the initial state.
128
97f6bd40
TT
1292007-12-06 Tom Tromey <tromey@redhat.com>
130
765d600a 131 PR c/29172
97f6bd40
TT
132 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
133 type.
134 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
135 * files.c (FILE_HASH_POOL_SIZE): New macro.
136 (struct file_hash_entry_pool): New.
137 (destroy_all_cpp_files): New function.
138 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
139 (new_file_hash_entry): Update.
140 (free_file_hash_entries): New function.
141 (_cpp_cleanup_files): Call free_file_hash_entries and
142 destroy_all_cpp_files.
143 (cpp_clear_file_cache): New function.
144 * include/cpplib.h (cpp_clear_file_cache): Declare.
145
d56a25e1
TT
1462007-12-03 Tom Tromey <tromey@redhat.com>
147
765d600a 148 PR preprocessor/34288
d56a25e1
TT
149 * configure.ac, config.in: Rebuilt.
150 * configure.ac: Check for ssize_t.
151
607f74e9
TT
1522007-11-30 Tom Tromey <tromey@redhat.com>
153
765d600a 154 PR preprocessor/32868
607f74e9
TT
155 * macro.c (_cpp_create_definition): Special case
156 __STDC_FORMAT_MACROS.
157
b0f4807f
MM
1582007-11-16 Michael Matz <matz@suse.de>
159
160 * files.c (search_path_head): Fix check for absolute paths.
161
f1e20710
TT
1622007-11-11 Tom Tromey <tromey@redhat.com>
163
765d600a 164 PR c++/17557
f1e20710
TT
165 * include/cpplib.h (cpp_included_before): Declare.
166 * files.c (struct file_hash_entry) <location>: New field.
167 (_cpp_find_file): Initialize new field.
168 (make_cpp_dir): Likewise.
169 (cpp_included_before): New function.
170
f373b44d
TT
1712007-11-01 Tom Tromey <tromey@redhat.com>
172
765d600a 173 PR preprocessor/30805
f373b44d
TT
174 * macro.c (paste_tokens): Handle padding token.
175 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
176
5b9a40df
TT
1772007-10-31 Tom Tromey <tromey@redhat.com>
178
765d600a 179 PR preprocessor/30786
5b9a40df
TT
180 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
181 * directives.c (_cpp_do__Pragma): Return error status.
182 * internal.h (_cpp_do__Pragma): Update.
183 * directives.c (get__Pragma_string): Back up if EOF seen.
184
5ffeb913
TT
1852007-09-06 Tom Tromey <tromey@redhat.com>
186
187 * internal.h (struct cpp_reader) <invocation_location>: New
188 field.
189 (struct cpp_reader) <set_invocation_location>: Likewise.
190 * init.c (cpp_set_line_map): New function.
191 * line-map.c (linemap_add): Use linemap's allocator.
192 * include/line-map.h (GTY): Define.
193 (line_map_realloc): New typedef.
194 (struct line_map): Mark with GTY.
195 (struct line_maps): Likewise.
196 (struct line_maps) <maps>: Likewise.
197 (struct line_maps) <reallocator>: New field.
198 * include/symtab.h (GTY): Conditionally define.
199 * include/cpplib.h (cpp_set_line_map): Declare.
200 (cpp_get_token_with_location): Declare.
201 * macro.c (cpp_get_token): Set invocation_location on the reader.
202 (cpp_get_token_with_location): New function.
203
ac6b1c67
CF
2042007-08-30 Chao-ying Fu <fu@mips.com>
205
206 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
207 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
208 (cpp_classify_number): Support decimal fixed-point constants without
209 exponents.
210 Warn about fixed-point constants when -pedantic.
211 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
212 comments to support fixed-point values.
213 (CPP_N_FRACT, CPP_N_ACCUM): Define.
214
cda5e672
TT
2152007-08-18 Tom Tromey <tromey@redhat.com>
216
765d600a 217 PR preprocessor/32974
cda5e672
TT
218 * directives.c (parse_include): Don't check for EOL when
219 processing #pragma dependency.
220
ccfc4c91
OW
2212007-07-30 Ollie Wild <aaw@google.com>
222
223 * directives-only.c: New file.
224 * internal.h (struct _cpp_dir_only_callbacks): New.
225 (_cpp_preprocess_dir_only): New function.
226 * directives.c (_cpp_handle_directive): Check directives_only before
227 disabling execution of indented directives.
228 * files.c (_cpp_stack_file): Add directives_only check.
229 * include/cpplib.h (struct cpp_options): Add directives_only.
230 (cpp_init_special_builtins): New function.
231 * init.c (cpp_init_special_builtins): New function.
232 (cpp_init_builtins): Move builtin_array initialization to
233 cpp_init_special_builtins.
234 (post_options): Check directives_only before setting
235 pfile->state.prevent_expansion = 1.
236 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
237 is expanded inside a directive while -fdirectives-only is enabled.
238 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
239 (libcpp_a_SOURCES): Add directives-only.c.
240
a206413a
UB
2412007-07-04 Uros Bizjak <ubizjak@gmail.com>
242
243 * traditional.c (_cpp_scan_out_logical_line): Initialize
244 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
245 fmacro.args to prevent 'may be used uninitialized' warning.
246
c77cd3d1
UB
2472007-07-03 Uros Bizjak <ubizjak@gmail.com>
248
249 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
250 Add new constants.
251 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
252 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
253 for 'q' or 'Q' suffixes.
254
66938a1d
DS
2552007-06-17 Danny Smith <dannysmith@users.sourceforge.net
256
e1311401 257 * files.c (open_file): Correct typo.
66938a1d 258
71995ede
VP
2592007-06-16 Vladimir Prus <vladimir@codesourcery.com>
260
e1311401 261 * files.c (open_file): Prevent the call
71995ede
VP
262 for stat from overwriting errno.
263
84152c25
VP
2642007-06-09 Vladimir Prus <vladimir@codesourcery.com>
265
e1311401 266 * files.c (open_file): Account for the
84152c25
VP
267 fact that on windows, opening a directory gives
268 EACCES.
269
f7fd775f
JW
2702007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
271
272 PR preprocessor/23479
273 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
274 integer constants.
275 (append_digit): Likewise.
276 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
277 binary integer constants.
278
ed0e74e0
DK
2792007-05-31 Dave Korn <dave.korn@artimi.com>
280
281 PR preprocessor/14331
282 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
283
a702045a
OW
2842007-05-24 Ollie Wild <aaw@google.com>
285
286 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
287 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
288 (cpp_write_pch_state): Save __COUNTER__ state.
289 (cpp_valid_state): Check valid __COUNTER__ state.
290 (cpp_read_state): Read new __COUNTER__ state.
291 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
292 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
293 * internal.h (struct cpp_reader): Add counter member.
294
126e073b
SM
2952007-05-23 Simon Martin <simartin@users.sourceforge.net>
296
297 PR preprocessor/20077
298 * macro.c (create_iso_definition): Fixed the method to determine
299 whether the token-pasting operator appears at the beginning or the end
300 of a macro.
301
0b4cafec
ILT
3022007-05-21 Ian Lance Taylor <iant@google.com>
303
304 * internal.h (struct cpp_reader): Add new fields:
305 nonexistent_file_hash and nonexistent_file_ob.
306 * files.c: Include "obstack.h".
307 (find_file_in_dir): Before trying to open the file, look up the
308 path name in the hash table of nonexistent files. After failing
309 to open the file, add the path name to the hash table.
310 (_cpp_find_file): Cache the results of looking up the file name
311 starting with the quote and bracket chain heads, if we can.
312 (nonexistent_file_hash_eq): New static function.
313 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
314 pfile->nonexistent_file_ob.
315 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
316 pfile->nonexistent_file_ob.
317
30e04921
JJ
3182007-05-14 Janis Johnson <janis187@us.ibm.com>
319
5a6bb57e
JJ
320 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
321
30e04921
JJ
322 PR c/31924
323 * expr.c (interpret_float_suffix): Check for invalid suffix.
324
22a8a52d
EC
3252007-05-02 Eric Christopher <echristo@apple.com>
326
327 * expr.c (num_div_op): Don't overflow if the result is
328 zero.
329
fca35e1b
TT
3302007-05-02 Tom Tromey <tromey@redhat.com>
331
765d600a 332 PR preprocessor/28709
fca35e1b
TT
333 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
334
4cd97075
MM
3352007-03-30 Michael Meissner <michael.meissner@amd.com>
336
337 * directives.c (lex_macro_node_from_str): Fix alloca call to be
338 type correct.
339
121de39f
RH
3402007-03-30 Richard Henderson <rth@redhat.com>
341
342 * directives.c (lex_macro_node_from_str): New.
343 (cpp_push_definition, cpp_pop_definition): New.
344 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
345
4fcb360b
BM
3462007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
347
348 * Makefile.in: Add dummy install-pdf target.
349
67e64439
TT
3502007-01-30 Tom Tromey <tromey@redhat.com>
351
765d600a 352 PR preprocessor/30468
67e64439
TT
353 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
354 './'.
355
ee380365
TT
3562007-01-30 Tom Tromey <tromey@redhat.com>
357
765d600a 358 PR preprocessor/29966
ee380365
TT
359 * macro.c (lex_expansion_token): Save and restore cpp_reader's
360 cur_token.
361 (_cpp_create_definition): Don't restore cur_token here.
362 * lex.c (_cpp_lex_token): Added assertion.
363
024abeb3
TT
3642007-01-27 Tom Tromey <tromey@redhat.com>
365
366 * configure: Rebuilt.
367
ee1c2a10
TT
3682007-01-12 Tom Tromey <tromey@redhat.com>
369
765d600a 370 PR preprocessor/28227
ee1c2a10
TT
371 * directives.c (lex_macro_node): Added 'is_def_or_undef'
372 argument.
373 (do_define): Update.
374 (do_undef): Update.
375 (do_ifdef): Update.
376 (do_ifndef): Update.
377
67214c16
PB
3782007-01-11 Paolo Bonzini <bonzini@gnu.org>
379
380 * configure: Regenerate.
381
1aa6ca40
PB
3822007-01-11 Paolo Bonzini <bonzini@gnu.org>
383
384 * configure: Regenerate.
385
705e2d28
TT
3862007-01-04 Tom Tromey <tromey@redhat.com>
387
765d600a 388 PR preprocessor/28165
705e2d28
TT
389 * internal.h (cpp_in_primary_file): New function.
390 * directives.c (do_include_next): Use cpp_in_primary_file.
391 (do_pragma_once): Likewise.
392 (do_pragma_system_header): Likewise.
393
7af45bd4
ILT
3942006-12-29 Ian Lance Taylor <iant@google.com>
395
396 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
397 look backward at the end of the line unless we saw a backslash.
398
9d30f270
JJ
3992006-12-29 Jakub Jelinek <jakub@redhat.com>
400
401 PR preprocessor/29612
402 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
403 only when new_sysp is non-zero.
404
30b0edc0
TT
4052006-12-28 Tom Tromey <tromey@redhat.com>
406
765d600a 407 PR preprocessor/30001
30b0edc0
TT
408 * charset.c (_cpp_convert_input): Check that to.len is greater
409 than zero.
410
85d9c13c
TS
4112006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
412
413 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 414 * configure: Rebuilt.
85d9c13c 415
dfafdaa6
DG
4162006-11-01 Douglas Gregor <doug.gregor@gmail.com>
417
418 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
419 for experimental C++0x mode.
420 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
421 adopted the preprocessor changes introduced in C99.
422
0f45f0f5
JM
4232006-10-29 Joseph Myers <joseph@codesourcery.com>
424
425 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
426 depending on --enable-targets=all.
427 * configure: Regenerate.
428
de000d22
JJ
4292006-10-12 Jakub Jelinek <jakub@redhat.com>
430
431 PR preprocessor/28709
432 * macro.c (paste_tokens): Do error reporting here, use BUF with the
433 spelled LHS token as opposed to spelling it again.
434 (paste_all_tokens): Don't report errors here, just break on failure.
435
b5422ad7
BM
4362006-10-10 Brooks Moses <bmoses@stanford.edu>
437
438 * Makefile.in: Added empty "pdf" target.
439
aaf50ff2
GK
4402006-09-22 Geoffrey Keating <geoffk@apple.com>
441
442 * configure.ac: Make need_64_bit_hwint case for x86-darwin
443 match exactly the glob in gcc/config.gcc.
444 * configure: Regenerate.
445
c663e301
JM
4462006-09-13 Joseph S. Myers <joseph@codesourcery.com>
447
448 PR c/28768
449 PR preprocessor/14634
450 * lex.c (lex_string): Pedwarn for unterminated literals.
451
f7288899
EC
4522006-09-08 Eric Christopher <echristo@apple.com>
453
454 * configure.ac: Add 64-bit HWI support for i?86-darwin.
455
b52dbbf8
SE
4562006-08-14 Steve Ellcey <sje@cup.hp.com>
457
458 PR c++/28288
459 PR c++/14556
460 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
461 (CPP_LAST_EQ): Change.
462 (CPP_LAST_PUNCTUATOR): Change.
463 * expr.c (cpp_operator): Remove MIN and MAX.
464 (reduce): Remove CPP_MIN and CPP_MAX.
465 (num_binary_op): Ditto.
466 * lex.c (_cpp_lex_direct): Ditto.
467 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
468
1c90c6f9
JJ
4692006-06-09 Jakub Jelinek <jakub@redhat.com>
470
471 PR preprocessor/27746
472 * directives.c (do_pragma): Handle pragma with valid namespace
473 and invalid name coming from macro expansion.
474 * directives.c (destringize_and_run): Initialize next field in
475 context.
476
477 PR c/27747
478 PR c++/27748
479 * directives.c (destringize_and_run): Set NO_EXPAND on the
480 tokens.
481
482 * macro.c (_cpp_backup_tokens): Fix comment typo.
483
5c3c3683
DJ
4842006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
485
486 * Makefile.in (CATALOGS): Add po/ prefix.
487 * configure: Regenerated.
488
b2bd74bc
CD
4892006-05-23 Carlos O'Donell <carlos@codesourcery.com>
490
491 * Makefile.in: Add install-html target. Add install-html to .PHONY
492
be8ac3e2
GZ
4932006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
494
495 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
496 * files.c (_cpp_get_file_stat): New function.
497 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
498 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
499 * internal.h (_cpp_get_file_stat): Prototype.
500 (struct cpp_buffer): Add timestamp.
501
83900997
JJ
5022006-01-23 Jakub Jelinek <jakub@redhat.com>
503
504 PR preprocessor/25717
505 * init.c (cpp_init_builtins): If __STDC__ will not change value
506 between system headers and other sources, define it as a normal
507 macro rather than a builtin.
508 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
509 cpp_in_system_header condition.
510
5112006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
512
513 * Makefile.in: Use -MMD instead of -MD.
514
bc4071dd
RH
5152006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
516 Richard Henderson <rth@redhat.com>
517
518 Merge from gomp branch:
519 * directives.c (struct pragma_entry): Add is_deferred. Add ident
520 entry to value union.
521 (end_directive): Don't eat the line if in_deferred_pragma.
522 (run_directive): Remove pragma hacks.
523 (insert_pragma_entry): Remove.
524 (new_pragma_entry): New.
525 (register_pragma_1): Split out of register_pragma. Only handle
526 the lookup tree and return the new entry.
527 (cpp_register_pragma): Fill in the pragma entry here.
528 (cpp_register_deferred_pragma): New.
529 (register_pragma_internal): New.
530 (_cpp_init_internal_pragmas): Use register_pragma_internal.
531 (do_pragma): Allow pragma expansion after namespace. For deferred
532 pragmas, don't slurp the line into a string.
533 (destringize_and_run): Save tokens for deferred pragmas.
534 (cpp_handle_deferred_pragma): Remove.
535 * macro.c (builtin_macro): Remove pragma token hack.
536 (_cpp_push_token_context): Rename from push_token_context and export.
537 * internal.h (struct lexer_state): Add pragma_allow_expansion.
538 (_cpp_push_token_context): Declare.
539 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
540 a token. Update the line number correctly if so.
541 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
542 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
543 * include/cpplib.h (PRAGMA_EOL): New.
544 (CPP_TOKEN_FLD_PRAGMA): New.
545 (struct cpp_token): Add val.pragma.
546 (struct cpp_options): Remove defer_pragmas.
547 (cpp_handle_deferred_pragma): Remove.
548 (cpp_register_deferred_pragma): Declare.
549
d09e893f
JJ
5502006-01-01 Jakub Jelinek <jakub@redhat.com>
551
552 PR c++/25294
553 * directives.c (do_pragma): If pragma line ends with multi-line
554 block comment, end the saved deferred pragma string before that
555 comment. Handle embedded '\0' chars on the pragma line.
556
ab84748a
VR
5572005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
558
559 PR c++/23333
560 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
561
ad6ed77e
JG
5622005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
563 Ben Elliston <bje@au.ibm.com>
564
565 * include/cpplib.h (CPP_N_DFLOAT): New.
566 * expr.c (interpret_float_suffix): Identify df, dd, and dl
567 suffixes as decimal floating point constants.
568 (cpp_classify_number): Disallow hexadecimal DFP constants.
569
ba096620 5702005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 571 Ian Lance Taylor <ian@airs.com>
ba096620
GP
572
573 * include/cpplib.h (struct cpp_callbacks): Annotate error with
574 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
575
456b8ce5
UB
5762005-11-09 Per Bothner <per@bothner.com>
577 Uros Bizjak <uros@kss-loka.si>
f7288899 578
456b8ce5
UB
579 PR c/24101
580 * init.c (read_original_filename): Temporarily set
581 state.in_directive before calling _cpp_lex_direct for
582 CPP_HASH tokens.
583
5571f74f
JW
5842005-11-03 James E Wilson <wilson@specifix.com>
585
586 PR preprocessor/24202
587 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
588
a63607ed
JM
5892005-11-04 Joseph S. Myers <joseph@codesourcery.com>
590
591 * include/cpplib.h (struct cpp_callbacks): Make error take
592 va_list* parameter.
593 * errors.c (cpp_error): Update call to callback.
594
651ed942
AP
5952005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
596
597 PR preprocessor/22042
598 * macro.c (_cpp_builtin_macro_text): Lower the needed max
599 buffer size.
600 (cpp_quote_string): Don't octalify non printable
601 charactors.
602
178b58b5
JM
6032005-11-03 Joseph S. Myers <joseph@codesourcery.com>
604
605 PR c++/17964
606 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
607 (struct cpp_callbacks): Add error.
608 * errors.c (cpp_error): If client_diagnostic, use error callback.
609 * charset.c (convert_escape): Don't use %03o in diagnostic.
610
3ee5ed11 6112005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
612
613 PR preprocessor/15220
614 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
615 callers. Pass to open_file_failed.
616 (open_file_failed): New parameter angle_brackets. Fix all callers.
617 Use in print_dep assignment.
618 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
619 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 620
077fc835
KH
6212005-10-08 Kazu Hirata <kazu@codesourcery.com>
622
623 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
624 * configure: Regenerate.
625
cbc43ae0
ILT
6262005-10-04 Ian Lance Taylor <ian@airs.com>
627
628 PR preprocessor/13726
629 * directives.c (check_eol_return_comments): New static function.
630 (parse_include): Add buf parameter. Change all callers.
631 (do_include_common): If not discard comments, turn on
632 save_comments. Pass collected comments to include callback.
633 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
634 include callback: cpp_token list.
635
af15a2fe
JM
6362005-09-20 Joseph S. Myers <joseph@codesourcery.com>
637
638 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
639 * init.c (struct lang_flags, lang_defaults): Add
640 extended_identifiers.
641 (cpp_set_lang): Use it.
642 * lex.c (forms_identifier_p): Check extended_identifiers.
643
f5eab47e
JJ
6442005-08-30 Jakub Jelinek <jakub@redhat.com>
645
646 PR preprocessor/20348
647 PR preprocessor/20356
648 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
649 2004-06-05 changes.
650
467129e6
KG
6512005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
652
653 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
654 -Wmissing-format-attribute.
655
656 * configure: Regenerate.
657
200031d1
KC
6582005-06-29 Kelley Cook <kcook@gcc.gnu.org>
659
660 * all files: Update FSF address in copyright headers.
661 * makeucnid.c (write_copyright): Update outputted FSF address.
662
f610dd5f
ZW
6632005-06-13 Zack Weinberg <zack@codesourcery.com>
664
665 * configure.ac: Invoke ZW_CREATE_DEPDIR and
666 ZW_PROG_COMPILER_DEPENDENCIES.
667 * aclocal.m4, configure: Regenerate.
668 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
669 New variables.
670 (distclean): Clean up $(DEPDIR) and its contents.
671 (.c.o): Use $(COMPILE).
672 Include $(DEPDIR)/*.Po for most object->header dependencies.
673
c3f829c1
GDR
6742005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
675
676 * configure.ac: Check declarations for asprintf and vasprintf.
677 * config.in: Regenerate.
678 * configure: Likewise.
679
680 * charset.c (conversion_loop): Use XRESIZEVEC.
681 (convert_no_conversion): Likewise.
682 (convert_using_iconv): Likewise.
683 (init_iconv_desc): Cast return value of alloca.
684 (cpp_host_to_exec_charset): Use XNEWVEC.
685 (emit_numeric_escape): Use XRESIZEVEC.
686 (cpp_interpret_string): Use XNEWVEC.
687 (cpp_interpret_string): Use XRESIZEVEC.
688 (_cpp_interpret_identifier): Cast return value of alloca.
689 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
690 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
691 (parse_include): Use XNEWVEC.
692 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 693 "new_entry".
c3f829c1
GDR
694 (save_registered_pragmas): Cast return value of xmemdup.
695 (destringize_and_run): Same for alloca.
696 (parse_assertion): Likewise.
697 (do_assert): Cast allocated storage to proper type.
698 (cpp_define): Likewise.
699 (_cpp_define_builtin): Likewise.
700 (cpp_undef): Likewise.
701 (handle_assertion): Likewise.
702 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
703 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
704 (CPP_UMINUS): Likewise.
705 (struct cpp_operator): Rename from struct operator.
706 (_cpp_expand_op_stack): Use XRESIZEVEC.
707 * files.c (pch_open_file): Use XNEWVEC.
708 (pch_open_file): Use XRESIZEVEC.
709 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
710 (dir_name_of_file): Use XNEWVEC.
711 (make_cpp_file): Use XCNEW.
712 (make_cpp_dir): Likewise.
713 (allocate_file_hash_entries): USE XNEWVEC.
714 (cpp_included): Cast return value of htab_find_with_hash.
715 (append_file_to_dir): Use XNEWVEC.
716 (read_filename_string): Likewise. Use XRESIZEVEC too.
717 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
718 (remap_filename): Use XNEWVEC.
719 (struct pchf_entry): Move definition out of struct pchf_data.
720 (_cpp_save_file_entries): Use XCNEWVAR.
721 (_cpp_read_file_entries): Use XNEWVAR.
722 * identifiers.c (alloc_node): Use XOBNEW.
723 * init.c (cpp_create_reader): Use XCNEW.
724 (cpp_init_builtins): Cast of b->value to enum builtin_type.
725 (read_original_directory): Cast return value of alloca.
726 * lex.c (add_line_note): Use XRESIZEVEC.
727 (warn_about_normalization): Use XNEWVEC.
728 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
729 (new_buff): Use XNEWVEC.
730 * line-map.c (linemap_add): Use XRESIZEVEC.
731 * macro.c (builtin_macro): Cast return value of alloca.
732 (paste_tokens): Likewise.
733 (expand_arg): Use XNEWVEC and XRESIZEVEC.
734 (_cpp_save_parameter): Use XRESIZEVEC.
735 (create_iso_definition): Cast allocated storage to proper type.
736 (_cpp_create_definition): Likewise.
737 (cpp_macro_definition): Use XRESIZEVEC.
738 * makedepend.c (add_clm): Use XNEW.
739 (add_dir): Likewise.
740 * mkdeps.c (munge): Use XNEWVEC.
741 (deps_init): Use XCNEW.
742 (deps_add_target): Use XRESIZEVEC.
743 (deps_add_default_target): Cast return value of alloca.
744 (deps_add_dep): Use XRESIZEVEC.
745 (deps_add_vpath): Likewise. Use XNEWVEC too.
746 (deps_restore): Likewise.
747 * pch.c (save_idents): Use XNEW and XNEWVEC.
748 (cpp_save_state): Use XNEW.
749 (count_defs): Cast return value of htab_find.
750 (write_defs): Likewise.
751 (cpp_write_pch_deps): Use XNEWVEC.
752 (collect_ht_nodes): Use XRESIZEVEC.
753 (cpp_valid_state): Use XNEWVEC.
754 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
755 * symtab.c (ht_create): Use XCNEW.
756 (ht_lookup_with_hash): Cast return value of obstack_copy0.
757 (ht_expand): Use XCNEWVEC.
758 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
759 (bool): Do not define if __cplusplus.
760
1ed17cd5
ZW
7612005-05-12 Zack Weinberg <zack@codesourcery.com>
762
763 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
764 (do_sccs): Delete function definition, #define to do_ident.
765 (do_ident): Don't hardwire directive name.
766
5a8c20ce
RK
7672005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
768
769 PR bootstrap/21230
770 * configure: Regenerate.
771
473c5bc9
AP
7722005-04-27 Andris Pavenis <pavenis@latnet.lv>
773
774 * files.c: Include io.h for DJGPP to get prototype of setmode.
775
c1fc5047
PB
7762005-04-19 Per Bothner <per@bothner.com>
777
778 PR preprocessor/20907
779 * line-map.c (linemap_line_start): Fix bug when we need to increse
780 column_bits but can re-use the current line_map.
781
042630ad
KG
7822005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
783
784 * system.h (fopen, fdopen, freopen): Define these to the unlocked
785 libiberty functions.
786
0d667716
KG
7872005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
788
789 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
790 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
791 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
792 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
793 _unlocked function.
794 (fwrite_unlocked): Fix prototype.
1ed17cd5 795
0d667716
KG
796 * configure, config.in: Regenerate.
797
cae064e7
JJ
7982005-04-05 Jakub Jelinek <jakub@redhat.com>
799
800 PR preprocessor/19475
801 * macro.c (create_iso_definition): For < ISO C99, don't
802 pedwarn if there is no whitespace between macro name and its
803 replacement, but the replacement starts with a basic character
804 set character.
805
cbada204
AJ
8062005-03-28 Andreas Jaeger <aj@suse.de>
807
808 * lex.c (warn_about_normalization): Cast field width to int to
809 avoid warning.
810
f42eccdb
JM
8112005-03-19 Joseph S. Myers <joseph@codesourcery.com>
812
813 * configure.ac: Consistently use solaris2.1[0-9]* instead of
814 solaris2.1[0-9].
815 * configure: Regenerate.
816
c79e602b
GK
8172005-03-15 Geoffrey Keating <geoffk@apple.com>
818
819 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
820 UCN rather than printing an error.
821
50668cf6
GK
8222005-03-14 Geoffrey Keating <geoffk@apple.com>
823
6baba9bb
GK
824 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
825
8262005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 827
50668cf6
GK
828 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
829 * charset.c: Update for new format of ucnid.h.
830 (ucn_valid_in_identifier): Update for new format of ucnid.h.
831 Add NST parameter, and update it; update callers.
832 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
833 with cpp_error.
834 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
835 * internal.h (struct normalize_state): New.
836 (INITIAL_NORMALIZE_STATE): New.
837 (NORMALIZE_STATE_RESULT): New.
838 (NORMALIZE_STATE_UPDATE_IDNUM): New.
839 (_cpp_valid_ucn): New.
840 * lex.c (warn_about_normalization): New.
841 (forms_identifier_p): Add normalize_state parameter, update callers.
842 (lex_identifier): Add normalize_state parameter, update callers. Keep
843 the state current.
844 (lex_number): Likewise.
845 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
846 it with warn_about_normalization.
847 * makeucnid.c: New.
848 * ucnid.h: Replace.
849 * ucnid.pl: Remove.
850 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
851 comments about obsolete version of C++.
852 * include/cpplib.h (enum cpp_normalize_level): New.
853 (struct cpp_options): Add warn_normalize field.
854
47e20491
GK
8552005-03-11 Geoffrey Keating <geoffk@apple.com>
856
857 * directives.c (glue_header_name): Update call to cpp_spell_token.
858 * internal.h (_cpp_interpret_identifier): New.
859 * charset.c (_cpp_interpret_identifier): New.
860 (_cpp_valid_ucn): Allow UCN version of '$'.
861 * lex.c (lex_identifier): Add extra parameter to indicate if initial
862 character was '$' or '\'. Support identifiers with UCNs.
863 (forms_identifier_p): Allow UCNs.
864 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
865 (utf8_to_ucn): New.
866 (cpp_spell_token): Add FORSTRING parameter. Use it.
867 (cpp_token_as_text): Update call to cpp_spell_token.
868 (cpp_output_token): Write UCNs back out.
869 (stringify_arg): Update call to cpp_spell_token.
870 (paste_tokens): Likewise.
871 (cpp_macro_definition): Likewise.
872 * macro.c (stringify_arg): Likewise.
873 (paste_tokens): Likewise.
874 (cpp_macro_definition): Likewise.
875 * include/cpplib.h: Add parameter to cpp_spell_token.
876
73096711
JJ
8772005-03-04 Jakub Jelinek <jakub@redhat.com>
878
879 PR bootstrap/20282
880 PR bootstrap/20305
881 * macro.c (replace_args, cpp_get_token): Copy whole
882 cpp_token_u instead of just cpp_string field from it.
883
2203a881
DP
8842005-02-28 Devang Patel <dpatel@apple.com>
885
886 * directives.c (do_line): Save sysp early before line table is
887 realloc'ed.
1ed17cd5 888
c5ff069d
ZW
8892005-02-20 Zack Weinberg <zack@codesourcery.com>
890
891 PR 18785
892 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
893 (cpp_host_to_exec_charset): New function.
894 * include/cpplib.h: Declare cpp_host_to_exec_charset.
895
04c90eea
DP
8962005-02-19 Devang Patel <dpatel@apple.com>
897
898 * charset.c (_cpp_convert_input): Check '\r' before inserting
899 '\n' at the end.
c5ff069d 900
6da55c00
EC
9012005-02-15 Eric Christopher <echristo@redhat.com>
902
903 PR preprocessor/19077
904 * macro.c (cpp_macro_definition): Move handling of whitespace
905 to PREV_WHITE conditional. Remove overloading of len
906 variable.
907
31c3e631
KH
9082005-02-14 Kazu Hirata <kazu@cs.umass.edu>
909
910 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
911 traditional.c: Update copyright.
912
be0f1e54
PB
9132005-02-14 Paolo Bonzini <bonzini@gnu.org>
914
915 PR bootstrap/19818
916 * configure.ac: Check for declaration of basename and getopt.
917 * config.in: Regenerate.
918 * configure: Regenerate.
919 * internal.h (ustrcspn): New.
920 * macro.c (create_iso_definition): Fix allocation of memory.
921 (padding_token): Add cast to remove const-ness.
922 * pch.c (cpp_read_state): Use ustrcspn.
923
ecddfb39
MS
9242005-02-08 Mike Stump <mrs@apple.com>
925
926 * files.c (pchf_adder): Remove.
927 (struct pchf_adder_info): Likewise.
928 (_cpp_save_file_entries): Write out all files so that #import works.
929
9fcdd891
JM
9302005-01-23 Joseph S. Myers <joseph@codesourcery.com>
931
932 * configure: Regenerate.
933
ecfd72e7
TS
9342005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
935
936 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
937
6c25a4f7 938 * include/cpplib.h: Also update copyright years.
c5ff069d 939
942926ad
GK
9402005-01-03 Geoffrey Keating <geoffk@apple.com>
941
942 * files.c (_cpp_find_file): Add files found by search_path_exhausted
943 to the list of all files.
944
a2566ae9
GDR
9452005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
946
947 * internal.h: Update references to Cpp lib filenames.
948 * directives.c: Likewise.
949 * init.c: Likewise.
950 * macro.c: Likewise.
951 * traditional.c: Likewise.
952
1b449375
EB
9532004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
954
955 PR preprocessor/15167
956 * files.c (destroy_cpp_file): New function.
957 (should_stack_file): Make a new file if the
958 compared file is still stacked.
959
28303828
NN
9602004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
961
c5ff069d 962 PR preprocessor/17610
28303828
NN
963 * directives.c (do_include_common): Error out if an empty filename
964 is given for #include (or #include_next or #import).
965
c812785a
RS
9662004-11-27 Roger Sayle <roger@eyesopen.com>
967 Zack Weinberg <zack@codesourcery.com>
968
969 * internal.h: Replace all uses of uchar with unsigned char.
970 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
971 with !IN_GCC, so uchar is only defined whilst building libcpp.
972
f91eaa01
KC
9732004-11-24 Kelley Cook <kcook@gcc.gnu.org>
974
975 * aclocal.m4: Regenerate.
976
f78ce0c2
RS
9772004-11-24 Roger Sayle <roger@eyesopen.com>
978
979 PR preprocessor/15824
980 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
981 directly, instead of the non-existant "system.h" and "ansidecl.h".
982 * configure: Regenerate.
983
b5b3e36a 9842004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 985 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
986
987 * internal.h (struct lexer_state): Add in_deferred_pragma.
988 * directives.c (struct pragma_entry): Add allow_expansion.
989 (insert_pragma_entry): Take allow_expansion flag.
990 (register_pragma): Likewise.
991 (cpp_register_pragma): Likewise.
992 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
993 (do_pragma): Honor allow_expansion.
994 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
995 * include/cpplib.h (cpp_register_pragma): Update prototype.
996
a8e68029 9972004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 998 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
999
1000 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1001 need_64bit_hwint=yes.
1002 * configure: Regenerate.
1003
50f47ee0
JM
10042004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1005
1006 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1007 po/$(PACKAGE).pot.
1008 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1009 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1010 Remove local srcdir path from generated file.
1011
968e08d6 10122004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 1013 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
1014
1015 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1016 as well.
1017
3da3d587
ZW
10182004-10-27 Zack Weinberg <zack@codesourcery.com>
1019
1020 PR 18075
1021 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1022 (cpp_handle_deferred_pragma): Add cast to silence warning.
1023
ac24fc25
JM
10242004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1025
1026 * errors.c (_cpp_begin_message): Print "error: " for errors.
1027
7731405b
AJ
10282004-10-10 Andreas Jaeger <aj@suse.de>
1029
1030 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1031 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1032
646544e3
AP
10332004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1034
1035 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1036 used.
1037 (cpp_read_state): Remove unused variables, m, d and mac_count.
1038
67a74146
PB
10392004-09-29 Per Bothner <per@bothner.com>
1040
1041 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1042 cb.line_change. Otherwise do_pragma will call the line_change
1043 call-back with a meaningless line number.
1044
018a4785
ZW
10452004-09-24 Zack Weinberg <zack@codesourcery.com>
1046
1047 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1048 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1049 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1050 * aclocal.m4, configure: Regenerate.
1051 * init.c: Include localedir.h.
1052 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1053 (DEFS): Delete.
1054 (.c.o): Use $(ALL_CFLAGS).
1055 (localedir.h, localedir.hs): New rules.
1056 (clean): Use rm -rf to remove directories.
1057 (distclean): Also delete localedir.h and localedir.hs.
1058 (init.o): Update dependencies.
1059
88fa57d7
KC
10602004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1061
1062 * Makefile.in (aclocal.m4): Update dependencies.
1063 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1064 * aclocal.m4, configure: Regenerate.
1065
8f8e9aa5
ZW
10662004-09-17 Zack Weinberg <zack@codesourcery.com>
1067
a29f62d9
ZW
1068 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1069 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1070 Some other comments in this file also tweaked.
1071
8f8e9aa5
ZW
1072 * directives.c (do_pragma): Save current buffer position
1073 before lexing the pragma keywords; don't call
1074 _cpp_backup_tokens in the defer_pragmas case.
1075
a2981930
PB
10762004-09-15 Per Bothner <per@bothner.com>
1077
1078 * include/line-map.h (line_map_start): Add parameter names so
1079 preceding comment makes sense.
1080 (linemap_add): Remove from comment mention of non-existing parameter.
1081
21b11495
ZW
10822004-09-09 Matt Austern <austern@apple.com>
1083 Zack Weinberg <zack@codesourcery.com>
1084
1085 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1086 prefixes throughout. Add entry for PRAGMA. Remove
1087 unnecessary "= 0" from EQ.
1088 (enum cpp_ttype): Adjust OP and TK definitions to restore
1089 prefixes, via token-paste.
1090 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1091 Change from #defines to additional cpp_ttype enumerators.
1092 (struct cpp_options): Add defer_pragmas.
1093 (cpp_handle_deferred_pragma): Prototype new interface.
1094
1095 * internal.h (struct cpp_reader): Add directive_result.
1096 * directives.c (struct pragma_entry): Add is_internal field;
1097 give boolean fields type bool.
1098 (start_directive): Initialize pfile->directive_result.type.
1099 (_cpp_do__Pragma): Likewise.
1100 (run_directive): Do not crash if pfile->buffer->prev is NULL.
1101 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1102 from it.
1103 (register_pragma): New static function, bulk of former
1104 cpp_register_pragma here; add 'internal' argument, pass along
1105 to insert_pragma_entry.
1106 (cpp_register_pragma): Now a wrapper around register_pragma which
1107 always passes false for 'internal' argument.
1108 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1109 true for 'internal'.
1110 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1111 an internal pragma, save text till the end of the line as a CPP_PRAGMA
1112 token instead of executing the pragma.
1113 (cpp_handle_deferred_pragma): New interface.
1114 * lex.c (token_spellings): Adjust OP and TK definitions to
1115 match changes to cpplib.h.
1116 (_cpp_lex_token): Check for a directive-result token and
1117 return it if present.
1118 (cpp_token_val_index): Handle CPP_PRAGMA.
1119 * macro.c (cpp_builtin_macro_text): Correct comment.
1120 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1121
0fd9e8dd
SB
11222004-09-06 Serge Belyshev <belyshev@lubercy.com>
1123
1124 PR preprocessor/14699
1125 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1126 from size_t to double.
1127
39b8ce7f
AS
11282004-08-28 Andreas Schwab <schwab@suse.de>
1129 Andreas Jaeger <aj@suse.de>
1130
1131 * configure.ac: Set PACKAGE correctly.
1132 * configure: Regenerated.
1133
5d1f4b27
PB
11342004-08-25 Paolo Bonzini <bonzini@gnu.org>
1135
1136 * Makefile.in: Add back top_builddir.
1137
078e3ffe
PB
11382004-08-25 Paolo Bonzini <bonzini@gnu.org>
1139
1140 * configure.ac: Replace Automake macro invocations
1141 with manual Autoconf checks and substitutions.
1142 * configure: Regenerate.
1143 * aclocal.m4: Regenerate.
1144 * config.in: Regenerate.
1145 * Makefile.am: Removed.
1146 * Makefile.in: Heavy simplification and reorganization.
1147
b3f8d95d
MM
11482004-08-09 Mark Mitchell <mark@codesourcery.com>
1149
1150 * configure.ac (arm*-*-eabi*): New target.
1151 (arm*-*-symbianelf*): Likewise.
1152 * configure: Regenerated.
1153
72bb2c39
BI
11542004-07-24 Bernardo Innocenti <bernie@develer.com>
1155
1156 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1157 * directives.c: Use XNEW-family macros from libiberty.
1158 * lex.c: Likewise.
1159 * macro.c: Likewise.
1160 * cpplib.h (cpp_deps_style): Export enum with name.
1161
21b11495 11622004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 1163
21b11495 1164 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 1165
a23ee064
AP
11662004-07-16 Andris Pavenis <pavenis@latnet.lv>
1167
1168 PR preprocessor/16366
1169 * internal.h (struct cpp_reader): New field dir_hash.
1170 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1171 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1172
a09d4744
NB
11732004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
1174
1175 PR preprocessor/16192
1176 PR preprocessor/15913
1177 PR preprocessor/15572
1178 * expr.c (_cpp_parse_expr): Handle remaining cases where an
1179 expression is missing.
1180 * init.c (post_options): Traditional cpp doesn't do // comments.
1181
f58f7def
PB
11822004-06-30 Per Bothner <per@bothner.com>
1183
1184 * include/line-map.h (fileline): Remove old typedef.
1185 * internal.h (struct cpp_reader): Use source_location typedef instead.
1186
e83d8d43
ZW
11872004-06-26 Zack Weinberg <zack@codesourcery.com>
1188
1189 Partially revert patch of 2004-06-05.
1190 * files.c (search_cache): Remove pfile argument. Don't check
1191 for file that would be found by "" or <> search here...
1192 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1193 Do not apply directory-of-current-file correction to files
1194 found by this check. Rearrange code slightly.
1195
c0d578e6
GK
11962004-06-21 Geoffrey Keating <geoffk@apple.com>
1197
1198 * files.c (should_stack_file): Correct swapped parameters to call
1199 to cb.read_pch.
1200 * pch.c (cpp_valid_state): Handle -fpreprocessed.
1201
159d5224
PB
12022004-06-15 Paolo Bonzini <bonzini@gnu.org>
1203
1204 * Makefile.in: Regenerate with automake 1.8.5.
1205 * aclocal.m4: Likewise.
1206 * configure: Regenerate.
1207
2fac9c01
ZW
12082004-06-11 Zack Weinberg <zack@codesourcery.com>
1209
1210 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1211 * configure, config.in: Regenerate.
1212 * system.h: Unconditionally define bool as unsigned char,
1213 BOOL_BITFIELD as unsigned int.
1214 * .cvsignore: New file.
1215
d8044160
GK
12162004-06-09 Geoffrey Keating <geoffk@apple.com>
1217
1218 * traditional.c (push_replacement_text): Set macro->traditional.
1219 (save_replacement_text): Likewise.
1220 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1221 (struct save_macro_item): Delete.
1222 (struct save_macro_data): Use a character array not the previous
1223 structured format.
1224 (save_macros): Save macro as text not as internal structures.
1225 (cpp_prepare_state): Update for changes to save_macro_data.
1226 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 1227 -D macros as text.
d8044160
GK
1228 * macro.c (create_iso_definition): Honour alloc_subobject.
1229 Clear traditional flag.
1230 (_cpp_create_definition): Honour alloc_subobject.
1231 * lex.c (cpp_token_val_index): New.
1232 * internal.h: Include cpp-id-data.h.
1233 (uchar): Move definition to cpp-id-data.h.
1234 (U): Likewise.
1235 (cpp_macro): Likewise.
1236 * directives.c (struct answer): Move to cpp-id-data.h.
1237 (do_assert): Honour alloc_subobject.
2cf22451
ZW
1238
1239 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1240 * include/cpplib.h (struct cpp_string): Add GTY marker.
1241 (enum cpp_token_fld_kind): New.
1242 (struct cpp_token): Add GTY markers.
1243 (cpp_token_val_index): Prototype.
1244 (CPP_HASHNODE_VALUE_IDX): New.
1245 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1246 * include/cpp-id-data.h: New file.
d8044160 1247
0ca8e815
PB
12482004-06-09 Paolo Bonzini <bonzini@gnu.org>
1249
1250 * Makefile.am (all-local): New.
1251 * Makefile.in: Regenerate.
1252
b51fa00f
RS
12532004-06-06 Roger Sayle <roger@eyesopen.com>
1254
1255 * Makefile.am (LIBICONV): Declare.
1256 (makedepend_LDADD): Use LIBICONV.
1257 * Makefile.in: Regenerate.
1258
5e2f3f39
AP
12592004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
1260
1261 * Makefile.am (LIBINTL): Declare
1262 (makedepend_LDADD): Use LIBINTL.
1263 * Makefile.in: Regenerate.
1264
c6e83800
ZW
12652004-06-05 Zack Weinberg <zack@codesourcery.com>
1266
1267 * Makefile.am: Add makedepend.
1268 * Makefile.in, aclocal.m4: Regenerate.
1269 * charset.c: Insert a space to avoid a warning.
1270 * directives.c: Include mkdeps.h.
1271 (_cpp_handle_directive): Reenable macro expander if appropriate.
1272 (undefine_macros): Inline body of _cpp_free_definition for speed.
1273 Do not call undef callback or _cpp_warn_if_unused_macro.
1274 (cpp_get_deps): New interface.
1275 * files.c (search_cache): Add pfile argument. Check for file
1276 that would be found by "" or <> search here...
1277 (_cpp_find_file): ...not here. Correct recorded start_dir of
1278 files found by directory-of-current-file search that would be
1279 found by "" or <> search.
1280 * init.c (cpp_add_dependency_target): Delete.
1281 * internal.h (struct lexer_state): Add discarding_output flag.
1282 * lex.c (lex_identifier): Compute hash function while scanning.
1283 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1284 directives.
1285 * makedepend.c: New file.
1286 * mkdeps.c (struct deps): Add vpath vector.
1287 (apply_vpath, deps_add_vpath): New function.
1288 (deps_free): Free vpath vector.
1289 (deps_add_dep, deps_add_target): Use apply_vpath.
1290 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1291 (ht_lookup_with_hash): New function.
1292 * cpplib.h, mkdeps.h: Update prototypes.
1293 * symtab.h: Update prototypes.
1294 (HT_HASHSTEP, HT_FINISH): New macros.
1295
b453c95f
GK
12962004-05-29 Geoffrey Keating <geoffk@apple.com>
1297
1298 * symtab.c (ht_create): Set entries_owned.
1299 (ht_destroy): Honour entries_owned.
1300 (ht_expand): Likewise.
1301 (ht_load): New.
2cf22451
ZW
1302 * include/symtab.h (struct ht): New field 'entries_owned'
1303 (ht_load): New prototype.
b453c95f 1304
963e23c5
PB
13052004-05-26 Paolo Bonzini <bonzini@gnu.org>
1306
1307 PR bootstrap/15651
1308 * configure.ac: Fix m4 quoting when picking
1309 the size of HOST_WIDE_INT.
1310 * configure: Regenerate.
1311
0429bc77
PB
13122004-05-25 Paolo Bonzini <bonzini@gnu.org>
1313
1314 * Makefile.am: the correct directory for
1315 gettext include files is given by @INCINTL@.
1316 * Makefile.in: Regenerate.
1317
c86dd7db
PB
13182004-05-24 Paolo Bonzini <bonzini@gnu.org>
1319
1320 * system.h [!ENABLE_NLS]: dgettext takes two
1321 parameters.
1322
4f4e53dd
PB
13232004-05-23 Paolo Bonzini <bonzini@gnu.org>
1324
1325 Moved libcpp from the gcc subdirectory to the toplevel.
1326 * Makefile.am: New file.
1327 * Makefile.in: Regenerate.
1328 * configure.ac: New file.
1329 * configure: Regenerate.
1330 * config.in: Regenerate.
1331 * charset.c: Moved from gcc/cppcharset.c. Add note about
1332 brokenness of input charset detection. Adjust for change
1333 in name of cppucnid.h.
1334 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
1335 * expr.c: Moved from gcc/cppexp.c.
1336 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
1337 Remove #define of O_BINARY, it is in system.h.
1338 * identifiers.c: Moved from gcc/cpphash.c.
1339 * internal.h: Moved from gcc/cpphash.h. Change header
1340 guard name. All other files adjusted to match name change.
1341 * init.c: Moved from gcc/cppinit.c.
1342 (init_library) [ENABLE_NLS]: Call bindtextdomain.
1343 * lex.c: Moved from gcc/cpplex.c.
1344 * directives.c: Moved from gcc/cpplib.c.
1345 * macro.c: Moved from gcc/cppmacro.c.
1346 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
1347 * traditional.c: Moved from gcc/cpptrad.c.
1348 * ucnid.h: Moved from gcc/cppucnid.h. Change header
1349 guard name.
1350 * ucnid.pl: Moved from gcc/cppucnid.pl.
1351 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
1352 guard name.
1353 * symtab.c: Moved from gcc/hashtable.c.
1354 * line-map.c: Moved from gcc. Do not include intl.h.
1355 * mkdeps.c: Moved from gcc.
1356 * system.h: New file.
2cf22451
ZW
1357 * include/cpplib.h: Moved from gcc. Change header guard name.
1358 * include/line-map.h: Moved from gcc. Change header guard name.
1359 * include/mkdeps.h: Moved from gcc. Change header guard name.
1360 * include/symtab.h: Moved from gcc/hashtable.h. Change header
1361 guard name.