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