]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
jvmti.cc (_Jv_JVMTI_GetErrorName): Now static.
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
c663e301
JM
12006-09-13 Joseph S. Myers <joseph@codesourcery.com>
2
3 PR c/28768
4 PR preprocessor/14634
5 * lex.c (lex_string): Pedwarn for unterminated literals.
6
f7288899
EC
72006-09-08 Eric Christopher <echristo@apple.com>
8
9 * configure.ac: Add 64-bit HWI support for i?86-darwin.
10
b52dbbf8
SE
112006-08-14 Steve Ellcey <sje@cup.hp.com>
12
13 PR c++/28288
14 PR c++/14556
15 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
16 (CPP_LAST_EQ): Change.
17 (CPP_LAST_PUNCTUATOR): Change.
18 * expr.c (cpp_operator): Remove MIN and MAX.
19 (reduce): Remove CPP_MIN and CPP_MAX.
20 (num_binary_op): Ditto.
21 * lex.c (_cpp_lex_direct): Ditto.
22 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
23
1c90c6f9
JJ
242006-06-09 Jakub Jelinek <jakub@redhat.com>
25
26 PR preprocessor/27746
27 * directives.c (do_pragma): Handle pragma with valid namespace
28 and invalid name coming from macro expansion.
29 * directives.c (destringize_and_run): Initialize next field in
30 context.
31
32 PR c/27747
33 PR c++/27748
34 * directives.c (destringize_and_run): Set NO_EXPAND on the
35 tokens.
36
37 * macro.c (_cpp_backup_tokens): Fix comment typo.
38
5c3c3683
DJ
392006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
40
41 * Makefile.in (CATALOGS): Add po/ prefix.
42 * configure: Regenerated.
43
b2bd74bc
CD
442006-05-23 Carlos O'Donell <carlos@codesourcery.com>
45
46 * Makefile.in: Add install-html target. Add install-html to .PHONY
47
be8ac3e2
GZ
482006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
49
50 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
51 * files.c (_cpp_get_file_stat): New function.
52 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
53 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
54 * internal.h (_cpp_get_file_stat): Prototype.
55 (struct cpp_buffer): Add timestamp.
56
83900997
JJ
572006-01-23 Jakub Jelinek <jakub@redhat.com>
58
59 PR preprocessor/25717
60 * init.c (cpp_init_builtins): If __STDC__ will not change value
61 between system headers and other sources, define it as a normal
62 macro rather than a builtin.
63 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
64 cpp_in_system_header condition.
65
662006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
67
68 * Makefile.in: Use -MMD instead of -MD.
69
bc4071dd
RH
702006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
71 Richard Henderson <rth@redhat.com>
72
73 Merge from gomp branch:
74 * directives.c (struct pragma_entry): Add is_deferred. Add ident
75 entry to value union.
76 (end_directive): Don't eat the line if in_deferred_pragma.
77 (run_directive): Remove pragma hacks.
78 (insert_pragma_entry): Remove.
79 (new_pragma_entry): New.
80 (register_pragma_1): Split out of register_pragma. Only handle
81 the lookup tree and return the new entry.
82 (cpp_register_pragma): Fill in the pragma entry here.
83 (cpp_register_deferred_pragma): New.
84 (register_pragma_internal): New.
85 (_cpp_init_internal_pragmas): Use register_pragma_internal.
86 (do_pragma): Allow pragma expansion after namespace. For deferred
87 pragmas, don't slurp the line into a string.
88 (destringize_and_run): Save tokens for deferred pragmas.
89 (cpp_handle_deferred_pragma): Remove.
90 * macro.c (builtin_macro): Remove pragma token hack.
91 (_cpp_push_token_context): Rename from push_token_context and export.
92 * internal.h (struct lexer_state): Add pragma_allow_expansion.
93 (_cpp_push_token_context): Declare.
94 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
95 a token. Update the line number correctly if so.
96 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
97 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
98 * include/cpplib.h (PRAGMA_EOL): New.
99 (CPP_TOKEN_FLD_PRAGMA): New.
100 (struct cpp_token): Add val.pragma.
101 (struct cpp_options): Remove defer_pragmas.
102 (cpp_handle_deferred_pragma): Remove.
103 (cpp_register_deferred_pragma): Declare.
104
d09e893f
JJ
1052006-01-01 Jakub Jelinek <jakub@redhat.com>
106
107 PR c++/25294
108 * directives.c (do_pragma): If pragma line ends with multi-line
109 block comment, end the saved deferred pragma string before that
110 comment. Handle embedded '\0' chars on the pragma line.
111
ab84748a
VR
1122005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
113
114 PR c++/23333
115 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
116
ad6ed77e
JG
1172005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
118 Ben Elliston <bje@au.ibm.com>
119
120 * include/cpplib.h (CPP_N_DFLOAT): New.
121 * expr.c (interpret_float_suffix): Identify df, dd, and dl
122 suffixes as decimal floating point constants.
123 (cpp_classify_number): Disallow hexadecimal DFP constants.
124
ba096620 1252005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 126 Ian Lance Taylor <ian@airs.com>
ba096620
GP
127
128 * include/cpplib.h (struct cpp_callbacks): Annotate error with
129 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
130
456b8ce5
UB
1312005-11-09 Per Bothner <per@bothner.com>
132 Uros Bizjak <uros@kss-loka.si>
f7288899 133
456b8ce5
UB
134 PR c/24101
135 * init.c (read_original_filename): Temporarily set
136 state.in_directive before calling _cpp_lex_direct for
137 CPP_HASH tokens.
138
5571f74f
JW
1392005-11-03 James E Wilson <wilson@specifix.com>
140
141 PR preprocessor/24202
142 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
143
a63607ed
JM
1442005-11-04 Joseph S. Myers <joseph@codesourcery.com>
145
146 * include/cpplib.h (struct cpp_callbacks): Make error take
147 va_list* parameter.
148 * errors.c (cpp_error): Update call to callback.
149
651ed942
AP
1502005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
151
152 PR preprocessor/22042
153 * macro.c (_cpp_builtin_macro_text): Lower the needed max
154 buffer size.
155 (cpp_quote_string): Don't octalify non printable
156 charactors.
157
178b58b5
JM
1582005-11-03 Joseph S. Myers <joseph@codesourcery.com>
159
160 PR c++/17964
161 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
162 (struct cpp_callbacks): Add error.
163 * errors.c (cpp_error): If client_diagnostic, use error callback.
164 * charset.c (convert_escape): Don't use %03o in diagnostic.
165
3ee5ed11 1662005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
167
168 PR preprocessor/15220
169 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
170 callers. Pass to open_file_failed.
171 (open_file_failed): New parameter angle_brackets. Fix all callers.
172 Use in print_dep assignment.
173 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
174 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 175
077fc835
KH
1762005-10-08 Kazu Hirata <kazu@codesourcery.com>
177
178 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
179 * configure: Regenerate.
180
cbc43ae0
ILT
1812005-10-04 Ian Lance Taylor <ian@airs.com>
182
183 PR preprocessor/13726
184 * directives.c (check_eol_return_comments): New static function.
185 (parse_include): Add buf parameter. Change all callers.
186 (do_include_common): If not discard comments, turn on
187 save_comments. Pass collected comments to include callback.
188 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
189 include callback: cpp_token list.
190
af15a2fe
JM
1912005-09-20 Joseph S. Myers <joseph@codesourcery.com>
192
193 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
194 * init.c (struct lang_flags, lang_defaults): Add
195 extended_identifiers.
196 (cpp_set_lang): Use it.
197 * lex.c (forms_identifier_p): Check extended_identifiers.
198
f5eab47e
JJ
1992005-08-30 Jakub Jelinek <jakub@redhat.com>
200
201 PR preprocessor/20348
202 PR preprocessor/20356
203 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
204 2004-06-05 changes.
205
467129e6
KG
2062005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
207
208 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
209 -Wmissing-format-attribute.
210
211 * configure: Regenerate.
212
200031d1
KC
2132005-06-29 Kelley Cook <kcook@gcc.gnu.org>
214
215 * all files: Update FSF address in copyright headers.
216 * makeucnid.c (write_copyright): Update outputted FSF address.
217
f610dd5f
ZW
2182005-06-13 Zack Weinberg <zack@codesourcery.com>
219
220 * configure.ac: Invoke ZW_CREATE_DEPDIR and
221 ZW_PROG_COMPILER_DEPENDENCIES.
222 * aclocal.m4, configure: Regenerate.
223 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
224 New variables.
225 (distclean): Clean up $(DEPDIR) and its contents.
226 (.c.o): Use $(COMPILE).
227 Include $(DEPDIR)/*.Po for most object->header dependencies.
228
c3f829c1
GDR
2292005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
230
231 * configure.ac: Check declarations for asprintf and vasprintf.
232 * config.in: Regenerate.
233 * configure: Likewise.
234
235 * charset.c (conversion_loop): Use XRESIZEVEC.
236 (convert_no_conversion): Likewise.
237 (convert_using_iconv): Likewise.
238 (init_iconv_desc): Cast return value of alloca.
239 (cpp_host_to_exec_charset): Use XNEWVEC.
240 (emit_numeric_escape): Use XRESIZEVEC.
241 (cpp_interpret_string): Use XNEWVEC.
242 (cpp_interpret_string): Use XRESIZEVEC.
243 (_cpp_interpret_identifier): Cast return value of alloca.
244 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
245 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
246 (parse_include): Use XNEWVEC.
247 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 248 "new_entry".
c3f829c1
GDR
249 (save_registered_pragmas): Cast return value of xmemdup.
250 (destringize_and_run): Same for alloca.
251 (parse_assertion): Likewise.
252 (do_assert): Cast allocated storage to proper type.
253 (cpp_define): Likewise.
254 (_cpp_define_builtin): Likewise.
255 (cpp_undef): Likewise.
256 (handle_assertion): Likewise.
257 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
258 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
259 (CPP_UMINUS): Likewise.
260 (struct cpp_operator): Rename from struct operator.
261 (_cpp_expand_op_stack): Use XRESIZEVEC.
262 * files.c (pch_open_file): Use XNEWVEC.
263 (pch_open_file): Use XRESIZEVEC.
264 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
265 (dir_name_of_file): Use XNEWVEC.
266 (make_cpp_file): Use XCNEW.
267 (make_cpp_dir): Likewise.
268 (allocate_file_hash_entries): USE XNEWVEC.
269 (cpp_included): Cast return value of htab_find_with_hash.
270 (append_file_to_dir): Use XNEWVEC.
271 (read_filename_string): Likewise. Use XRESIZEVEC too.
272 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
273 (remap_filename): Use XNEWVEC.
274 (struct pchf_entry): Move definition out of struct pchf_data.
275 (_cpp_save_file_entries): Use XCNEWVAR.
276 (_cpp_read_file_entries): Use XNEWVAR.
277 * identifiers.c (alloc_node): Use XOBNEW.
278 * init.c (cpp_create_reader): Use XCNEW.
279 (cpp_init_builtins): Cast of b->value to enum builtin_type.
280 (read_original_directory): Cast return value of alloca.
281 * lex.c (add_line_note): Use XRESIZEVEC.
282 (warn_about_normalization): Use XNEWVEC.
283 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
284 (new_buff): Use XNEWVEC.
285 * line-map.c (linemap_add): Use XRESIZEVEC.
286 * macro.c (builtin_macro): Cast return value of alloca.
287 (paste_tokens): Likewise.
288 (expand_arg): Use XNEWVEC and XRESIZEVEC.
289 (_cpp_save_parameter): Use XRESIZEVEC.
290 (create_iso_definition): Cast allocated storage to proper type.
291 (_cpp_create_definition): Likewise.
292 (cpp_macro_definition): Use XRESIZEVEC.
293 * makedepend.c (add_clm): Use XNEW.
294 (add_dir): Likewise.
295 * mkdeps.c (munge): Use XNEWVEC.
296 (deps_init): Use XCNEW.
297 (deps_add_target): Use XRESIZEVEC.
298 (deps_add_default_target): Cast return value of alloca.
299 (deps_add_dep): Use XRESIZEVEC.
300 (deps_add_vpath): Likewise. Use XNEWVEC too.
301 (deps_restore): Likewise.
302 * pch.c (save_idents): Use XNEW and XNEWVEC.
303 (cpp_save_state): Use XNEW.
304 (count_defs): Cast return value of htab_find.
305 (write_defs): Likewise.
306 (cpp_write_pch_deps): Use XNEWVEC.
307 (collect_ht_nodes): Use XRESIZEVEC.
308 (cpp_valid_state): Use XNEWVEC.
309 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
310 * symtab.c (ht_create): Use XCNEW.
311 (ht_lookup_with_hash): Cast return value of obstack_copy0.
312 (ht_expand): Use XCNEWVEC.
313 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
314 (bool): Do not define if __cplusplus.
315
1ed17cd5
ZW
3162005-05-12 Zack Weinberg <zack@codesourcery.com>
317
318 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
319 (do_sccs): Delete function definition, #define to do_ident.
320 (do_ident): Don't hardwire directive name.
321
5a8c20ce
RK
3222005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
323
324 PR bootstrap/21230
325 * configure: Regenerate.
326
473c5bc9
AP
3272005-04-27 Andris Pavenis <pavenis@latnet.lv>
328
329 * files.c: Include io.h for DJGPP to get prototype of setmode.
330
c1fc5047
PB
3312005-04-19 Per Bothner <per@bothner.com>
332
333 PR preprocessor/20907
334 * line-map.c (linemap_line_start): Fix bug when we need to increse
335 column_bits but can re-use the current line_map.
336
042630ad
KG
3372005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
338
339 * system.h (fopen, fdopen, freopen): Define these to the unlocked
340 libiberty functions.
341
0d667716
KG
3422005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
343
344 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
345 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
346 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
347 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
348 _unlocked function.
349 (fwrite_unlocked): Fix prototype.
1ed17cd5 350
0d667716
KG
351 * configure, config.in: Regenerate.
352
cae064e7
JJ
3532005-04-05 Jakub Jelinek <jakub@redhat.com>
354
355 PR preprocessor/19475
356 * macro.c (create_iso_definition): For < ISO C99, don't
357 pedwarn if there is no whitespace between macro name and its
358 replacement, but the replacement starts with a basic character
359 set character.
360
cbada204
AJ
3612005-03-28 Andreas Jaeger <aj@suse.de>
362
363 * lex.c (warn_about_normalization): Cast field width to int to
364 avoid warning.
365
f42eccdb
JM
3662005-03-19 Joseph S. Myers <joseph@codesourcery.com>
367
368 * configure.ac: Consistently use solaris2.1[0-9]* instead of
369 solaris2.1[0-9].
370 * configure: Regenerate.
371
c79e602b
GK
3722005-03-15 Geoffrey Keating <geoffk@apple.com>
373
374 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
375 UCN rather than printing an error.
376
50668cf6
GK
3772005-03-14 Geoffrey Keating <geoffk@apple.com>
378
6baba9bb
GK
379 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
380
3812005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 382
50668cf6
GK
383 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
384 * charset.c: Update for new format of ucnid.h.
385 (ucn_valid_in_identifier): Update for new format of ucnid.h.
386 Add NST parameter, and update it; update callers.
387 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
388 with cpp_error.
389 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
390 * internal.h (struct normalize_state): New.
391 (INITIAL_NORMALIZE_STATE): New.
392 (NORMALIZE_STATE_RESULT): New.
393 (NORMALIZE_STATE_UPDATE_IDNUM): New.
394 (_cpp_valid_ucn): New.
395 * lex.c (warn_about_normalization): New.
396 (forms_identifier_p): Add normalize_state parameter, update callers.
397 (lex_identifier): Add normalize_state parameter, update callers. Keep
398 the state current.
399 (lex_number): Likewise.
400 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
401 it with warn_about_normalization.
402 * makeucnid.c: New.
403 * ucnid.h: Replace.
404 * ucnid.pl: Remove.
405 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
406 comments about obsolete version of C++.
407 * include/cpplib.h (enum cpp_normalize_level): New.
408 (struct cpp_options): Add warn_normalize field.
409
47e20491
GK
4102005-03-11 Geoffrey Keating <geoffk@apple.com>
411
412 * directives.c (glue_header_name): Update call to cpp_spell_token.
413 * internal.h (_cpp_interpret_identifier): New.
414 * charset.c (_cpp_interpret_identifier): New.
415 (_cpp_valid_ucn): Allow UCN version of '$'.
416 * lex.c (lex_identifier): Add extra parameter to indicate if initial
417 character was '$' or '\'. Support identifiers with UCNs.
418 (forms_identifier_p): Allow UCNs.
419 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
420 (utf8_to_ucn): New.
421 (cpp_spell_token): Add FORSTRING parameter. Use it.
422 (cpp_token_as_text): Update call to cpp_spell_token.
423 (cpp_output_token): Write UCNs back out.
424 (stringify_arg): Update call to cpp_spell_token.
425 (paste_tokens): Likewise.
426 (cpp_macro_definition): Likewise.
427 * macro.c (stringify_arg): Likewise.
428 (paste_tokens): Likewise.
429 (cpp_macro_definition): Likewise.
430 * include/cpplib.h: Add parameter to cpp_spell_token.
431
73096711
JJ
4322005-03-04 Jakub Jelinek <jakub@redhat.com>
433
434 PR bootstrap/20282
435 PR bootstrap/20305
436 * macro.c (replace_args, cpp_get_token): Copy whole
437 cpp_token_u instead of just cpp_string field from it.
438
2203a881
DP
4392005-02-28 Devang Patel <dpatel@apple.com>
440
441 * directives.c (do_line): Save sysp early before line table is
442 realloc'ed.
1ed17cd5 443
c5ff069d
ZW
4442005-02-20 Zack Weinberg <zack@codesourcery.com>
445
446 PR 18785
447 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
448 (cpp_host_to_exec_charset): New function.
449 * include/cpplib.h: Declare cpp_host_to_exec_charset.
450
04c90eea
DP
4512005-02-19 Devang Patel <dpatel@apple.com>
452
453 * charset.c (_cpp_convert_input): Check '\r' before inserting
454 '\n' at the end.
c5ff069d 455
6da55c00
EC
4562005-02-15 Eric Christopher <echristo@redhat.com>
457
458 PR preprocessor/19077
459 * macro.c (cpp_macro_definition): Move handling of whitespace
460 to PREV_WHITE conditional. Remove overloading of len
461 variable.
462
31c3e631
KH
4632005-02-14 Kazu Hirata <kazu@cs.umass.edu>
464
465 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
466 traditional.c: Update copyright.
467
be0f1e54
PB
4682005-02-14 Paolo Bonzini <bonzini@gnu.org>
469
470 PR bootstrap/19818
471 * configure.ac: Check for declaration of basename and getopt.
472 * config.in: Regenerate.
473 * configure: Regenerate.
474 * internal.h (ustrcspn): New.
475 * macro.c (create_iso_definition): Fix allocation of memory.
476 (padding_token): Add cast to remove const-ness.
477 * pch.c (cpp_read_state): Use ustrcspn.
478
ecddfb39
MS
4792005-02-08 Mike Stump <mrs@apple.com>
480
481 * files.c (pchf_adder): Remove.
482 (struct pchf_adder_info): Likewise.
483 (_cpp_save_file_entries): Write out all files so that #import works.
484
9fcdd891
JM
4852005-01-23 Joseph S. Myers <joseph@codesourcery.com>
486
487 * configure: Regenerate.
488
ecfd72e7
TS
4892005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
490
491 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
492
6c25a4f7 493 * include/cpplib.h: Also update copyright years.
c5ff069d 494
942926ad
GK
4952005-01-03 Geoffrey Keating <geoffk@apple.com>
496
497 * files.c (_cpp_find_file): Add files found by search_path_exhausted
498 to the list of all files.
499
a2566ae9
GDR
5002005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
501
502 * internal.h: Update references to Cpp lib filenames.
503 * directives.c: Likewise.
504 * init.c: Likewise.
505 * macro.c: Likewise.
506 * traditional.c: Likewise.
507
1b449375
EB
5082004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
509
510 PR preprocessor/15167
511 * files.c (destroy_cpp_file): New function.
512 (should_stack_file): Make a new file if the
513 compared file is still stacked.
514
28303828
NN
5152004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
516
c5ff069d 517 PR preprocessor/17610
28303828
NN
518 * directives.c (do_include_common): Error out if an empty filename
519 is given for #include (or #include_next or #import).
520
c812785a
RS
5212004-11-27 Roger Sayle <roger@eyesopen.com>
522 Zack Weinberg <zack@codesourcery.com>
523
524 * internal.h: Replace all uses of uchar with unsigned char.
525 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
526 with !IN_GCC, so uchar is only defined whilst building libcpp.
527
f91eaa01
KC
5282004-11-24 Kelley Cook <kcook@gcc.gnu.org>
529
530 * aclocal.m4: Regenerate.
531
f78ce0c2
RS
5322004-11-24 Roger Sayle <roger@eyesopen.com>
533
534 PR preprocessor/15824
535 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
536 directly, instead of the non-existant "system.h" and "ansidecl.h".
537 * configure: Regenerate.
538
b5b3e36a 5392004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 540 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
541
542 * internal.h (struct lexer_state): Add in_deferred_pragma.
543 * directives.c (struct pragma_entry): Add allow_expansion.
544 (insert_pragma_entry): Take allow_expansion flag.
545 (register_pragma): Likewise.
546 (cpp_register_pragma): Likewise.
547 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
548 (do_pragma): Honor allow_expansion.
549 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
550 * include/cpplib.h (cpp_register_pragma): Update prototype.
551
a8e68029 5522004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 553 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
554
555 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
556 need_64bit_hwint=yes.
557 * configure: Regenerate.
558
50f47ee0
JM
5592004-11-09 Joseph S. Myers <joseph@codesourcery.com>
560
561 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
562 po/$(PACKAGE).pot.
563 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
564 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
565 Remove local srcdir path from generated file.
566
968e08d6 5672004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 568 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
569
570 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
571 as well.
572
3da3d587
ZW
5732004-10-27 Zack Weinberg <zack@codesourcery.com>
574
575 PR 18075
576 * directives.c (do_pragma): Do not defer pragmas which are unknown.
577 (cpp_handle_deferred_pragma): Add cast to silence warning.
578
ac24fc25
JM
5792004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
580
581 * errors.c (_cpp_begin_message): Print "error: " for errors.
582
7731405b
AJ
5832004-10-10 Andreas Jaeger <aj@suse.de>
584
585 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
586 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
587
646544e3
AP
5882004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
589
590 * pch.c (cpp_write_pch_state): Remove variable z as it is not
591 used.
592 (cpp_read_state): Remove unused variables, m, d and mac_count.
593
67a74146
PB
5942004-09-29 Per Bothner <per@bothner.com>
595
596 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
597 cb.line_change. Otherwise do_pragma will call the line_change
598 call-back with a meaningless line number.
599
018a4785
ZW
6002004-09-24 Zack Weinberg <zack@codesourcery.com>
601
602 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
603 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
604 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
605 * aclocal.m4, configure: Regenerate.
606 * init.c: Include localedir.h.
607 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
608 (DEFS): Delete.
609 (.c.o): Use $(ALL_CFLAGS).
610 (localedir.h, localedir.hs): New rules.
611 (clean): Use rm -rf to remove directories.
612 (distclean): Also delete localedir.h and localedir.hs.
613 (init.o): Update dependencies.
614
88fa57d7
KC
6152004-09-22 Kelley Cook <kcook@gcc.gnu.org>
616
617 * Makefile.in (aclocal.m4): Update dependencies.
618 * configure.ac (AC_CONFIG_MACRO_DIR): New.
619 * aclocal.m4, configure: Regenerate.
620
8f8e9aa5
ZW
6212004-09-17 Zack Weinberg <zack@codesourcery.com>
622
a29f62d9
ZW
623 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
624 (_cpp_convert_input, _cpp_default_encoding): Add comments.
625 Some other comments in this file also tweaked.
626
8f8e9aa5
ZW
627 * directives.c (do_pragma): Save current buffer position
628 before lexing the pragma keywords; don't call
629 _cpp_backup_tokens in the defer_pragmas case.
630
a2981930
PB
6312004-09-15 Per Bothner <per@bothner.com>
632
633 * include/line-map.h (line_map_start): Add parameter names so
634 preceding comment makes sense.
635 (linemap_add): Remove from comment mention of non-existing parameter.
636
21b11495
ZW
6372004-09-09 Matt Austern <austern@apple.com>
638 Zack Weinberg <zack@codesourcery.com>
639
640 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
641 prefixes throughout. Add entry for PRAGMA. Remove
642 unnecessary "= 0" from EQ.
643 (enum cpp_ttype): Adjust OP and TK definitions to restore
644 prefixes, via token-paste.
645 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
646 Change from #defines to additional cpp_ttype enumerators.
647 (struct cpp_options): Add defer_pragmas.
648 (cpp_handle_deferred_pragma): Prototype new interface.
649
650 * internal.h (struct cpp_reader): Add directive_result.
651 * directives.c (struct pragma_entry): Add is_internal field;
652 give boolean fields type bool.
653 (start_directive): Initialize pfile->directive_result.type.
654 (_cpp_do__Pragma): Likewise.
655 (run_directive): Do not crash if pfile->buffer->prev is NULL.
656 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
657 from it.
658 (register_pragma): New static function, bulk of former
659 cpp_register_pragma here; add 'internal' argument, pass along
660 to insert_pragma_entry.
661 (cpp_register_pragma): Now a wrapper around register_pragma which
662 always passes false for 'internal' argument.
663 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
664 true for 'internal'.
665 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
666 an internal pragma, save text till the end of the line as a CPP_PRAGMA
667 token instead of executing the pragma.
668 (cpp_handle_deferred_pragma): New interface.
669 * lex.c (token_spellings): Adjust OP and TK definitions to
670 match changes to cpplib.h.
671 (_cpp_lex_token): Check for a directive-result token and
672 return it if present.
673 (cpp_token_val_index): Handle CPP_PRAGMA.
674 * macro.c (cpp_builtin_macro_text): Correct comment.
675 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
676
0fd9e8dd
SB
6772004-09-06 Serge Belyshev <belyshev@lubercy.com>
678
679 PR preprocessor/14699
680 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
681 from size_t to double.
682
39b8ce7f
AS
6832004-08-28 Andreas Schwab <schwab@suse.de>
684 Andreas Jaeger <aj@suse.de>
685
686 * configure.ac: Set PACKAGE correctly.
687 * configure: Regenerated.
688
5d1f4b27
PB
6892004-08-25 Paolo Bonzini <bonzini@gnu.org>
690
691 * Makefile.in: Add back top_builddir.
692
078e3ffe
PB
6932004-08-25 Paolo Bonzini <bonzini@gnu.org>
694
695 * configure.ac: Replace Automake macro invocations
696 with manual Autoconf checks and substitutions.
697 * configure: Regenerate.
698 * aclocal.m4: Regenerate.
699 * config.in: Regenerate.
700 * Makefile.am: Removed.
701 * Makefile.in: Heavy simplification and reorganization.
702
b3f8d95d
MM
7032004-08-09 Mark Mitchell <mark@codesourcery.com>
704
705 * configure.ac (arm*-*-eabi*): New target.
706 (arm*-*-symbianelf*): Likewise.
707 * configure: Regenerated.
708
72bb2c39
BI
7092004-07-24 Bernardo Innocenti <bernie@develer.com>
710
711 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
712 * directives.c: Use XNEW-family macros from libiberty.
713 * lex.c: Likewise.
714 * macro.c: Likewise.
715 * cpplib.h (cpp_deps_style): Export enum with name.
716
21b11495 7172004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 718
21b11495 719 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 720
a23ee064
AP
7212004-07-16 Andris Pavenis <pavenis@latnet.lv>
722
723 PR preprocessor/16366
724 * internal.h (struct cpp_reader): New field dir_hash.
725 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
726 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
727
a09d4744
NB
7282004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
729
730 PR preprocessor/16192
731 PR preprocessor/15913
732 PR preprocessor/15572
733 * expr.c (_cpp_parse_expr): Handle remaining cases where an
734 expression is missing.
735 * init.c (post_options): Traditional cpp doesn't do // comments.
736
f58f7def
PB
7372004-06-30 Per Bothner <per@bothner.com>
738
739 * include/line-map.h (fileline): Remove old typedef.
740 * internal.h (struct cpp_reader): Use source_location typedef instead.
741
e83d8d43
ZW
7422004-06-26 Zack Weinberg <zack@codesourcery.com>
743
744 Partially revert patch of 2004-06-05.
745 * files.c (search_cache): Remove pfile argument. Don't check
746 for file that would be found by "" or <> search here...
747 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
748 Do not apply directory-of-current-file correction to files
749 found by this check. Rearrange code slightly.
750
c0d578e6
GK
7512004-06-21 Geoffrey Keating <geoffk@apple.com>
752
753 * files.c (should_stack_file): Correct swapped parameters to call
754 to cb.read_pch.
755 * pch.c (cpp_valid_state): Handle -fpreprocessed.
756
159d5224
PB
7572004-06-15 Paolo Bonzini <bonzini@gnu.org>
758
759 * Makefile.in: Regenerate with automake 1.8.5.
760 * aclocal.m4: Likewise.
761 * configure: Regenerate.
762
2fac9c01
ZW
7632004-06-11 Zack Weinberg <zack@codesourcery.com>
764
765 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
766 * configure, config.in: Regenerate.
767 * system.h: Unconditionally define bool as unsigned char,
768 BOOL_BITFIELD as unsigned int.
769 * .cvsignore: New file.
770
d8044160
GK
7712004-06-09 Geoffrey Keating <geoffk@apple.com>
772
773 * traditional.c (push_replacement_text): Set macro->traditional.
774 (save_replacement_text): Likewise.
775 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
776 (struct save_macro_item): Delete.
777 (struct save_macro_data): Use a character array not the previous
778 structured format.
779 (save_macros): Save macro as text not as internal structures.
780 (cpp_prepare_state): Update for changes to save_macro_data.
781 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 782 -D macros as text.
d8044160
GK
783 * macro.c (create_iso_definition): Honour alloc_subobject.
784 Clear traditional flag.
785 (_cpp_create_definition): Honour alloc_subobject.
786 * lex.c (cpp_token_val_index): New.
787 * internal.h: Include cpp-id-data.h.
788 (uchar): Move definition to cpp-id-data.h.
789 (U): Likewise.
790 (cpp_macro): Likewise.
791 * directives.c (struct answer): Move to cpp-id-data.h.
792 (do_assert): Honour alloc_subobject.
2cf22451
ZW
793
794 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
795 * include/cpplib.h (struct cpp_string): Add GTY marker.
796 (enum cpp_token_fld_kind): New.
797 (struct cpp_token): Add GTY markers.
798 (cpp_token_val_index): Prototype.
799 (CPP_HASHNODE_VALUE_IDX): New.
800 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
801 * include/cpp-id-data.h: New file.
d8044160 802
0ca8e815
PB
8032004-06-09 Paolo Bonzini <bonzini@gnu.org>
804
805 * Makefile.am (all-local): New.
806 * Makefile.in: Regenerate.
807
b51fa00f
RS
8082004-06-06 Roger Sayle <roger@eyesopen.com>
809
810 * Makefile.am (LIBICONV): Declare.
811 (makedepend_LDADD): Use LIBICONV.
812 * Makefile.in: Regenerate.
813
5e2f3f39
AP
8142004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
815
816 * Makefile.am (LIBINTL): Declare
817 (makedepend_LDADD): Use LIBINTL.
818 * Makefile.in: Regenerate.
819
c6e83800
ZW
8202004-06-05 Zack Weinberg <zack@codesourcery.com>
821
822 * Makefile.am: Add makedepend.
823 * Makefile.in, aclocal.m4: Regenerate.
824 * charset.c: Insert a space to avoid a warning.
825 * directives.c: Include mkdeps.h.
826 (_cpp_handle_directive): Reenable macro expander if appropriate.
827 (undefine_macros): Inline body of _cpp_free_definition for speed.
828 Do not call undef callback or _cpp_warn_if_unused_macro.
829 (cpp_get_deps): New interface.
830 * files.c (search_cache): Add pfile argument. Check for file
831 that would be found by "" or <> search here...
832 (_cpp_find_file): ...not here. Correct recorded start_dir of
833 files found by directory-of-current-file search that would be
834 found by "" or <> search.
835 * init.c (cpp_add_dependency_target): Delete.
836 * internal.h (struct lexer_state): Add discarding_output flag.
837 * lex.c (lex_identifier): Compute hash function while scanning.
838 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
839 directives.
840 * makedepend.c: New file.
841 * mkdeps.c (struct deps): Add vpath vector.
842 (apply_vpath, deps_add_vpath): New function.
843 (deps_free): Free vpath vector.
844 (deps_add_dep, deps_add_target): Use apply_vpath.
845 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
846 (ht_lookup_with_hash): New function.
847 * cpplib.h, mkdeps.h: Update prototypes.
848 * symtab.h: Update prototypes.
849 (HT_HASHSTEP, HT_FINISH): New macros.
850
b453c95f
GK
8512004-05-29 Geoffrey Keating <geoffk@apple.com>
852
853 * symtab.c (ht_create): Set entries_owned.
854 (ht_destroy): Honour entries_owned.
855 (ht_expand): Likewise.
856 (ht_load): New.
2cf22451
ZW
857 * include/symtab.h (struct ht): New field 'entries_owned'
858 (ht_load): New prototype.
b453c95f 859
963e23c5
PB
8602004-05-26 Paolo Bonzini <bonzini@gnu.org>
861
862 PR bootstrap/15651
863 * configure.ac: Fix m4 quoting when picking
864 the size of HOST_WIDE_INT.
865 * configure: Regenerate.
866
0429bc77
PB
8672004-05-25 Paolo Bonzini <bonzini@gnu.org>
868
869 * Makefile.am: the correct directory for
870 gettext include files is given by @INCINTL@.
871 * Makefile.in: Regenerate.
872
c86dd7db
PB
8732004-05-24 Paolo Bonzini <bonzini@gnu.org>
874
875 * system.h [!ENABLE_NLS]: dgettext takes two
876 parameters.
877
4f4e53dd
PB
8782004-05-23 Paolo Bonzini <bonzini@gnu.org>
879
880 Moved libcpp from the gcc subdirectory to the toplevel.
881 * Makefile.am: New file.
882 * Makefile.in: Regenerate.
883 * configure.ac: New file.
884 * configure: Regenerate.
885 * config.in: Regenerate.
886 * charset.c: Moved from gcc/cppcharset.c. Add note about
887 brokenness of input charset detection. Adjust for change
888 in name of cppucnid.h.
889 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
890 * expr.c: Moved from gcc/cppexp.c.
891 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
892 Remove #define of O_BINARY, it is in system.h.
893 * identifiers.c: Moved from gcc/cpphash.c.
894 * internal.h: Moved from gcc/cpphash.h. Change header
895 guard name. All other files adjusted to match name change.
896 * init.c: Moved from gcc/cppinit.c.
897 (init_library) [ENABLE_NLS]: Call bindtextdomain.
898 * lex.c: Moved from gcc/cpplex.c.
899 * directives.c: Moved from gcc/cpplib.c.
900 * macro.c: Moved from gcc/cppmacro.c.
901 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
902 * traditional.c: Moved from gcc/cpptrad.c.
903 * ucnid.h: Moved from gcc/cppucnid.h. Change header
904 guard name.
905 * ucnid.pl: Moved from gcc/cppucnid.pl.
906 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
907 guard name.
908 * symtab.c: Moved from gcc/hashtable.c.
909 * line-map.c: Moved from gcc. Do not include intl.h.
910 * mkdeps.c: Moved from gcc.
911 * system.h: New file.
2cf22451
ZW
912 * include/cpplib.h: Moved from gcc. Change header guard name.
913 * include/line-map.h: Moved from gcc. Change header guard name.
914 * include/mkdeps.h: Moved from gcc. Change header guard name.
915 * include/symtab.h: Moved from gcc/hashtable.h. Change header
916 guard name.