* class.c (ident_subst): Always alloca buffer.
[official-gcc.git] / libcpp / ChangeLog
blob77f1dc08b80f42202543686167d995d6e0b601ee
1 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
3         * errors.c (_cpp_begin_message): Print "error: " for errors.
5 2004-10-10  Andreas Jaeger  <aj@suse.de>
7         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
8         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
10 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
12         * pch.c (cpp_write_pch_state): Remove variable z as it is not
13         used.
14         (cpp_read_state): Remove unused variables, m, d and mac_count.
16 2004-09-29  Per Bothner  <per@bothner.com>
18         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
19         cb.line_change.  Otherwise do_pragma will call the line_change
20         call-back with a meaningless line number.
22 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
24         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
25         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
26         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
27         * aclocal.m4, configure: Regenerate.
28         * init.c: Include localedir.h.
29         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
30         (DEFS): Delete.
31         (.c.o): Use $(ALL_CFLAGS).
32         (localedir.h, localedir.hs): New rules.
33         (clean): Use rm -rf to remove directories.
34         (distclean): Also delete localedir.h and localedir.hs.
35         (init.o): Update dependencies.
37 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
39         * Makefile.in (aclocal.m4): Update dependencies.
40         * configure.ac (AC_CONFIG_MACRO_DIR): New.
41         * aclocal.m4, configure: Regenerate.
43 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
45         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
46         (_cpp_convert_input, _cpp_default_encoding): Add comments.
47         Some other comments in this file also tweaked.
49         * directives.c (do_pragma): Save current buffer position
50         before lexing the pragma keywords; don't call
51         _cpp_backup_tokens in the defer_pragmas case.
53 2004-09-15  Per Bothner  <per@bothner.com>
55         * include/line-map.h (line_map_start):  Add parameter names so
56         preceding comment makes sense.
57         (linemap_add):  Remove from comment mention of non-existing parameter.
59 2004-09-09  Matt Austern  <austern@apple.com>
60             Zack Weinberg  <zack@codesourcery.com>
62         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
63         prefixes throughout.  Add entry for PRAGMA.  Remove
64         unnecessary "= 0" from EQ.
65         (enum cpp_ttype): Adjust OP and TK definitions to restore
66         prefixes, via token-paste.
67         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
68         Change from #defines to additional cpp_ttype enumerators.
69         (struct cpp_options): Add defer_pragmas.
70         (cpp_handle_deferred_pragma): Prototype new interface.
72         * internal.h (struct cpp_reader): Add directive_result.
73         * directives.c (struct pragma_entry): Add is_internal field;
74         give boolean fields type bool.
75         (start_directive): Initialize pfile->directive_result.type.
76         (_cpp_do__Pragma): Likewise.
77         (run_directive): Do not crash if pfile->buffer->prev is NULL.
78         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
79         from it.
80         (register_pragma): New static function, bulk of former
81         cpp_register_pragma here; add 'internal' argument, pass along
82         to insert_pragma_entry.
83         (cpp_register_pragma): Now a wrapper around register_pragma which
84         always passes false for 'internal' argument.
85         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
86         true for 'internal'.
87         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
88         an internal pragma, save text till the end of the line as a CPP_PRAGMA
89         token instead of executing the pragma.
90         (cpp_handle_deferred_pragma): New interface.
91         * lex.c (token_spellings): Adjust OP and TK definitions to
92         match changes to cpplib.h.
93         (_cpp_lex_token): Check for a directive-result token and
94         return it if present.
95         (cpp_token_val_index): Handle CPP_PRAGMA.
96         * macro.c (cpp_builtin_macro_text): Correct comment.
97         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
99 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
101         PR preprocessor/14699
102         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
103         from size_t to double.
105 2004-08-28  Andreas Schwab  <schwab@suse.de>
106             Andreas Jaeger <aj@suse.de>
108         * configure.ac: Set PACKAGE correctly.
109         * configure: Regenerated.
111 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
113         * Makefile.in: Add back top_builddir.
115 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
117         * configure.ac: Replace Automake macro invocations
118         with manual Autoconf checks and substitutions.
119         * configure: Regenerate.
120         * aclocal.m4: Regenerate.
121         * config.in: Regenerate.
122         * Makefile.am: Removed.
123         * Makefile.in: Heavy simplification and reorganization.
125 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
127         * configure.ac (arm*-*-eabi*): New target.
128         (arm*-*-symbianelf*): Likewise.
129         * configure: Regenerated.
131 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
133         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
134         * directives.c: Use XNEW-family macros from libiberty.
135         * lex.c: Likewise.
136         * macro.c: Likewise.
137         * cpplib.h (cpp_deps_style): Export enum with name.
139 2004-07-23  Matthias Klose  <doko@debian.org>
141         * init.c (init_library): Use PACKAGE for the text domain.
143 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
145         PR preprocessor/16366
146         * internal.h (struct cpp_reader): New field dir_hash.
147         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
148         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
150 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
152         PR preprocessor/16192
153         PR preprocessor/15913
154         PR preprocessor/15572
155         * expr.c (_cpp_parse_expr): Handle remaining cases where an
156         expression is missing.
157         * init.c (post_options): Traditional cpp doesn't do // comments.
159 2004-06-30  Per Bothner  <per@bothner.com>
161         * include/line-map.h (fileline):  Remove old typedef.
162         * internal.h (struct cpp_reader):  Use source_location typedef instead.
164 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
166         Partially revert patch of 2004-06-05.
167         * files.c (search_cache): Remove pfile argument.  Don't check
168         for file that would be found by "" or <> search here...
169         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
170         Do not apply directory-of-current-file correction to files
171         found by this check.  Rearrange code slightly.
173 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
175         * files.c (should_stack_file): Correct swapped parameters to call
176         to cb.read_pch.
177         * pch.c (cpp_valid_state): Handle -fpreprocessed.
179 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
181         * Makefile.in: Regenerate with automake 1.8.5.
182         * aclocal.m4: Likewise.
183         * configure: Regenerate.
185 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
187         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
188         * configure, config.in: Regenerate.
189         * system.h: Unconditionally define bool as unsigned char,
190         BOOL_BITFIELD as unsigned int.
191         * .cvsignore: New file.
193 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
195         * traditional.c (push_replacement_text): Set macro->traditional.
196         (save_replacement_text): Likewise.
197         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
198         (struct save_macro_item): Delete.
199         (struct save_macro_data): Use a character array not the previous
200         structured format.
201         (save_macros): Save macro as text not as internal structures.
202         (cpp_prepare_state): Update for changes to save_macro_data.
203         (cpp_read_state): Don't read macros defined in PCH.  Restore
204         -D macros as text.
205         * macro.c (create_iso_definition): Honour alloc_subobject.
206         Clear traditional flag.
207         (_cpp_create_definition): Honour alloc_subobject.
208         * lex.c (cpp_token_val_index): New.
209         * internal.h: Include cpp-id-data.h.
210         (uchar): Move definition to cpp-id-data.h.
211         (U): Likewise.
212         (cpp_macro): Likewise.
213         * directives.c (struct answer): Move to cpp-id-data.h.
214         (do_assert): Honour alloc_subobject.
216         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
217         * include/cpplib.h (struct cpp_string): Add GTY marker.
218         (enum cpp_token_fld_kind): New.
219         (struct cpp_token): Add GTY markers.
220         (cpp_token_val_index): Prototype.
221         (CPP_HASHNODE_VALUE_IDX): New.
222         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
223         * include/cpp-id-data.h: New file.
225 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
227         * Makefile.am (all-local): New.
228         * Makefile.in: Regenerate.
230 2004-06-06  Roger Sayle  <roger@eyesopen.com>
232         * Makefile.am (LIBICONV): Declare.
233         (makedepend_LDADD): Use LIBICONV.
234         * Makefile.in: Regenerate.
236 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
238         * Makefile.am (LIBINTL): Declare
239         (makedepend_LDADD): Use LIBINTL.
240         * Makefile.in: Regenerate.
242 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
244         * Makefile.am: Add makedepend.
245         * Makefile.in, aclocal.m4: Regenerate.
246         * charset.c: Insert a space to avoid a warning.
247         * directives.c: Include mkdeps.h.
248         (_cpp_handle_directive): Reenable macro expander if appropriate.
249         (undefine_macros): Inline body of _cpp_free_definition for speed.
250         Do not call undef callback or _cpp_warn_if_unused_macro.
251         (cpp_get_deps): New interface.
252         * files.c (search_cache): Add pfile argument.  Check for file
253         that would be found by "" or <> search here...
254         (_cpp_find_file): ...not here.  Correct recorded start_dir of
255         files found by directory-of-current-file search that would be
256         found by "" or <> search.
257         * init.c (cpp_add_dependency_target): Delete.
258         * internal.h (struct lexer_state): Add discarding_output flag.
259         * lex.c (lex_identifier): Compute hash function while scanning.
260         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
261         directives.
262         * makedepend.c: New file.
263         * mkdeps.c (struct deps): Add vpath vector.
264         (apply_vpath, deps_add_vpath): New function.
265         (deps_free): Free vpath vector.
266         (deps_add_dep, deps_add_target): Use apply_vpath.
267         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
268         (ht_lookup_with_hash): New function.
269         * cpplib.h, mkdeps.h: Update prototypes.
270         * symtab.h: Update prototypes.
271         (HT_HASHSTEP, HT_FINISH): New macros.
273 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
275         * symtab.c (ht_create): Set entries_owned.
276         (ht_destroy): Honour entries_owned.
277         (ht_expand): Likewise.
278         (ht_load): New.
279         * include/symtab.h (struct ht): New field 'entries_owned'
280         (ht_load): New prototype.
282 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
284         PR bootstrap/15651
285         * configure.ac: Fix m4 quoting when picking
286         the size of HOST_WIDE_INT.
287         * configure: Regenerate.
289 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
291         * Makefile.am: the correct directory for
292         gettext include files is given by @INCINTL@.
293         * Makefile.in: Regenerate.
295 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
297         * system.h [!ENABLE_NLS]: dgettext takes two
298         parameters.
300 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
302         Moved libcpp from the gcc subdirectory to the toplevel.
303         * Makefile.am: New file.
304         * Makefile.in: Regenerate.
305         * configure.ac: New file.
306         * configure: Regenerate.
307         * config.in: Regenerate.
308         * charset.c: Moved from gcc/cppcharset.c.  Add note about
309         brokenness of input charset detection.  Adjust for change
310         in name of cppucnid.h.
311         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
312         * expr.c: Moved from gcc/cppexp.c.
313         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
314         Remove #define of O_BINARY, it is in system.h.
315         * identifiers.c: Moved from gcc/cpphash.c.
316         * internal.h: Moved from gcc/cpphash.h.  Change header
317         guard name.  All other files adjusted to match name change.
318         * init.c: Moved from gcc/cppinit.c.
319         (init_library) [ENABLE_NLS]: Call bindtextdomain.
320         * lex.c: Moved from gcc/cpplex.c.
321         * directives.c: Moved from gcc/cpplib.c.
322         * macro.c: Moved from gcc/cppmacro.c.
323         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
324         * traditional.c: Moved from gcc/cpptrad.c.
325         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
326         guard name.
327         * ucnid.pl: Moved from gcc/cppucnid.pl.
328         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
329         guard name.
330         * symtab.c: Moved from gcc/hashtable.c.
331         * line-map.c: Moved from gcc.  Do not include intl.h.
332         * mkdeps.c: Moved from gcc.
333         * system.h: New file.
334         * include/cpplib.h: Moved from gcc.  Change header guard name.
335         * include/line-map.h: Moved from gcc.  Change header guard name.
336         * include/mkdeps.h: Moved from gcc.  Change header guard name.
337         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
338         guard name.