OSDN Git Service

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