OSDN Git Service

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