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