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