]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
* g++.dg/abi/thunk3.C, g++.dg/abi/thunk4.C: Revert unnecessary fix
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
b75b98aa 12006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
2 Richard Henderson <rth@redhat.com>
3
4 Merge from gomp branch:
5 * directives.c (struct pragma_entry): Add is_deferred. Add ident
6 entry to value union.
7 (end_directive): Don't eat the line if in_deferred_pragma.
8 (run_directive): Remove pragma hacks.
9 (insert_pragma_entry): Remove.
10 (new_pragma_entry): New.
11 (register_pragma_1): Split out of register_pragma. Only handle
12 the lookup tree and return the new entry.
13 (cpp_register_pragma): Fill in the pragma entry here.
14 (cpp_register_deferred_pragma): New.
15 (register_pragma_internal): New.
16 (_cpp_init_internal_pragmas): Use register_pragma_internal.
17 (do_pragma): Allow pragma expansion after namespace. For deferred
18 pragmas, don't slurp the line into a string.
19 (destringize_and_run): Save tokens for deferred pragmas.
20 (cpp_handle_deferred_pragma): Remove.
21 * macro.c (builtin_macro): Remove pragma token hack.
22 (_cpp_push_token_context): Rename from push_token_context and export.
23 * internal.h (struct lexer_state): Add pragma_allow_expansion.
24 (_cpp_push_token_context): Declare.
25 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
26 a token. Update the line number correctly if so.
27 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
28 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
29 * include/cpplib.h (PRAGMA_EOL): New.
30 (CPP_TOKEN_FLD_PRAGMA): New.
31 (struct cpp_token): Add val.pragma.
32 (struct cpp_options): Remove defer_pragmas.
33 (cpp_handle_deferred_pragma): Remove.
34 (cpp_register_deferred_pragma): Declare.
35
986ca356 362006-01-01 Jakub Jelinek <jakub@redhat.com>
37
38 PR c++/25294
39 * directives.c (do_pragma): If pragma line ends with multi-line
40 block comment, end the saved deferred pragma string before that
41 comment. Handle embedded '\0' chars on the pragma line.
42
8dba02f7 432005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
44
45 PR c++/23333
46 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
47
6db045b0 482005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
49 Ben Elliston <bje@au.ibm.com>
50
51 * include/cpplib.h (CPP_N_DFLOAT): New.
52 * expr.c (interpret_float_suffix): Identify df, dd, and dl
53 suffixes as decimal floating point constants.
54 (cpp_classify_number): Disallow hexadecimal DFP constants.
55
9a7c76f9 562005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
b75b98aa 57 Ian Lance Taylor <ian@airs.com>
9a7c76f9 58
59 * include/cpplib.h (struct cpp_callbacks): Annotate error with
60 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
61
0c5e3a3d 622005-11-09 Per Bothner <per@bothner.com>
63 Uros Bizjak <uros@kss-loka.si>
64
65 PR c/24101
66 * init.c (read_original_filename): Temporarily set
67 state.in_directive before calling _cpp_lex_direct for
68 CPP_HASH tokens.
69
3c2359db 702005-11-03 James E Wilson <wilson@specifix.com>
71
72 PR preprocessor/24202
73 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
74
d65b3a40 752005-11-04 Joseph S. Myers <joseph@codesourcery.com>
76
77 * include/cpplib.h (struct cpp_callbacks): Make error take
78 va_list* parameter.
79 * errors.c (cpp_error): Update call to callback.
80
cc9012f7 812005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
82
83 PR preprocessor/22042
84 * macro.c (_cpp_builtin_macro_text): Lower the needed max
85 buffer size.
86 (cpp_quote_string): Don't octalify non printable
87 charactors.
88
eb0d20b7 892005-11-03 Joseph S. Myers <joseph@codesourcery.com>
90
91 PR c++/17964
92 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
93 (struct cpp_callbacks): Add error.
94 * errors.c (cpp_error): If client_diagnostic, use error callback.
95 * charset.c (convert_escape): Don't use %03o in diagnostic.
96
de4aacc0 972005-10-21 James E Wilson <wilson@specifix.com>
04c0bfd0 98
99 PR preprocessor/15220
100 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
101 callers. Pass to open_file_failed.
102 (open_file_failed): New parameter angle_brackets. Fix all callers.
103 Use in print_dep assignment.
104 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
105 * internal.h (_cpp_find_file): Add new parm to declaration.
106
6783d878 1072005-10-08 Kazu Hirata <kazu@codesourcery.com>
108
109 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
110 * configure: Regenerate.
111
f789fe3e 1122005-10-04 Ian Lance Taylor <ian@airs.com>
113
114 PR preprocessor/13726
115 * directives.c (check_eol_return_comments): New static function.
116 (parse_include): Add buf parameter. Change all callers.
117 (do_include_common): If not discard comments, turn on
118 save_comments. Pass collected comments to include callback.
119 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
120 include callback: cpp_token list.
121
865c4e44 1222005-09-20 Joseph S. Myers <joseph@codesourcery.com>
123
124 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
125 * init.c (struct lang_flags, lang_defaults): Add
126 extended_identifiers.
127 (cpp_set_lang): Use it.
128 * lex.c (forms_identifier_p): Check extended_identifiers.
129
56845aa6 1302005-08-30 Jakub Jelinek <jakub@redhat.com>
131
132 PR preprocessor/20348
133 PR preprocessor/20356
134 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
135 2004-06-05 changes.
136
72ee8ff9 1372005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
138
139 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
140 -Wmissing-format-attribute.
141
142 * configure: Regenerate.
143
2656917a 1442005-06-29 Kelley Cook <kcook@gcc.gnu.org>
145
146 * all files: Update FSF address in copyright headers.
147 * makeucnid.c (write_copyright): Update outputted FSF address.
148
cbaa9876 1492005-06-13 Zack Weinberg <zack@codesourcery.com>
150
151 * configure.ac: Invoke ZW_CREATE_DEPDIR and
152 ZW_PROG_COMPILER_DEPENDENCIES.
153 * aclocal.m4, configure: Regenerate.
154 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
155 New variables.
156 (distclean): Clean up $(DEPDIR) and its contents.
157 (.c.o): Use $(COMPILE).
158 Include $(DEPDIR)/*.Po for most object->header dependencies.
159
720aca92 1602005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
161
162 * configure.ac: Check declarations for asprintf and vasprintf.
163 * config.in: Regenerate.
164 * configure: Likewise.
165
166 * charset.c (conversion_loop): Use XRESIZEVEC.
167 (convert_no_conversion): Likewise.
168 (convert_using_iconv): Likewise.
169 (init_iconv_desc): Cast return value of alloca.
170 (cpp_host_to_exec_charset): Use XNEWVEC.
171 (emit_numeric_escape): Use XRESIZEVEC.
172 (cpp_interpret_string): Use XNEWVEC.
173 (cpp_interpret_string): Use XRESIZEVEC.
174 (_cpp_interpret_identifier): Cast return value of alloca.
175 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
176 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
177 (parse_include): Use XNEWVEC.
178 (insert_pragma_entry): Rename local variable "new" to
cbaa9876 179 "new_entry".
720aca92 180 (save_registered_pragmas): Cast return value of xmemdup.
181 (destringize_and_run): Same for alloca.
182 (parse_assertion): Likewise.
183 (do_assert): Cast allocated storage to proper type.
184 (cpp_define): Likewise.
185 (_cpp_define_builtin): Likewise.
186 (cpp_undef): Likewise.
187 (handle_assertion): Likewise.
188 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
189 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
190 (CPP_UMINUS): Likewise.
191 (struct cpp_operator): Rename from struct operator.
192 (_cpp_expand_op_stack): Use XRESIZEVEC.
193 * files.c (pch_open_file): Use XNEWVEC.
194 (pch_open_file): Use XRESIZEVEC.
195 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
196 (dir_name_of_file): Use XNEWVEC.
197 (make_cpp_file): Use XCNEW.
198 (make_cpp_dir): Likewise.
199 (allocate_file_hash_entries): USE XNEWVEC.
200 (cpp_included): Cast return value of htab_find_with_hash.
201 (append_file_to_dir): Use XNEWVEC.
202 (read_filename_string): Likewise. Use XRESIZEVEC too.
203 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
204 (remap_filename): Use XNEWVEC.
205 (struct pchf_entry): Move definition out of struct pchf_data.
206 (_cpp_save_file_entries): Use XCNEWVAR.
207 (_cpp_read_file_entries): Use XNEWVAR.
208 * identifiers.c (alloc_node): Use XOBNEW.
209 * init.c (cpp_create_reader): Use XCNEW.
210 (cpp_init_builtins): Cast of b->value to enum builtin_type.
211 (read_original_directory): Cast return value of alloca.
212 * lex.c (add_line_note): Use XRESIZEVEC.
213 (warn_about_normalization): Use XNEWVEC.
214 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
215 (new_buff): Use XNEWVEC.
216 * line-map.c (linemap_add): Use XRESIZEVEC.
217 * macro.c (builtin_macro): Cast return value of alloca.
218 (paste_tokens): Likewise.
219 (expand_arg): Use XNEWVEC and XRESIZEVEC.
220 (_cpp_save_parameter): Use XRESIZEVEC.
221 (create_iso_definition): Cast allocated storage to proper type.
222 (_cpp_create_definition): Likewise.
223 (cpp_macro_definition): Use XRESIZEVEC.
224 * makedepend.c (add_clm): Use XNEW.
225 (add_dir): Likewise.
226 * mkdeps.c (munge): Use XNEWVEC.
227 (deps_init): Use XCNEW.
228 (deps_add_target): Use XRESIZEVEC.
229 (deps_add_default_target): Cast return value of alloca.
230 (deps_add_dep): Use XRESIZEVEC.
231 (deps_add_vpath): Likewise. Use XNEWVEC too.
232 (deps_restore): Likewise.
233 * pch.c (save_idents): Use XNEW and XNEWVEC.
234 (cpp_save_state): Use XNEW.
235 (count_defs): Cast return value of htab_find.
236 (write_defs): Likewise.
237 (cpp_write_pch_deps): Use XNEWVEC.
238 (collect_ht_nodes): Use XRESIZEVEC.
239 (cpp_valid_state): Use XNEWVEC.
240 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
241 * symtab.c (ht_create): Use XCNEW.
242 (ht_lookup_with_hash): Cast return value of obstack_copy0.
243 (ht_expand): Use XCNEWVEC.
244 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
245 (bool): Do not define if __cplusplus.
246
81e19b31 2472005-05-12 Zack Weinberg <zack@codesourcery.com>
248
249 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
250 (do_sccs): Delete function definition, #define to do_ident.
251 (do_ident): Don't hardwire directive name.
252
18f11b84 2532005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
254
255 PR bootstrap/21230
256 * configure: Regenerate.
257
2dc04f36 2582005-04-27 Andris Pavenis <pavenis@latnet.lv>
259
260 * files.c: Include io.h for DJGPP to get prototype of setmode.
261
0b7f838f 2622005-04-19 Per Bothner <per@bothner.com>
263
264 PR preprocessor/20907
265 * line-map.c (linemap_line_start): Fix bug when we need to increse
266 column_bits but can re-use the current line_map.
267
2224c90b 2682005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
269
270 * system.h (fopen, fdopen, freopen): Define these to the unlocked
271 libiberty functions.
272
077a3c99 2732005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
274
275 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
276 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
277 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
278 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
279 _unlocked function.
280 (fwrite_unlocked): Fix prototype.
81e19b31 281
077a3c99 282 * configure, config.in: Regenerate.
283
99617355 2842005-04-05 Jakub Jelinek <jakub@redhat.com>
285
286 PR preprocessor/19475
287 * macro.c (create_iso_definition): For < ISO C99, don't
288 pedwarn if there is no whitespace between macro name and its
289 replacement, but the replacement starts with a basic character
290 set character.
291
3827dee5 2922005-03-28 Andreas Jaeger <aj@suse.de>
293
294 * lex.c (warn_about_normalization): Cast field width to int to
295 avoid warning.
296
b8273627 2972005-03-19 Joseph S. Myers <joseph@codesourcery.com>
298
299 * configure.ac: Consistently use solaris2.1[0-9]* instead of
300 solaris2.1[0-9].
301 * configure: Regenerate.
302
bc65f24f 3032005-03-15 Geoffrey Keating <geoffk@apple.com>
304
305 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
306 UCN rather than printing an error.
307
bce47149 3082005-03-14 Geoffrey Keating <geoffk@apple.com>
309
4e9d1e6d 310 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
311
3122005-03-14 Geoffrey Keating <geoffk@apple.com>
81e19b31 313
bce47149 314 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
315 * charset.c: Update for new format of ucnid.h.
316 (ucn_valid_in_identifier): Update for new format of ucnid.h.
317 Add NST parameter, and update it; update callers.
318 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
319 with cpp_error.
320 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
321 * internal.h (struct normalize_state): New.
322 (INITIAL_NORMALIZE_STATE): New.
323 (NORMALIZE_STATE_RESULT): New.
324 (NORMALIZE_STATE_UPDATE_IDNUM): New.
325 (_cpp_valid_ucn): New.
326 * lex.c (warn_about_normalization): New.
327 (forms_identifier_p): Add normalize_state parameter, update callers.
328 (lex_identifier): Add normalize_state parameter, update callers. Keep
329 the state current.
330 (lex_number): Likewise.
331 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
332 it with warn_about_normalization.
333 * makeucnid.c: New.
334 * ucnid.h: Replace.
335 * ucnid.pl: Remove.
336 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
337 comments about obsolete version of C++.
338 * include/cpplib.h (enum cpp_normalize_level): New.
339 (struct cpp_options): Add warn_normalize field.
340
bb1fa6bb 3412005-03-11 Geoffrey Keating <geoffk@apple.com>
342
343 * directives.c (glue_header_name): Update call to cpp_spell_token.
344 * internal.h (_cpp_interpret_identifier): New.
345 * charset.c (_cpp_interpret_identifier): New.
346 (_cpp_valid_ucn): Allow UCN version of '$'.
347 * lex.c (lex_identifier): Add extra parameter to indicate if initial
348 character was '$' or '\'. Support identifiers with UCNs.
349 (forms_identifier_p): Allow UCNs.
350 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
351 (utf8_to_ucn): New.
352 (cpp_spell_token): Add FORSTRING parameter. Use it.
353 (cpp_token_as_text): Update call to cpp_spell_token.
354 (cpp_output_token): Write UCNs back out.
355 (stringify_arg): Update call to cpp_spell_token.
356 (paste_tokens): Likewise.
357 (cpp_macro_definition): Likewise.
358 * macro.c (stringify_arg): Likewise.
359 (paste_tokens): Likewise.
360 (cpp_macro_definition): Likewise.
361 * include/cpplib.h: Add parameter to cpp_spell_token.
362
960391da 3632005-03-04 Jakub Jelinek <jakub@redhat.com>
364
365 PR bootstrap/20282
366 PR bootstrap/20305
367 * macro.c (replace_args, cpp_get_token): Copy whole
368 cpp_token_u instead of just cpp_string field from it.
369
b0d0794d 3702005-02-28 Devang Patel <dpatel@apple.com>
371
372 * directives.c (do_line): Save sysp early before line table is
373 realloc'ed.
81e19b31 374
624d37a6 3752005-02-20 Zack Weinberg <zack@codesourcery.com>
376
377 PR 18785
378 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
379 (cpp_host_to_exec_charset): New function.
380 * include/cpplib.h: Declare cpp_host_to_exec_charset.
381
f86986bc 3822005-02-19 Devang Patel <dpatel@apple.com>
383
384 * charset.c (_cpp_convert_input): Check '\r' before inserting
385 '\n' at the end.
624d37a6 386
9936e07d 3872005-02-15 Eric Christopher <echristo@redhat.com>
388
389 PR preprocessor/19077
390 * macro.c (cpp_macro_definition): Move handling of whitespace
391 to PREV_WHITE conditional. Remove overloading of len
392 variable.
393
129a1540 3942005-02-14 Kazu Hirata <kazu@cs.umass.edu>
395
396 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
397 traditional.c: Update copyright.
398
bb30d1f4 3992005-02-14 Paolo Bonzini <bonzini@gnu.org>
400
401 PR bootstrap/19818
402 * configure.ac: Check for declaration of basename and getopt.
403 * config.in: Regenerate.
404 * configure: Regenerate.
405 * internal.h (ustrcspn): New.
406 * macro.c (create_iso_definition): Fix allocation of memory.
407 (padding_token): Add cast to remove const-ness.
408 * pch.c (cpp_read_state): Use ustrcspn.
409
26ec4f15 4102005-02-08 Mike Stump <mrs@apple.com>
411
412 * files.c (pchf_adder): Remove.
413 (struct pchf_adder_info): Likewise.
414 (_cpp_save_file_entries): Write out all files so that #import works.
415
0cb78cbd 4162005-01-23 Joseph S. Myers <joseph@codesourcery.com>
417
418 * configure: Regenerate.
419
d862067c 4202005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
421
422 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
423
457e71e4 424 * include/cpplib.h: Also update copyright years.
624d37a6 425
ba841ef8 4262005-01-03 Geoffrey Keating <geoffk@apple.com>
427
428 * files.c (_cpp_find_file): Add files found by search_path_exhausted
429 to the list of all files.
430
f03668bd 4312005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
432
433 * internal.h: Update references to Cpp lib filenames.
434 * directives.c: Likewise.
435 * init.c: Likewise.
436 * macro.c: Likewise.
437 * traditional.c: Likewise.
438
461ea98d 4392004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
440
441 PR preprocessor/15167
442 * files.c (destroy_cpp_file): New function.
443 (should_stack_file): Make a new file if the
444 compared file is still stacked.
445
bd9e37a6 4462004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
447
624d37a6 448 PR preprocessor/17610
bd9e37a6 449 * directives.c (do_include_common): Error out if an empty filename
450 is given for #include (or #include_next or #import).
451
fe4dcd90 4522004-11-27 Roger Sayle <roger@eyesopen.com>
453 Zack Weinberg <zack@codesourcery.com>
454
455 * internal.h: Replace all uses of uchar with unsigned char.
456 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
457 with !IN_GCC, so uchar is only defined whilst building libcpp.
458
ac7cc2f4 4592004-11-24 Kelley Cook <kcook@gcc.gnu.org>
460
461 * aclocal.m4: Regenerate.
462
6e11b263 4632004-11-24 Roger Sayle <roger@eyesopen.com>
464
465 PR preprocessor/15824
466 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
467 directly, instead of the non-existant "system.h" and "ansidecl.h".
468 * configure: Regenerate.
469
68bf2ad9 4702004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
624d37a6 471 Joseph Myers <joseph@codesourcery.com>
68bf2ad9 472
473 * internal.h (struct lexer_state): Add in_deferred_pragma.
474 * directives.c (struct pragma_entry): Add allow_expansion.
475 (insert_pragma_entry): Take allow_expansion flag.
476 (register_pragma): Likewise.
477 (cpp_register_pragma): Likewise.
478 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
479 (do_pragma): Honor allow_expansion.
480 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
481 * include/cpplib.h (cpp_register_pragma): Update prototype.
482
27559c4e 4832004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
624d37a6 484 Mark Mitchell <mark@codesourcery.com>
27559c4e 485
486 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
487 need_64bit_hwint=yes.
488 * configure: Regenerate.
489
34ae664d 4902004-11-09 Joseph S. Myers <joseph@codesourcery.com>
491
492 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
493 po/$(PACKAGE).pot.
494 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
495 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
496 Remove local srcdir path from generated file.
497
39b83bdb 4982004-11-04 Zack Weinberg <zack@codesourcery.com>
624d37a6 499 Gerald Pfeifer <gerald@pfeifer.com>
39b83bdb 500
501 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
502 as well.
503
a095c1b5 5042004-10-27 Zack Weinberg <zack@codesourcery.com>
505
506 PR 18075
507 * directives.c (do_pragma): Do not defer pragmas which are unknown.
508 (cpp_handle_deferred_pragma): Add cast to silence warning.
509
700b0d81 5102004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
511
512 * errors.c (_cpp_begin_message): Print "error: " for errors.
513
fbe83ac1 5142004-10-10 Andreas Jaeger <aj@suse.de>
515
516 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
517 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
518
09f10c94 5192004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
520
521 * pch.c (cpp_write_pch_state): Remove variable z as it is not
522 used.
523 (cpp_read_state): Remove unused variables, m, d and mac_count.
524
a8b2a8d5 5252004-09-29 Per Bothner <per@bothner.com>
526
527 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
528 cb.line_change. Otherwise do_pragma will call the line_change
529 call-back with a meaningless line number.
530
21164c01 5312004-09-24 Zack Weinberg <zack@codesourcery.com>
532
533 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
534 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
535 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
536 * aclocal.m4, configure: Regenerate.
537 * init.c: Include localedir.h.
538 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
539 (DEFS): Delete.
540 (.c.o): Use $(ALL_CFLAGS).
541 (localedir.h, localedir.hs): New rules.
542 (clean): Use rm -rf to remove directories.
543 (distclean): Also delete localedir.h and localedir.hs.
544 (init.o): Update dependencies.
545
986086aa 5462004-09-22 Kelley Cook <kcook@gcc.gnu.org>
547
548 * Makefile.in (aclocal.m4): Update dependencies.
549 * configure.ac (AC_CONFIG_MACRO_DIR): New.
550 * aclocal.m4, configure: Regenerate.
551
e9cc3617 5522004-09-17 Zack Weinberg <zack@codesourcery.com>
553
0097f6a2 554 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
555 (_cpp_convert_input, _cpp_default_encoding): Add comments.
556 Some other comments in this file also tweaked.
557
e9cc3617 558 * directives.c (do_pragma): Save current buffer position
559 before lexing the pragma keywords; don't call
560 _cpp_backup_tokens in the defer_pragmas case.
561
9832c977 5622004-09-15 Per Bothner <per@bothner.com>
563
564 * include/line-map.h (line_map_start): Add parameter names so
565 preceding comment makes sense.
566 (linemap_add): Remove from comment mention of non-existing parameter.
567
d6d3c909 5682004-09-09 Matt Austern <austern@apple.com>
569 Zack Weinberg <zack@codesourcery.com>
570
571 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
572 prefixes throughout. Add entry for PRAGMA. Remove
573 unnecessary "= 0" from EQ.
574 (enum cpp_ttype): Adjust OP and TK definitions to restore
575 prefixes, via token-paste.
576 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
577 Change from #defines to additional cpp_ttype enumerators.
578 (struct cpp_options): Add defer_pragmas.
579 (cpp_handle_deferred_pragma): Prototype new interface.
580
581 * internal.h (struct cpp_reader): Add directive_result.
582 * directives.c (struct pragma_entry): Add is_internal field;
583 give boolean fields type bool.
584 (start_directive): Initialize pfile->directive_result.type.
585 (_cpp_do__Pragma): Likewise.
586 (run_directive): Do not crash if pfile->buffer->prev is NULL.
587 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
588 from it.
589 (register_pragma): New static function, bulk of former
590 cpp_register_pragma here; add 'internal' argument, pass along
591 to insert_pragma_entry.
592 (cpp_register_pragma): Now a wrapper around register_pragma which
593 always passes false for 'internal' argument.
594 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
595 true for 'internal'.
596 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
597 an internal pragma, save text till the end of the line as a CPP_PRAGMA
598 token instead of executing the pragma.
599 (cpp_handle_deferred_pragma): New interface.
600 * lex.c (token_spellings): Adjust OP and TK definitions to
601 match changes to cpplib.h.
602 (_cpp_lex_token): Check for a directive-result token and
603 return it if present.
604 (cpp_token_val_index): Handle CPP_PRAGMA.
605 * macro.c (cpp_builtin_macro_text): Correct comment.
606 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
607
735a9bc4 6082004-09-06 Serge Belyshev <belyshev@lubercy.com>
609
610 PR preprocessor/14699
611 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
612 from size_t to double.
613
25696d3f 6142004-08-28 Andreas Schwab <schwab@suse.de>
615 Andreas Jaeger <aj@suse.de>
616
617 * configure.ac: Set PACKAGE correctly.
618 * configure: Regenerated.
619
99439f5b 6202004-08-25 Paolo Bonzini <bonzini@gnu.org>
621
622 * Makefile.in: Add back top_builddir.
623
a668be26 6242004-08-25 Paolo Bonzini <bonzini@gnu.org>
625
626 * configure.ac: Replace Automake macro invocations
627 with manual Autoconf checks and substitutions.
628 * configure: Regenerate.
629 * aclocal.m4: Regenerate.
630 * config.in: Regenerate.
631 * Makefile.am: Removed.
632 * Makefile.in: Heavy simplification and reorganization.
633
30e9913f 6342004-08-09 Mark Mitchell <mark@codesourcery.com>
635
636 * configure.ac (arm*-*-eabi*): New target.
637 (arm*-*-symbianelf*): Likewise.
638 * configure: Regenerated.
639
3b298764 6402004-07-24 Bernardo Innocenti <bernie@develer.com>
641
642 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
643 * directives.c: Use XNEW-family macros from libiberty.
644 * lex.c: Likewise.
645 * macro.c: Likewise.
646 * cpplib.h (cpp_deps_style): Export enum with name.
647
d6d3c909 6482004-07-23 Matthias Klose <doko@debian.org>
3b298764 649
d6d3c909 650 * init.c (init_library): Use PACKAGE for the text domain.
1ed7d058 651
821fa045 6522004-07-16 Andris Pavenis <pavenis@latnet.lv>
653
654 PR preprocessor/16366
655 * internal.h (struct cpp_reader): New field dir_hash.
656 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
657 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
658
d80efa72 6592004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
660
661 PR preprocessor/16192
662 PR preprocessor/15913
663 PR preprocessor/15572
664 * expr.c (_cpp_parse_expr): Handle remaining cases where an
665 expression is missing.
666 * init.c (post_options): Traditional cpp doesn't do // comments.
667
ed000086 6682004-06-30 Per Bothner <per@bothner.com>
669
670 * include/line-map.h (fileline): Remove old typedef.
671 * internal.h (struct cpp_reader): Use source_location typedef instead.
672
dcb9d064 6732004-06-26 Zack Weinberg <zack@codesourcery.com>
674
675 Partially revert patch of 2004-06-05.
676 * files.c (search_cache): Remove pfile argument. Don't check
677 for file that would be found by "" or <> search here...
678 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
679 Do not apply directory-of-current-file correction to files
680 found by this check. Rearrange code slightly.
681
d718b525 6822004-06-21 Geoffrey Keating <geoffk@apple.com>
683
684 * files.c (should_stack_file): Correct swapped parameters to call
685 to cb.read_pch.
686 * pch.c (cpp_valid_state): Handle -fpreprocessed.
687
79b68529 6882004-06-15 Paolo Bonzini <bonzini@gnu.org>
689
690 * Makefile.in: Regenerate with automake 1.8.5.
691 * aclocal.m4: Likewise.
692 * configure: Regenerate.
693
151899c5 6942004-06-11 Zack Weinberg <zack@codesourcery.com>
695
696 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
697 * configure, config.in: Regenerate.
698 * system.h: Unconditionally define bool as unsigned char,
699 BOOL_BITFIELD as unsigned int.
700 * .cvsignore: New file.
701
c39ed964 7022004-06-09 Geoffrey Keating <geoffk@apple.com>
703
704 * traditional.c (push_replacement_text): Set macro->traditional.
705 (save_replacement_text): Likewise.
706 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
707 (struct save_macro_item): Delete.
708 (struct save_macro_data): Use a character array not the previous
709 structured format.
710 (save_macros): Save macro as text not as internal structures.
711 (cpp_prepare_state): Update for changes to save_macro_data.
712 (cpp_read_state): Don't read macros defined in PCH. Restore
c84ca916 713 -D macros as text.
c39ed964 714 * macro.c (create_iso_definition): Honour alloc_subobject.
715 Clear traditional flag.
716 (_cpp_create_definition): Honour alloc_subobject.
717 * lex.c (cpp_token_val_index): New.
718 * internal.h: Include cpp-id-data.h.
719 (uchar): Move definition to cpp-id-data.h.
720 (U): Likewise.
721 (cpp_macro): Likewise.
722 * directives.c (struct answer): Move to cpp-id-data.h.
723 (do_assert): Honour alloc_subobject.
c84ca916 724
725 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
726 * include/cpplib.h (struct cpp_string): Add GTY marker.
727 (enum cpp_token_fld_kind): New.
728 (struct cpp_token): Add GTY markers.
729 (cpp_token_val_index): Prototype.
730 (CPP_HASHNODE_VALUE_IDX): New.
731 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
732 * include/cpp-id-data.h: New file.
c39ed964 733
dd6e5561 7342004-06-09 Paolo Bonzini <bonzini@gnu.org>
735
736 * Makefile.am (all-local): New.
737 * Makefile.in: Regenerate.
738
8af0c78d 7392004-06-06 Roger Sayle <roger@eyesopen.com>
740
741 * Makefile.am (LIBICONV): Declare.
742 (makedepend_LDADD): Use LIBICONV.
743 * Makefile.in: Regenerate.
744
30302733 7452004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
746
747 * Makefile.am (LIBINTL): Declare
748 (makedepend_LDADD): Use LIBINTL.
749 * Makefile.in: Regenerate.
750
3eb3f293 7512004-06-05 Zack Weinberg <zack@codesourcery.com>
752
753 * Makefile.am: Add makedepend.
754 * Makefile.in, aclocal.m4: Regenerate.
755 * charset.c: Insert a space to avoid a warning.
756 * directives.c: Include mkdeps.h.
757 (_cpp_handle_directive): Reenable macro expander if appropriate.
758 (undefine_macros): Inline body of _cpp_free_definition for speed.
759 Do not call undef callback or _cpp_warn_if_unused_macro.
760 (cpp_get_deps): New interface.
761 * files.c (search_cache): Add pfile argument. Check for file
762 that would be found by "" or <> search here...
763 (_cpp_find_file): ...not here. Correct recorded start_dir of
764 files found by directory-of-current-file search that would be
765 found by "" or <> search.
766 * init.c (cpp_add_dependency_target): Delete.
767 * internal.h (struct lexer_state): Add discarding_output flag.
768 * lex.c (lex_identifier): Compute hash function while scanning.
769 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
770 directives.
771 * makedepend.c: New file.
772 * mkdeps.c (struct deps): Add vpath vector.
773 (apply_vpath, deps_add_vpath): New function.
774 (deps_free): Free vpath vector.
775 (deps_add_dep, deps_add_target): Use apply_vpath.
776 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
777 (ht_lookup_with_hash): New function.
778 * cpplib.h, mkdeps.h: Update prototypes.
779 * symtab.h: Update prototypes.
780 (HT_HASHSTEP, HT_FINISH): New macros.
781
8ed01400 7822004-05-29 Geoffrey Keating <geoffk@apple.com>
783
784 * symtab.c (ht_create): Set entries_owned.
785 (ht_destroy): Honour entries_owned.
786 (ht_expand): Likewise.
787 (ht_load): New.
c84ca916 788 * include/symtab.h (struct ht): New field 'entries_owned'
789 (ht_load): New prototype.
8ed01400 790
347a3ab5 7912004-05-26 Paolo Bonzini <bonzini@gnu.org>
792
793 PR bootstrap/15651
794 * configure.ac: Fix m4 quoting when picking
795 the size of HOST_WIDE_INT.
796 * configure: Regenerate.
797
fc231f28 7982004-05-25 Paolo Bonzini <bonzini@gnu.org>
799
800 * Makefile.am: the correct directory for
801 gettext include files is given by @INCINTL@.
802 * Makefile.in: Regenerate.
803
babfbd63 8042004-05-24 Paolo Bonzini <bonzini@gnu.org>
805
806 * system.h [!ENABLE_NLS]: dgettext takes two
807 parameters.
808
d856c8a6 8092004-05-23 Paolo Bonzini <bonzini@gnu.org>
810
811 Moved libcpp from the gcc subdirectory to the toplevel.
812 * Makefile.am: New file.
813 * Makefile.in: Regenerate.
814 * configure.ac: New file.
815 * configure: Regenerate.
816 * config.in: Regenerate.
817 * charset.c: Moved from gcc/cppcharset.c. Add note about
818 brokenness of input charset detection. Adjust for change
819 in name of cppucnid.h.
820 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
821 * expr.c: Moved from gcc/cppexp.c.
822 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
823 Remove #define of O_BINARY, it is in system.h.
824 * identifiers.c: Moved from gcc/cpphash.c.
825 * internal.h: Moved from gcc/cpphash.h. Change header
826 guard name. All other files adjusted to match name change.
827 * init.c: Moved from gcc/cppinit.c.
828 (init_library) [ENABLE_NLS]: Call bindtextdomain.
829 * lex.c: Moved from gcc/cpplex.c.
830 * directives.c: Moved from gcc/cpplib.c.
831 * macro.c: Moved from gcc/cppmacro.c.
832 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
833 * traditional.c: Moved from gcc/cpptrad.c.
834 * ucnid.h: Moved from gcc/cppucnid.h. Change header
835 guard name.
836 * ucnid.pl: Moved from gcc/cppucnid.pl.
837 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
838 guard name.
839 * symtab.c: Moved from gcc/hashtable.c.
840 * line-map.c: Moved from gcc. Do not include intl.h.
841 * mkdeps.c: Moved from gcc.
842 * system.h: New file.
c84ca916 843 * include/cpplib.h: Moved from gcc. Change header guard name.
844 * include/line-map.h: Moved from gcc. Change header guard name.
845 * include/mkdeps.h: Moved from gcc. Change header guard name.
846 * include/symtab.h: Moved from gcc/hashtable.h. Change header
847 guard name.