Daily bump.
[official-gcc.git] / libcpp / ChangeLog
blob0eb632f92f957324bbb21899eeccc4cc59f30f18
1 2008-04-16  Tom Tromey  <tromey@redhat.com>
3         * Makefile.in (TAGS_SOURCES): New variable.
4         (TAGS): New target.
6 2008-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
8         * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
9         and shbe-*-*.
10         * configure: Rebuilt.
12 2008-04-02  Joseph Myers  <joseph@codesourcery.com>
14         * include/cpplib.h (struct cpp_callbacks): Add used_define,
15         used_undef and before_define.
16         (NODE_USED): Define.
17         * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
18         do_ifndef, cpp_pop_definition): Handle new flag and use new
19         callbacks.
20         * expr.c (parse_defined): Handle new flag and use new callbacks.
21         * macro.c (enter_macro_context, _cpp_free_definition): Handle new
22         flag and use new callbacks.
24 2008-04-01  Jakub Jelinek  <jakub@redhat.com>
26         PR pch/13675
27         * files.c (struct _cpp_file): Remove pch field.
28         (pch_open_file): Don't set file->pch, just file->pchname.
29         (should_stack_file): After pfile->cb.read_pch call
30         free pchname and clear pchname, don't close file->fd.
31         Test file->pchname instead of file->pch.  Don't close fd after cb.
32         (_cpp_stack_include): Test file->pchname instead of file->pch.
34 2008-03-28  Tom Tromey  <tromey@redhat.com>
36         * Makefile.in (POSTCOMPILE): New variable.
37         (.c.o): Use it.
39 2008-03-13  Tom Tromey  <tromey@redhat.com>
41         PR libcpp/35322:
42         * directives.c (destringize_and_run): Set pfile->directive.
44 2008-03-06  Markus Milleder  <markus.milleder@generali.at>
46         PR preprocessor/35458
47         * mkdeps.c (munge): Quote '#' with a '\'.
49 2008-02-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
51         PR preprocessor/35379
52         * mkdeps.c (deps_write): Ensure the first target always appears
53         in the first column, without leading backslash newline.  Avoid
54         some more extra whitespace.
56 2008-02-25  Thiemo Seufer <ths@mips.com>
58         * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
60 2008-02-19  Tom Tromey  <tromey@redhat.com>
62         * traditional.c (lex_identifier): Use CPP_HASHNODE.
63         * lex.c (lex_identifier): Use CPP_HASHNODE.
64         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
65         do-while.
66         * identifiers.c (alloc_node): Change return type.
67         (_cpp_init_hashtable): Don't cast 'alloc_node'.
68         (proxy_assertion_broken): New declaration.
69         (cpp_forall_identifiers): Move comment.
70         * line-map.c (linemap_add): Comment fix.
71         (linemap_line_start): Indentation fix.
73 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
75         PR preprocessor/34692
76         * macro.c (collect_args): Add pragma_buff argument.  Push
77         CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
78         than into arguments.  Reset prevent_expansion and parsing_args
79         state at CPP_PRAGMA_EOL/CPP_EOF.
80         (funlike_invocation_p): Add pragma_buff argument, pass it through
81         to collect_args.
82         (enter_macro_context): Add result argument.  Adjust
83         funlike_invocation_p caller.  Emit all deferred pragma tokens
84         gathered during collect_args before the expansion, add a padding
85         token.  Return 2 instead of 1 if any pragma tokens were prepended.
86         (cpp_get_token): If enter_macro_context returns 2, don't return
87         a padding token, instead cycle to grab CPP_PRAGMA token.
88         * directives.c (_cpp_handle_directive): If was_parsing_args
89         in deferred pragma, leave parsing_args and prevent_expansion as is.
91 2008-01-22  Tom Tromey  <tromey@redhat.com>
93         PR c++/34859
94         * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
95         __STDC_CONSTANT_MACROS.
97 2008-01-07  Fred Fish  <fnf@specifix.com>
99         PR preprocessor/30363
100         * traditional.c (replace_args_and_push): Add local variable
101         cxtquote, calculate the replacement text size assuming a 
102         worst case of every input character quoted with backslash,
103         and properly handle output quoting of quote characters in
104         actual arguments used in function-like macros.
106 2008-01-03  Tom Tromey  <tromey@redhat.com>
108         PR preprocessor/34602
109         * directives.c (do_line): Don't try to spell EOF token.
110         (do_linemarker): Add comment.
112 2007-12-11  DJ Delorie  <dj@redhat.com>
114         * charset.c (convert_using_iconv): Close out any shift states,
115         returning to the initial state.
117 2007-12-06  Tom Tromey  <tromey@redhat.com>
119         PR c/29172
120         * internal.h (struct cpp_reader) <file_hash_entries>: Changed
121         type.
122         <file_hash_entries_allocated, file_hash_entries_used>: Removed.
123         * files.c (FILE_HASH_POOL_SIZE): New macro.
124         (struct file_hash_entry_pool): New.
125         (destroy_all_cpp_files): New function.
126         (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
127         (new_file_hash_entry): Update.
128         (free_file_hash_entries): New function.
129         (_cpp_cleanup_files): Call free_file_hash_entries and
130         destroy_all_cpp_files.
131         (cpp_clear_file_cache): New function.
132         * include/cpplib.h (cpp_clear_file_cache): Declare.
134 2007-12-03  Tom Tromey  <tromey@redhat.com>
136         PR preprocessor/34288
137         * configure.ac, config.in: Rebuilt.
138         * configure.ac: Check for ssize_t.
140 2007-11-30  Tom Tromey  <tromey@redhat.com>
142         PR preprocessor/32868
143         * macro.c (_cpp_create_definition): Special case
144         __STDC_FORMAT_MACROS.
146 2007-11-16  Michael Matz  <matz@suse.de>
148         * files.c (search_path_head): Fix check for absolute paths.
150 2007-11-11  Tom Tromey  <tromey@redhat.com>
152         PR c++/17557
153         * include/cpplib.h (cpp_included_before): Declare.
154         * files.c (struct file_hash_entry) <location>: New field.
155         (_cpp_find_file): Initialize new field.
156         (make_cpp_dir): Likewise.
157         (cpp_included_before): New function.
159 2007-11-01  Tom Tromey  <tromey@redhat.com>
161         PR preprocessor/30805
162         * macro.c (paste_tokens): Handle padding token.
163         (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
165 2007-10-31  Tom Tromey  <tromey@redhat.com>
167         PR preprocessor/30786
168         * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
169         * directives.c (_cpp_do__Pragma): Return error status.
170         * internal.h (_cpp_do__Pragma): Update.
171         * directives.c (get__Pragma_string): Back up if EOF seen.
173 2007-09-06  Tom Tromey  <tromey@redhat.com>
175         * internal.h (struct cpp_reader) <invocation_location>: New
176         field.
177         (struct cpp_reader) <set_invocation_location>: Likewise.
178         * init.c (cpp_set_line_map): New function.
179         * line-map.c (linemap_add): Use linemap's allocator.
180         * include/line-map.h (GTY): Define.
181         (line_map_realloc): New typedef.
182         (struct line_map): Mark with GTY.
183         (struct line_maps): Likewise.
184         (struct line_maps) <maps>: Likewise.
185         (struct line_maps) <reallocator>: New field.
186         * include/symtab.h (GTY): Conditionally define.
187         * include/cpplib.h (cpp_set_line_map): Declare.
188         (cpp_get_token_with_location): Declare.
189         * macro.c (cpp_get_token): Set invocation_location on the reader.
190         (cpp_get_token_with_location): New function.
192 2007-08-30  Chao-ying Fu  <fu@mips.com>
194         * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
195         ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
196         (cpp_classify_number): Support decimal fixed-point constants without
197         exponents.
198         Warn about fixed-point constants when -pedantic.
199         * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
200         comments to support fixed-point values.
201         (CPP_N_FRACT, CPP_N_ACCUM): Define.
203 2007-08-18  Tom Tromey  <tromey@redhat.com>
205         PR preprocessor/32974
206         * directives.c (parse_include): Don't check for EOL when
207         processing #pragma dependency.
209 2007-07-30  Ollie Wild  <aaw@google.com>
211         * directives-only.c: New file.
212         * internal.h (struct _cpp_dir_only_callbacks): New.
213         (_cpp_preprocess_dir_only): New function.
214         * directives.c (_cpp_handle_directive): Check directives_only before
215         disabling execution of indented directives.
216         * files.c (_cpp_stack_file): Add directives_only check.
217         * include/cpplib.h (struct cpp_options): Add directives_only.
218         (cpp_init_special_builtins): New function.
219         * init.c (cpp_init_special_builtins): New function.
220         (cpp_init_builtins): Move builtin_array initialization to
221         cpp_init_special_builtins.
222         (post_options): Check directives_only before setting
223         pfile->state.prevent_expansion = 1.
224         * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
225         is expanded inside a directive while -fdirectives-only is enabled.
226         * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
227         (libcpp_a_SOURCES): Add directives-only.c.
229 2007-07-04  Uros Bizjak  <ubizjak@gmail.com>
231         * traditional.c (_cpp_scan_out_logical_line): Initialize
232         fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
233         fmacro.args to prevent 'may be used uninitialized' warning.
235 2007-07-03  Uros Bizjak  <ubizjak@gmail.com>
237         * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
238         Add new constants.
239         * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
240         suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
241         for 'q' or 'Q' suffixes.
243 2007-06-17  Danny Smith  <dannysmith@users.sourceforge.net
245         * files.c (open_file): Correct typo.
247 2007-06-16  Vladimir Prus  <vladimir@codesourcery.com>
249         * files.c (open_file): Prevent the call
250         for stat from overwriting errno.
252 2007-06-09  Vladimir Prus  <vladimir@codesourcery.com>
254         * files.c (open_file): Account for the
255         fact that on windows, opening a directory gives
256         EACCES.
258 2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
260         PR preprocessor/23479
261         * expr.c (cpp_classify_number): Implement 0b-prefixed binary
262         integer constants.
263         (append_digit): Likewise.
264         * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
265         binary integer constants.
267 2007-05-31  Dave Korn  <dave.korn@artimi.com>
269         PR preprocessor/14331
270         * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
272 2007-05-24  Ollie Wild  <aaw@google.com>
274         * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
275         * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
276         (cpp_write_pch_state): Save __COUNTER__ state.
277         (cpp_valid_state): Check valid __COUNTER__ state.
278         (cpp_read_state): Read new __COUNTER__ state.
279         * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
280         * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
281         * internal.h (struct cpp_reader): Add counter member.
283 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
285         PR preprocessor/20077
286         * macro.c (create_iso_definition): Fixed the method to determine
287         whether the token-pasting operator appears at the beginning or the end
288         of a macro.
290 2007-05-21  Ian Lance Taylor  <iant@google.com>
292         * internal.h (struct cpp_reader): Add new fields:
293         nonexistent_file_hash and nonexistent_file_ob.
294         * files.c: Include "obstack.h".
295         (find_file_in_dir): Before trying to open the file, look up the
296         path name in the hash table of nonexistent files.  After failing
297         to open the file, add the path name to the hash table.
298         (_cpp_find_file): Cache the results of looking up the file name
299         starting with the quote and bracket chain heads, if we can.
300         (nonexistent_file_hash_eq): New static function.
301         (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
302         pfile->nonexistent_file_ob.
303         (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
304         pfile->nonexistent_file_ob.
306 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
308         * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
310         PR c/31924
311         * expr.c (interpret_float_suffix): Check for invalid suffix.
313 2007-05-02  Eric Christopher  <echristo@apple.com>
315         * expr.c (num_div_op): Don't overflow if the result is
316         zero.
318 2007-05-02  Tom Tromey  <tromey@redhat.com>
320         PR preprocessor/28709
321         * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
323 2007-03-30  Michael Meissner  <michael.meissner@amd.com>
325         * directives.c (lex_macro_node_from_str): Fix alloca call to be
326         type correct.
328 2007-03-30  Richard Henderson  <rth@redhat.com>
330         * directives.c (lex_macro_node_from_str): New.
331         (cpp_push_definition, cpp_pop_definition): New.
332         * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
334 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
336         * Makefile.in: Add dummy install-pdf target.
338 2007-01-30  Tom Tromey  <tromey@redhat.com>
340         PR preprocessor/30468
341         * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
342         './'.
344 2007-01-30  Tom Tromey  <tromey@redhat.com>
346         PR preprocessor/29966
347         * macro.c (lex_expansion_token): Save and restore cpp_reader's
348         cur_token.
349         (_cpp_create_definition): Don't restore cur_token here.
350         * lex.c (_cpp_lex_token): Added assertion.
352 2007-01-27  Tom Tromey  <tromey@redhat.com>
354         * configure: Rebuilt.
356 2007-01-12  Tom Tromey  <tromey@redhat.com>
358         PR preprocessor/28227
359         * directives.c (lex_macro_node): Added 'is_def_or_undef'
360         argument.
361         (do_define): Update.
362         (do_undef): Update.
363         (do_ifdef): Update.
364         (do_ifndef): Update.
366 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
368         * configure: Regenerate.
370 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
372         * configure: Regenerate.
374 2007-01-04  Tom Tromey  <tromey@redhat.com>
376         PR preprocessor/28165
377         * internal.h (cpp_in_primary_file): New function.
378         * directives.c (do_include_next): Use cpp_in_primary_file.
379         (do_pragma_once): Likewise.
380         (do_pragma_system_header): Likewise.
382 2006-12-29  Ian Lance Taylor  <iant@google.com>
384         * lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
385         look backward at the end of the line unless we saw a backslash.
387 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
389         PR preprocessor/29612
390         * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
391         only when new_sysp is non-zero.
393 2006-12-28  Tom Tromey  <tromey@redhat.com>
395         PR preprocessor/30001
396         * charset.c (_cpp_convert_input): Check that to.len is greater
397         than zero.
399 2006-11-20  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
401         * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
402         * configure: Rebuilt.
404 2006-11-01      Douglas Gregor <doug.gregor@gmail.com>
406         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
407         for experimental C++0x mode.
408         * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
409         adopted the preprocessor changes introduced in C99.
411 2006-10-29  Joseph Myers  <joseph@codesourcery.com>
413         * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
414         depending on --enable-targets=all.
415         * configure: Regenerate.
417 2006-10-12  Jakub Jelinek  <jakub@redhat.com>
419         PR preprocessor/28709
420         * macro.c (paste_tokens): Do error reporting here, use BUF with the
421         spelled LHS token as opposed to spelling it again.
422         (paste_all_tokens): Don't report errors here, just break on failure.
424 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
426         * Makefile.in: Added empty "pdf" target.
428 2006-09-22  Geoffrey Keating  <geoffk@apple.com>
430         * configure.ac: Make need_64_bit_hwint case for x86-darwin
431         match exactly the glob in gcc/config.gcc.
432         * configure: Regenerate.
434 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
436         PR c/28768
437         PR preprocessor/14634
438         * lex.c (lex_string): Pedwarn for unterminated literals.
440 2006-09-08  Eric Christopher  <echristo@apple.com>
442         * configure.ac: Add 64-bit HWI support for i?86-darwin.
444 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
446         PR c++/28288
447         PR c++/14556
448         * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
449         (CPP_LAST_EQ): Change.
450         (CPP_LAST_PUNCTUATOR): Change.
451         * expr.c (cpp_operator): Remove MIN and MAX.
452         (reduce): Remove CPP_MIN and CPP_MAX.
453         (num_binary_op): Ditto.
454         * lex.c (_cpp_lex_direct): Ditto.
455         (cpp_avoid_paste): Remove ? as legal symbol after > or <.
457 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
459         PR preprocessor/27746
460         * directives.c (do_pragma): Handle pragma with valid namespace
461         and invalid name coming from macro expansion.
462         * directives.c (destringize_and_run): Initialize next field in
463         context.
465         PR c/27747
466         PR c++/27748
467         * directives.c (destringize_and_run): Set NO_EXPAND on the
468         tokens.
470         * macro.c (_cpp_backup_tokens): Fix comment typo.
472 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
474         * Makefile.in (CATALOGS): Add po/ prefix.
475         * configure: Regenerated.
477 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
479         * Makefile.in: Add install-html target. Add install-html to .PHONY
481 2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
483         * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
484         * files.c (_cpp_get_file_stat): New function.
485         * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
486         * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
487         * internal.h (_cpp_get_file_stat): Prototype.
488         (struct cpp_buffer): Add timestamp.
490 2006-01-23  Jakub Jelinek  <jakub@redhat.com>
492         PR preprocessor/25717
493         * init.c (cpp_init_builtins): If __STDC__ will not change value
494         between system headers and other sources, define it as a normal
495         macro rather than a builtin.
496         * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
497         cpp_in_system_header condition.
499 2006-01-05  Paolo Bonzini  <bonzini@gnu.org>
501         * Makefile.in: Use -MMD instead of -MD.
503 2006-01-04  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
504             Richard Henderson  <rth@redhat.com>
506         Merge from gomp branch:
507         * directives.c (struct pragma_entry): Add is_deferred.  Add ident
508         entry to value union.
509         (end_directive): Don't eat the line if in_deferred_pragma.
510         (run_directive): Remove pragma hacks.
511         (insert_pragma_entry): Remove.
512         (new_pragma_entry): New.
513         (register_pragma_1): Split out of register_pragma.  Only handle
514         the lookup tree and return the new entry.
515         (cpp_register_pragma): Fill in the pragma entry here.
516         (cpp_register_deferred_pragma): New.
517         (register_pragma_internal): New.
518         (_cpp_init_internal_pragmas): Use register_pragma_internal.
519         (do_pragma): Allow pragma expansion after namespace.  For deferred
520         pragmas, don't slurp the line into a string.
521         (destringize_and_run): Save tokens for deferred pragmas.
522         (cpp_handle_deferred_pragma): Remove.
523         * macro.c (builtin_macro): Remove pragma token hack.
524         (_cpp_push_token_context): Rename from push_token_context and export.
525         * internal.h (struct lexer_state): Add pragma_allow_expansion.
526         (_cpp_push_token_context): Declare.
527         * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
528         a token.  Update the line number correctly if so.
529         (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
530         (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
531         * include/cpplib.h (PRAGMA_EOL): New.
532         (CPP_TOKEN_FLD_PRAGMA): New.
533         (struct cpp_token): Add val.pragma.
534         (struct cpp_options): Remove defer_pragmas.
535         (cpp_handle_deferred_pragma): Remove.
536         (cpp_register_deferred_pragma): Declare.
538 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
540         PR c++/25294
541         * directives.c (do_pragma): If pragma line ends with multi-line
542         block comment, end the saved deferred pragma string before that
543         comment.  Handle embedded '\0' chars on the pragma line.
545 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
547         PR c++/23333
548         * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
550 2005-12-07  Jon Grimm  <jgrimm2@us.ibm.com>
551             Ben Elliston  <bje@au.ibm.com>
553         * include/cpplib.h (CPP_N_DFLOAT): New.
554         * expr.c (interpret_float_suffix): Identify df, dd, and dl
555         suffixes as decimal floating point constants.
556         (cpp_classify_number): Disallow hexadecimal DFP constants.
558 2005-11-14  Gerald Pfeifer  <gerald@pfeifer.com>
559             Ian Lance Taylor  <ian@airs.com>
561         * include/cpplib.h (struct cpp_callbacks): Annotate error with
562         ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
564 2005-11-09  Per Bothner  <per@bothner.com>
565             Uros Bizjak  <uros@kss-loka.si>
567         PR c/24101
568         * init.c (read_original_filename): Temporarily set
569         state.in_directive before calling _cpp_lex_direct for
570         CPP_HASH tokens.
572 2005-11-03  James E Wilson  <wilson@specifix.com>
574         PR preprocessor/24202
575         * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
577 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
579         * include/cpplib.h (struct cpp_callbacks): Make error take
580         va_list* parameter.
581         * errors.c (cpp_error): Update call to callback.
583 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
585         PR preprocessor/22042
586         * macro.c (_cpp_builtin_macro_text): Lower the needed max
587         buffer size.
588         (cpp_quote_string): Don't octalify non printable
589         charactors.
591 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
593         PR c++/17964
594         * include/cpplib.h (struct cpp_options): Add client_diagnostic.
595         (struct cpp_callbacks): Add error.
596         * errors.c (cpp_error): If client_diagnostic, use error callback.
597         * charset.c (convert_escape): Don't use %03o in diagnostic.
599 2005-10-21  James E Wilson  <wilson@specifix.com>
601         PR preprocessor/15220
602         * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
603         callers.  Pass to open_file_failed.
604         (open_file_failed): New parameter angle_brackets.  Fix all callers.
605         Use in print_dep assignment.
606         * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
607         * internal.h (_cpp_find_file): Add new parm to declaration.
609 2005-10-08  Kazu Hirata  <kazu@codesourcery.com>
611         * configure.ac: Require 64-bit int for arm*-*-*eabi*.
612         * configure: Regenerate.
614 2005-10-04  Ian Lance Taylor  <ian@airs.com>
616         PR preprocessor/13726
617         * directives.c (check_eol_return_comments): New static function.
618         (parse_include): Add buf parameter.  Change all callers.
619         (do_include_common): If not discard comments, turn on
620         save_comments.  Pass collected comments to include callback.
621         * include/cpplib.h (struct cpp_callbacks): Add new parameter to
622         include callback: cpp_token list.
624 2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
626         * include/cpplib.h (struct cpp_options): Add extended_identifiers.
627         * init.c (struct lang_flags, lang_defaults): Add
628         extended_identifiers.
629         (cpp_set_lang): Use it.
630         * lex.c (forms_identifier_p): Check extended_identifiers.
632 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
634         PR preprocessor/20348
635         PR preprocessor/20356
636         * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
637         2004-06-05 changes.
639 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
641         * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
642         -Wmissing-format-attribute.
644         * configure: Regenerate.
646 2005-06-29  Kelley Cook  <kcook@gcc.gnu.org>
648         * all files: Update FSF address in copyright headers.
649         * makeucnid.c (write_copyright): Update outputted FSF address.
651 2005-06-13  Zack Weinberg  <zack@codesourcery.com>
653         * configure.ac: Invoke ZW_CREATE_DEPDIR and
654         ZW_PROG_COMPILER_DEPENDENCIES.
655         * aclocal.m4, configure: Regenerate.
656         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
657         New variables.
658         (distclean): Clean up $(DEPDIR) and its contents.
659         (.c.o): Use $(COMPILE).
660         Include $(DEPDIR)/*.Po for most object->header dependencies.
662 2005-05-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
664         * configure.ac: Check declarations for asprintf and vasprintf.
665         * config.in: Regenerate.
666         * configure: Likewise.
668         * charset.c (conversion_loop): Use XRESIZEVEC.
669         (convert_no_conversion): Likewise.
670         (convert_using_iconv): Likewise.
671         (init_iconv_desc): Cast return value of alloca.
672         (cpp_host_to_exec_charset): Use XNEWVEC.
673         (emit_numeric_escape): Use XRESIZEVEC.
674         (cpp_interpret_string): Use XNEWVEC.
675         (cpp_interpret_string): Use XRESIZEVEC.
676         (_cpp_interpret_identifier): Cast return value of alloca.
677         (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
678         * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
679         (parse_include): Use XNEWVEC.
680         (insert_pragma_entry): Rename local variable "new" to
681         "new_entry".
682         (save_registered_pragmas): Cast return value of xmemdup.
683         (destringize_and_run): Same for alloca.
684         (parse_assertion): Likewise.
685         (do_assert): Cast allocated storage to proper type.
686         (cpp_define): Likewise.
687         (_cpp_define_builtin): Likewise.
688         (cpp_undef): Likewise.
689         (handle_assertion): Likewise.
690         (cpp_push_buffer): Rename local variable "new" to "new_buffer".
691         * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
692         (CPP_UMINUS): Likewise.
693         (struct cpp_operator): Rename from struct operator.
694         (_cpp_expand_op_stack): Use XRESIZEVEC.
695         * files.c (pch_open_file): Use XNEWVEC.
696         (pch_open_file): Use XRESIZEVEC.
697         (read_file_guts): Use XNEWVEC and XRESIZEVEC.
698         (dir_name_of_file): Use XNEWVEC.
699         (make_cpp_file): Use XCNEW.
700         (make_cpp_dir): Likewise.
701         (allocate_file_hash_entries): USE XNEWVEC.
702         (cpp_included): Cast return value of htab_find_with_hash.
703         (append_file_to_dir): Use XNEWVEC.
704         (read_filename_string): Likewise. Use XRESIZEVEC too.
705         (read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
706         (remap_filename): Use XNEWVEC.
707         (struct pchf_entry): Move definition out of struct pchf_data.
708         (_cpp_save_file_entries): Use XCNEWVAR.
709         (_cpp_read_file_entries): Use XNEWVAR.
710         * identifiers.c (alloc_node): Use XOBNEW.
711         * init.c (cpp_create_reader): Use XCNEW.
712         (cpp_init_builtins): Cast of b->value to enum builtin_type.
713         (read_original_directory): Cast return value of alloca.
714         * lex.c (add_line_note): Use XRESIZEVEC.
715         (warn_about_normalization): Use XNEWVEC.
716         (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
717         (new_buff): Use XNEWVEC.
718         * line-map.c (linemap_add): Use XRESIZEVEC.
719         * macro.c (builtin_macro): Cast return value of alloca.
720         (paste_tokens): Likewise.
721         (expand_arg): Use XNEWVEC and XRESIZEVEC.
722         (_cpp_save_parameter): Use XRESIZEVEC.
723         (create_iso_definition): Cast allocated storage to proper type.
724         (_cpp_create_definition): Likewise.
725         (cpp_macro_definition): Use XRESIZEVEC.
726         * makedepend.c (add_clm): Use XNEW.
727         (add_dir): Likewise.
728         * mkdeps.c (munge): Use XNEWVEC.
729         (deps_init): Use XCNEW.
730         (deps_add_target): Use XRESIZEVEC.
731         (deps_add_default_target): Cast return value of alloca.
732         (deps_add_dep): Use XRESIZEVEC.
733         (deps_add_vpath): Likewise.  Use XNEWVEC too.
734         (deps_restore): Likewise.
735         * pch.c (save_idents): Use XNEW and XNEWVEC.
736         (cpp_save_state): Use XNEW.
737         (count_defs): Cast return value of htab_find.
738         (write_defs): Likewise.
739         (cpp_write_pch_deps): Use XNEWVEC.
740         (collect_ht_nodes): Use XRESIZEVEC.
741         (cpp_valid_state): Use XNEWVEC.
742         (save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
743         * symtab.c (ht_create): Use XCNEW.
744         (ht_lookup_with_hash): Cast return value of obstack_copy0.
745         (ht_expand): Use XCNEWVEC.
746         * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
747         (bool): Do not define if __cplusplus.
749 2005-05-12  Zack Weinberg  <zack@codesourcery.com>
751         * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
752         (do_sccs): Delete function definition, #define to do_ident.
753         (do_ident): Don't hardwire directive name.
755 2005-05-12  Ryota Kunisawa  <kunisawa@access.co.jp>
757         PR bootstrap/21230
758         * configure: Regenerate.
760 2005-04-27  Andris Pavenis  <pavenis@latnet.lv>
762         * files.c: Include io.h for DJGPP to get prototype of setmode.
764 2005-04-19  Per Bothner  <per@bothner.com>
766         PR preprocessor/20907
767         * line-map.c (linemap_line_start): Fix bug when we need to increse
768         column_bits but can re-use the current line_map.
770 2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
772         * system.h (fopen, fdopen, freopen): Define these to the unlocked
773         libiberty functions.
775 2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
777         * configure.ac (libcpp_UNLOCKED_FUNCS): New.
778         (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
779         * system.h (putchar, getc, getchar, clearerr, feof, fileno,
780         fflush, fgetc, fgets, ferror, fread): Redefine to the associated
781         _unlocked function.
782         (fwrite_unlocked): Fix prototype.
784         * configure, config.in: Regenerate.
786 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
788         PR preprocessor/19475
789         * macro.c (create_iso_definition): For < ISO C99, don't
790         pedwarn if there is no whitespace between macro name and its
791         replacement, but the replacement starts with a basic character
792         set character.
794 2005-03-28  Andreas Jaeger  <aj@suse.de>
796         * lex.c (warn_about_normalization): Cast field width to int to
797         avoid warning.
799 2005-03-19  Joseph S. Myers  <joseph@codesourcery.com>
801         * configure.ac: Consistently use solaris2.1[0-9]* instead of
802         solaris2.1[0-9].
803         * configure: Regenerate.
805 2005-03-15  Geoffrey Keating  <geoffk@apple.com>
807         * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
808         UCN rather than printing an error.
810 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
812         * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
814 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
816         * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
817         * charset.c: Update for new format of ucnid.h.
818         (ucn_valid_in_identifier): Update for new format of ucnid.h.
819         Add NST parameter, and update it; update callers.
820         (cpp_valid_ucn): Add NST parameter, update callers.  Replace abort
821         with cpp_error.
822         (convert_ucn): Pass normalize_state to cpp_valid_ucn.
823         * internal.h (struct normalize_state): New.
824         (INITIAL_NORMALIZE_STATE): New.
825         (NORMALIZE_STATE_RESULT): New.
826         (NORMALIZE_STATE_UPDATE_IDNUM): New.
827         (_cpp_valid_ucn): New.
828         * lex.c (warn_about_normalization): New.
829         (forms_identifier_p): Add normalize_state parameter, update callers.
830         (lex_identifier): Add normalize_state parameter, update callers.  Keep
831         the state current.
832         (lex_number): Likewise.
833         (_cpp_lex_direct): Pass normalize_state to subroutines.  Check
834         it with warn_about_normalization.
835         * makeucnid.c: New.
836         * ucnid.h: Replace.
837         * ucnid.pl: Remove.
838         * ucnid.tab: Make appropriate for input to makeucnid.c.  Remove
839         comments about obsolete version of C++.
840         * include/cpplib.h (enum cpp_normalize_level): New.
841         (struct cpp_options): Add warn_normalize field.
843 2005-03-11  Geoffrey Keating  <geoffk@apple.com>
845         * directives.c (glue_header_name): Update call to cpp_spell_token.
846         * internal.h (_cpp_interpret_identifier): New.
847         * charset.c (_cpp_interpret_identifier): New.
848         (_cpp_valid_ucn): Allow UCN version of '$'.
849         * lex.c (lex_identifier): Add extra parameter to indicate if initial
850         character was '$' or '\'.  Support identifiers with UCNs.
851         (forms_identifier_p): Allow UCNs.
852         (_cpp_lex_direct): Pass extra parameter to lex_identifier.
853         (utf8_to_ucn): New.
854         (cpp_spell_token): Add FORSTRING parameter.  Use it.
855         (cpp_token_as_text): Update call to cpp_spell_token.
856         (cpp_output_token): Write UCNs back out.
857         (stringify_arg): Update call to cpp_spell_token.
858         (paste_tokens): Likewise.
859         (cpp_macro_definition): Likewise.
860         * macro.c (stringify_arg): Likewise.
861         (paste_tokens): Likewise.
862         (cpp_macro_definition): Likewise.
863         * include/cpplib.h: Add parameter to cpp_spell_token.
865 2005-03-04  Jakub Jelinek  <jakub@redhat.com>
867         PR bootstrap/20282
868         PR bootstrap/20305
869         * macro.c (replace_args, cpp_get_token): Copy whole
870         cpp_token_u instead of just cpp_string field from it.
872 2005-02-28  Devang Patel  <dpatel@apple.com>
874         * directives.c (do_line): Save sysp early before line table is
875         realloc'ed.
877 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
879         PR 18785
880         * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
881         (cpp_host_to_exec_charset): New function.
882         * include/cpplib.h: Declare cpp_host_to_exec_charset.
884 2005-02-19  Devang Patel  <dpatel@apple.com>
886         * charset.c (_cpp_convert_input): Check '\r' before inserting
887         '\n' at the end.
889 2005-02-15  Eric Christopher  <echristo@redhat.com>
891         PR preprocessor/19077
892         * macro.c (cpp_macro_definition): Move handling of whitespace
893         to PREV_WHITE conditional. Remove overloading of len
894         variable.
896 2005-02-14  Kazu Hirata  <kazu@cs.umass.edu>
898         * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
899         traditional.c: Update copyright.
901 2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
903         PR bootstrap/19818
904         * configure.ac: Check for declaration of basename and getopt.
905         * config.in: Regenerate.
906         * configure: Regenerate.
907         * internal.h (ustrcspn): New.
908         * macro.c (create_iso_definition): Fix allocation of memory.
909         (padding_token): Add cast to remove const-ness.
910         * pch.c (cpp_read_state): Use ustrcspn.
912 2005-02-08  Mike Stump  <mrs@apple.com>
914         * files.c (pchf_adder): Remove.
915         (struct pchf_adder_info): Likewise.
916         (_cpp_save_file_entries): Write out all files so that #import works.
918 2005-01-23  Joseph S. Myers  <joseph@codesourcery.com>
920         * configure: Regenerate.
922 2005-01-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
924         * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
926         * include/cpplib.h: Also update copyright years.
928 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
930         * files.c (_cpp_find_file): Add files found by search_path_exhausted
931         to the list of all files.
933 2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
935         * internal.h: Update references to Cpp lib filenames.
936         * directives.c: Likewise.
937         * init.c: Likewise.
938         * macro.c: Likewise.
939         * traditional.c: Likewise.
941 2004-12-15  Eric Botcazou  <ebotcazou@libertysurf.fr>
943         PR preprocessor/15167
944         * files.c (destroy_cpp_file): New function.
945         (should_stack_file): Make a new file if the
946         compared file is still stacked.
948 2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>
950         PR preprocessor/17610
951         * directives.c (do_include_common): Error out if an empty filename
952         is given for #include (or #include_next or #import).
954 2004-11-27  Roger Sayle  <roger@eyesopen.com>
955             Zack Weinberg  <zack@codesourcery.com>
957         * internal.h: Replace all uses of uchar with unsigned char.
958         * include/cpp-id-data.h: Likewise.  Guard typedef of uchar
959         with !IN_GCC, so uchar is only defined whilst building libcpp.
961 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
963         * aclocal.m4: Regenerate.
965 2004-11-24  Roger Sayle  <roger@eyesopen.com>
967         PR preprocessor/15824
968         * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
969         directly, instead of the non-existant "system.h" and "ansidecl.h".
970         * configure: Regenerate.
972 2004-11-23  Daniel Jacobowitz  <dan@codesourcery.com>
973             Joseph Myers  <joseph@codesourcery.com>
975         * internal.h (struct lexer_state): Add in_deferred_pragma.
976         * directives.c (struct pragma_entry): Add allow_expansion.
977         (insert_pragma_entry): Take allow_expansion flag.
978         (register_pragma): Likewise.
979         (cpp_register_pragma): Likewise.
980         (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
981         (do_pragma): Honor allow_expansion.
982         (cpp_handle_deferred_pragma): Set in_deferred_pragma.
983         * include/cpplib.h (cpp_register_pragma): Update prototype.
985 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
986             Mark Mitchell  <mark@codesourcery.com>
988         * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
989         need_64bit_hwint=yes.
990         * configure: Regenerate.
992 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
994         * Makefile.in ($(PACKAGE).pot): New rule.  Depend on
995         po/$(PACKAGE).pot.
996         (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
997         arguments.  Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
998         Remove local srcdir path from generated file.
1000 2004-11-04  Zack Weinberg  <zack@codesourcery.com>
1001             Gerald Pfeifer  <gerald@pfeifer.com>
1003         * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1004         as well.
1006 2004-10-27  Zack Weinberg  <zack@codesourcery.com>
1008         PR 18075
1009         * directives.c (do_pragma): Do not defer pragmas which are unknown.
1010         (cpp_handle_deferred_pragma): Add cast to silence warning.
1012 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
1014         * errors.c (_cpp_begin_message): Print "error: " for errors.
1016 2004-10-10  Andreas Jaeger  <aj@suse.de>
1018         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1019         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1021 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
1023         * pch.c (cpp_write_pch_state): Remove variable z as it is not
1024         used.
1025         (cpp_read_state): Remove unused variables, m, d and mac_count.
1027 2004-09-29  Per Bothner  <per@bothner.com>
1029         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
1030         cb.line_change.  Otherwise do_pragma will call the line_change
1031         call-back with a meaningless line number.
1033 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
1035         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1036         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1037         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1038         * aclocal.m4, configure: Regenerate.
1039         * init.c: Include localedir.h.
1040         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1041         (DEFS): Delete.
1042         (.c.o): Use $(ALL_CFLAGS).
1043         (localedir.h, localedir.hs): New rules.
1044         (clean): Use rm -rf to remove directories.
1045         (distclean): Also delete localedir.h and localedir.hs.
1046         (init.o): Update dependencies.
1048 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
1050         * Makefile.in (aclocal.m4): Update dependencies.
1051         * configure.ac (AC_CONFIG_MACRO_DIR): New.
1052         * aclocal.m4, configure: Regenerate.
1054 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
1056         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1057         (_cpp_convert_input, _cpp_default_encoding): Add comments.
1058         Some other comments in this file also tweaked.
1060         * directives.c (do_pragma): Save current buffer position
1061         before lexing the pragma keywords; don't call
1062         _cpp_backup_tokens in the defer_pragmas case.
1064 2004-09-15  Per Bothner  <per@bothner.com>
1066         * include/line-map.h (line_map_start):  Add parameter names so
1067         preceding comment makes sense.
1068         (linemap_add):  Remove from comment mention of non-existing parameter.
1070 2004-09-09  Matt Austern  <austern@apple.com>
1071             Zack Weinberg  <zack@codesourcery.com>
1073         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1074         prefixes throughout.  Add entry for PRAGMA.  Remove
1075         unnecessary "= 0" from EQ.
1076         (enum cpp_ttype): Adjust OP and TK definitions to restore
1077         prefixes, via token-paste.
1078         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1079         Change from #defines to additional cpp_ttype enumerators.
1080         (struct cpp_options): Add defer_pragmas.
1081         (cpp_handle_deferred_pragma): Prototype new interface.
1083         * internal.h (struct cpp_reader): Add directive_result.
1084         * directives.c (struct pragma_entry): Add is_internal field;
1085         give boolean fields type bool.
1086         (start_directive): Initialize pfile->directive_result.type.
1087         (_cpp_do__Pragma): Likewise.
1088         (run_directive): Do not crash if pfile->buffer->prev is NULL.
1089         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1090         from it.
1091         (register_pragma): New static function, bulk of former
1092         cpp_register_pragma here; add 'internal' argument, pass along
1093         to insert_pragma_entry.
1094         (cpp_register_pragma): Now a wrapper around register_pragma which
1095         always passes false for 'internal' argument.
1096         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1097         true for 'internal'.
1098         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1099         an internal pragma, save text till the end of the line as a CPP_PRAGMA
1100         token instead of executing the pragma.
1101         (cpp_handle_deferred_pragma): New interface.
1102         * lex.c (token_spellings): Adjust OP and TK definitions to
1103         match changes to cpplib.h.
1104         (_cpp_lex_token): Check for a directive-result token and
1105         return it if present.
1106         (cpp_token_val_index): Handle CPP_PRAGMA.
1107         * macro.c (cpp_builtin_macro_text): Correct comment.
1108         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1110 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
1112         PR preprocessor/14699
1113         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1114         from size_t to double.
1116 2004-08-28  Andreas Schwab  <schwab@suse.de>
1117             Andreas Jaeger <aj@suse.de>
1119         * configure.ac: Set PACKAGE correctly.
1120         * configure: Regenerated.
1122 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
1124         * Makefile.in: Add back top_builddir.
1126 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
1128         * configure.ac: Replace Automake macro invocations
1129         with manual Autoconf checks and substitutions.
1130         * configure: Regenerate.
1131         * aclocal.m4: Regenerate.
1132         * config.in: Regenerate.
1133         * Makefile.am: Removed.
1134         * Makefile.in: Heavy simplification and reorganization.
1136 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
1138         * configure.ac (arm*-*-eabi*): New target.
1139         (arm*-*-symbianelf*): Likewise.
1140         * configure: Regenerated.
1142 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
1144         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1145         * directives.c: Use XNEW-family macros from libiberty.
1146         * lex.c: Likewise.
1147         * macro.c: Likewise.
1148         * cpplib.h (cpp_deps_style): Export enum with name.
1150 2004-07-23  Matthias Klose  <doko@debian.org>
1152         * init.c (init_library): Use PACKAGE for the text domain.
1154 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
1156         PR preprocessor/16366
1157         * internal.h (struct cpp_reader): New field dir_hash.
1158         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1159         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1161 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
1163         PR preprocessor/16192
1164         PR preprocessor/15913
1165         PR preprocessor/15572
1166         * expr.c (_cpp_parse_expr): Handle remaining cases where an
1167         expression is missing.
1168         * init.c (post_options): Traditional cpp doesn't do // comments.
1170 2004-06-30  Per Bothner  <per@bothner.com>
1172         * include/line-map.h (fileline):  Remove old typedef.
1173         * internal.h (struct cpp_reader):  Use source_location typedef instead.
1175 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
1177         Partially revert patch of 2004-06-05.
1178         * files.c (search_cache): Remove pfile argument.  Don't check
1179         for file that would be found by "" or <> search here...
1180         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1181         Do not apply directory-of-current-file correction to files
1182         found by this check.  Rearrange code slightly.
1184 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
1186         * files.c (should_stack_file): Correct swapped parameters to call
1187         to cb.read_pch.
1188         * pch.c (cpp_valid_state): Handle -fpreprocessed.
1190 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1192         * Makefile.in: Regenerate with automake 1.8.5.
1193         * aclocal.m4: Likewise.
1194         * configure: Regenerate.
1196 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
1198         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1199         * configure, config.in: Regenerate.
1200         * system.h: Unconditionally define bool as unsigned char,
1201         BOOL_BITFIELD as unsigned int.
1202         * .cvsignore: New file.
1204 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
1206         * traditional.c (push_replacement_text): Set macro->traditional.
1207         (save_replacement_text): Likewise.
1208         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1209         (struct save_macro_item): Delete.
1210         (struct save_macro_data): Use a character array not the previous
1211         structured format.
1212         (save_macros): Save macro as text not as internal structures.
1213         (cpp_prepare_state): Update for changes to save_macro_data.
1214         (cpp_read_state): Don't read macros defined in PCH.  Restore
1215         -D macros as text.
1216         * macro.c (create_iso_definition): Honour alloc_subobject.
1217         Clear traditional flag.
1218         (_cpp_create_definition): Honour alloc_subobject.
1219         * lex.c (cpp_token_val_index): New.
1220         * internal.h: Include cpp-id-data.h.
1221         (uchar): Move definition to cpp-id-data.h.
1222         (U): Likewise.
1223         (cpp_macro): Likewise.
1224         * directives.c (struct answer): Move to cpp-id-data.h.
1225         (do_assert): Honour alloc_subobject.
1227         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1228         * include/cpplib.h (struct cpp_string): Add GTY marker.
1229         (enum cpp_token_fld_kind): New.
1230         (struct cpp_token): Add GTY markers.
1231         (cpp_token_val_index): Prototype.
1232         (CPP_HASHNODE_VALUE_IDX): New.
1233         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1234         * include/cpp-id-data.h: New file.
1236 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
1238         * Makefile.am (all-local): New.
1239         * Makefile.in: Regenerate.
1241 2004-06-06  Roger Sayle  <roger@eyesopen.com>
1243         * Makefile.am (LIBICONV): Declare.
1244         (makedepend_LDADD): Use LIBICONV.
1245         * Makefile.in: Regenerate.
1247 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
1249         * Makefile.am (LIBINTL): Declare
1250         (makedepend_LDADD): Use LIBINTL.
1251         * Makefile.in: Regenerate.
1253 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
1255         * Makefile.am: Add makedepend.
1256         * Makefile.in, aclocal.m4: Regenerate.
1257         * charset.c: Insert a space to avoid a warning.
1258         * directives.c: Include mkdeps.h.
1259         (_cpp_handle_directive): Reenable macro expander if appropriate.
1260         (undefine_macros): Inline body of _cpp_free_definition for speed.
1261         Do not call undef callback or _cpp_warn_if_unused_macro.
1262         (cpp_get_deps): New interface.
1263         * files.c (search_cache): Add pfile argument.  Check for file
1264         that would be found by "" or <> search here...
1265         (_cpp_find_file): ...not here.  Correct recorded start_dir of
1266         files found by directory-of-current-file search that would be
1267         found by "" or <> search.
1268         * init.c (cpp_add_dependency_target): Delete.
1269         * internal.h (struct lexer_state): Add discarding_output flag.
1270         * lex.c (lex_identifier): Compute hash function while scanning.
1271         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1272         directives.
1273         * makedepend.c: New file.
1274         * mkdeps.c (struct deps): Add vpath vector.
1275         (apply_vpath, deps_add_vpath): New function.
1276         (deps_free): Free vpath vector.
1277         (deps_add_dep, deps_add_target): Use apply_vpath.
1278         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1279         (ht_lookup_with_hash): New function.
1280         * cpplib.h, mkdeps.h: Update prototypes.
1281         * symtab.h: Update prototypes.
1282         (HT_HASHSTEP, HT_FINISH): New macros.
1284 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
1286         * symtab.c (ht_create): Set entries_owned.
1287         (ht_destroy): Honour entries_owned.
1288         (ht_expand): Likewise.
1289         (ht_load): New.
1290         * include/symtab.h (struct ht): New field 'entries_owned'
1291         (ht_load): New prototype.
1293 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
1295         PR bootstrap/15651
1296         * configure.ac: Fix m4 quoting when picking
1297         the size of HOST_WIDE_INT.
1298         * configure: Regenerate.
1300 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
1302         * Makefile.am: the correct directory for
1303         gettext include files is given by @INCINTL@.
1304         * Makefile.in: Regenerate.
1306 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
1308         * system.h [!ENABLE_NLS]: dgettext takes two
1309         parameters.
1311 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
1313         Moved libcpp from the gcc subdirectory to the toplevel.
1314         * Makefile.am: New file.
1315         * Makefile.in: Regenerate.
1316         * configure.ac: New file.
1317         * configure: Regenerate.
1318         * config.in: Regenerate.
1319         * charset.c: Moved from gcc/cppcharset.c.  Add note about
1320         brokenness of input charset detection.  Adjust for change
1321         in name of cppucnid.h.
1322         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
1323         * expr.c: Moved from gcc/cppexp.c.
1324         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
1325         Remove #define of O_BINARY, it is in system.h.
1326         * identifiers.c: Moved from gcc/cpphash.c.
1327         * internal.h: Moved from gcc/cpphash.h.  Change header
1328         guard name.  All other files adjusted to match name change.
1329         * init.c: Moved from gcc/cppinit.c.
1330         (init_library) [ENABLE_NLS]: Call bindtextdomain.
1331         * lex.c: Moved from gcc/cpplex.c.
1332         * directives.c: Moved from gcc/cpplib.c.
1333         * macro.c: Moved from gcc/cppmacro.c.
1334         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
1335         * traditional.c: Moved from gcc/cpptrad.c.
1336         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
1337         guard name.
1338         * ucnid.pl: Moved from gcc/cppucnid.pl.
1339         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
1340         guard name.
1341         * symtab.c: Moved from gcc/hashtable.c.
1342         * line-map.c: Moved from gcc.  Do not include intl.h.
1343         * mkdeps.c: Moved from gcc.
1344         * system.h: New file.
1345         * include/cpplib.h: Moved from gcc.  Change header guard name.
1346         * include/line-map.h: Moved from gcc.  Change header guard name.
1347         * include/mkdeps.h: Moved from gcc.  Change header guard name.
1348         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
1349         guard name.