OSDN Git Service

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