OSDN Git Service

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