OSDN Git Service

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