1 2004-09-17 Zack Weinberg <zack@codesourcery.com>
3 * directives.c (do_pragma): Save current buffer position
4 before lexing the pragma keywords; don't call
5 _cpp_backup_tokens in the defer_pragmas case.
7 2004-09-15 Per Bothner <per@bothner.com>
9 * include/line-map.h (line_map_start): Add parameter names so
10 preceding comment makes sense.
11 (linemap_add): Remove from comment mention of non-existing parameter.
13 2004-09-09 Matt Austern <austern@apple.com>
14 Zack Weinberg <zack@codesourcery.com>
16 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
17 prefixes throughout. Add entry for PRAGMA. Remove
18 unnecessary "= 0" from EQ.
19 (enum cpp_ttype): Adjust OP and TK definitions to restore
20 prefixes, via token-paste.
21 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
22 Change from #defines to additional cpp_ttype enumerators.
23 (struct cpp_options): Add defer_pragmas.
24 (cpp_handle_deferred_pragma): Prototype new interface.
26 * internal.h (struct cpp_reader): Add directive_result.
27 * directives.c (struct pragma_entry): Add is_internal field;
28 give boolean fields type bool.
29 (start_directive): Initialize pfile->directive_result.type.
30 (_cpp_do__Pragma): Likewise.
31 (run_directive): Do not crash if pfile->buffer->prev is NULL.
32 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
34 (register_pragma): New static function, bulk of former
35 cpp_register_pragma here; add 'internal' argument, pass along
36 to insert_pragma_entry.
37 (cpp_register_pragma): Now a wrapper around register_pragma which
38 always passes false for 'internal' argument.
39 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
41 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
42 an internal pragma, save text till the end of the line as a CPP_PRAGMA
43 token instead of executing the pragma.
44 (cpp_handle_deferred_pragma): New interface.
45 * lex.c (token_spellings): Adjust OP and TK definitions to
46 match changes to cpplib.h.
47 (_cpp_lex_token): Check for a directive-result token and
49 (cpp_token_val_index): Handle CPP_PRAGMA.
50 * macro.c (cpp_builtin_macro_text): Correct comment.
51 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
53 2004-09-06 Serge Belyshev <belyshev@lubercy.com>
56 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
57 from size_t to double.
59 2004-08-28 Andreas Schwab <schwab@suse.de>
60 Andreas Jaeger <aj@suse.de>
62 * configure.ac: Set PACKAGE correctly.
63 * configure: Regenerated.
65 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
67 * Makefile.in: Add back top_builddir.
69 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
71 * configure.ac: Replace Automake macro invocations
72 with manual Autoconf checks and substitutions.
73 * configure: Regenerate.
74 * aclocal.m4: Regenerate.
75 * config.in: Regenerate.
76 * Makefile.am: Removed.
77 * Makefile.in: Heavy simplification and reorganization.
79 2004-08-09 Mark Mitchell <mark@codesourcery.com>
81 * configure.ac (arm*-*-eabi*): New target.
82 (arm*-*-symbianelf*): Likewise.
83 * configure: Regenerated.
85 2004-07-24 Bernardo Innocenti <bernie@develer.com>
87 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
88 * directives.c: Use XNEW-family macros from libiberty.
91 * cpplib.h (cpp_deps_style): Export enum with name.
93 2004-07-23 Matthias Klose <doko@debian.org>
95 * init.c (init_library): Use PACKAGE for the text domain.
97 2004-07-16 Andris Pavenis <pavenis@latnet.lv>
100 * internal.h (struct cpp_reader): New field dir_hash.
101 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
102 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
104 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
106 PR preprocessor/16192
107 PR preprocessor/15913
108 PR preprocessor/15572
109 * expr.c (_cpp_parse_expr): Handle remaining cases where an
110 expression is missing.
111 * init.c (post_options): Traditional cpp doesn't do // comments.
113 2004-06-30 Per Bothner <per@bothner.com>
115 * include/line-map.h (fileline): Remove old typedef.
116 * internal.h (struct cpp_reader): Use source_location typedef instead.
118 2004-06-26 Zack Weinberg <zack@codesourcery.com>
120 Partially revert patch of 2004-06-05.
121 * files.c (search_cache): Remove pfile argument. Don't check
122 for file that would be found by "" or <> search here...
123 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
124 Do not apply directory-of-current-file correction to files
125 found by this check. Rearrange code slightly.
127 2004-06-21 Geoffrey Keating <geoffk@apple.com>
129 * files.c (should_stack_file): Correct swapped parameters to call
131 * pch.c (cpp_valid_state): Handle -fpreprocessed.
133 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
135 * Makefile.in: Regenerate with automake 1.8.5.
136 * aclocal.m4: Likewise.
137 * configure: Regenerate.
139 2004-06-11 Zack Weinberg <zack@codesourcery.com>
141 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
142 * configure, config.in: Regenerate.
143 * system.h: Unconditionally define bool as unsigned char,
144 BOOL_BITFIELD as unsigned int.
145 * .cvsignore: New file.
147 2004-06-09 Geoffrey Keating <geoffk@apple.com>
149 * traditional.c (push_replacement_text): Set macro->traditional.
150 (save_replacement_text): Likewise.
151 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
152 (struct save_macro_item): Delete.
153 (struct save_macro_data): Use a character array not the previous
155 (save_macros): Save macro as text not as internal structures.
156 (cpp_prepare_state): Update for changes to save_macro_data.
157 (cpp_read_state): Don't read macros defined in PCH. Restore
159 * macro.c (create_iso_definition): Honour alloc_subobject.
160 Clear traditional flag.
161 (_cpp_create_definition): Honour alloc_subobject.
162 * lex.c (cpp_token_val_index): New.
163 * internal.h: Include cpp-id-data.h.
164 (uchar): Move definition to cpp-id-data.h.
166 (cpp_macro): Likewise.
167 * directives.c (struct answer): Move to cpp-id-data.h.
168 (do_assert): Honour alloc_subobject.
170 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
171 * include/cpplib.h (struct cpp_string): Add GTY marker.
172 (enum cpp_token_fld_kind): New.
173 (struct cpp_token): Add GTY markers.
174 (cpp_token_val_index): Prototype.
175 (CPP_HASHNODE_VALUE_IDX): New.
176 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
177 * include/cpp-id-data.h: New file.
179 2004-06-09 Paolo Bonzini <bonzini@gnu.org>
181 * Makefile.am (all-local): New.
182 * Makefile.in: Regenerate.
184 2004-06-06 Roger Sayle <roger@eyesopen.com>
186 * Makefile.am (LIBICONV): Declare.
187 (makedepend_LDADD): Use LIBICONV.
188 * Makefile.in: Regenerate.
190 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
192 * Makefile.am (LIBINTL): Declare
193 (makedepend_LDADD): Use LIBINTL.
194 * Makefile.in: Regenerate.
196 2004-06-05 Zack Weinberg <zack@codesourcery.com>
198 * Makefile.am: Add makedepend.
199 * Makefile.in, aclocal.m4: Regenerate.
200 * charset.c: Insert a space to avoid a warning.
201 * directives.c: Include mkdeps.h.
202 (_cpp_handle_directive): Reenable macro expander if appropriate.
203 (undefine_macros): Inline body of _cpp_free_definition for speed.
204 Do not call undef callback or _cpp_warn_if_unused_macro.
205 (cpp_get_deps): New interface.
206 * files.c (search_cache): Add pfile argument. Check for file
207 that would be found by "" or <> search here...
208 (_cpp_find_file): ...not here. Correct recorded start_dir of
209 files found by directory-of-current-file search that would be
210 found by "" or <> search.
211 * init.c (cpp_add_dependency_target): Delete.
212 * internal.h (struct lexer_state): Add discarding_output flag.
213 * lex.c (lex_identifier): Compute hash function while scanning.
214 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
216 * makedepend.c: New file.
217 * mkdeps.c (struct deps): Add vpath vector.
218 (apply_vpath, deps_add_vpath): New function.
219 (deps_free): Free vpath vector.
220 (deps_add_dep, deps_add_target): Use apply_vpath.
221 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
222 (ht_lookup_with_hash): New function.
223 * cpplib.h, mkdeps.h: Update prototypes.
224 * symtab.h: Update prototypes.
225 (HT_HASHSTEP, HT_FINISH): New macros.
227 2004-05-29 Geoffrey Keating <geoffk@apple.com>
229 * symtab.c (ht_create): Set entries_owned.
230 (ht_destroy): Honour entries_owned.
231 (ht_expand): Likewise.
233 * include/symtab.h (struct ht): New field 'entries_owned'
234 (ht_load): New prototype.
236 2004-05-26 Paolo Bonzini <bonzini@gnu.org>
239 * configure.ac: Fix m4 quoting when picking
240 the size of HOST_WIDE_INT.
241 * configure: Regenerate.
243 2004-05-25 Paolo Bonzini <bonzini@gnu.org>
245 * Makefile.am: the correct directory for
246 gettext include files is given by @INCINTL@.
247 * Makefile.in: Regenerate.
249 2004-05-24 Paolo Bonzini <bonzini@gnu.org>
251 * system.h [!ENABLE_NLS]: dgettext takes two
254 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
256 Moved libcpp from the gcc subdirectory to the toplevel.
257 * Makefile.am: New file.
258 * Makefile.in: Regenerate.
259 * configure.ac: New file.
260 * configure: Regenerate.
261 * config.in: Regenerate.
262 * charset.c: Moved from gcc/cppcharset.c. Add note about
263 brokenness of input charset detection. Adjust for change
264 in name of cppucnid.h.
265 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
266 * expr.c: Moved from gcc/cppexp.c.
267 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
268 Remove #define of O_BINARY, it is in system.h.
269 * identifiers.c: Moved from gcc/cpphash.c.
270 * internal.h: Moved from gcc/cpphash.h. Change header
271 guard name. All other files adjusted to match name change.
272 * init.c: Moved from gcc/cppinit.c.
273 (init_library) [ENABLE_NLS]: Call bindtextdomain.
274 * lex.c: Moved from gcc/cpplex.c.
275 * directives.c: Moved from gcc/cpplib.c.
276 * macro.c: Moved from gcc/cppmacro.c.
277 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
278 * traditional.c: Moved from gcc/cpptrad.c.
279 * ucnid.h: Moved from gcc/cppucnid.h. Change header
281 * ucnid.pl: Moved from gcc/cppucnid.pl.
282 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
284 * symtab.c: Moved from gcc/hashtable.c.
285 * line-map.c: Moved from gcc. Do not include intl.h.
286 * mkdeps.c: Moved from gcc.
287 * system.h: New file.
288 * include/cpplib.h: Moved from gcc. Change header guard name.
289 * include/line-map.h: Moved from gcc. Change header guard name.
290 * include/mkdeps.h: Moved from gcc. Change header guard name.
291 * include/symtab.h: Moved from gcc/hashtable.h. Change header