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