]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
re PR c++/19989 (Inconsistency with zero-sized arrays)
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
a63607ed
JM
12005-11-04 Joseph S. Myers <joseph@codesourcery.com>
2
3 * include/cpplib.h (struct cpp_callbacks): Make error take
4 va_list* parameter.
5 * errors.c (cpp_error): Update call to callback.
6
651ed942
AP
72005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
8
9 PR preprocessor/22042
10 * macro.c (_cpp_builtin_macro_text): Lower the needed max
11 buffer size.
12 (cpp_quote_string): Don't octalify non printable
13 charactors.
14
178b58b5
JM
152005-11-03 Joseph S. Myers <joseph@codesourcery.com>
16
17 PR c++/17964
18 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
19 (struct cpp_callbacks): Add error.
20 * errors.c (cpp_error): If client_diagnostic, use error callback.
21 * charset.c (convert_escape): Don't use %03o in diagnostic.
22
3ee5ed11 232005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
24
25 PR preprocessor/15220
26 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
27 callers. Pass to open_file_failed.
28 (open_file_failed): New parameter angle_brackets. Fix all callers.
29 Use in print_dep assignment.
30 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
31 * internal.h (_cpp_find_file): Add new parm to declaration.
32
077fc835
KH
332005-10-08 Kazu Hirata <kazu@codesourcery.com>
34
35 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
36 * configure: Regenerate.
37
cbc43ae0
ILT
382005-10-04 Ian Lance Taylor <ian@airs.com>
39
40 PR preprocessor/13726
41 * directives.c (check_eol_return_comments): New static function.
42 (parse_include): Add buf parameter. Change all callers.
43 (do_include_common): If not discard comments, turn on
44 save_comments. Pass collected comments to include callback.
45 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
46 include callback: cpp_token list.
47
af15a2fe
JM
482005-09-20 Joseph S. Myers <joseph@codesourcery.com>
49
50 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
51 * init.c (struct lang_flags, lang_defaults): Add
52 extended_identifiers.
53 (cpp_set_lang): Use it.
54 * lex.c (forms_identifier_p): Check extended_identifiers.
55
f5eab47e
JJ
562005-08-30 Jakub Jelinek <jakub@redhat.com>
57
58 PR preprocessor/20348
59 PR preprocessor/20356
60 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
61 2004-06-05 changes.
62
467129e6
KG
632005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
64
65 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
66 -Wmissing-format-attribute.
67
68 * configure: Regenerate.
69
200031d1
KC
702005-06-29 Kelley Cook <kcook@gcc.gnu.org>
71
72 * all files: Update FSF address in copyright headers.
73 * makeucnid.c (write_copyright): Update outputted FSF address.
74
f610dd5f
ZW
752005-06-13 Zack Weinberg <zack@codesourcery.com>
76
77 * configure.ac: Invoke ZW_CREATE_DEPDIR and
78 ZW_PROG_COMPILER_DEPENDENCIES.
79 * aclocal.m4, configure: Regenerate.
80 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
81 New variables.
82 (distclean): Clean up $(DEPDIR) and its contents.
83 (.c.o): Use $(COMPILE).
84 Include $(DEPDIR)/*.Po for most object->header dependencies.
85
c3f829c1
GDR
862005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
87
88 * configure.ac: Check declarations for asprintf and vasprintf.
89 * config.in: Regenerate.
90 * configure: Likewise.
91
92 * charset.c (conversion_loop): Use XRESIZEVEC.
93 (convert_no_conversion): Likewise.
94 (convert_using_iconv): Likewise.
95 (init_iconv_desc): Cast return value of alloca.
96 (cpp_host_to_exec_charset): Use XNEWVEC.
97 (emit_numeric_escape): Use XRESIZEVEC.
98 (cpp_interpret_string): Use XNEWVEC.
99 (cpp_interpret_string): Use XRESIZEVEC.
100 (_cpp_interpret_identifier): Cast return value of alloca.
101 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
102 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
103 (parse_include): Use XNEWVEC.
104 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 105 "new_entry".
c3f829c1
GDR
106 (save_registered_pragmas): Cast return value of xmemdup.
107 (destringize_and_run): Same for alloca.
108 (parse_assertion): Likewise.
109 (do_assert): Cast allocated storage to proper type.
110 (cpp_define): Likewise.
111 (_cpp_define_builtin): Likewise.
112 (cpp_undef): Likewise.
113 (handle_assertion): Likewise.
114 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
115 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
116 (CPP_UMINUS): Likewise.
117 (struct cpp_operator): Rename from struct operator.
118 (_cpp_expand_op_stack): Use XRESIZEVEC.
119 * files.c (pch_open_file): Use XNEWVEC.
120 (pch_open_file): Use XRESIZEVEC.
121 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
122 (dir_name_of_file): Use XNEWVEC.
123 (make_cpp_file): Use XCNEW.
124 (make_cpp_dir): Likewise.
125 (allocate_file_hash_entries): USE XNEWVEC.
126 (cpp_included): Cast return value of htab_find_with_hash.
127 (append_file_to_dir): Use XNEWVEC.
128 (read_filename_string): Likewise. Use XRESIZEVEC too.
129 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
130 (remap_filename): Use XNEWVEC.
131 (struct pchf_entry): Move definition out of struct pchf_data.
132 (_cpp_save_file_entries): Use XCNEWVAR.
133 (_cpp_read_file_entries): Use XNEWVAR.
134 * identifiers.c (alloc_node): Use XOBNEW.
135 * init.c (cpp_create_reader): Use XCNEW.
136 (cpp_init_builtins): Cast of b->value to enum builtin_type.
137 (read_original_directory): Cast return value of alloca.
138 * lex.c (add_line_note): Use XRESIZEVEC.
139 (warn_about_normalization): Use XNEWVEC.
140 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
141 (new_buff): Use XNEWVEC.
142 * line-map.c (linemap_add): Use XRESIZEVEC.
143 * macro.c (builtin_macro): Cast return value of alloca.
144 (paste_tokens): Likewise.
145 (expand_arg): Use XNEWVEC and XRESIZEVEC.
146 (_cpp_save_parameter): Use XRESIZEVEC.
147 (create_iso_definition): Cast allocated storage to proper type.
148 (_cpp_create_definition): Likewise.
149 (cpp_macro_definition): Use XRESIZEVEC.
150 * makedepend.c (add_clm): Use XNEW.
151 (add_dir): Likewise.
152 * mkdeps.c (munge): Use XNEWVEC.
153 (deps_init): Use XCNEW.
154 (deps_add_target): Use XRESIZEVEC.
155 (deps_add_default_target): Cast return value of alloca.
156 (deps_add_dep): Use XRESIZEVEC.
157 (deps_add_vpath): Likewise. Use XNEWVEC too.
158 (deps_restore): Likewise.
159 * pch.c (save_idents): Use XNEW and XNEWVEC.
160 (cpp_save_state): Use XNEW.
161 (count_defs): Cast return value of htab_find.
162 (write_defs): Likewise.
163 (cpp_write_pch_deps): Use XNEWVEC.
164 (collect_ht_nodes): Use XRESIZEVEC.
165 (cpp_valid_state): Use XNEWVEC.
166 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
167 * symtab.c (ht_create): Use XCNEW.
168 (ht_lookup_with_hash): Cast return value of obstack_copy0.
169 (ht_expand): Use XCNEWVEC.
170 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
171 (bool): Do not define if __cplusplus.
172
1ed17cd5
ZW
1732005-05-12 Zack Weinberg <zack@codesourcery.com>
174
175 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
176 (do_sccs): Delete function definition, #define to do_ident.
177 (do_ident): Don't hardwire directive name.
178
5a8c20ce
RK
1792005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
180
181 PR bootstrap/21230
182 * configure: Regenerate.
183
473c5bc9
AP
1842005-04-27 Andris Pavenis <pavenis@latnet.lv>
185
186 * files.c: Include io.h for DJGPP to get prototype of setmode.
187
c1fc5047
PB
1882005-04-19 Per Bothner <per@bothner.com>
189
190 PR preprocessor/20907
191 * line-map.c (linemap_line_start): Fix bug when we need to increse
192 column_bits but can re-use the current line_map.
193
042630ad
KG
1942005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
195
196 * system.h (fopen, fdopen, freopen): Define these to the unlocked
197 libiberty functions.
198
0d667716
KG
1992005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
200
201 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
202 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
203 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
204 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
205 _unlocked function.
206 (fwrite_unlocked): Fix prototype.
1ed17cd5 207
0d667716
KG
208 * configure, config.in: Regenerate.
209
cae064e7
JJ
2102005-04-05 Jakub Jelinek <jakub@redhat.com>
211
212 PR preprocessor/19475
213 * macro.c (create_iso_definition): For < ISO C99, don't
214 pedwarn if there is no whitespace between macro name and its
215 replacement, but the replacement starts with a basic character
216 set character.
217
cbada204
AJ
2182005-03-28 Andreas Jaeger <aj@suse.de>
219
220 * lex.c (warn_about_normalization): Cast field width to int to
221 avoid warning.
222
f42eccdb
JM
2232005-03-19 Joseph S. Myers <joseph@codesourcery.com>
224
225 * configure.ac: Consistently use solaris2.1[0-9]* instead of
226 solaris2.1[0-9].
227 * configure: Regenerate.
228
c79e602b
GK
2292005-03-15 Geoffrey Keating <geoffk@apple.com>
230
231 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
232 UCN rather than printing an error.
233
50668cf6
GK
2342005-03-14 Geoffrey Keating <geoffk@apple.com>
235
6baba9bb
GK
236 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
237
2382005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 239
50668cf6
GK
240 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
241 * charset.c: Update for new format of ucnid.h.
242 (ucn_valid_in_identifier): Update for new format of ucnid.h.
243 Add NST parameter, and update it; update callers.
244 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
245 with cpp_error.
246 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
247 * internal.h (struct normalize_state): New.
248 (INITIAL_NORMALIZE_STATE): New.
249 (NORMALIZE_STATE_RESULT): New.
250 (NORMALIZE_STATE_UPDATE_IDNUM): New.
251 (_cpp_valid_ucn): New.
252 * lex.c (warn_about_normalization): New.
253 (forms_identifier_p): Add normalize_state parameter, update callers.
254 (lex_identifier): Add normalize_state parameter, update callers. Keep
255 the state current.
256 (lex_number): Likewise.
257 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
258 it with warn_about_normalization.
259 * makeucnid.c: New.
260 * ucnid.h: Replace.
261 * ucnid.pl: Remove.
262 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
263 comments about obsolete version of C++.
264 * include/cpplib.h (enum cpp_normalize_level): New.
265 (struct cpp_options): Add warn_normalize field.
266
47e20491
GK
2672005-03-11 Geoffrey Keating <geoffk@apple.com>
268
269 * directives.c (glue_header_name): Update call to cpp_spell_token.
270 * internal.h (_cpp_interpret_identifier): New.
271 * charset.c (_cpp_interpret_identifier): New.
272 (_cpp_valid_ucn): Allow UCN version of '$'.
273 * lex.c (lex_identifier): Add extra parameter to indicate if initial
274 character was '$' or '\'. Support identifiers with UCNs.
275 (forms_identifier_p): Allow UCNs.
276 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
277 (utf8_to_ucn): New.
278 (cpp_spell_token): Add FORSTRING parameter. Use it.
279 (cpp_token_as_text): Update call to cpp_spell_token.
280 (cpp_output_token): Write UCNs back out.
281 (stringify_arg): Update call to cpp_spell_token.
282 (paste_tokens): Likewise.
283 (cpp_macro_definition): Likewise.
284 * macro.c (stringify_arg): Likewise.
285 (paste_tokens): Likewise.
286 (cpp_macro_definition): Likewise.
287 * include/cpplib.h: Add parameter to cpp_spell_token.
288
73096711
JJ
2892005-03-04 Jakub Jelinek <jakub@redhat.com>
290
291 PR bootstrap/20282
292 PR bootstrap/20305
293 * macro.c (replace_args, cpp_get_token): Copy whole
294 cpp_token_u instead of just cpp_string field from it.
295
2203a881
DP
2962005-02-28 Devang Patel <dpatel@apple.com>
297
298 * directives.c (do_line): Save sysp early before line table is
299 realloc'ed.
1ed17cd5 300
c5ff069d
ZW
3012005-02-20 Zack Weinberg <zack@codesourcery.com>
302
303 PR 18785
304 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
305 (cpp_host_to_exec_charset): New function.
306 * include/cpplib.h: Declare cpp_host_to_exec_charset.
307
04c90eea
DP
3082005-02-19 Devang Patel <dpatel@apple.com>
309
310 * charset.c (_cpp_convert_input): Check '\r' before inserting
311 '\n' at the end.
c5ff069d 312
6da55c00
EC
3132005-02-15 Eric Christopher <echristo@redhat.com>
314
315 PR preprocessor/19077
316 * macro.c (cpp_macro_definition): Move handling of whitespace
317 to PREV_WHITE conditional. Remove overloading of len
318 variable.
319
31c3e631
KH
3202005-02-14 Kazu Hirata <kazu@cs.umass.edu>
321
322 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
323 traditional.c: Update copyright.
324
be0f1e54
PB
3252005-02-14 Paolo Bonzini <bonzini@gnu.org>
326
327 PR bootstrap/19818
328 * configure.ac: Check for declaration of basename and getopt.
329 * config.in: Regenerate.
330 * configure: Regenerate.
331 * internal.h (ustrcspn): New.
332 * macro.c (create_iso_definition): Fix allocation of memory.
333 (padding_token): Add cast to remove const-ness.
334 * pch.c (cpp_read_state): Use ustrcspn.
335
ecddfb39
MS
3362005-02-08 Mike Stump <mrs@apple.com>
337
338 * files.c (pchf_adder): Remove.
339 (struct pchf_adder_info): Likewise.
340 (_cpp_save_file_entries): Write out all files so that #import works.
341
9fcdd891
JM
3422005-01-23 Joseph S. Myers <joseph@codesourcery.com>
343
344 * configure: Regenerate.
345
ecfd72e7
TS
3462005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
347
348 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
349
6c25a4f7 350 * include/cpplib.h: Also update copyright years.
c5ff069d 351
942926ad
GK
3522005-01-03 Geoffrey Keating <geoffk@apple.com>
353
354 * files.c (_cpp_find_file): Add files found by search_path_exhausted
355 to the list of all files.
356
a2566ae9
GDR
3572005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
358
359 * internal.h: Update references to Cpp lib filenames.
360 * directives.c: Likewise.
361 * init.c: Likewise.
362 * macro.c: Likewise.
363 * traditional.c: Likewise.
364
1b449375
EB
3652004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
366
367 PR preprocessor/15167
368 * files.c (destroy_cpp_file): New function.
369 (should_stack_file): Make a new file if the
370 compared file is still stacked.
371
28303828
NN
3722004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
373
c5ff069d 374 PR preprocessor/17610
28303828
NN
375 * directives.c (do_include_common): Error out if an empty filename
376 is given for #include (or #include_next or #import).
377
c812785a
RS
3782004-11-27 Roger Sayle <roger@eyesopen.com>
379 Zack Weinberg <zack@codesourcery.com>
380
381 * internal.h: Replace all uses of uchar with unsigned char.
382 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
383 with !IN_GCC, so uchar is only defined whilst building libcpp.
384
f91eaa01
KC
3852004-11-24 Kelley Cook <kcook@gcc.gnu.org>
386
387 * aclocal.m4: Regenerate.
388
f78ce0c2
RS
3892004-11-24 Roger Sayle <roger@eyesopen.com>
390
391 PR preprocessor/15824
392 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
393 directly, instead of the non-existant "system.h" and "ansidecl.h".
394 * configure: Regenerate.
395
b5b3e36a 3962004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 397 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
398
399 * internal.h (struct lexer_state): Add in_deferred_pragma.
400 * directives.c (struct pragma_entry): Add allow_expansion.
401 (insert_pragma_entry): Take allow_expansion flag.
402 (register_pragma): Likewise.
403 (cpp_register_pragma): Likewise.
404 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
405 (do_pragma): Honor allow_expansion.
406 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
407 * include/cpplib.h (cpp_register_pragma): Update prototype.
408
a8e68029 4092004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 410 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
411
412 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
413 need_64bit_hwint=yes.
414 * configure: Regenerate.
415
50f47ee0
JM
4162004-11-09 Joseph S. Myers <joseph@codesourcery.com>
417
418 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
419 po/$(PACKAGE).pot.
420 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
421 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
422 Remove local srcdir path from generated file.
423
968e08d6 4242004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 425 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
426
427 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
428 as well.
429
3da3d587
ZW
4302004-10-27 Zack Weinberg <zack@codesourcery.com>
431
432 PR 18075
433 * directives.c (do_pragma): Do not defer pragmas which are unknown.
434 (cpp_handle_deferred_pragma): Add cast to silence warning.
435
ac24fc25
JM
4362004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
437
438 * errors.c (_cpp_begin_message): Print "error: " for errors.
439
7731405b
AJ
4402004-10-10 Andreas Jaeger <aj@suse.de>
441
442 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
443 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
444
646544e3
AP
4452004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
446
447 * pch.c (cpp_write_pch_state): Remove variable z as it is not
448 used.
449 (cpp_read_state): Remove unused variables, m, d and mac_count.
450
67a74146
PB
4512004-09-29 Per Bothner <per@bothner.com>
452
453 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
454 cb.line_change. Otherwise do_pragma will call the line_change
455 call-back with a meaningless line number.
456
018a4785
ZW
4572004-09-24 Zack Weinberg <zack@codesourcery.com>
458
459 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
460 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
461 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
462 * aclocal.m4, configure: Regenerate.
463 * init.c: Include localedir.h.
464 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
465 (DEFS): Delete.
466 (.c.o): Use $(ALL_CFLAGS).
467 (localedir.h, localedir.hs): New rules.
468 (clean): Use rm -rf to remove directories.
469 (distclean): Also delete localedir.h and localedir.hs.
470 (init.o): Update dependencies.
471
88fa57d7
KC
4722004-09-22 Kelley Cook <kcook@gcc.gnu.org>
473
474 * Makefile.in (aclocal.m4): Update dependencies.
475 * configure.ac (AC_CONFIG_MACRO_DIR): New.
476 * aclocal.m4, configure: Regenerate.
477
8f8e9aa5
ZW
4782004-09-17 Zack Weinberg <zack@codesourcery.com>
479
a29f62d9
ZW
480 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
481 (_cpp_convert_input, _cpp_default_encoding): Add comments.
482 Some other comments in this file also tweaked.
483
8f8e9aa5
ZW
484 * directives.c (do_pragma): Save current buffer position
485 before lexing the pragma keywords; don't call
486 _cpp_backup_tokens in the defer_pragmas case.
487
a2981930
PB
4882004-09-15 Per Bothner <per@bothner.com>
489
490 * include/line-map.h (line_map_start): Add parameter names so
491 preceding comment makes sense.
492 (linemap_add): Remove from comment mention of non-existing parameter.
493
21b11495
ZW
4942004-09-09 Matt Austern <austern@apple.com>
495 Zack Weinberg <zack@codesourcery.com>
496
497 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
498 prefixes throughout. Add entry for PRAGMA. Remove
499 unnecessary "= 0" from EQ.
500 (enum cpp_ttype): Adjust OP and TK definitions to restore
501 prefixes, via token-paste.
502 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
503 Change from #defines to additional cpp_ttype enumerators.
504 (struct cpp_options): Add defer_pragmas.
505 (cpp_handle_deferred_pragma): Prototype new interface.
506
507 * internal.h (struct cpp_reader): Add directive_result.
508 * directives.c (struct pragma_entry): Add is_internal field;
509 give boolean fields type bool.
510 (start_directive): Initialize pfile->directive_result.type.
511 (_cpp_do__Pragma): Likewise.
512 (run_directive): Do not crash if pfile->buffer->prev is NULL.
513 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
514 from it.
515 (register_pragma): New static function, bulk of former
516 cpp_register_pragma here; add 'internal' argument, pass along
517 to insert_pragma_entry.
518 (cpp_register_pragma): Now a wrapper around register_pragma which
519 always passes false for 'internal' argument.
520 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
521 true for 'internal'.
522 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
523 an internal pragma, save text till the end of the line as a CPP_PRAGMA
524 token instead of executing the pragma.
525 (cpp_handle_deferred_pragma): New interface.
526 * lex.c (token_spellings): Adjust OP and TK definitions to
527 match changes to cpplib.h.
528 (_cpp_lex_token): Check for a directive-result token and
529 return it if present.
530 (cpp_token_val_index): Handle CPP_PRAGMA.
531 * macro.c (cpp_builtin_macro_text): Correct comment.
532 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
533
0fd9e8dd
SB
5342004-09-06 Serge Belyshev <belyshev@lubercy.com>
535
536 PR preprocessor/14699
537 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
538 from size_t to double.
539
39b8ce7f
AS
5402004-08-28 Andreas Schwab <schwab@suse.de>
541 Andreas Jaeger <aj@suse.de>
542
543 * configure.ac: Set PACKAGE correctly.
544 * configure: Regenerated.
545
5d1f4b27
PB
5462004-08-25 Paolo Bonzini <bonzini@gnu.org>
547
548 * Makefile.in: Add back top_builddir.
549
078e3ffe
PB
5502004-08-25 Paolo Bonzini <bonzini@gnu.org>
551
552 * configure.ac: Replace Automake macro invocations
553 with manual Autoconf checks and substitutions.
554 * configure: Regenerate.
555 * aclocal.m4: Regenerate.
556 * config.in: Regenerate.
557 * Makefile.am: Removed.
558 * Makefile.in: Heavy simplification and reorganization.
559
b3f8d95d
MM
5602004-08-09 Mark Mitchell <mark@codesourcery.com>
561
562 * configure.ac (arm*-*-eabi*): New target.
563 (arm*-*-symbianelf*): Likewise.
564 * configure: Regenerated.
565
72bb2c39
BI
5662004-07-24 Bernardo Innocenti <bernie@develer.com>
567
568 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
569 * directives.c: Use XNEW-family macros from libiberty.
570 * lex.c: Likewise.
571 * macro.c: Likewise.
572 * cpplib.h (cpp_deps_style): Export enum with name.
573
21b11495 5742004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 575
21b11495 576 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 577
a23ee064
AP
5782004-07-16 Andris Pavenis <pavenis@latnet.lv>
579
580 PR preprocessor/16366
581 * internal.h (struct cpp_reader): New field dir_hash.
582 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
583 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
584
a09d4744
NB
5852004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
586
587 PR preprocessor/16192
588 PR preprocessor/15913
589 PR preprocessor/15572
590 * expr.c (_cpp_parse_expr): Handle remaining cases where an
591 expression is missing.
592 * init.c (post_options): Traditional cpp doesn't do // comments.
593
f58f7def
PB
5942004-06-30 Per Bothner <per@bothner.com>
595
596 * include/line-map.h (fileline): Remove old typedef.
597 * internal.h (struct cpp_reader): Use source_location typedef instead.
598
e83d8d43
ZW
5992004-06-26 Zack Weinberg <zack@codesourcery.com>
600
601 Partially revert patch of 2004-06-05.
602 * files.c (search_cache): Remove pfile argument. Don't check
603 for file that would be found by "" or <> search here...
604 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
605 Do not apply directory-of-current-file correction to files
606 found by this check. Rearrange code slightly.
607
c0d578e6
GK
6082004-06-21 Geoffrey Keating <geoffk@apple.com>
609
610 * files.c (should_stack_file): Correct swapped parameters to call
611 to cb.read_pch.
612 * pch.c (cpp_valid_state): Handle -fpreprocessed.
613
159d5224
PB
6142004-06-15 Paolo Bonzini <bonzini@gnu.org>
615
616 * Makefile.in: Regenerate with automake 1.8.5.
617 * aclocal.m4: Likewise.
618 * configure: Regenerate.
619
2fac9c01
ZW
6202004-06-11 Zack Weinberg <zack@codesourcery.com>
621
622 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
623 * configure, config.in: Regenerate.
624 * system.h: Unconditionally define bool as unsigned char,
625 BOOL_BITFIELD as unsigned int.
626 * .cvsignore: New file.
627
d8044160
GK
6282004-06-09 Geoffrey Keating <geoffk@apple.com>
629
630 * traditional.c (push_replacement_text): Set macro->traditional.
631 (save_replacement_text): Likewise.
632 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
633 (struct save_macro_item): Delete.
634 (struct save_macro_data): Use a character array not the previous
635 structured format.
636 (save_macros): Save macro as text not as internal structures.
637 (cpp_prepare_state): Update for changes to save_macro_data.
638 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 639 -D macros as text.
d8044160
GK
640 * macro.c (create_iso_definition): Honour alloc_subobject.
641 Clear traditional flag.
642 (_cpp_create_definition): Honour alloc_subobject.
643 * lex.c (cpp_token_val_index): New.
644 * internal.h: Include cpp-id-data.h.
645 (uchar): Move definition to cpp-id-data.h.
646 (U): Likewise.
647 (cpp_macro): Likewise.
648 * directives.c (struct answer): Move to cpp-id-data.h.
649 (do_assert): Honour alloc_subobject.
2cf22451
ZW
650
651 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
652 * include/cpplib.h (struct cpp_string): Add GTY marker.
653 (enum cpp_token_fld_kind): New.
654 (struct cpp_token): Add GTY markers.
655 (cpp_token_val_index): Prototype.
656 (CPP_HASHNODE_VALUE_IDX): New.
657 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
658 * include/cpp-id-data.h: New file.
d8044160 659
0ca8e815
PB
6602004-06-09 Paolo Bonzini <bonzini@gnu.org>
661
662 * Makefile.am (all-local): New.
663 * Makefile.in: Regenerate.
664
b51fa00f
RS
6652004-06-06 Roger Sayle <roger@eyesopen.com>
666
667 * Makefile.am (LIBICONV): Declare.
668 (makedepend_LDADD): Use LIBICONV.
669 * Makefile.in: Regenerate.
670
5e2f3f39
AP
6712004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
672
673 * Makefile.am (LIBINTL): Declare
674 (makedepend_LDADD): Use LIBINTL.
675 * Makefile.in: Regenerate.
676
c6e83800
ZW
6772004-06-05 Zack Weinberg <zack@codesourcery.com>
678
679 * Makefile.am: Add makedepend.
680 * Makefile.in, aclocal.m4: Regenerate.
681 * charset.c: Insert a space to avoid a warning.
682 * directives.c: Include mkdeps.h.
683 (_cpp_handle_directive): Reenable macro expander if appropriate.
684 (undefine_macros): Inline body of _cpp_free_definition for speed.
685 Do not call undef callback or _cpp_warn_if_unused_macro.
686 (cpp_get_deps): New interface.
687 * files.c (search_cache): Add pfile argument. Check for file
688 that would be found by "" or <> search here...
689 (_cpp_find_file): ...not here. Correct recorded start_dir of
690 files found by directory-of-current-file search that would be
691 found by "" or <> search.
692 * init.c (cpp_add_dependency_target): Delete.
693 * internal.h (struct lexer_state): Add discarding_output flag.
694 * lex.c (lex_identifier): Compute hash function while scanning.
695 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
696 directives.
697 * makedepend.c: New file.
698 * mkdeps.c (struct deps): Add vpath vector.
699 (apply_vpath, deps_add_vpath): New function.
700 (deps_free): Free vpath vector.
701 (deps_add_dep, deps_add_target): Use apply_vpath.
702 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
703 (ht_lookup_with_hash): New function.
704 * cpplib.h, mkdeps.h: Update prototypes.
705 * symtab.h: Update prototypes.
706 (HT_HASHSTEP, HT_FINISH): New macros.
707
b453c95f
GK
7082004-05-29 Geoffrey Keating <geoffk@apple.com>
709
710 * symtab.c (ht_create): Set entries_owned.
711 (ht_destroy): Honour entries_owned.
712 (ht_expand): Likewise.
713 (ht_load): New.
2cf22451
ZW
714 * include/symtab.h (struct ht): New field 'entries_owned'
715 (ht_load): New prototype.
b453c95f 716
963e23c5
PB
7172004-05-26 Paolo Bonzini <bonzini@gnu.org>
718
719 PR bootstrap/15651
720 * configure.ac: Fix m4 quoting when picking
721 the size of HOST_WIDE_INT.
722 * configure: Regenerate.
723
0429bc77
PB
7242004-05-25 Paolo Bonzini <bonzini@gnu.org>
725
726 * Makefile.am: the correct directory for
727 gettext include files is given by @INCINTL@.
728 * Makefile.in: Regenerate.
729
c86dd7db
PB
7302004-05-24 Paolo Bonzini <bonzini@gnu.org>
731
732 * system.h [!ENABLE_NLS]: dgettext takes two
733 parameters.
734
4f4e53dd
PB
7352004-05-23 Paolo Bonzini <bonzini@gnu.org>
736
737 Moved libcpp from the gcc subdirectory to the toplevel.
738 * Makefile.am: New file.
739 * Makefile.in: Regenerate.
740 * configure.ac: New file.
741 * configure: Regenerate.
742 * config.in: Regenerate.
743 * charset.c: Moved from gcc/cppcharset.c. Add note about
744 brokenness of input charset detection. Adjust for change
745 in name of cppucnid.h.
746 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
747 * expr.c: Moved from gcc/cppexp.c.
748 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
749 Remove #define of O_BINARY, it is in system.h.
750 * identifiers.c: Moved from gcc/cpphash.c.
751 * internal.h: Moved from gcc/cpphash.h. Change header
752 guard name. All other files adjusted to match name change.
753 * init.c: Moved from gcc/cppinit.c.
754 (init_library) [ENABLE_NLS]: Call bindtextdomain.
755 * lex.c: Moved from gcc/cpplex.c.
756 * directives.c: Moved from gcc/cpplib.c.
757 * macro.c: Moved from gcc/cppmacro.c.
758 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
759 * traditional.c: Moved from gcc/cpptrad.c.
760 * ucnid.h: Moved from gcc/cppucnid.h. Change header
761 guard name.
762 * ucnid.pl: Moved from gcc/cppucnid.pl.
763 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
764 guard name.
765 * symtab.c: Moved from gcc/hashtable.c.
766 * line-map.c: Moved from gcc. Do not include intl.h.
767 * mkdeps.c: Moved from gcc.
768 * system.h: New file.
2cf22451
ZW
769 * include/cpplib.h: Moved from gcc. Change header guard name.
770 * include/line-map.h: Moved from gcc. Change header guard name.
771 * include/mkdeps.h: Moved from gcc. Change header guard name.
772 * include/symtab.h: Moved from gcc/hashtable.h. Change header
773 guard name.