]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
avr.c (avr_mcu_t): Remove atmega32hvb.
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
2d09b640
RW
12008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2
3 * Makefile.in (datarootdir): New variable.
4
0b7c73cc
L
52008-06-12 H.J. Lu <hongjiu.lu@intel.com>
6
7 PR preprocessor/36479
8 * charset.c (cpp_interpret_string_notranslate): Also set
9 narrow_cset_desc.width.
10
cd985f66
JM
112008-06-07 Joseph Myers <joseph@codesourcery.com>
12
13 * configure.ac (parisc*64*-*-*): Remove.
14 * configure: Regenerate.
15
d750887f
TT
162008-05-30 Tom Tromey <tromey@redhat.com>
17
18 PR preprocessor/36320:
19 * internal.h (_cpp_parse_expr): Update.
20 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
21 messages.
22 * directives.c (do_if): Update.
23 (do_elif): Require expression if processing group.
24
c100de59
DS
252008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
26
27 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
28
5d6342eb
TT
292008-05-21 Tom Tromey <tromey@redhat.com>
30
31 PR preprocessor/27777:
32 * lex.c (cpp_output_line_to_string): New function.
33 * internal.h (_cpp_begin_message): Don't declare.
34 * errors.c (_cpp_begin_message): Now static.
35 * include/cpplib.h (cpp_output_line_to_string): Declare.
36 * directives.c (do_diagnostic): Rewrote. Use
37 cpp_output_line_to_string. Don't use _cpp_begin_message.
38
dae4174e
TT
392008-05-21 Tom Tromey <tromey@redhat.com>
40
41 * include/symtab.h (HT_ALLOCED): Remove.
42 (ht_purge): Declare.
43 * symtab.c (DELETED): New define.
44 (ht_lookup): Update comment.
45 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
46 code. Use subobject allocator for strings, if it exists.
47 (ht_expand): Handle deleted entries.
48 (ht_forall): Likewise.
49 (ht_purge): New function.
50 (ht_dump_statistics): Print deletion statistics.
51
899015a0
TT
522008-05-13 Tom Tromey <tromey@redhat.com>
53
54 PR preprocessor/22168:
55 * include/cpplib.h (struct cpp_options) <objc>: Update
56 documentation.
57 * expr.c (eval_token): Warn for use of assertions.
58 * directives.c (directive_diagnostics): Warn about extensions.
59 (DEPRECATED): New define.
60 (DIRECTIVE_TABLE): Use it.
61
71c10038
TT
622008-05-06 Tom Tromey <tromey@redhat.com>
63
64 PR preprocessor/35313, PR preprocessor/36088:
65 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
66 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
67
2bd0fe3d
DM
682008-05-04 David S. Miller <davem@davemloft.net>
69
70 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
71 * configure: Regenerate.
72
28f68625
DF
732008-04-22 Daniel Franke <franke.daniel@gmail.com>
74
75 * include/cpplib.h (cpp_define_formatted): New.
76 * directives.c (cpp_define_formatted): New.
77
688e7a53
TT
782008-04-21 Tom Tromey <tromey@redhat.com>
79
80 PR libcpp/33415:
81 * charset.c (_cpp_convert_input): Add buffer_start argument.
82 Ignore UTF-8 BOM if seen.
83 * internal.h (_cpp_convert_input): Add argument.
84 * files.c (struct _cpp_file) <buffer_start>: New field.
85 (destroy_cpp_file): Free buffer_start, not buffer.
86 (_cpp_pop_file_buffer): Likewise.
87 (read_file_guts): Update.
88
b6baa67d
KVH
892008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
90
91 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
92 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
93 (struct cpp_options): Added uliterals.
94 (cpp_interpret_string): Update prototype.
95 (cpp_interpret_string_notranslate): Idem.
96 * charset.c (init_iconv_desc): New width member in cset_converter.
97 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
98 (convert_ucn): Idem.
99 (emit_numeric_escape): Idem.
100 (convert_hex): Idem.
101 (convert_oct): Idem.
102 (convert_escape): Idem.
103 (converter_for_type): New function.
104 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
105 (cpp_interpret_string_notranslate): Match changed prototype.
106 (wide_str_to_charconst): Use converter_for_type.
107 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
108 * directives.c (linemarker_dir): Macro U changed to UC.
109 (parse_include): Idem.
110 (register_pragma_1): Idem.
111 (restore_registered_pragmas): Idem.
112 (get__Pragma_string): Support CPP_STRING{16,32}.
113 * expr.c (eval_token): Support CPP_CHAR{16,32}.
114 * init.c (struct lang_flags): Added uliterals.
115 (lang_defaults): Idem.
116 * internal.h (struct cset_converter) <width>: New field.
117 (struct cpp_reader) <char16_cset_desc>: Idem.
118 (struct cpp_reader) <char32_cset_desc>: Idem.
119 * lex.c (digraph_spellings): Macro U changed to UC.
120 (OP, TK): Idem.
121 (lex_string): Add support for u'...', U'...', u"..." and U"...".
122 (_cpp_lex_direct): Idem.
123 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
124 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
125
deb984e6
PB
1262008-04-18 Paolo Bonzini <bonzini@gnu.org>
127
128 PR bootstrap/35457
129 * aclocal.m4: Regenerate.
130 * configure: Regenerate.
131
bf048bea
TT
1322008-04-17 Tom Tromey <tromey@redhat.com>
133
134 PR libcpp/34866:
135 * errors.c (cpp_error): Don't reference a token before the start
136 of the current run.
137
7f27b0f8
TT
1382008-04-16 Tom Tromey <tromey@redhat.com>
139
140 * Makefile.in (TAGS_SOURCES): New variable.
141 (TAGS): New target.
142
a1fcb9a1
KK
1432008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
144
145 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
146 and shbe-*-*.
147 * configure: Rebuilt.
148
93d45d9e
JM
1492008-04-02 Joseph Myers <joseph@codesourcery.com>
150
151 * include/cpplib.h (struct cpp_callbacks): Add used_define,
152 used_undef and before_define.
153 (NODE_USED): Define.
154 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
155 do_ifndef, cpp_pop_definition): Handle new flag and use new
156 callbacks.
157 * expr.c (parse_defined): Handle new flag and use new callbacks.
158 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
159 flag and use new callbacks.
160
d4c32e1d
JJ
1612008-04-01 Jakub Jelinek <jakub@redhat.com>
162
163 PR pch/13675
164 * files.c (struct _cpp_file): Remove pch field.
165 (pch_open_file): Don't set file->pch, just file->pchname.
166 (should_stack_file): After pfile->cb.read_pch call
167 free pchname and clear pchname, don't close file->fd.
168 Test file->pchname instead of file->pch. Don't close fd after cb.
169 (_cpp_stack_include): Test file->pchname instead of file->pch.
170
161031e3
TT
1712008-03-28 Tom Tromey <tromey@redhat.com>
172
173 * Makefile.in (POSTCOMPILE): New variable.
174 (.c.o): Use it.
175
14ccf800
TT
1762008-03-13 Tom Tromey <tromey@redhat.com>
177
178 PR libcpp/35322:
179 * directives.c (destringize_and_run): Set pfile->directive.
180
830465c6
MM
1812008-03-06 Markus Milleder <markus.milleder@generali.at>
182
183 PR preprocessor/35458
184 * mkdeps.c (munge): Quote '#' with a '\'.
185
d482a073
RW
1862008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
187
188 PR preprocessor/35379
189 * mkdeps.c (deps_write): Ensure the first target always appears
190 in the first column, without leading backslash newline. Avoid
191 some more extra whitespace.
192
185a6cc1
TS
1932008-02-25 Thiemo Seufer <ths@mips.com>
194
d482a073 195 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 196
2bf41bf0
TT
1972008-02-19 Tom Tromey <tromey@redhat.com>
198
199 * traditional.c (lex_identifier): Use CPP_HASHNODE.
200 * lex.c (lex_identifier): Use CPP_HASHNODE.
201 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
202 do-while.
203 * identifiers.c (alloc_node): Change return type.
204 (_cpp_init_hashtable): Don't cast 'alloc_node'.
205 (proxy_assertion_broken): New declaration.
206 (cpp_forall_identifiers): Move comment.
207 * line-map.c (linemap_add): Comment fix.
208 (linemap_line_start): Indentation fix.
209
765d600a
JJ
2102008-01-25 Jakub Jelinek <jakub@redhat.com>
211
212 PR preprocessor/34692
213 * macro.c (collect_args): Add pragma_buff argument. Push
214 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
215 than into arguments. Reset prevent_expansion and parsing_args
216 state at CPP_PRAGMA_EOL/CPP_EOF.
217 (funlike_invocation_p): Add pragma_buff argument, pass it through
218 to collect_args.
219 (enter_macro_context): Add result argument. Adjust
220 funlike_invocation_p caller. Emit all deferred pragma tokens
221 gathered during collect_args before the expansion, add a padding
222 token. Return 2 instead of 1 if any pragma tokens were prepended.
223 (cpp_get_token): If enter_macro_context returns 2, don't return
224 a padding token, instead cycle to grab CPP_PRAGMA token.
225 * directives.c (_cpp_handle_directive): If was_parsing_args
226 in deferred pragma, leave parsing_args and prevent_expansion as is.
227
ec46053b
TT
2282008-01-22 Tom Tromey <tromey@redhat.com>
229
765d600a 230 PR c++/34859
ec46053b
TT
231 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
232 __STDC_CONSTANT_MACROS.
233
681c6ab0
FF
2342008-01-07 Fred Fish <fnf@specifix.com>
235
765d600a 236 PR preprocessor/30363
681c6ab0
FF
237 * traditional.c (replace_args_and_push): Add local variable
238 cxtquote, calculate the replacement text size assuming a
239 worst case of every input character quoted with backslash,
240 and properly handle output quoting of quote characters in
241 actual arguments used in function-like macros.
242
33ae4837
TT
2432008-01-03 Tom Tromey <tromey@redhat.com>
244
765d600a 245 PR preprocessor/34602
33ae4837
TT
246 * directives.c (do_line): Don't try to spell EOF token.
247 (do_linemarker): Add comment.
248
675575f5
DD
2492007-12-11 DJ Delorie <dj@redhat.com>
250
251 * charset.c (convert_using_iconv): Close out any shift states,
252 returning to the initial state.
253
97f6bd40
TT
2542007-12-06 Tom Tromey <tromey@redhat.com>
255
765d600a 256 PR c/29172
97f6bd40
TT
257 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
258 type.
259 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
260 * files.c (FILE_HASH_POOL_SIZE): New macro.
261 (struct file_hash_entry_pool): New.
262 (destroy_all_cpp_files): New function.
263 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
264 (new_file_hash_entry): Update.
265 (free_file_hash_entries): New function.
266 (_cpp_cleanup_files): Call free_file_hash_entries and
267 destroy_all_cpp_files.
268 (cpp_clear_file_cache): New function.
269 * include/cpplib.h (cpp_clear_file_cache): Declare.
270
d56a25e1
TT
2712007-12-03 Tom Tromey <tromey@redhat.com>
272
765d600a 273 PR preprocessor/34288
d56a25e1
TT
274 * configure.ac, config.in: Rebuilt.
275 * configure.ac: Check for ssize_t.
276
607f74e9
TT
2772007-11-30 Tom Tromey <tromey@redhat.com>
278
765d600a 279 PR preprocessor/32868
607f74e9
TT
280 * macro.c (_cpp_create_definition): Special case
281 __STDC_FORMAT_MACROS.
282
b0f4807f
MM
2832007-11-16 Michael Matz <matz@suse.de>
284
285 * files.c (search_path_head): Fix check for absolute paths.
286
f1e20710
TT
2872007-11-11 Tom Tromey <tromey@redhat.com>
288
765d600a 289 PR c++/17557
f1e20710
TT
290 * include/cpplib.h (cpp_included_before): Declare.
291 * files.c (struct file_hash_entry) <location>: New field.
292 (_cpp_find_file): Initialize new field.
293 (make_cpp_dir): Likewise.
294 (cpp_included_before): New function.
295
f373b44d
TT
2962007-11-01 Tom Tromey <tromey@redhat.com>
297
765d600a 298 PR preprocessor/30805
f373b44d
TT
299 * macro.c (paste_tokens): Handle padding token.
300 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
301
5b9a40df
TT
3022007-10-31 Tom Tromey <tromey@redhat.com>
303
765d600a 304 PR preprocessor/30786
5b9a40df
TT
305 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
306 * directives.c (_cpp_do__Pragma): Return error status.
307 * internal.h (_cpp_do__Pragma): Update.
308 * directives.c (get__Pragma_string): Back up if EOF seen.
309
5ffeb913
TT
3102007-09-06 Tom Tromey <tromey@redhat.com>
311
312 * internal.h (struct cpp_reader) <invocation_location>: New
313 field.
314 (struct cpp_reader) <set_invocation_location>: Likewise.
315 * init.c (cpp_set_line_map): New function.
316 * line-map.c (linemap_add): Use linemap's allocator.
317 * include/line-map.h (GTY): Define.
318 (line_map_realloc): New typedef.
319 (struct line_map): Mark with GTY.
320 (struct line_maps): Likewise.
321 (struct line_maps) <maps>: Likewise.
322 (struct line_maps) <reallocator>: New field.
323 * include/symtab.h (GTY): Conditionally define.
324 * include/cpplib.h (cpp_set_line_map): Declare.
325 (cpp_get_token_with_location): Declare.
326 * macro.c (cpp_get_token): Set invocation_location on the reader.
327 (cpp_get_token_with_location): New function.
328
ac6b1c67
CF
3292007-08-30 Chao-ying Fu <fu@mips.com>
330
331 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
332 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
333 (cpp_classify_number): Support decimal fixed-point constants without
334 exponents.
335 Warn about fixed-point constants when -pedantic.
336 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
337 comments to support fixed-point values.
338 (CPP_N_FRACT, CPP_N_ACCUM): Define.
339
cda5e672
TT
3402007-08-18 Tom Tromey <tromey@redhat.com>
341
765d600a 342 PR preprocessor/32974
cda5e672
TT
343 * directives.c (parse_include): Don't check for EOL when
344 processing #pragma dependency.
345
ccfc4c91
OW
3462007-07-30 Ollie Wild <aaw@google.com>
347
348 * directives-only.c: New file.
349 * internal.h (struct _cpp_dir_only_callbacks): New.
350 (_cpp_preprocess_dir_only): New function.
351 * directives.c (_cpp_handle_directive): Check directives_only before
352 disabling execution of indented directives.
353 * files.c (_cpp_stack_file): Add directives_only check.
354 * include/cpplib.h (struct cpp_options): Add directives_only.
355 (cpp_init_special_builtins): New function.
356 * init.c (cpp_init_special_builtins): New function.
357 (cpp_init_builtins): Move builtin_array initialization to
358 cpp_init_special_builtins.
359 (post_options): Check directives_only before setting
360 pfile->state.prevent_expansion = 1.
361 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
362 is expanded inside a directive while -fdirectives-only is enabled.
363 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
364 (libcpp_a_SOURCES): Add directives-only.c.
365
a206413a
UB
3662007-07-04 Uros Bizjak <ubizjak@gmail.com>
367
368 * traditional.c (_cpp_scan_out_logical_line): Initialize
369 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
370 fmacro.args to prevent 'may be used uninitialized' warning.
371
c77cd3d1
UB
3722007-07-03 Uros Bizjak <ubizjak@gmail.com>
373
374 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
375 Add new constants.
376 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
377 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
378 for 'q' or 'Q' suffixes.
379
66938a1d
DS
3802007-06-17 Danny Smith <dannysmith@users.sourceforge.net
381
e1311401 382 * files.c (open_file): Correct typo.
66938a1d 383
71995ede
VP
3842007-06-16 Vladimir Prus <vladimir@codesourcery.com>
385
e1311401 386 * files.c (open_file): Prevent the call
71995ede
VP
387 for stat from overwriting errno.
388
84152c25
VP
3892007-06-09 Vladimir Prus <vladimir@codesourcery.com>
390
e1311401 391 * files.c (open_file): Account for the
84152c25
VP
392 fact that on windows, opening a directory gives
393 EACCES.
394
f7fd775f
JW
3952007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
396
397 PR preprocessor/23479
398 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
399 integer constants.
400 (append_digit): Likewise.
401 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
402 binary integer constants.
403
ed0e74e0
DK
4042007-05-31 Dave Korn <dave.korn@artimi.com>
405
406 PR preprocessor/14331
407 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
408
a702045a
OW
4092007-05-24 Ollie Wild <aaw@google.com>
410
411 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
412 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
413 (cpp_write_pch_state): Save __COUNTER__ state.
414 (cpp_valid_state): Check valid __COUNTER__ state.
415 (cpp_read_state): Read new __COUNTER__ state.
416 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
417 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
418 * internal.h (struct cpp_reader): Add counter member.
419
126e073b
SM
4202007-05-23 Simon Martin <simartin@users.sourceforge.net>
421
422 PR preprocessor/20077
423 * macro.c (create_iso_definition): Fixed the method to determine
424 whether the token-pasting operator appears at the beginning or the end
425 of a macro.
426
0b4cafec
ILT
4272007-05-21 Ian Lance Taylor <iant@google.com>
428
429 * internal.h (struct cpp_reader): Add new fields:
430 nonexistent_file_hash and nonexistent_file_ob.
431 * files.c: Include "obstack.h".
432 (find_file_in_dir): Before trying to open the file, look up the
433 path name in the hash table of nonexistent files. After failing
434 to open the file, add the path name to the hash table.
435 (_cpp_find_file): Cache the results of looking up the file name
436 starting with the quote and bracket chain heads, if we can.
437 (nonexistent_file_hash_eq): New static function.
438 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
439 pfile->nonexistent_file_ob.
440 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
441 pfile->nonexistent_file_ob.
442
30e04921
JJ
4432007-05-14 Janis Johnson <janis187@us.ibm.com>
444
5a6bb57e
JJ
445 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
446
30e04921
JJ
447 PR c/31924
448 * expr.c (interpret_float_suffix): Check for invalid suffix.
449
22a8a52d
EC
4502007-05-02 Eric Christopher <echristo@apple.com>
451
452 * expr.c (num_div_op): Don't overflow if the result is
453 zero.
454
fca35e1b
TT
4552007-05-02 Tom Tromey <tromey@redhat.com>
456
765d600a 457 PR preprocessor/28709
fca35e1b
TT
458 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
459
4cd97075
MM
4602007-03-30 Michael Meissner <michael.meissner@amd.com>
461
462 * directives.c (lex_macro_node_from_str): Fix alloca call to be
463 type correct.
464
121de39f
RH
4652007-03-30 Richard Henderson <rth@redhat.com>
466
467 * directives.c (lex_macro_node_from_str): New.
468 (cpp_push_definition, cpp_pop_definition): New.
469 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
470
4fcb360b
BM
4712007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
472
473 * Makefile.in: Add dummy install-pdf target.
474
67e64439
TT
4752007-01-30 Tom Tromey <tromey@redhat.com>
476
765d600a 477 PR preprocessor/30468
67e64439
TT
478 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
479 './'.
480
ee380365
TT
4812007-01-30 Tom Tromey <tromey@redhat.com>
482
765d600a 483 PR preprocessor/29966
ee380365
TT
484 * macro.c (lex_expansion_token): Save and restore cpp_reader's
485 cur_token.
486 (_cpp_create_definition): Don't restore cur_token here.
487 * lex.c (_cpp_lex_token): Added assertion.
488
024abeb3
TT
4892007-01-27 Tom Tromey <tromey@redhat.com>
490
491 * configure: Rebuilt.
492
ee1c2a10
TT
4932007-01-12 Tom Tromey <tromey@redhat.com>
494
765d600a 495 PR preprocessor/28227
ee1c2a10
TT
496 * directives.c (lex_macro_node): Added 'is_def_or_undef'
497 argument.
498 (do_define): Update.
499 (do_undef): Update.
500 (do_ifdef): Update.
501 (do_ifndef): Update.
502
67214c16
PB
5032007-01-11 Paolo Bonzini <bonzini@gnu.org>
504
505 * configure: Regenerate.
506
1aa6ca40
PB
5072007-01-11 Paolo Bonzini <bonzini@gnu.org>
508
509 * configure: Regenerate.
510
705e2d28
TT
5112007-01-04 Tom Tromey <tromey@redhat.com>
512
765d600a 513 PR preprocessor/28165
705e2d28
TT
514 * internal.h (cpp_in_primary_file): New function.
515 * directives.c (do_include_next): Use cpp_in_primary_file.
516 (do_pragma_once): Likewise.
517 (do_pragma_system_header): Likewise.
518
7af45bd4
ILT
5192006-12-29 Ian Lance Taylor <iant@google.com>
520
521 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
522 look backward at the end of the line unless we saw a backslash.
523
9d30f270
JJ
5242006-12-29 Jakub Jelinek <jakub@redhat.com>
525
526 PR preprocessor/29612
527 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
528 only when new_sysp is non-zero.
529
30b0edc0
TT
5302006-12-28 Tom Tromey <tromey@redhat.com>
531
765d600a 532 PR preprocessor/30001
30b0edc0
TT
533 * charset.c (_cpp_convert_input): Check that to.len is greater
534 than zero.
535
85d9c13c
TS
5362006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
537
538 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 539 * configure: Rebuilt.
85d9c13c 540
dfafdaa6
DG
5412006-11-01 Douglas Gregor <doug.gregor@gmail.com>
542
543 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
544 for experimental C++0x mode.
545 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
546 adopted the preprocessor changes introduced in C99.
547
0f45f0f5
JM
5482006-10-29 Joseph Myers <joseph@codesourcery.com>
549
550 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
551 depending on --enable-targets=all.
552 * configure: Regenerate.
553
de000d22
JJ
5542006-10-12 Jakub Jelinek <jakub@redhat.com>
555
556 PR preprocessor/28709
557 * macro.c (paste_tokens): Do error reporting here, use BUF with the
558 spelled LHS token as opposed to spelling it again.
559 (paste_all_tokens): Don't report errors here, just break on failure.
560
b5422ad7
BM
5612006-10-10 Brooks Moses <bmoses@stanford.edu>
562
563 * Makefile.in: Added empty "pdf" target.
564
aaf50ff2
GK
5652006-09-22 Geoffrey Keating <geoffk@apple.com>
566
567 * configure.ac: Make need_64_bit_hwint case for x86-darwin
568 match exactly the glob in gcc/config.gcc.
569 * configure: Regenerate.
570
c663e301
JM
5712006-09-13 Joseph S. Myers <joseph@codesourcery.com>
572
573 PR c/28768
574 PR preprocessor/14634
575 * lex.c (lex_string): Pedwarn for unterminated literals.
576
f7288899
EC
5772006-09-08 Eric Christopher <echristo@apple.com>
578
579 * configure.ac: Add 64-bit HWI support for i?86-darwin.
580
b52dbbf8
SE
5812006-08-14 Steve Ellcey <sje@cup.hp.com>
582
583 PR c++/28288
584 PR c++/14556
585 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
586 (CPP_LAST_EQ): Change.
587 (CPP_LAST_PUNCTUATOR): Change.
588 * expr.c (cpp_operator): Remove MIN and MAX.
589 (reduce): Remove CPP_MIN and CPP_MAX.
590 (num_binary_op): Ditto.
591 * lex.c (_cpp_lex_direct): Ditto.
592 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
593
1c90c6f9
JJ
5942006-06-09 Jakub Jelinek <jakub@redhat.com>
595
596 PR preprocessor/27746
597 * directives.c (do_pragma): Handle pragma with valid namespace
598 and invalid name coming from macro expansion.
599 * directives.c (destringize_and_run): Initialize next field in
600 context.
601
602 PR c/27747
603 PR c++/27748
604 * directives.c (destringize_and_run): Set NO_EXPAND on the
605 tokens.
606
607 * macro.c (_cpp_backup_tokens): Fix comment typo.
608
5c3c3683
DJ
6092006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
610
611 * Makefile.in (CATALOGS): Add po/ prefix.
612 * configure: Regenerated.
613
b2bd74bc
CD
6142006-05-23 Carlos O'Donell <carlos@codesourcery.com>
615
616 * Makefile.in: Add install-html target. Add install-html to .PHONY
617
be8ac3e2
GZ
6182006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
619
620 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
621 * files.c (_cpp_get_file_stat): New function.
622 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
623 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
624 * internal.h (_cpp_get_file_stat): Prototype.
625 (struct cpp_buffer): Add timestamp.
626
83900997
JJ
6272006-01-23 Jakub Jelinek <jakub@redhat.com>
628
629 PR preprocessor/25717
630 * init.c (cpp_init_builtins): If __STDC__ will not change value
631 between system headers and other sources, define it as a normal
632 macro rather than a builtin.
633 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
634 cpp_in_system_header condition.
635
6362006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
637
638 * Makefile.in: Use -MMD instead of -MD.
639
bc4071dd
RH
6402006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
641 Richard Henderson <rth@redhat.com>
642
643 Merge from gomp branch:
644 * directives.c (struct pragma_entry): Add is_deferred. Add ident
645 entry to value union.
646 (end_directive): Don't eat the line if in_deferred_pragma.
647 (run_directive): Remove pragma hacks.
648 (insert_pragma_entry): Remove.
649 (new_pragma_entry): New.
650 (register_pragma_1): Split out of register_pragma. Only handle
651 the lookup tree and return the new entry.
652 (cpp_register_pragma): Fill in the pragma entry here.
653 (cpp_register_deferred_pragma): New.
654 (register_pragma_internal): New.
655 (_cpp_init_internal_pragmas): Use register_pragma_internal.
656 (do_pragma): Allow pragma expansion after namespace. For deferred
657 pragmas, don't slurp the line into a string.
658 (destringize_and_run): Save tokens for deferred pragmas.
659 (cpp_handle_deferred_pragma): Remove.
660 * macro.c (builtin_macro): Remove pragma token hack.
661 (_cpp_push_token_context): Rename from push_token_context and export.
662 * internal.h (struct lexer_state): Add pragma_allow_expansion.
663 (_cpp_push_token_context): Declare.
664 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
665 a token. Update the line number correctly if so.
666 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
667 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
668 * include/cpplib.h (PRAGMA_EOL): New.
669 (CPP_TOKEN_FLD_PRAGMA): New.
670 (struct cpp_token): Add val.pragma.
671 (struct cpp_options): Remove defer_pragmas.
672 (cpp_handle_deferred_pragma): Remove.
673 (cpp_register_deferred_pragma): Declare.
674
d09e893f
JJ
6752006-01-01 Jakub Jelinek <jakub@redhat.com>
676
677 PR c++/25294
678 * directives.c (do_pragma): If pragma line ends with multi-line
679 block comment, end the saved deferred pragma string before that
680 comment. Handle embedded '\0' chars on the pragma line.
681
ab84748a
VR
6822005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
683
684 PR c++/23333
685 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
686
ad6ed77e
JG
6872005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
688 Ben Elliston <bje@au.ibm.com>
689
690 * include/cpplib.h (CPP_N_DFLOAT): New.
691 * expr.c (interpret_float_suffix): Identify df, dd, and dl
692 suffixes as decimal floating point constants.
693 (cpp_classify_number): Disallow hexadecimal DFP constants.
694
ba096620 6952005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 696 Ian Lance Taylor <ian@airs.com>
ba096620
GP
697
698 * include/cpplib.h (struct cpp_callbacks): Annotate error with
699 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
700
456b8ce5
UB
7012005-11-09 Per Bothner <per@bothner.com>
702 Uros Bizjak <uros@kss-loka.si>
f7288899 703
456b8ce5
UB
704 PR c/24101
705 * init.c (read_original_filename): Temporarily set
706 state.in_directive before calling _cpp_lex_direct for
707 CPP_HASH tokens.
708
5571f74f
JW
7092005-11-03 James E Wilson <wilson@specifix.com>
710
711 PR preprocessor/24202
712 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
713
a63607ed
JM
7142005-11-04 Joseph S. Myers <joseph@codesourcery.com>
715
716 * include/cpplib.h (struct cpp_callbacks): Make error take
717 va_list* parameter.
718 * errors.c (cpp_error): Update call to callback.
719
651ed942
AP
7202005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
721
722 PR preprocessor/22042
723 * macro.c (_cpp_builtin_macro_text): Lower the needed max
724 buffer size.
725 (cpp_quote_string): Don't octalify non printable
726 charactors.
727
178b58b5
JM
7282005-11-03 Joseph S. Myers <joseph@codesourcery.com>
729
730 PR c++/17964
731 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
732 (struct cpp_callbacks): Add error.
733 * errors.c (cpp_error): If client_diagnostic, use error callback.
734 * charset.c (convert_escape): Don't use %03o in diagnostic.
735
3ee5ed11 7362005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
737
738 PR preprocessor/15220
739 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
740 callers. Pass to open_file_failed.
741 (open_file_failed): New parameter angle_brackets. Fix all callers.
742 Use in print_dep assignment.
743 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
744 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 745
077fc835
KH
7462005-10-08 Kazu Hirata <kazu@codesourcery.com>
747
748 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
749 * configure: Regenerate.
750
cbc43ae0
ILT
7512005-10-04 Ian Lance Taylor <ian@airs.com>
752
753 PR preprocessor/13726
754 * directives.c (check_eol_return_comments): New static function.
755 (parse_include): Add buf parameter. Change all callers.
756 (do_include_common): If not discard comments, turn on
757 save_comments. Pass collected comments to include callback.
758 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
759 include callback: cpp_token list.
760
af15a2fe
JM
7612005-09-20 Joseph S. Myers <joseph@codesourcery.com>
762
763 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
764 * init.c (struct lang_flags, lang_defaults): Add
765 extended_identifiers.
766 (cpp_set_lang): Use it.
767 * lex.c (forms_identifier_p): Check extended_identifiers.
768
f5eab47e
JJ
7692005-08-30 Jakub Jelinek <jakub@redhat.com>
770
771 PR preprocessor/20348
772 PR preprocessor/20356
773 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
774 2004-06-05 changes.
775
467129e6
KG
7762005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
777
778 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
779 -Wmissing-format-attribute.
780
781 * configure: Regenerate.
782
200031d1
KC
7832005-06-29 Kelley Cook <kcook@gcc.gnu.org>
784
785 * all files: Update FSF address in copyright headers.
786 * makeucnid.c (write_copyright): Update outputted FSF address.
787
f610dd5f
ZW
7882005-06-13 Zack Weinberg <zack@codesourcery.com>
789
790 * configure.ac: Invoke ZW_CREATE_DEPDIR and
791 ZW_PROG_COMPILER_DEPENDENCIES.
792 * aclocal.m4, configure: Regenerate.
793 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
794 New variables.
795 (distclean): Clean up $(DEPDIR) and its contents.
796 (.c.o): Use $(COMPILE).
797 Include $(DEPDIR)/*.Po for most object->header dependencies.
798
c3f829c1
GDR
7992005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
800
801 * configure.ac: Check declarations for asprintf and vasprintf.
802 * config.in: Regenerate.
803 * configure: Likewise.
804
805 * charset.c (conversion_loop): Use XRESIZEVEC.
806 (convert_no_conversion): Likewise.
807 (convert_using_iconv): Likewise.
808 (init_iconv_desc): Cast return value of alloca.
809 (cpp_host_to_exec_charset): Use XNEWVEC.
810 (emit_numeric_escape): Use XRESIZEVEC.
811 (cpp_interpret_string): Use XNEWVEC.
812 (cpp_interpret_string): Use XRESIZEVEC.
813 (_cpp_interpret_identifier): Cast return value of alloca.
814 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
815 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
816 (parse_include): Use XNEWVEC.
817 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 818 "new_entry".
c3f829c1
GDR
819 (save_registered_pragmas): Cast return value of xmemdup.
820 (destringize_and_run): Same for alloca.
821 (parse_assertion): Likewise.
822 (do_assert): Cast allocated storage to proper type.
823 (cpp_define): Likewise.
824 (_cpp_define_builtin): Likewise.
825 (cpp_undef): Likewise.
826 (handle_assertion): Likewise.
827 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
828 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
829 (CPP_UMINUS): Likewise.
830 (struct cpp_operator): Rename from struct operator.
831 (_cpp_expand_op_stack): Use XRESIZEVEC.
832 * files.c (pch_open_file): Use XNEWVEC.
833 (pch_open_file): Use XRESIZEVEC.
834 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
835 (dir_name_of_file): Use XNEWVEC.
836 (make_cpp_file): Use XCNEW.
837 (make_cpp_dir): Likewise.
838 (allocate_file_hash_entries): USE XNEWVEC.
839 (cpp_included): Cast return value of htab_find_with_hash.
840 (append_file_to_dir): Use XNEWVEC.
841 (read_filename_string): Likewise. Use XRESIZEVEC too.
842 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
843 (remap_filename): Use XNEWVEC.
844 (struct pchf_entry): Move definition out of struct pchf_data.
845 (_cpp_save_file_entries): Use XCNEWVAR.
846 (_cpp_read_file_entries): Use XNEWVAR.
847 * identifiers.c (alloc_node): Use XOBNEW.
848 * init.c (cpp_create_reader): Use XCNEW.
849 (cpp_init_builtins): Cast of b->value to enum builtin_type.
850 (read_original_directory): Cast return value of alloca.
851 * lex.c (add_line_note): Use XRESIZEVEC.
852 (warn_about_normalization): Use XNEWVEC.
853 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
854 (new_buff): Use XNEWVEC.
855 * line-map.c (linemap_add): Use XRESIZEVEC.
856 * macro.c (builtin_macro): Cast return value of alloca.
857 (paste_tokens): Likewise.
858 (expand_arg): Use XNEWVEC and XRESIZEVEC.
859 (_cpp_save_parameter): Use XRESIZEVEC.
860 (create_iso_definition): Cast allocated storage to proper type.
861 (_cpp_create_definition): Likewise.
862 (cpp_macro_definition): Use XRESIZEVEC.
863 * makedepend.c (add_clm): Use XNEW.
864 (add_dir): Likewise.
865 * mkdeps.c (munge): Use XNEWVEC.
866 (deps_init): Use XCNEW.
867 (deps_add_target): Use XRESIZEVEC.
868 (deps_add_default_target): Cast return value of alloca.
869 (deps_add_dep): Use XRESIZEVEC.
870 (deps_add_vpath): Likewise. Use XNEWVEC too.
871 (deps_restore): Likewise.
872 * pch.c (save_idents): Use XNEW and XNEWVEC.
873 (cpp_save_state): Use XNEW.
874 (count_defs): Cast return value of htab_find.
875 (write_defs): Likewise.
876 (cpp_write_pch_deps): Use XNEWVEC.
877 (collect_ht_nodes): Use XRESIZEVEC.
878 (cpp_valid_state): Use XNEWVEC.
879 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
880 * symtab.c (ht_create): Use XCNEW.
881 (ht_lookup_with_hash): Cast return value of obstack_copy0.
882 (ht_expand): Use XCNEWVEC.
883 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
884 (bool): Do not define if __cplusplus.
885
1ed17cd5
ZW
8862005-05-12 Zack Weinberg <zack@codesourcery.com>
887
888 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
889 (do_sccs): Delete function definition, #define to do_ident.
890 (do_ident): Don't hardwire directive name.
891
5a8c20ce
RK
8922005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
893
894 PR bootstrap/21230
895 * configure: Regenerate.
896
473c5bc9
AP
8972005-04-27 Andris Pavenis <pavenis@latnet.lv>
898
899 * files.c: Include io.h for DJGPP to get prototype of setmode.
900
c1fc5047
PB
9012005-04-19 Per Bothner <per@bothner.com>
902
903 PR preprocessor/20907
904 * line-map.c (linemap_line_start): Fix bug when we need to increse
905 column_bits but can re-use the current line_map.
906
042630ad
KG
9072005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
908
909 * system.h (fopen, fdopen, freopen): Define these to the unlocked
910 libiberty functions.
911
0d667716
KG
9122005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
913
914 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
915 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
916 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
917 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
918 _unlocked function.
919 (fwrite_unlocked): Fix prototype.
1ed17cd5 920
0d667716
KG
921 * configure, config.in: Regenerate.
922
cae064e7
JJ
9232005-04-05 Jakub Jelinek <jakub@redhat.com>
924
925 PR preprocessor/19475
926 * macro.c (create_iso_definition): For < ISO C99, don't
927 pedwarn if there is no whitespace between macro name and its
928 replacement, but the replacement starts with a basic character
929 set character.
930
cbada204
AJ
9312005-03-28 Andreas Jaeger <aj@suse.de>
932
933 * lex.c (warn_about_normalization): Cast field width to int to
934 avoid warning.
935
f42eccdb
JM
9362005-03-19 Joseph S. Myers <joseph@codesourcery.com>
937
938 * configure.ac: Consistently use solaris2.1[0-9]* instead of
939 solaris2.1[0-9].
940 * configure: Regenerate.
941
c79e602b
GK
9422005-03-15 Geoffrey Keating <geoffk@apple.com>
943
944 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
945 UCN rather than printing an error.
946
50668cf6
GK
9472005-03-14 Geoffrey Keating <geoffk@apple.com>
948
6baba9bb
GK
949 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
950
9512005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 952
50668cf6
GK
953 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
954 * charset.c: Update for new format of ucnid.h.
955 (ucn_valid_in_identifier): Update for new format of ucnid.h.
956 Add NST parameter, and update it; update callers.
957 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
958 with cpp_error.
959 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
960 * internal.h (struct normalize_state): New.
961 (INITIAL_NORMALIZE_STATE): New.
962 (NORMALIZE_STATE_RESULT): New.
963 (NORMALIZE_STATE_UPDATE_IDNUM): New.
964 (_cpp_valid_ucn): New.
965 * lex.c (warn_about_normalization): New.
966 (forms_identifier_p): Add normalize_state parameter, update callers.
967 (lex_identifier): Add normalize_state parameter, update callers. Keep
968 the state current.
969 (lex_number): Likewise.
970 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
971 it with warn_about_normalization.
972 * makeucnid.c: New.
973 * ucnid.h: Replace.
974 * ucnid.pl: Remove.
975 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
976 comments about obsolete version of C++.
977 * include/cpplib.h (enum cpp_normalize_level): New.
978 (struct cpp_options): Add warn_normalize field.
979
47e20491
GK
9802005-03-11 Geoffrey Keating <geoffk@apple.com>
981
982 * directives.c (glue_header_name): Update call to cpp_spell_token.
983 * internal.h (_cpp_interpret_identifier): New.
984 * charset.c (_cpp_interpret_identifier): New.
985 (_cpp_valid_ucn): Allow UCN version of '$'.
986 * lex.c (lex_identifier): Add extra parameter to indicate if initial
987 character was '$' or '\'. Support identifiers with UCNs.
988 (forms_identifier_p): Allow UCNs.
989 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
990 (utf8_to_ucn): New.
991 (cpp_spell_token): Add FORSTRING parameter. Use it.
992 (cpp_token_as_text): Update call to cpp_spell_token.
993 (cpp_output_token): Write UCNs back out.
994 (stringify_arg): Update call to cpp_spell_token.
995 (paste_tokens): Likewise.
996 (cpp_macro_definition): Likewise.
997 * macro.c (stringify_arg): Likewise.
998 (paste_tokens): Likewise.
999 (cpp_macro_definition): Likewise.
1000 * include/cpplib.h: Add parameter to cpp_spell_token.
1001
73096711
JJ
10022005-03-04 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR bootstrap/20282
1005 PR bootstrap/20305
1006 * macro.c (replace_args, cpp_get_token): Copy whole
1007 cpp_token_u instead of just cpp_string field from it.
1008
2203a881
DP
10092005-02-28 Devang Patel <dpatel@apple.com>
1010
1011 * directives.c (do_line): Save sysp early before line table is
1012 realloc'ed.
1ed17cd5 1013
c5ff069d
ZW
10142005-02-20 Zack Weinberg <zack@codesourcery.com>
1015
1016 PR 18785
1017 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1018 (cpp_host_to_exec_charset): New function.
1019 * include/cpplib.h: Declare cpp_host_to_exec_charset.
1020
04c90eea
DP
10212005-02-19 Devang Patel <dpatel@apple.com>
1022
1023 * charset.c (_cpp_convert_input): Check '\r' before inserting
1024 '\n' at the end.
c5ff069d 1025
6da55c00
EC
10262005-02-15 Eric Christopher <echristo@redhat.com>
1027
1028 PR preprocessor/19077
1029 * macro.c (cpp_macro_definition): Move handling of whitespace
1030 to PREV_WHITE conditional. Remove overloading of len
1031 variable.
1032
31c3e631
KH
10332005-02-14 Kazu Hirata <kazu@cs.umass.edu>
1034
1035 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1036 traditional.c: Update copyright.
1037
be0f1e54
PB
10382005-02-14 Paolo Bonzini <bonzini@gnu.org>
1039
1040 PR bootstrap/19818
1041 * configure.ac: Check for declaration of basename and getopt.
1042 * config.in: Regenerate.
1043 * configure: Regenerate.
1044 * internal.h (ustrcspn): New.
1045 * macro.c (create_iso_definition): Fix allocation of memory.
1046 (padding_token): Add cast to remove const-ness.
1047 * pch.c (cpp_read_state): Use ustrcspn.
1048
ecddfb39
MS
10492005-02-08 Mike Stump <mrs@apple.com>
1050
1051 * files.c (pchf_adder): Remove.
1052 (struct pchf_adder_info): Likewise.
1053 (_cpp_save_file_entries): Write out all files so that #import works.
1054
9fcdd891
JM
10552005-01-23 Joseph S. Myers <joseph@codesourcery.com>
1056
1057 * configure: Regenerate.
1058
ecfd72e7
TS
10592005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1060
1061 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1062
6c25a4f7 1063 * include/cpplib.h: Also update copyright years.
c5ff069d 1064
942926ad
GK
10652005-01-03 Geoffrey Keating <geoffk@apple.com>
1066
1067 * files.c (_cpp_find_file): Add files found by search_path_exhausted
1068 to the list of all files.
1069
a2566ae9
GDR
10702005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1071
1072 * internal.h: Update references to Cpp lib filenames.
1073 * directives.c: Likewise.
1074 * init.c: Likewise.
1075 * macro.c: Likewise.
1076 * traditional.c: Likewise.
1077
1b449375
EB
10782004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
1079
1080 PR preprocessor/15167
1081 * files.c (destroy_cpp_file): New function.
1082 (should_stack_file): Make a new file if the
1083 compared file is still stacked.
1084
28303828
NN
10852004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
1086
c5ff069d 1087 PR preprocessor/17610
28303828
NN
1088 * directives.c (do_include_common): Error out if an empty filename
1089 is given for #include (or #include_next or #import).
1090
c812785a
RS
10912004-11-27 Roger Sayle <roger@eyesopen.com>
1092 Zack Weinberg <zack@codesourcery.com>
1093
1094 * internal.h: Replace all uses of uchar with unsigned char.
1095 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
1096 with !IN_GCC, so uchar is only defined whilst building libcpp.
1097
f91eaa01
KC
10982004-11-24 Kelley Cook <kcook@gcc.gnu.org>
1099
1100 * aclocal.m4: Regenerate.
1101
f78ce0c2
RS
11022004-11-24 Roger Sayle <roger@eyesopen.com>
1103
1104 PR preprocessor/15824
1105 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1106 directly, instead of the non-existant "system.h" and "ansidecl.h".
1107 * configure: Regenerate.
1108
b5b3e36a 11092004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1110 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
1111
1112 * internal.h (struct lexer_state): Add in_deferred_pragma.
1113 * directives.c (struct pragma_entry): Add allow_expansion.
1114 (insert_pragma_entry): Take allow_expansion flag.
1115 (register_pragma): Likewise.
1116 (cpp_register_pragma): Likewise.
1117 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1118 (do_pragma): Honor allow_expansion.
1119 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1120 * include/cpplib.h (cpp_register_pragma): Update prototype.
1121
a8e68029 11222004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1123 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
1124
1125 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1126 need_64bit_hwint=yes.
1127 * configure: Regenerate.
1128
50f47ee0
JM
11292004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1130
1131 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1132 po/$(PACKAGE).pot.
1133 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1134 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1135 Remove local srcdir path from generated file.
1136
968e08d6 11372004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 1138 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
1139
1140 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1141 as well.
1142
3da3d587
ZW
11432004-10-27 Zack Weinberg <zack@codesourcery.com>
1144
1145 PR 18075
1146 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1147 (cpp_handle_deferred_pragma): Add cast to silence warning.
1148
ac24fc25
JM
11492004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1150
1151 * errors.c (_cpp_begin_message): Print "error: " for errors.
1152
7731405b
AJ
11532004-10-10 Andreas Jaeger <aj@suse.de>
1154
1155 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1156 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1157
646544e3
AP
11582004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1159
1160 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1161 used.
1162 (cpp_read_state): Remove unused variables, m, d and mac_count.
1163
67a74146
PB
11642004-09-29 Per Bothner <per@bothner.com>
1165
1166 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1167 cb.line_change. Otherwise do_pragma will call the line_change
1168 call-back with a meaningless line number.
1169
018a4785
ZW
11702004-09-24 Zack Weinberg <zack@codesourcery.com>
1171
1172 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1173 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1174 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1175 * aclocal.m4, configure: Regenerate.
1176 * init.c: Include localedir.h.
1177 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1178 (DEFS): Delete.
1179 (.c.o): Use $(ALL_CFLAGS).
1180 (localedir.h, localedir.hs): New rules.
1181 (clean): Use rm -rf to remove directories.
1182 (distclean): Also delete localedir.h and localedir.hs.
1183 (init.o): Update dependencies.
1184
88fa57d7
KC
11852004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1186
1187 * Makefile.in (aclocal.m4): Update dependencies.
1188 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1189 * aclocal.m4, configure: Regenerate.
1190
8f8e9aa5
ZW
11912004-09-17 Zack Weinberg <zack@codesourcery.com>
1192
a29f62d9
ZW
1193 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1194 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1195 Some other comments in this file also tweaked.
1196
8f8e9aa5
ZW
1197 * directives.c (do_pragma): Save current buffer position
1198 before lexing the pragma keywords; don't call
1199 _cpp_backup_tokens in the defer_pragmas case.
1200
a2981930
PB
12012004-09-15 Per Bothner <per@bothner.com>
1202
1203 * include/line-map.h (line_map_start): Add parameter names so
1204 preceding comment makes sense.
1205 (linemap_add): Remove from comment mention of non-existing parameter.
1206
21b11495
ZW
12072004-09-09 Matt Austern <austern@apple.com>
1208 Zack Weinberg <zack@codesourcery.com>
1209
1210 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1211 prefixes throughout. Add entry for PRAGMA. Remove
1212 unnecessary "= 0" from EQ.
1213 (enum cpp_ttype): Adjust OP and TK definitions to restore
1214 prefixes, via token-paste.
1215 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1216 Change from #defines to additional cpp_ttype enumerators.
1217 (struct cpp_options): Add defer_pragmas.
1218 (cpp_handle_deferred_pragma): Prototype new interface.
1219
1220 * internal.h (struct cpp_reader): Add directive_result.
1221 * directives.c (struct pragma_entry): Add is_internal field;
1222 give boolean fields type bool.
1223 (start_directive): Initialize pfile->directive_result.type.
1224 (_cpp_do__Pragma): Likewise.
1225 (run_directive): Do not crash if pfile->buffer->prev is NULL.
1226 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1227 from it.
1228 (register_pragma): New static function, bulk of former
1229 cpp_register_pragma here; add 'internal' argument, pass along
1230 to insert_pragma_entry.
1231 (cpp_register_pragma): Now a wrapper around register_pragma which
1232 always passes false for 'internal' argument.
1233 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1234 true for 'internal'.
1235 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1236 an internal pragma, save text till the end of the line as a CPP_PRAGMA
1237 token instead of executing the pragma.
1238 (cpp_handle_deferred_pragma): New interface.
1239 * lex.c (token_spellings): Adjust OP and TK definitions to
1240 match changes to cpplib.h.
1241 (_cpp_lex_token): Check for a directive-result token and
1242 return it if present.
1243 (cpp_token_val_index): Handle CPP_PRAGMA.
1244 * macro.c (cpp_builtin_macro_text): Correct comment.
1245 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1246
0fd9e8dd
SB
12472004-09-06 Serge Belyshev <belyshev@lubercy.com>
1248
1249 PR preprocessor/14699
1250 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1251 from size_t to double.
1252
39b8ce7f
AS
12532004-08-28 Andreas Schwab <schwab@suse.de>
1254 Andreas Jaeger <aj@suse.de>
1255
1256 * configure.ac: Set PACKAGE correctly.
1257 * configure: Regenerated.
1258
5d1f4b27
PB
12592004-08-25 Paolo Bonzini <bonzini@gnu.org>
1260
1261 * Makefile.in: Add back top_builddir.
1262
078e3ffe
PB
12632004-08-25 Paolo Bonzini <bonzini@gnu.org>
1264
1265 * configure.ac: Replace Automake macro invocations
1266 with manual Autoconf checks and substitutions.
1267 * configure: Regenerate.
1268 * aclocal.m4: Regenerate.
1269 * config.in: Regenerate.
1270 * Makefile.am: Removed.
1271 * Makefile.in: Heavy simplification and reorganization.
1272
b3f8d95d
MM
12732004-08-09 Mark Mitchell <mark@codesourcery.com>
1274
1275 * configure.ac (arm*-*-eabi*): New target.
1276 (arm*-*-symbianelf*): Likewise.
1277 * configure: Regenerated.
1278
72bb2c39
BI
12792004-07-24 Bernardo Innocenti <bernie@develer.com>
1280
1281 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1282 * directives.c: Use XNEW-family macros from libiberty.
1283 * lex.c: Likewise.
1284 * macro.c: Likewise.
1285 * cpplib.h (cpp_deps_style): Export enum with name.
1286
21b11495 12872004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 1288
21b11495 1289 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 1290
a23ee064
AP
12912004-07-16 Andris Pavenis <pavenis@latnet.lv>
1292
1293 PR preprocessor/16366
1294 * internal.h (struct cpp_reader): New field dir_hash.
1295 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1296 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1297
a09d4744
NB
12982004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
1299
1300 PR preprocessor/16192
1301 PR preprocessor/15913
1302 PR preprocessor/15572
1303 * expr.c (_cpp_parse_expr): Handle remaining cases where an
1304 expression is missing.
1305 * init.c (post_options): Traditional cpp doesn't do // comments.
1306
f58f7def
PB
13072004-06-30 Per Bothner <per@bothner.com>
1308
1309 * include/line-map.h (fileline): Remove old typedef.
1310 * internal.h (struct cpp_reader): Use source_location typedef instead.
1311
e83d8d43
ZW
13122004-06-26 Zack Weinberg <zack@codesourcery.com>
1313
1314 Partially revert patch of 2004-06-05.
1315 * files.c (search_cache): Remove pfile argument. Don't check
1316 for file that would be found by "" or <> search here...
1317 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1318 Do not apply directory-of-current-file correction to files
1319 found by this check. Rearrange code slightly.
1320
c0d578e6
GK
13212004-06-21 Geoffrey Keating <geoffk@apple.com>
1322
1323 * files.c (should_stack_file): Correct swapped parameters to call
1324 to cb.read_pch.
1325 * pch.c (cpp_valid_state): Handle -fpreprocessed.
1326
159d5224
PB
13272004-06-15 Paolo Bonzini <bonzini@gnu.org>
1328
1329 * Makefile.in: Regenerate with automake 1.8.5.
1330 * aclocal.m4: Likewise.
1331 * configure: Regenerate.
1332
2fac9c01
ZW
13332004-06-11 Zack Weinberg <zack@codesourcery.com>
1334
1335 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1336 * configure, config.in: Regenerate.
1337 * system.h: Unconditionally define bool as unsigned char,
1338 BOOL_BITFIELD as unsigned int.
1339 * .cvsignore: New file.
1340
d8044160
GK
13412004-06-09 Geoffrey Keating <geoffk@apple.com>
1342
1343 * traditional.c (push_replacement_text): Set macro->traditional.
1344 (save_replacement_text): Likewise.
1345 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1346 (struct save_macro_item): Delete.
1347 (struct save_macro_data): Use a character array not the previous
1348 structured format.
1349 (save_macros): Save macro as text not as internal structures.
1350 (cpp_prepare_state): Update for changes to save_macro_data.
1351 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 1352 -D macros as text.
d8044160
GK
1353 * macro.c (create_iso_definition): Honour alloc_subobject.
1354 Clear traditional flag.
1355 (_cpp_create_definition): Honour alloc_subobject.
1356 * lex.c (cpp_token_val_index): New.
1357 * internal.h: Include cpp-id-data.h.
1358 (uchar): Move definition to cpp-id-data.h.
1359 (U): Likewise.
1360 (cpp_macro): Likewise.
1361 * directives.c (struct answer): Move to cpp-id-data.h.
1362 (do_assert): Honour alloc_subobject.
2cf22451
ZW
1363
1364 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1365 * include/cpplib.h (struct cpp_string): Add GTY marker.
1366 (enum cpp_token_fld_kind): New.
1367 (struct cpp_token): Add GTY markers.
1368 (cpp_token_val_index): Prototype.
1369 (CPP_HASHNODE_VALUE_IDX): New.
1370 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1371 * include/cpp-id-data.h: New file.
d8044160 1372
0ca8e815
PB
13732004-06-09 Paolo Bonzini <bonzini@gnu.org>
1374
1375 * Makefile.am (all-local): New.
1376 * Makefile.in: Regenerate.
1377
b51fa00f
RS
13782004-06-06 Roger Sayle <roger@eyesopen.com>
1379
1380 * Makefile.am (LIBICONV): Declare.
1381 (makedepend_LDADD): Use LIBICONV.
1382 * Makefile.in: Regenerate.
1383
5e2f3f39
AP
13842004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
1385
1386 * Makefile.am (LIBINTL): Declare
1387 (makedepend_LDADD): Use LIBINTL.
1388 * Makefile.in: Regenerate.
1389
c6e83800
ZW
13902004-06-05 Zack Weinberg <zack@codesourcery.com>
1391
1392 * Makefile.am: Add makedepend.
1393 * Makefile.in, aclocal.m4: Regenerate.
1394 * charset.c: Insert a space to avoid a warning.
1395 * directives.c: Include mkdeps.h.
1396 (_cpp_handle_directive): Reenable macro expander if appropriate.
1397 (undefine_macros): Inline body of _cpp_free_definition for speed.
1398 Do not call undef callback or _cpp_warn_if_unused_macro.
1399 (cpp_get_deps): New interface.
1400 * files.c (search_cache): Add pfile argument. Check for file
1401 that would be found by "" or <> search here...
1402 (_cpp_find_file): ...not here. Correct recorded start_dir of
1403 files found by directory-of-current-file search that would be
1404 found by "" or <> search.
1405 * init.c (cpp_add_dependency_target): Delete.
1406 * internal.h (struct lexer_state): Add discarding_output flag.
1407 * lex.c (lex_identifier): Compute hash function while scanning.
1408 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1409 directives.
1410 * makedepend.c: New file.
1411 * mkdeps.c (struct deps): Add vpath vector.
1412 (apply_vpath, deps_add_vpath): New function.
1413 (deps_free): Free vpath vector.
1414 (deps_add_dep, deps_add_target): Use apply_vpath.
1415 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1416 (ht_lookup_with_hash): New function.
1417 * cpplib.h, mkdeps.h: Update prototypes.
1418 * symtab.h: Update prototypes.
1419 (HT_HASHSTEP, HT_FINISH): New macros.
1420
b453c95f
GK
14212004-05-29 Geoffrey Keating <geoffk@apple.com>
1422
1423 * symtab.c (ht_create): Set entries_owned.
1424 (ht_destroy): Honour entries_owned.
1425 (ht_expand): Likewise.
1426 (ht_load): New.
2cf22451
ZW
1427 * include/symtab.h (struct ht): New field 'entries_owned'
1428 (ht_load): New prototype.
b453c95f 1429
963e23c5
PB
14302004-05-26 Paolo Bonzini <bonzini@gnu.org>
1431
1432 PR bootstrap/15651
1433 * configure.ac: Fix m4 quoting when picking
1434 the size of HOST_WIDE_INT.
1435 * configure: Regenerate.
1436
0429bc77
PB
14372004-05-25 Paolo Bonzini <bonzini@gnu.org>
1438
1439 * Makefile.am: the correct directory for
1440 gettext include files is given by @INCINTL@.
1441 * Makefile.in: Regenerate.
1442
c86dd7db
PB
14432004-05-24 Paolo Bonzini <bonzini@gnu.org>
1444
1445 * system.h [!ENABLE_NLS]: dgettext takes two
1446 parameters.
1447
4f4e53dd
PB
14482004-05-23 Paolo Bonzini <bonzini@gnu.org>
1449
1450 Moved libcpp from the gcc subdirectory to the toplevel.
1451 * Makefile.am: New file.
1452 * Makefile.in: Regenerate.
1453 * configure.ac: New file.
1454 * configure: Regenerate.
1455 * config.in: Regenerate.
1456 * charset.c: Moved from gcc/cppcharset.c. Add note about
1457 brokenness of input charset detection. Adjust for change
1458 in name of cppucnid.h.
1459 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
1460 * expr.c: Moved from gcc/cppexp.c.
1461 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
1462 Remove #define of O_BINARY, it is in system.h.
1463 * identifiers.c: Moved from gcc/cpphash.c.
1464 * internal.h: Moved from gcc/cpphash.h. Change header
1465 guard name. All other files adjusted to match name change.
1466 * init.c: Moved from gcc/cppinit.c.
1467 (init_library) [ENABLE_NLS]: Call bindtextdomain.
1468 * lex.c: Moved from gcc/cpplex.c.
1469 * directives.c: Moved from gcc/cpplib.c.
1470 * macro.c: Moved from gcc/cppmacro.c.
1471 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
1472 * traditional.c: Moved from gcc/cpptrad.c.
1473 * ucnid.h: Moved from gcc/cppucnid.h. Change header
1474 guard name.
1475 * ucnid.pl: Moved from gcc/cppucnid.pl.
1476 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
1477 guard name.
1478 * symtab.c: Moved from gcc/hashtable.c.
1479 * line-map.c: Moved from gcc. Do not include intl.h.
1480 * mkdeps.c: Moved from gcc.
1481 * system.h: New file.
2cf22451
ZW
1482 * include/cpplib.h: Moved from gcc. Change header guard name.
1483 * include/line-map.h: Moved from gcc. Change header guard name.
1484 * include/mkdeps.h: Moved from gcc. Change header guard name.
1485 * include/symtab.h: Moved from gcc/hashtable.h. Change header
1486 guard name.