]> gcc.gnu.org Git - gcc.git/blob - libcpp/ChangeLog
w_prof_single_str_global.c: Mask return value.
[gcc.git] / libcpp / ChangeLog
1 2009-02-13 Richard Guenther <rguenther@suse.de>
2
3 * configure.ac: Enable LFS.
4 * configure: Re-generate.
5 * config.in: Likewise.
6
7 2009-01-05 Ben Elliston <bje@au.ibm.com>
8
9 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
10 (.po.pox): Likewise.
11 (po/$(PACKAGE).pot): Likewise.
12
13 2008-12-10 Alexandre Oliva <aoliva@redhat.com>
14
15 PR target/37033
16 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
17 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
18
19 2008-11-29 Joseph Myers <joseph@codesourcery.com>
20
21 * lex.c (cpp_token_len): Use 6 as default length.
22
23 2008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
24
25 * expr.c (struct op): Add location.
26 (_cpp_parse_expr): Propagate locations throught the stack
27 of expressions.
28 (reduce): Likewise.
29 (check_promotion): Use explicit location in errors.
30
31 2008-10-05 Matthew Gingell <gingell@adacore.com>
32 Arnaud Charlet <charlet@adacore.com>
33
34 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
35 (cpp_get_comments): New function.
36 * internal.h (struct cpp_reader): Add comments field.
37 * init.c (cpp_destroy): Free comments.
38 * lex.c (store_comment, cpp_get_comments): New functions.
39 (comments): New struct.
40 (save_comment): Store comments in comments struct.
41
42 2008-09-18 Simon Baldwin <simonb@google.com>
43
44 * include/cpplib.h (struct cpp_options): Add new boolean flag
45 warn_builtin_macro_redefined.
46 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
47 * (struct builtin_operator): Split out from previous struct builtin,
48 enhance extra const correctness.
49 * (struct builtin_macro): Split out from previous struct builtin, add
50 new always_warn_if_redefined flag, enhance const correctness.
51 * (mark_named_operators): Use struct builtin_operator.
52 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
53 to builtins selectively.
54 * macro.c (warn_of_redefinition): Return false if a builtin macro
55 is not flagged with NODE_WARN.
56
57 2008-07-31 Jakub Jelinek <jakub@redhat.com>
58
59 PR preprocessor/36649
60 * files.c (struct report_missing_guard_data): New type.
61 (report_missing_guard): Put paths into an array instead of printing
62 them right away. Return 1 rather than 0.
63 (report_missing_guard_cmp): New function.
64 (_cpp_report_missing_guards): Sort and print paths gathered by
65 report_missing_guard callback.
66
67 2008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
68
69 PR 28079
70 * directives.c (strtolinenum): Handle overflow.
71 (do_line): Give a warning if line number overflowed.
72 (do_linemarker): Update call to strtolinenum.
73
74 2008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
75
76 * include/line-map.h (linenum_type): New typedef.
77 (struct line_map): Use it.
78 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
79 (SOURCE_COLUMN): Likewise.
80 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
81 source_location values in a variable of type linenum_type.
82 * directives.c (struct if_stack): Use linenum_type.
83 (strtoul_for_line): Rename as strtolinenum.
84 (do_line): Use linenum_type.
85 (do_linemarker): Use linenum_type and strtolinenum.
86 (_cpp_do_file_change): Use linenum_t.
87 * line-map.c (linemap_add): Likewise.
88 (linemap_line_start): Likewise.
89 * traditional.c (struct fun_macro): 'line' is a source_location.
90 * errors.c (print_location): Use linenum_type.
91 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
92 * internal.h (CPP_INCREMENT_LINE): Likewise.
93 * lex.c (_cpp_skip_block_comment): Use source_location.
94
95 2008-07-14 Ben Elliston <bje@au.ibm.com>
96
97 * include/cpplib.h (NODE_CONDITIONAL): New.
98 (struct cpp_callbacks): New macro_to_expand field.
99 (struct cpp_hashnode): Adjust size of flags and type fields.
100 (cpp_peek_token): Prototype.
101 * lex.c (cpp_peek_token): New function.
102 (_cpp_temp_token): Protect pre-existing lookaheads.
103 * macro.c (cpp_get_token): Expand any conditional macros.
104 (_cpp_backup_tokens_direct): New.
105 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
106 (warn_of_redefinition): Silently allow redefined conditional
107 macros.
108 (_cpp_create_definition): Remove the conditional flag when a user
109 defines one of the conditional macros.
110 * internal.h (_cpp_backup_tokens_direct): New prototype.
111
112 2008-06-13 Andrew Haley <aph@redhat.com>
113
114 PR preprocessor/33305
115 * macro.c (replace_args): Print a warning for empty macro
116 arguments in C89 and C++.
117
118 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
119
120 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
121 * configure: Regenerate.
122
123 2008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
124
125 * Makefile.in (datarootdir): New variable.
126
127 2008-06-12 H.J. Lu <hongjiu.lu@intel.com>
128
129 PR preprocessor/36479
130 * charset.c (cpp_interpret_string_notranslate): Also set
131 narrow_cset_desc.width.
132
133 2008-06-07 Joseph Myers <joseph@codesourcery.com>
134
135 * configure.ac (parisc*64*-*-*): Remove.
136 * configure: Regenerate.
137
138 2008-05-30 Tom Tromey <tromey@redhat.com>
139
140 PR preprocessor/36320:
141 * internal.h (_cpp_parse_expr): Update.
142 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
143 messages.
144 * directives.c (do_if): Update.
145 (do_elif): Require expression if processing group.
146
147 2008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
148
149 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
150
151 2008-05-21 Tom Tromey <tromey@redhat.com>
152
153 PR preprocessor/27777:
154 * lex.c (cpp_output_line_to_string): New function.
155 * internal.h (_cpp_begin_message): Don't declare.
156 * errors.c (_cpp_begin_message): Now static.
157 * include/cpplib.h (cpp_output_line_to_string): Declare.
158 * directives.c (do_diagnostic): Rewrote. Use
159 cpp_output_line_to_string. Don't use _cpp_begin_message.
160
161 2008-05-21 Tom Tromey <tromey@redhat.com>
162
163 * include/symtab.h (HT_ALLOCED): Remove.
164 (ht_purge): Declare.
165 * symtab.c (DELETED): New define.
166 (ht_lookup): Update comment.
167 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
168 code. Use subobject allocator for strings, if it exists.
169 (ht_expand): Handle deleted entries.
170 (ht_forall): Likewise.
171 (ht_purge): New function.
172 (ht_dump_statistics): Print deletion statistics.
173
174 2008-05-13 Tom Tromey <tromey@redhat.com>
175
176 PR preprocessor/22168:
177 * include/cpplib.h (struct cpp_options) <objc>: Update
178 documentation.
179 * expr.c (eval_token): Warn for use of assertions.
180 * directives.c (directive_diagnostics): Warn about extensions.
181 (DEPRECATED): New define.
182 (DIRECTIVE_TABLE): Use it.
183
184 2008-05-06 Tom Tromey <tromey@redhat.com>
185
186 PR preprocessor/35313, PR preprocessor/36088:
187 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
188 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
189
190 2008-05-04 David S. Miller <davem@davemloft.net>
191
192 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
193 * configure: Regenerate.
194
195 2008-04-22 Daniel Franke <franke.daniel@gmail.com>
196
197 * include/cpplib.h (cpp_define_formatted): New.
198 * directives.c (cpp_define_formatted): New.
199
200 2008-04-21 Tom Tromey <tromey@redhat.com>
201
202 PR libcpp/33415:
203 * charset.c (_cpp_convert_input): Add buffer_start argument.
204 Ignore UTF-8 BOM if seen.
205 * internal.h (_cpp_convert_input): Add argument.
206 * files.c (struct _cpp_file) <buffer_start>: New field.
207 (destroy_cpp_file): Free buffer_start, not buffer.
208 (_cpp_pop_file_buffer): Likewise.
209 (read_file_guts): Update.
210
211 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
212
213 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
214 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
215 (struct cpp_options): Added uliterals.
216 (cpp_interpret_string): Update prototype.
217 (cpp_interpret_string_notranslate): Idem.
218 * charset.c (init_iconv_desc): New width member in cset_converter.
219 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
220 (convert_ucn): Idem.
221 (emit_numeric_escape): Idem.
222 (convert_hex): Idem.
223 (convert_oct): Idem.
224 (convert_escape): Idem.
225 (converter_for_type): New function.
226 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
227 (cpp_interpret_string_notranslate): Match changed prototype.
228 (wide_str_to_charconst): Use converter_for_type.
229 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
230 * directives.c (linemarker_dir): Macro U changed to UC.
231 (parse_include): Idem.
232 (register_pragma_1): Idem.
233 (restore_registered_pragmas): Idem.
234 (get__Pragma_string): Support CPP_STRING{16,32}.
235 * expr.c (eval_token): Support CPP_CHAR{16,32}.
236 * init.c (struct lang_flags): Added uliterals.
237 (lang_defaults): Idem.
238 * internal.h (struct cset_converter) <width>: New field.
239 (struct cpp_reader) <char16_cset_desc>: Idem.
240 (struct cpp_reader) <char32_cset_desc>: Idem.
241 * lex.c (digraph_spellings): Macro U changed to UC.
242 (OP, TK): Idem.
243 (lex_string): Add support for u'...', U'...', u"..." and U"...".
244 (_cpp_lex_direct): Idem.
245 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
246 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
247
248 2008-04-18 Paolo Bonzini <bonzini@gnu.org>
249
250 PR bootstrap/35457
251 * aclocal.m4: Regenerate.
252 * configure: Regenerate.
253
254 2008-04-17 Tom Tromey <tromey@redhat.com>
255
256 PR libcpp/34866:
257 * errors.c (cpp_error): Don't reference a token before the start
258 of the current run.
259
260 2008-04-16 Tom Tromey <tromey@redhat.com>
261
262 * Makefile.in (TAGS_SOURCES): New variable.
263 (TAGS): New target.
264
265 2008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
266
267 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
268 and shbe-*-*.
269 * configure: Rebuilt.
270
271 2008-04-02 Joseph Myers <joseph@codesourcery.com>
272
273 * include/cpplib.h (struct cpp_callbacks): Add used_define,
274 used_undef and before_define.
275 (NODE_USED): Define.
276 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
277 do_ifndef, cpp_pop_definition): Handle new flag and use new
278 callbacks.
279 * expr.c (parse_defined): Handle new flag and use new callbacks.
280 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
281 flag and use new callbacks.
282
283 2008-04-01 Jakub Jelinek <jakub@redhat.com>
284
285 PR pch/13675
286 * files.c (struct _cpp_file): Remove pch field.
287 (pch_open_file): Don't set file->pch, just file->pchname.
288 (should_stack_file): After pfile->cb.read_pch call
289 free pchname and clear pchname, don't close file->fd.
290 Test file->pchname instead of file->pch. Don't close fd after cb.
291 (_cpp_stack_include): Test file->pchname instead of file->pch.
292
293 2008-03-28 Tom Tromey <tromey@redhat.com>
294
295 * Makefile.in (POSTCOMPILE): New variable.
296 (.c.o): Use it.
297
298 2008-03-13 Tom Tromey <tromey@redhat.com>
299
300 PR libcpp/35322:
301 * directives.c (destringize_and_run): Set pfile->directive.
302
303 2008-03-06 Markus Milleder <markus.milleder@generali.at>
304
305 PR preprocessor/35458
306 * mkdeps.c (munge): Quote '#' with a '\'.
307
308 2008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
309
310 PR preprocessor/35379
311 * mkdeps.c (deps_write): Ensure the first target always appears
312 in the first column, without leading backslash newline. Avoid
313 some more extra whitespace.
314
315 2008-02-25 Thiemo Seufer <ths@mips.com>
316
317 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
318
319 2008-02-19 Tom Tromey <tromey@redhat.com>
320
321 * traditional.c (lex_identifier): Use CPP_HASHNODE.
322 * lex.c (lex_identifier): Use CPP_HASHNODE.
323 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
324 do-while.
325 * identifiers.c (alloc_node): Change return type.
326 (_cpp_init_hashtable): Don't cast 'alloc_node'.
327 (proxy_assertion_broken): New declaration.
328 (cpp_forall_identifiers): Move comment.
329 * line-map.c (linemap_add): Comment fix.
330 (linemap_line_start): Indentation fix.
331
332 2008-01-25 Jakub Jelinek <jakub@redhat.com>
333
334 PR preprocessor/34692
335 * macro.c (collect_args): Add pragma_buff argument. Push
336 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
337 than into arguments. Reset prevent_expansion and parsing_args
338 state at CPP_PRAGMA_EOL/CPP_EOF.
339 (funlike_invocation_p): Add pragma_buff argument, pass it through
340 to collect_args.
341 (enter_macro_context): Add result argument. Adjust
342 funlike_invocation_p caller. Emit all deferred pragma tokens
343 gathered during collect_args before the expansion, add a padding
344 token. Return 2 instead of 1 if any pragma tokens were prepended.
345 (cpp_get_token): If enter_macro_context returns 2, don't return
346 a padding token, instead cycle to grab CPP_PRAGMA token.
347 * directives.c (_cpp_handle_directive): If was_parsing_args
348 in deferred pragma, leave parsing_args and prevent_expansion as is.
349
350 2008-01-22 Tom Tromey <tromey@redhat.com>
351
352 PR c++/34859
353 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
354 __STDC_CONSTANT_MACROS.
355
356 2008-01-07 Fred Fish <fnf@specifix.com>
357
358 PR preprocessor/30363
359 * traditional.c (replace_args_and_push): Add local variable
360 cxtquote, calculate the replacement text size assuming a
361 worst case of every input character quoted with backslash,
362 and properly handle output quoting of quote characters in
363 actual arguments used in function-like macros.
364
365 2008-01-03 Tom Tromey <tromey@redhat.com>
366
367 PR preprocessor/34602
368 * directives.c (do_line): Don't try to spell EOF token.
369 (do_linemarker): Add comment.
370
371 2007-12-11 DJ Delorie <dj@redhat.com>
372
373 * charset.c (convert_using_iconv): Close out any shift states,
374 returning to the initial state.
375
376 2007-12-06 Tom Tromey <tromey@redhat.com>
377
378 PR c/29172
379 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
380 type.
381 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
382 * files.c (FILE_HASH_POOL_SIZE): New macro.
383 (struct file_hash_entry_pool): New.
384 (destroy_all_cpp_files): New function.
385 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
386 (new_file_hash_entry): Update.
387 (free_file_hash_entries): New function.
388 (_cpp_cleanup_files): Call free_file_hash_entries and
389 destroy_all_cpp_files.
390 (cpp_clear_file_cache): New function.
391 * include/cpplib.h (cpp_clear_file_cache): Declare.
392
393 2007-12-03 Tom Tromey <tromey@redhat.com>
394
395 PR preprocessor/34288
396 * configure.ac, config.in: Rebuilt.
397 * configure.ac: Check for ssize_t.
398
399 2007-11-30 Tom Tromey <tromey@redhat.com>
400
401 PR preprocessor/32868
402 * macro.c (_cpp_create_definition): Special case
403 __STDC_FORMAT_MACROS.
404
405 2007-11-16 Michael Matz <matz@suse.de>
406
407 * files.c (search_path_head): Fix check for absolute paths.
408
409 2007-11-11 Tom Tromey <tromey@redhat.com>
410
411 PR c++/17557
412 * include/cpplib.h (cpp_included_before): Declare.
413 * files.c (struct file_hash_entry) <location>: New field.
414 (_cpp_find_file): Initialize new field.
415 (make_cpp_dir): Likewise.
416 (cpp_included_before): New function.
417
418 2007-11-01 Tom Tromey <tromey@redhat.com>
419
420 PR preprocessor/30805
421 * macro.c (paste_tokens): Handle padding token.
422 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
423
424 2007-10-31 Tom Tromey <tromey@redhat.com>
425
426 PR preprocessor/30786
427 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
428 * directives.c (_cpp_do__Pragma): Return error status.
429 * internal.h (_cpp_do__Pragma): Update.
430 * directives.c (get__Pragma_string): Back up if EOF seen.
431
432 2007-09-06 Tom Tromey <tromey@redhat.com>
433
434 * internal.h (struct cpp_reader) <invocation_location>: New
435 field.
436 (struct cpp_reader) <set_invocation_location>: Likewise.
437 * init.c (cpp_set_line_map): New function.
438 * line-map.c (linemap_add): Use linemap's allocator.
439 * include/line-map.h (GTY): Define.
440 (line_map_realloc): New typedef.
441 (struct line_map): Mark with GTY.
442 (struct line_maps): Likewise.
443 (struct line_maps) <maps>: Likewise.
444 (struct line_maps) <reallocator>: New field.
445 * include/symtab.h (GTY): Conditionally define.
446 * include/cpplib.h (cpp_set_line_map): Declare.
447 (cpp_get_token_with_location): Declare.
448 * macro.c (cpp_get_token): Set invocation_location on the reader.
449 (cpp_get_token_with_location): New function.
450
451 2007-08-30 Chao-ying Fu <fu@mips.com>
452
453 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
454 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
455 (cpp_classify_number): Support decimal fixed-point constants without
456 exponents.
457 Warn about fixed-point constants when -pedantic.
458 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
459 comments to support fixed-point values.
460 (CPP_N_FRACT, CPP_N_ACCUM): Define.
461
462 2007-08-18 Tom Tromey <tromey@redhat.com>
463
464 PR preprocessor/32974
465 * directives.c (parse_include): Don't check for EOL when
466 processing #pragma dependency.
467
468 2007-07-30 Ollie Wild <aaw@google.com>
469
470 * directives-only.c: New file.
471 * internal.h (struct _cpp_dir_only_callbacks): New.
472 (_cpp_preprocess_dir_only): New function.
473 * directives.c (_cpp_handle_directive): Check directives_only before
474 disabling execution of indented directives.
475 * files.c (_cpp_stack_file): Add directives_only check.
476 * include/cpplib.h (struct cpp_options): Add directives_only.
477 (cpp_init_special_builtins): New function.
478 * init.c (cpp_init_special_builtins): New function.
479 (cpp_init_builtins): Move builtin_array initialization to
480 cpp_init_special_builtins.
481 (post_options): Check directives_only before setting
482 pfile->state.prevent_expansion = 1.
483 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
484 is expanded inside a directive while -fdirectives-only is enabled.
485 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
486 (libcpp_a_SOURCES): Add directives-only.c.
487
488 2007-07-04 Uros Bizjak <ubizjak@gmail.com>
489
490 * traditional.c (_cpp_scan_out_logical_line): Initialize
491 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
492 fmacro.args to prevent 'may be used uninitialized' warning.
493
494 2007-07-03 Uros Bizjak <ubizjak@gmail.com>
495
496 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
497 Add new constants.
498 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
499 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
500 for 'q' or 'Q' suffixes.
501
502 2007-06-17 Danny Smith <dannysmith@users.sourceforge.net
503
504 * files.c (open_file): Correct typo.
505
506 2007-06-16 Vladimir Prus <vladimir@codesourcery.com>
507
508 * files.c (open_file): Prevent the call
509 for stat from overwriting errno.
510
511 2007-06-09 Vladimir Prus <vladimir@codesourcery.com>
512
513 * files.c (open_file): Account for the
514 fact that on windows, opening a directory gives
515 EACCES.
516
517 2007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
518
519 PR preprocessor/23479
520 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
521 integer constants.
522 (append_digit): Likewise.
523 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
524 binary integer constants.
525
526 2007-05-31 Dave Korn <dave.korn@artimi.com>
527
528 PR preprocessor/14331
529 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
530
531 2007-05-24 Ollie Wild <aaw@google.com>
532
533 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
534 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
535 (cpp_write_pch_state): Save __COUNTER__ state.
536 (cpp_valid_state): Check valid __COUNTER__ state.
537 (cpp_read_state): Read new __COUNTER__ state.
538 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
539 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
540 * internal.h (struct cpp_reader): Add counter member.
541
542 2007-05-23 Simon Martin <simartin@users.sourceforge.net>
543
544 PR preprocessor/20077
545 * macro.c (create_iso_definition): Fixed the method to determine
546 whether the token-pasting operator appears at the beginning or the end
547 of a macro.
548
549 2007-05-21 Ian Lance Taylor <iant@google.com>
550
551 * internal.h (struct cpp_reader): Add new fields:
552 nonexistent_file_hash and nonexistent_file_ob.
553 * files.c: Include "obstack.h".
554 (find_file_in_dir): Before trying to open the file, look up the
555 path name in the hash table of nonexistent files. After failing
556 to open the file, add the path name to the hash table.
557 (_cpp_find_file): Cache the results of looking up the file name
558 starting with the quote and bracket chain heads, if we can.
559 (nonexistent_file_hash_eq): New static function.
560 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
561 pfile->nonexistent_file_ob.
562 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
563 pfile->nonexistent_file_ob.
564
565 2007-05-14 Janis Johnson <janis187@us.ibm.com>
566
567 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
568
569 PR c/31924
570 * expr.c (interpret_float_suffix): Check for invalid suffix.
571
572 2007-05-02 Eric Christopher <echristo@apple.com>
573
574 * expr.c (num_div_op): Don't overflow if the result is
575 zero.
576
577 2007-05-02 Tom Tromey <tromey@redhat.com>
578
579 PR preprocessor/28709
580 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
581
582 2007-03-30 Michael Meissner <michael.meissner@amd.com>
583
584 * directives.c (lex_macro_node_from_str): Fix alloca call to be
585 type correct.
586
587 2007-03-30 Richard Henderson <rth@redhat.com>
588
589 * directives.c (lex_macro_node_from_str): New.
590 (cpp_push_definition, cpp_pop_definition): New.
591 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
592
593 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
594
595 * Makefile.in: Add dummy install-pdf target.
596
597 2007-01-30 Tom Tromey <tromey@redhat.com>
598
599 PR preprocessor/30468
600 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
601 './'.
602
603 2007-01-30 Tom Tromey <tromey@redhat.com>
604
605 PR preprocessor/29966
606 * macro.c (lex_expansion_token): Save and restore cpp_reader's
607 cur_token.
608 (_cpp_create_definition): Don't restore cur_token here.
609 * lex.c (_cpp_lex_token): Added assertion.
610
611 2007-01-27 Tom Tromey <tromey@redhat.com>
612
613 * configure: Rebuilt.
614
615 2007-01-12 Tom Tromey <tromey@redhat.com>
616
617 PR preprocessor/28227
618 * directives.c (lex_macro_node): Added 'is_def_or_undef'
619 argument.
620 (do_define): Update.
621 (do_undef): Update.
622 (do_ifdef): Update.
623 (do_ifndef): Update.
624
625 2007-01-11 Paolo Bonzini <bonzini@gnu.org>
626
627 * configure: Regenerate.
628
629 2007-01-11 Paolo Bonzini <bonzini@gnu.org>
630
631 * configure: Regenerate.
632
633 2007-01-04 Tom Tromey <tromey@redhat.com>
634
635 PR preprocessor/28165
636 * internal.h (cpp_in_primary_file): New function.
637 * directives.c (do_include_next): Use cpp_in_primary_file.
638 (do_pragma_once): Likewise.
639 (do_pragma_system_header): Likewise.
640
641 2006-12-29 Ian Lance Taylor <iant@google.com>
642
643 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
644 look backward at the end of the line unless we saw a backslash.
645
646 2006-12-29 Jakub Jelinek <jakub@redhat.com>
647
648 PR preprocessor/29612
649 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
650 only when new_sysp is non-zero.
651
652 2006-12-28 Tom Tromey <tromey@redhat.com>
653
654 PR preprocessor/30001
655 * charset.c (_cpp_convert_input): Check that to.len is greater
656 than zero.
657
658 2006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
659
660 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
661 * configure: Rebuilt.
662
663 2006-11-01 Douglas Gregor <doug.gregor@gmail.com>
664
665 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
666 for experimental C++0x mode.
667 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
668 adopted the preprocessor changes introduced in C99.
669
670 2006-10-29 Joseph Myers <joseph@codesourcery.com>
671
672 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
673 depending on --enable-targets=all.
674 * configure: Regenerate.
675
676 2006-10-12 Jakub Jelinek <jakub@redhat.com>
677
678 PR preprocessor/28709
679 * macro.c (paste_tokens): Do error reporting here, use BUF with the
680 spelled LHS token as opposed to spelling it again.
681 (paste_all_tokens): Don't report errors here, just break on failure.
682
683 2006-10-10 Brooks Moses <bmoses@stanford.edu>
684
685 * Makefile.in: Added empty "pdf" target.
686
687 2006-09-22 Geoffrey Keating <geoffk@apple.com>
688
689 * configure.ac: Make need_64_bit_hwint case for x86-darwin
690 match exactly the glob in gcc/config.gcc.
691 * configure: Regenerate.
692
693 2006-09-13 Joseph S. Myers <joseph@codesourcery.com>
694
695 PR c/28768
696 PR preprocessor/14634
697 * lex.c (lex_string): Pedwarn for unterminated literals.
698
699 2006-09-08 Eric Christopher <echristo@apple.com>
700
701 * configure.ac: Add 64-bit HWI support for i?86-darwin.
702
703 2006-08-14 Steve Ellcey <sje@cup.hp.com>
704
705 PR c++/28288
706 PR c++/14556
707 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
708 (CPP_LAST_EQ): Change.
709 (CPP_LAST_PUNCTUATOR): Change.
710 * expr.c (cpp_operator): Remove MIN and MAX.
711 (reduce): Remove CPP_MIN and CPP_MAX.
712 (num_binary_op): Ditto.
713 * lex.c (_cpp_lex_direct): Ditto.
714 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
715
716 2006-06-09 Jakub Jelinek <jakub@redhat.com>
717
718 PR preprocessor/27746
719 * directives.c (do_pragma): Handle pragma with valid namespace
720 and invalid name coming from macro expansion.
721 * directives.c (destringize_and_run): Initialize next field in
722 context.
723
724 PR c/27747
725 PR c++/27748
726 * directives.c (destringize_and_run): Set NO_EXPAND on the
727 tokens.
728
729 * macro.c (_cpp_backup_tokens): Fix comment typo.
730
731 2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
732
733 * Makefile.in (CATALOGS): Add po/ prefix.
734 * configure: Regenerated.
735
736 2006-05-23 Carlos O'Donell <carlos@codesourcery.com>
737
738 * Makefile.in: Add install-html target. Add install-html to .PHONY
739
740 2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
741
742 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
743 * files.c (_cpp_get_file_stat): New function.
744 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
745 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
746 * internal.h (_cpp_get_file_stat): Prototype.
747 (struct cpp_buffer): Add timestamp.
748
749 2006-01-23 Jakub Jelinek <jakub@redhat.com>
750
751 PR preprocessor/25717
752 * init.c (cpp_init_builtins): If __STDC__ will not change value
753 between system headers and other sources, define it as a normal
754 macro rather than a builtin.
755 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
756 cpp_in_system_header condition.
757
758 2006-01-05 Paolo Bonzini <bonzini@gnu.org>
759
760 * Makefile.in: Use -MMD instead of -MD.
761
762 2006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
763 Richard Henderson <rth@redhat.com>
764
765 Merge from gomp branch:
766 * directives.c (struct pragma_entry): Add is_deferred. Add ident
767 entry to value union.
768 (end_directive): Don't eat the line if in_deferred_pragma.
769 (run_directive): Remove pragma hacks.
770 (insert_pragma_entry): Remove.
771 (new_pragma_entry): New.
772 (register_pragma_1): Split out of register_pragma. Only handle
773 the lookup tree and return the new entry.
774 (cpp_register_pragma): Fill in the pragma entry here.
775 (cpp_register_deferred_pragma): New.
776 (register_pragma_internal): New.
777 (_cpp_init_internal_pragmas): Use register_pragma_internal.
778 (do_pragma): Allow pragma expansion after namespace. For deferred
779 pragmas, don't slurp the line into a string.
780 (destringize_and_run): Save tokens for deferred pragmas.
781 (cpp_handle_deferred_pragma): Remove.
782 * macro.c (builtin_macro): Remove pragma token hack.
783 (_cpp_push_token_context): Rename from push_token_context and export.
784 * internal.h (struct lexer_state): Add pragma_allow_expansion.
785 (_cpp_push_token_context): Declare.
786 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
787 a token. Update the line number correctly if so.
788 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
789 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
790 * include/cpplib.h (PRAGMA_EOL): New.
791 (CPP_TOKEN_FLD_PRAGMA): New.
792 (struct cpp_token): Add val.pragma.
793 (struct cpp_options): Remove defer_pragmas.
794 (cpp_handle_deferred_pragma): Remove.
795 (cpp_register_deferred_pragma): Declare.
796
797 2006-01-01 Jakub Jelinek <jakub@redhat.com>
798
799 PR c++/25294
800 * directives.c (do_pragma): If pragma line ends with multi-line
801 block comment, end the saved deferred pragma string before that
802 comment. Handle embedded '\0' chars on the pragma line.
803
804 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
805
806 PR c++/23333
807 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
808
809 2005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
810 Ben Elliston <bje@au.ibm.com>
811
812 * include/cpplib.h (CPP_N_DFLOAT): New.
813 * expr.c (interpret_float_suffix): Identify df, dd, and dl
814 suffixes as decimal floating point constants.
815 (cpp_classify_number): Disallow hexadecimal DFP constants.
816
817 2005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
818 Ian Lance Taylor <ian@airs.com>
819
820 * include/cpplib.h (struct cpp_callbacks): Annotate error with
821 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
822
823 2005-11-09 Per Bothner <per@bothner.com>
824 Uros Bizjak <uros@kss-loka.si>
825
826 PR c/24101
827 * init.c (read_original_filename): Temporarily set
828 state.in_directive before calling _cpp_lex_direct for
829 CPP_HASH tokens.
830
831 2005-11-03 James E Wilson <wilson@specifix.com>
832
833 PR preprocessor/24202
834 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
835
836 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
837
838 * include/cpplib.h (struct cpp_callbacks): Make error take
839 va_list* parameter.
840 * errors.c (cpp_error): Update call to callback.
841
842 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
843
844 PR preprocessor/22042
845 * macro.c (_cpp_builtin_macro_text): Lower the needed max
846 buffer size.
847 (cpp_quote_string): Don't octalify non printable
848 charactors.
849
850 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
851
852 PR c++/17964
853 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
854 (struct cpp_callbacks): Add error.
855 * errors.c (cpp_error): If client_diagnostic, use error callback.
856 * charset.c (convert_escape): Don't use %03o in diagnostic.
857
858 2005-10-21 James E Wilson <wilson@specifix.com>
859
860 PR preprocessor/15220
861 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
862 callers. Pass to open_file_failed.
863 (open_file_failed): New parameter angle_brackets. Fix all callers.
864 Use in print_dep assignment.
865 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
866 * internal.h (_cpp_find_file): Add new parm to declaration.
867
868 2005-10-08 Kazu Hirata <kazu@codesourcery.com>
869
870 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
871 * configure: Regenerate.
872
873 2005-10-04 Ian Lance Taylor <ian@airs.com>
874
875 PR preprocessor/13726
876 * directives.c (check_eol_return_comments): New static function.
877 (parse_include): Add buf parameter. Change all callers.
878 (do_include_common): If not discard comments, turn on
879 save_comments. Pass collected comments to include callback.
880 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
881 include callback: cpp_token list.
882
883 2005-09-20 Joseph S. Myers <joseph@codesourcery.com>
884
885 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
886 * init.c (struct lang_flags, lang_defaults): Add
887 extended_identifiers.
888 (cpp_set_lang): Use it.
889 * lex.c (forms_identifier_p): Check extended_identifiers.
890
891 2005-08-30 Jakub Jelinek <jakub@redhat.com>
892
893 PR preprocessor/20348
894 PR preprocessor/20356
895 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
896 2004-06-05 changes.
897
898 2005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
899
900 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
901 -Wmissing-format-attribute.
902
903 * configure: Regenerate.
904
905 2005-06-29 Kelley Cook <kcook@gcc.gnu.org>
906
907 * all files: Update FSF address in copyright headers.
908 * makeucnid.c (write_copyright): Update outputted FSF address.
909
910 2005-06-13 Zack Weinberg <zack@codesourcery.com>
911
912 * configure.ac: Invoke ZW_CREATE_DEPDIR and
913 ZW_PROG_COMPILER_DEPENDENCIES.
914 * aclocal.m4, configure: Regenerate.
915 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
916 New variables.
917 (distclean): Clean up $(DEPDIR) and its contents.
918 (.c.o): Use $(COMPILE).
919 Include $(DEPDIR)/*.Po for most object->header dependencies.
920
921 2005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
922
923 * configure.ac: Check declarations for asprintf and vasprintf.
924 * config.in: Regenerate.
925 * configure: Likewise.
926
927 * charset.c (conversion_loop): Use XRESIZEVEC.
928 (convert_no_conversion): Likewise.
929 (convert_using_iconv): Likewise.
930 (init_iconv_desc): Cast return value of alloca.
931 (cpp_host_to_exec_charset): Use XNEWVEC.
932 (emit_numeric_escape): Use XRESIZEVEC.
933 (cpp_interpret_string): Use XNEWVEC.
934 (cpp_interpret_string): Use XRESIZEVEC.
935 (_cpp_interpret_identifier): Cast return value of alloca.
936 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
937 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
938 (parse_include): Use XNEWVEC.
939 (insert_pragma_entry): Rename local variable "new" to
940 "new_entry".
941 (save_registered_pragmas): Cast return value of xmemdup.
942 (destringize_and_run): Same for alloca.
943 (parse_assertion): Likewise.
944 (do_assert): Cast allocated storage to proper type.
945 (cpp_define): Likewise.
946 (_cpp_define_builtin): Likewise.
947 (cpp_undef): Likewise.
948 (handle_assertion): Likewise.
949 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
950 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
951 (CPP_UMINUS): Likewise.
952 (struct cpp_operator): Rename from struct operator.
953 (_cpp_expand_op_stack): Use XRESIZEVEC.
954 * files.c (pch_open_file): Use XNEWVEC.
955 (pch_open_file): Use XRESIZEVEC.
956 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
957 (dir_name_of_file): Use XNEWVEC.
958 (make_cpp_file): Use XCNEW.
959 (make_cpp_dir): Likewise.
960 (allocate_file_hash_entries): USE XNEWVEC.
961 (cpp_included): Cast return value of htab_find_with_hash.
962 (append_file_to_dir): Use XNEWVEC.
963 (read_filename_string): Likewise. Use XRESIZEVEC too.
964 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
965 (remap_filename): Use XNEWVEC.
966 (struct pchf_entry): Move definition out of struct pchf_data.
967 (_cpp_save_file_entries): Use XCNEWVAR.
968 (_cpp_read_file_entries): Use XNEWVAR.
969 * identifiers.c (alloc_node): Use XOBNEW.
970 * init.c (cpp_create_reader): Use XCNEW.
971 (cpp_init_builtins): Cast of b->value to enum builtin_type.
972 (read_original_directory): Cast return value of alloca.
973 * lex.c (add_line_note): Use XRESIZEVEC.
974 (warn_about_normalization): Use XNEWVEC.
975 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
976 (new_buff): Use XNEWVEC.
977 * line-map.c (linemap_add): Use XRESIZEVEC.
978 * macro.c (builtin_macro): Cast return value of alloca.
979 (paste_tokens): Likewise.
980 (expand_arg): Use XNEWVEC and XRESIZEVEC.
981 (_cpp_save_parameter): Use XRESIZEVEC.
982 (create_iso_definition): Cast allocated storage to proper type.
983 (_cpp_create_definition): Likewise.
984 (cpp_macro_definition): Use XRESIZEVEC.
985 * makedepend.c (add_clm): Use XNEW.
986 (add_dir): Likewise.
987 * mkdeps.c (munge): Use XNEWVEC.
988 (deps_init): Use XCNEW.
989 (deps_add_target): Use XRESIZEVEC.
990 (deps_add_default_target): Cast return value of alloca.
991 (deps_add_dep): Use XRESIZEVEC.
992 (deps_add_vpath): Likewise. Use XNEWVEC too.
993 (deps_restore): Likewise.
994 * pch.c (save_idents): Use XNEW and XNEWVEC.
995 (cpp_save_state): Use XNEW.
996 (count_defs): Cast return value of htab_find.
997 (write_defs): Likewise.
998 (cpp_write_pch_deps): Use XNEWVEC.
999 (collect_ht_nodes): Use XRESIZEVEC.
1000 (cpp_valid_state): Use XNEWVEC.
1001 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
1002 * symtab.c (ht_create): Use XCNEW.
1003 (ht_lookup_with_hash): Cast return value of obstack_copy0.
1004 (ht_expand): Use XCNEWVEC.
1005 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
1006 (bool): Do not define if __cplusplus.
1007
1008 2005-05-12 Zack Weinberg <zack@codesourcery.com>
1009
1010 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
1011 (do_sccs): Delete function definition, #define to do_ident.
1012 (do_ident): Don't hardwire directive name.
1013
1014 2005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
1015
1016 PR bootstrap/21230
1017 * configure: Regenerate.
1018
1019 2005-04-27 Andris Pavenis <pavenis@latnet.lv>
1020
1021 * files.c: Include io.h for DJGPP to get prototype of setmode.
1022
1023 2005-04-19 Per Bothner <per@bothner.com>
1024
1025 PR preprocessor/20907
1026 * line-map.c (linemap_line_start): Fix bug when we need to increse
1027 column_bits but can re-use the current line_map.
1028
1029 2005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1030
1031 * system.h (fopen, fdopen, freopen): Define these to the unlocked
1032 libiberty functions.
1033
1034 2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1035
1036 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
1037 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
1038 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
1039 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
1040 _unlocked function.
1041 (fwrite_unlocked): Fix prototype.
1042
1043 * configure, config.in: Regenerate.
1044
1045 2005-04-05 Jakub Jelinek <jakub@redhat.com>
1046
1047 PR preprocessor/19475
1048 * macro.c (create_iso_definition): For < ISO C99, don't
1049 pedwarn if there is no whitespace between macro name and its
1050 replacement, but the replacement starts with a basic character
1051 set character.
1052
1053 2005-03-28 Andreas Jaeger <aj@suse.de>
1054
1055 * lex.c (warn_about_normalization): Cast field width to int to
1056 avoid warning.
1057
1058 2005-03-19 Joseph S. Myers <joseph@codesourcery.com>
1059
1060 * configure.ac: Consistently use solaris2.1[0-9]* instead of
1061 solaris2.1[0-9].
1062 * configure: Regenerate.
1063
1064 2005-03-15 Geoffrey Keating <geoffk@apple.com>
1065
1066 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
1067 UCN rather than printing an error.
1068
1069 2005-03-14 Geoffrey Keating <geoffk@apple.com>
1070
1071 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
1072
1073 2005-03-14 Geoffrey Keating <geoffk@apple.com>
1074
1075 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
1076 * charset.c: Update for new format of ucnid.h.
1077 (ucn_valid_in_identifier): Update for new format of ucnid.h.
1078 Add NST parameter, and update it; update callers.
1079 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
1080 with cpp_error.
1081 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
1082 * internal.h (struct normalize_state): New.
1083 (INITIAL_NORMALIZE_STATE): New.
1084 (NORMALIZE_STATE_RESULT): New.
1085 (NORMALIZE_STATE_UPDATE_IDNUM): New.
1086 (_cpp_valid_ucn): New.
1087 * lex.c (warn_about_normalization): New.
1088 (forms_identifier_p): Add normalize_state parameter, update callers.
1089 (lex_identifier): Add normalize_state parameter, update callers. Keep
1090 the state current.
1091 (lex_number): Likewise.
1092 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
1093 it with warn_about_normalization.
1094 * makeucnid.c: New.
1095 * ucnid.h: Replace.
1096 * ucnid.pl: Remove.
1097 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
1098 comments about obsolete version of C++.
1099 * include/cpplib.h (enum cpp_normalize_level): New.
1100 (struct cpp_options): Add warn_normalize field.
1101
1102 2005-03-11 Geoffrey Keating <geoffk@apple.com>
1103
1104 * directives.c (glue_header_name): Update call to cpp_spell_token.
1105 * internal.h (_cpp_interpret_identifier): New.
1106 * charset.c (_cpp_interpret_identifier): New.
1107 (_cpp_valid_ucn): Allow UCN version of '$'.
1108 * lex.c (lex_identifier): Add extra parameter to indicate if initial
1109 character was '$' or '\'. Support identifiers with UCNs.
1110 (forms_identifier_p): Allow UCNs.
1111 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
1112 (utf8_to_ucn): New.
1113 (cpp_spell_token): Add FORSTRING parameter. Use it.
1114 (cpp_token_as_text): Update call to cpp_spell_token.
1115 (cpp_output_token): Write UCNs back out.
1116 (stringify_arg): Update call to cpp_spell_token.
1117 (paste_tokens): Likewise.
1118 (cpp_macro_definition): Likewise.
1119 * macro.c (stringify_arg): Likewise.
1120 (paste_tokens): Likewise.
1121 (cpp_macro_definition): Likewise.
1122 * include/cpplib.h: Add parameter to cpp_spell_token.
1123
1124 2005-03-04 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR bootstrap/20282
1127 PR bootstrap/20305
1128 * macro.c (replace_args, cpp_get_token): Copy whole
1129 cpp_token_u instead of just cpp_string field from it.
1130
1131 2005-02-28 Devang Patel <dpatel@apple.com>
1132
1133 * directives.c (do_line): Save sysp early before line table is
1134 realloc'ed.
1135
1136 2005-02-20 Zack Weinberg <zack@codesourcery.com>
1137
1138 PR 18785
1139 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1140 (cpp_host_to_exec_charset): New function.
1141 * include/cpplib.h: Declare cpp_host_to_exec_charset.
1142
1143 2005-02-19 Devang Patel <dpatel@apple.com>
1144
1145 * charset.c (_cpp_convert_input): Check '\r' before inserting
1146 '\n' at the end.
1147
1148 2005-02-15 Eric Christopher <echristo@redhat.com>
1149
1150 PR preprocessor/19077
1151 * macro.c (cpp_macro_definition): Move handling of whitespace
1152 to PREV_WHITE conditional. Remove overloading of len
1153 variable.
1154
1155 2005-02-14 Kazu Hirata <kazu@cs.umass.edu>
1156
1157 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1158 traditional.c: Update copyright.
1159
1160 2005-02-14 Paolo Bonzini <bonzini@gnu.org>
1161
1162 PR bootstrap/19818
1163 * configure.ac: Check for declaration of basename and getopt.
1164 * config.in: Regenerate.
1165 * configure: Regenerate.
1166 * internal.h (ustrcspn): New.
1167 * macro.c (create_iso_definition): Fix allocation of memory.
1168 (padding_token): Add cast to remove const-ness.
1169 * pch.c (cpp_read_state): Use ustrcspn.
1170
1171 2005-02-08 Mike Stump <mrs@apple.com>
1172
1173 * files.c (pchf_adder): Remove.
1174 (struct pchf_adder_info): Likewise.
1175 (_cpp_save_file_entries): Write out all files so that #import works.
1176
1177 2005-01-23 Joseph S. Myers <joseph@codesourcery.com>
1178
1179 * configure: Regenerate.
1180
1181 2005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1182
1183 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1184
1185 * include/cpplib.h: Also update copyright years.
1186
1187 2005-01-03 Geoffrey Keating <geoffk@apple.com>
1188
1189 * files.c (_cpp_find_file): Add files found by search_path_exhausted
1190 to the list of all files.
1191
1192 2005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1193
1194 * internal.h: Update references to Cpp lib filenames.
1195 * directives.c: Likewise.
1196 * init.c: Likewise.
1197 * macro.c: Likewise.
1198 * traditional.c: Likewise.
1199
1200 2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
1201
1202 PR preprocessor/15167
1203 * files.c (destroy_cpp_file): New function.
1204 (should_stack_file): Make a new file if the
1205 compared file is still stacked.
1206
1207 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
1208
1209 PR preprocessor/17610
1210 * directives.c (do_include_common): Error out if an empty filename
1211 is given for #include (or #include_next or #import).
1212
1213 2004-11-27 Roger Sayle <roger@eyesopen.com>
1214 Zack Weinberg <zack@codesourcery.com>
1215
1216 * internal.h: Replace all uses of uchar with unsigned char.
1217 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
1218 with !IN_GCC, so uchar is only defined whilst building libcpp.
1219
1220 2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
1221
1222 * aclocal.m4: Regenerate.
1223
1224 2004-11-24 Roger Sayle <roger@eyesopen.com>
1225
1226 PR preprocessor/15824
1227 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1228 directly, instead of the non-existant "system.h" and "ansidecl.h".
1229 * configure: Regenerate.
1230
1231 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
1232 Joseph Myers <joseph@codesourcery.com>
1233
1234 * internal.h (struct lexer_state): Add in_deferred_pragma.
1235 * directives.c (struct pragma_entry): Add allow_expansion.
1236 (insert_pragma_entry): Take allow_expansion flag.
1237 (register_pragma): Likewise.
1238 (cpp_register_pragma): Likewise.
1239 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1240 (do_pragma): Honor allow_expansion.
1241 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1242 * include/cpplib.h (cpp_register_pragma): Update prototype.
1243
1244 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
1245 Mark Mitchell <mark@codesourcery.com>
1246
1247 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1248 need_64bit_hwint=yes.
1249 * configure: Regenerate.
1250
1251 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1252
1253 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1254 po/$(PACKAGE).pot.
1255 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1256 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1257 Remove local srcdir path from generated file.
1258
1259 2004-11-04 Zack Weinberg <zack@codesourcery.com>
1260 Gerald Pfeifer <gerald@pfeifer.com>
1261
1262 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1263 as well.
1264
1265 2004-10-27 Zack Weinberg <zack@codesourcery.com>
1266
1267 PR 18075
1268 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1269 (cpp_handle_deferred_pragma): Add cast to silence warning.
1270
1271 2004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1272
1273 * errors.c (_cpp_begin_message): Print "error: " for errors.
1274
1275 2004-10-10 Andreas Jaeger <aj@suse.de>
1276
1277 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1278 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1279
1280 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1281
1282 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1283 used.
1284 (cpp_read_state): Remove unused variables, m, d and mac_count.
1285
1286 2004-09-29 Per Bothner <per@bothner.com>
1287
1288 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1289 cb.line_change. Otherwise do_pragma will call the line_change
1290 call-back with a meaningless line number.
1291
1292 2004-09-24 Zack Weinberg <zack@codesourcery.com>
1293
1294 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1295 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1296 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1297 * aclocal.m4, configure: Regenerate.
1298 * init.c: Include localedir.h.
1299 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1300 (DEFS): Delete.
1301 (.c.o): Use $(ALL_CFLAGS).
1302 (localedir.h, localedir.hs): New rules.
1303 (clean): Use rm -rf to remove directories.
1304 (distclean): Also delete localedir.h and localedir.hs.
1305 (init.o): Update dependencies.
1306
1307 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1308
1309 * Makefile.in (aclocal.m4): Update dependencies.
1310 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1311 * aclocal.m4, configure: Regenerate.
1312
1313 2004-09-17 Zack Weinberg <zack@codesourcery.com>
1314
1315 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1316 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1317 Some other comments in this file also tweaked.
1318
1319 * directives.c (do_pragma): Save current buffer position
1320 before lexing the pragma keywords; don't call
1321 _cpp_backup_tokens in the defer_pragmas case.
1322
1323 2004-09-15 Per Bothner <per@bothner.com>
1324
1325 * include/line-map.h (line_map_start): Add parameter names so
1326 preceding comment makes sense.
1327 (linemap_add): Remove from comment mention of non-existing parameter.
1328
1329 2004-09-09 Matt Austern <austern@apple.com>
1330 Zack Weinberg <zack@codesourcery.com>
1331
1332 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1333 prefixes throughout. Add entry for PRAGMA. Remove
1334 unnecessary "= 0" from EQ.
1335 (enum cpp_ttype): Adjust OP and TK definitions to restore
1336 prefixes, via token-paste.
1337 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1338 Change from #defines to additional cpp_ttype enumerators.
1339 (struct cpp_options): Add defer_pragmas.
1340 (cpp_handle_deferred_pragma): Prototype new interface.
1341
1342 * internal.h (struct cpp_reader): Add directive_result.
1343 * directives.c (struct pragma_entry): Add is_internal field;
1344 give boolean fields type bool.
1345 (start_directive): Initialize pfile->directive_result.type.
1346 (_cpp_do__Pragma): Likewise.
1347 (run_directive): Do not crash if pfile->buffer->prev is NULL.
1348 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1349 from it.
1350 (register_pragma): New static function, bulk of former
1351 cpp_register_pragma here; add 'internal' argument, pass along
1352 to insert_pragma_entry.
1353 (cpp_register_pragma): Now a wrapper around register_pragma which
1354 always passes false for 'internal' argument.
1355 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1356 true for 'internal'.
1357 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1358 an internal pragma, save text till the end of the line as a CPP_PRAGMA
1359 token instead of executing the pragma.
1360 (cpp_handle_deferred_pragma): New interface.
1361 * lex.c (token_spellings): Adjust OP and TK definitions to
1362 match changes to cpplib.h.
1363 (_cpp_lex_token): Check for a directive-result token and
1364 return it if present.
1365 (cpp_token_val_index): Handle CPP_PRAGMA.
1366 * macro.c (cpp_builtin_macro_text): Correct comment.
1367 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1368
1369 2004-09-06 Serge Belyshev <belyshev@lubercy.com>
1370
1371 PR preprocessor/14699
1372 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1373 from size_t to double.
1374
1375 2004-08-28 Andreas Schwab <schwab@suse.de>
1376 Andreas Jaeger <aj@suse.de>
1377
1378 * configure.ac: Set PACKAGE correctly.
1379 * configure: Regenerated.
1380
1381 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
1382
1383 * Makefile.in: Add back top_builddir.
1384
1385 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
1386
1387 * configure.ac: Replace Automake macro invocations
1388 with manual Autoconf checks and substitutions.
1389 * configure: Regenerate.
1390 * aclocal.m4: Regenerate.
1391 * config.in: Regenerate.
1392 * Makefile.am: Removed.
1393 * Makefile.in: Heavy simplification and reorganization.
1394
1395 2004-08-09 Mark Mitchell <mark@codesourcery.com>
1396
1397 * configure.ac (arm*-*-eabi*): New target.
1398 (arm*-*-symbianelf*): Likewise.
1399 * configure: Regenerated.
1400
1401 2004-07-24 Bernardo Innocenti <bernie@develer.com>
1402
1403 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1404 * directives.c: Use XNEW-family macros from libiberty.
1405 * lex.c: Likewise.
1406 * macro.c: Likewise.
1407 * cpplib.h (cpp_deps_style): Export enum with name.
1408
1409 2004-07-23 Matthias Klose <doko@debian.org>
1410
1411 * init.c (init_library): Use PACKAGE for the text domain.
1412
1413 2004-07-16 Andris Pavenis <pavenis@latnet.lv>
1414
1415 PR preprocessor/16366
1416 * internal.h (struct cpp_reader): New field dir_hash.
1417 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1418 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1419
1420 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
1421
1422 PR preprocessor/16192
1423 PR preprocessor/15913
1424 PR preprocessor/15572
1425 * expr.c (_cpp_parse_expr): Handle remaining cases where an
1426 expression is missing.
1427 * init.c (post_options): Traditional cpp doesn't do // comments.
1428
1429 2004-06-30 Per Bothner <per@bothner.com>
1430
1431 * include/line-map.h (fileline): Remove old typedef.
1432 * internal.h (struct cpp_reader): Use source_location typedef instead.
1433
1434 2004-06-26 Zack Weinberg <zack@codesourcery.com>
1435
1436 Partially revert patch of 2004-06-05.
1437 * files.c (search_cache): Remove pfile argument. Don't check
1438 for file that would be found by "" or <> search here...
1439 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1440 Do not apply directory-of-current-file correction to files
1441 found by this check. Rearrange code slightly.
1442
1443 2004-06-21 Geoffrey Keating <geoffk@apple.com>
1444
1445 * files.c (should_stack_file): Correct swapped parameters to call
1446 to cb.read_pch.
1447 * pch.c (cpp_valid_state): Handle -fpreprocessed.
1448
1449 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1450
1451 * Makefile.in: Regenerate with automake 1.8.5.
1452 * aclocal.m4: Likewise.
1453 * configure: Regenerate.
1454
1455 2004-06-11 Zack Weinberg <zack@codesourcery.com>
1456
1457 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1458 * configure, config.in: Regenerate.
1459 * system.h: Unconditionally define bool as unsigned char,
1460 BOOL_BITFIELD as unsigned int.
1461 * .cvsignore: New file.
1462
1463 2004-06-09 Geoffrey Keating <geoffk@apple.com>
1464
1465 * traditional.c (push_replacement_text): Set macro->traditional.
1466 (save_replacement_text): Likewise.
1467 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1468 (struct save_macro_item): Delete.
1469 (struct save_macro_data): Use a character array not the previous
1470 structured format.
1471 (save_macros): Save macro as text not as internal structures.
1472 (cpp_prepare_state): Update for changes to save_macro_data.
1473 (cpp_read_state): Don't read macros defined in PCH. Restore
1474 -D macros as text.
1475 * macro.c (create_iso_definition): Honour alloc_subobject.
1476 Clear traditional flag.
1477 (_cpp_create_definition): Honour alloc_subobject.
1478 * lex.c (cpp_token_val_index): New.
1479 * internal.h: Include cpp-id-data.h.
1480 (uchar): Move definition to cpp-id-data.h.
1481 (U): Likewise.
1482 (cpp_macro): Likewise.
1483 * directives.c (struct answer): Move to cpp-id-data.h.
1484 (do_assert): Honour alloc_subobject.
1485
1486 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1487 * include/cpplib.h (struct cpp_string): Add GTY marker.
1488 (enum cpp_token_fld_kind): New.
1489 (struct cpp_token): Add GTY markers.
1490 (cpp_token_val_index): Prototype.
1491 (CPP_HASHNODE_VALUE_IDX): New.
1492 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1493 * include/cpp-id-data.h: New file.
1494
1495 2004-06-09 Paolo Bonzini <bonzini@gnu.org>
1496
1497 * Makefile.am (all-local): New.
1498 * Makefile.in: Regenerate.
1499
1500 2004-06-06 Roger Sayle <roger@eyesopen.com>
1501
1502 * Makefile.am (LIBICONV): Declare.
1503 (makedepend_LDADD): Use LIBICONV.
1504 * Makefile.in: Regenerate.
1505
1506 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
1507
1508 * Makefile.am (LIBINTL): Declare
1509 (makedepend_LDADD): Use LIBINTL.
1510 * Makefile.in: Regenerate.
1511
1512 2004-06-05 Zack Weinberg <zack@codesourcery.com>
1513
1514 * Makefile.am: Add makedepend.
1515 * Makefile.in, aclocal.m4: Regenerate.
1516 * charset.c: Insert a space to avoid a warning.
1517 * directives.c: Include mkdeps.h.
1518 (_cpp_handle_directive): Reenable macro expander if appropriate.
1519 (undefine_macros): Inline body of _cpp_free_definition for speed.
1520 Do not call undef callback or _cpp_warn_if_unused_macro.
1521 (cpp_get_deps): New interface.
1522 * files.c (search_cache): Add pfile argument. Check for file
1523 that would be found by "" or <> search here...
1524 (_cpp_find_file): ...not here. Correct recorded start_dir of
1525 files found by directory-of-current-file search that would be
1526 found by "" or <> search.
1527 * init.c (cpp_add_dependency_target): Delete.
1528 * internal.h (struct lexer_state): Add discarding_output flag.
1529 * lex.c (lex_identifier): Compute hash function while scanning.
1530 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1531 directives.
1532 * makedepend.c: New file.
1533 * mkdeps.c (struct deps): Add vpath vector.
1534 (apply_vpath, deps_add_vpath): New function.
1535 (deps_free): Free vpath vector.
1536 (deps_add_dep, deps_add_target): Use apply_vpath.
1537 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1538 (ht_lookup_with_hash): New function.
1539 * cpplib.h, mkdeps.h: Update prototypes.
1540 * symtab.h: Update prototypes.
1541 (HT_HASHSTEP, HT_FINISH): New macros.
1542
1543 2004-05-29 Geoffrey Keating <geoffk@apple.com>
1544
1545 * symtab.c (ht_create): Set entries_owned.
1546 (ht_destroy): Honour entries_owned.
1547 (ht_expand): Likewise.
1548 (ht_load): New.
1549 * include/symtab.h (struct ht): New field 'entries_owned'
1550 (ht_load): New prototype.
1551
1552 2004-05-26 Paolo Bonzini <bonzini@gnu.org>
1553
1554 PR bootstrap/15651
1555 * configure.ac: Fix m4 quoting when picking
1556 the size of HOST_WIDE_INT.
1557 * configure: Regenerate.
1558
1559 2004-05-25 Paolo Bonzini <bonzini@gnu.org>
1560
1561 * Makefile.am: the correct directory for
1562 gettext include files is given by @INCINTL@.
1563 * Makefile.in: Regenerate.
1564
1565 2004-05-24 Paolo Bonzini <bonzini@gnu.org>
1566
1567 * system.h [!ENABLE_NLS]: dgettext takes two
1568 parameters.
1569
1570 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1571
1572 Moved libcpp from the gcc subdirectory to the toplevel.
1573 * Makefile.am: New file.
1574 * Makefile.in: Regenerate.
1575 * configure.ac: New file.
1576 * configure: Regenerate.
1577 * config.in: Regenerate.
1578 * charset.c: Moved from gcc/cppcharset.c. Add note about
1579 brokenness of input charset detection. Adjust for change
1580 in name of cppucnid.h.
1581 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
1582 * expr.c: Moved from gcc/cppexp.c.
1583 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
1584 Remove #define of O_BINARY, it is in system.h.
1585 * identifiers.c: Moved from gcc/cpphash.c.
1586 * internal.h: Moved from gcc/cpphash.h. Change header
1587 guard name. All other files adjusted to match name change.
1588 * init.c: Moved from gcc/cppinit.c.
1589 (init_library) [ENABLE_NLS]: Call bindtextdomain.
1590 * lex.c: Moved from gcc/cpplex.c.
1591 * directives.c: Moved from gcc/cpplib.c.
1592 * macro.c: Moved from gcc/cppmacro.c.
1593 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
1594 * traditional.c: Moved from gcc/cpptrad.c.
1595 * ucnid.h: Moved from gcc/cppucnid.h. Change header
1596 guard name.
1597 * ucnid.pl: Moved from gcc/cppucnid.pl.
1598 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
1599 guard name.
1600 * symtab.c: Moved from gcc/hashtable.c.
1601 * line-map.c: Moved from gcc. Do not include intl.h.
1602 * mkdeps.c: Moved from gcc.
1603 * system.h: New file.
1604 * include/cpplib.h: Moved from gcc. Change header guard name.
1605 * include/line-map.h: Moved from gcc. Change header guard name.
1606 * include/mkdeps.h: Moved from gcc. Change header guard name.
1607 * include/symtab.h: Moved from gcc/hashtable.h. Change header
1608 guard name.
This page took 0.106178 seconds and 6 git commands to generate.