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