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