]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
avr.c (avr_override_options): Clear 'flag_delete_null_pointer_checks'.
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
4fcb360b
BM
12007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2
3 * Makefile.in: Add dummy install-pdf target.
4
67e64439
TT
52007-01-30 Tom Tromey <tromey@redhat.com>
6
7 PR preprocessor/30468:
8 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
9 './'.
10
ee380365
TT
112007-01-30 Tom Tromey <tromey@redhat.com>
12
13 PR preprocessor/29966:
14 * macro.c (lex_expansion_token): Save and restore cpp_reader's
15 cur_token.
16 (_cpp_create_definition): Don't restore cur_token here.
17 * lex.c (_cpp_lex_token): Added assertion.
18
024abeb3
TT
192007-01-27 Tom Tromey <tromey@redhat.com>
20
21 * configure: Rebuilt.
22
ee1c2a10
TT
232007-01-12 Tom Tromey <tromey@redhat.com>
24
25 PR preprocessor/28227:
26 * directives.c (lex_macro_node): Added 'is_def_or_undef'
27 argument.
28 (do_define): Update.
29 (do_undef): Update.
30 (do_ifdef): Update.
31 (do_ifndef): Update.
32
67214c16
PB
332007-01-11 Paolo Bonzini <bonzini@gnu.org>
34
35 * configure: Regenerate.
36
1aa6ca40
PB
372007-01-11 Paolo Bonzini <bonzini@gnu.org>
38
39 * configure: Regenerate.
40
705e2d28
TT
412007-01-04 Tom Tromey <tromey@redhat.com>
42
43 PR preprocessor/28165:
44 * internal.h (cpp_in_primary_file): New function.
45 * directives.c (do_include_next): Use cpp_in_primary_file.
46 (do_pragma_once): Likewise.
47 (do_pragma_system_header): Likewise.
48
7af45bd4
ILT
492006-12-29 Ian Lance Taylor <iant@google.com>
50
51 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
52 look backward at the end of the line unless we saw a backslash.
53
9d30f270
JJ
542006-12-29 Jakub Jelinek <jakub@redhat.com>
55
56 PR preprocessor/29612
57 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
58 only when new_sysp is non-zero.
59
30b0edc0
TT
602006-12-28 Tom Tromey <tromey@redhat.com>
61
62 PR preprocessor/30001:
63 * charset.c (_cpp_convert_input): Check that to.len is greater
64 than zero.
65
85d9c13c
TS
662006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
67
68 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 69 * configure: Rebuilt.
85d9c13c 70
dfafdaa6
DG
712006-11-01 Douglas Gregor <doug.gregor@gmail.com>
72
73 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
74 for experimental C++0x mode.
75 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
76 adopted the preprocessor changes introduced in C99.
77
0f45f0f5
JM
782006-10-29 Joseph Myers <joseph@codesourcery.com>
79
80 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
81 depending on --enable-targets=all.
82 * configure: Regenerate.
83
de000d22
JJ
842006-10-12 Jakub Jelinek <jakub@redhat.com>
85
86 PR preprocessor/28709
87 * macro.c (paste_tokens): Do error reporting here, use BUF with the
88 spelled LHS token as opposed to spelling it again.
89 (paste_all_tokens): Don't report errors here, just break on failure.
90
b5422ad7
BM
912006-10-10 Brooks Moses <bmoses@stanford.edu>
92
93 * Makefile.in: Added empty "pdf" target.
94
aaf50ff2
GK
952006-09-22 Geoffrey Keating <geoffk@apple.com>
96
97 * configure.ac: Make need_64_bit_hwint case for x86-darwin
98 match exactly the glob in gcc/config.gcc.
99 * configure: Regenerate.
100
c663e301
JM
1012006-09-13 Joseph S. Myers <joseph@codesourcery.com>
102
103 PR c/28768
104 PR preprocessor/14634
105 * lex.c (lex_string): Pedwarn for unterminated literals.
106
f7288899
EC
1072006-09-08 Eric Christopher <echristo@apple.com>
108
109 * configure.ac: Add 64-bit HWI support for i?86-darwin.
110
b52dbbf8
SE
1112006-08-14 Steve Ellcey <sje@cup.hp.com>
112
113 PR c++/28288
114 PR c++/14556
115 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
116 (CPP_LAST_EQ): Change.
117 (CPP_LAST_PUNCTUATOR): Change.
118 * expr.c (cpp_operator): Remove MIN and MAX.
119 (reduce): Remove CPP_MIN and CPP_MAX.
120 (num_binary_op): Ditto.
121 * lex.c (_cpp_lex_direct): Ditto.
122 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
123
1c90c6f9
JJ
1242006-06-09 Jakub Jelinek <jakub@redhat.com>
125
126 PR preprocessor/27746
127 * directives.c (do_pragma): Handle pragma with valid namespace
128 and invalid name coming from macro expansion.
129 * directives.c (destringize_and_run): Initialize next field in
130 context.
131
132 PR c/27747
133 PR c++/27748
134 * directives.c (destringize_and_run): Set NO_EXPAND on the
135 tokens.
136
137 * macro.c (_cpp_backup_tokens): Fix comment typo.
138
5c3c3683
DJ
1392006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
140
141 * Makefile.in (CATALOGS): Add po/ prefix.
142 * configure: Regenerated.
143
b2bd74bc
CD
1442006-05-23 Carlos O'Donell <carlos@codesourcery.com>
145
146 * Makefile.in: Add install-html target. Add install-html to .PHONY
147
be8ac3e2
GZ
1482006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
149
150 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
151 * files.c (_cpp_get_file_stat): New function.
152 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
153 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
154 * internal.h (_cpp_get_file_stat): Prototype.
155 (struct cpp_buffer): Add timestamp.
156
83900997
JJ
1572006-01-23 Jakub Jelinek <jakub@redhat.com>
158
159 PR preprocessor/25717
160 * init.c (cpp_init_builtins): If __STDC__ will not change value
161 between system headers and other sources, define it as a normal
162 macro rather than a builtin.
163 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
164 cpp_in_system_header condition.
165
1662006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
167
168 * Makefile.in: Use -MMD instead of -MD.
169
bc4071dd
RH
1702006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
171 Richard Henderson <rth@redhat.com>
172
173 Merge from gomp branch:
174 * directives.c (struct pragma_entry): Add is_deferred. Add ident
175 entry to value union.
176 (end_directive): Don't eat the line if in_deferred_pragma.
177 (run_directive): Remove pragma hacks.
178 (insert_pragma_entry): Remove.
179 (new_pragma_entry): New.
180 (register_pragma_1): Split out of register_pragma. Only handle
181 the lookup tree and return the new entry.
182 (cpp_register_pragma): Fill in the pragma entry here.
183 (cpp_register_deferred_pragma): New.
184 (register_pragma_internal): New.
185 (_cpp_init_internal_pragmas): Use register_pragma_internal.
186 (do_pragma): Allow pragma expansion after namespace. For deferred
187 pragmas, don't slurp the line into a string.
188 (destringize_and_run): Save tokens for deferred pragmas.
189 (cpp_handle_deferred_pragma): Remove.
190 * macro.c (builtin_macro): Remove pragma token hack.
191 (_cpp_push_token_context): Rename from push_token_context and export.
192 * internal.h (struct lexer_state): Add pragma_allow_expansion.
193 (_cpp_push_token_context): Declare.
194 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
195 a token. Update the line number correctly if so.
196 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
197 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
198 * include/cpplib.h (PRAGMA_EOL): New.
199 (CPP_TOKEN_FLD_PRAGMA): New.
200 (struct cpp_token): Add val.pragma.
201 (struct cpp_options): Remove defer_pragmas.
202 (cpp_handle_deferred_pragma): Remove.
203 (cpp_register_deferred_pragma): Declare.
204
d09e893f
JJ
2052006-01-01 Jakub Jelinek <jakub@redhat.com>
206
207 PR c++/25294
208 * directives.c (do_pragma): If pragma line ends with multi-line
209 block comment, end the saved deferred pragma string before that
210 comment. Handle embedded '\0' chars on the pragma line.
211
ab84748a
VR
2122005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
213
214 PR c++/23333
215 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
216
ad6ed77e
JG
2172005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
218 Ben Elliston <bje@au.ibm.com>
219
220 * include/cpplib.h (CPP_N_DFLOAT): New.
221 * expr.c (interpret_float_suffix): Identify df, dd, and dl
222 suffixes as decimal floating point constants.
223 (cpp_classify_number): Disallow hexadecimal DFP constants.
224
ba096620 2252005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 226 Ian Lance Taylor <ian@airs.com>
ba096620
GP
227
228 * include/cpplib.h (struct cpp_callbacks): Annotate error with
229 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
230
456b8ce5
UB
2312005-11-09 Per Bothner <per@bothner.com>
232 Uros Bizjak <uros@kss-loka.si>
f7288899 233
456b8ce5
UB
234 PR c/24101
235 * init.c (read_original_filename): Temporarily set
236 state.in_directive before calling _cpp_lex_direct for
237 CPP_HASH tokens.
238
5571f74f
JW
2392005-11-03 James E Wilson <wilson@specifix.com>
240
241 PR preprocessor/24202
242 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
243
a63607ed
JM
2442005-11-04 Joseph S. Myers <joseph@codesourcery.com>
245
246 * include/cpplib.h (struct cpp_callbacks): Make error take
247 va_list* parameter.
248 * errors.c (cpp_error): Update call to callback.
249
651ed942
AP
2502005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
251
252 PR preprocessor/22042
253 * macro.c (_cpp_builtin_macro_text): Lower the needed max
254 buffer size.
255 (cpp_quote_string): Don't octalify non printable
256 charactors.
257
178b58b5
JM
2582005-11-03 Joseph S. Myers <joseph@codesourcery.com>
259
260 PR c++/17964
261 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
262 (struct cpp_callbacks): Add error.
263 * errors.c (cpp_error): If client_diagnostic, use error callback.
264 * charset.c (convert_escape): Don't use %03o in diagnostic.
265
3ee5ed11 2662005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
267
268 PR preprocessor/15220
269 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
270 callers. Pass to open_file_failed.
271 (open_file_failed): New parameter angle_brackets. Fix all callers.
272 Use in print_dep assignment.
273 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
274 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 275
077fc835
KH
2762005-10-08 Kazu Hirata <kazu@codesourcery.com>
277
278 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
279 * configure: Regenerate.
280
cbc43ae0
ILT
2812005-10-04 Ian Lance Taylor <ian@airs.com>
282
283 PR preprocessor/13726
284 * directives.c (check_eol_return_comments): New static function.
285 (parse_include): Add buf parameter. Change all callers.
286 (do_include_common): If not discard comments, turn on
287 save_comments. Pass collected comments to include callback.
288 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
289 include callback: cpp_token list.
290
af15a2fe
JM
2912005-09-20 Joseph S. Myers <joseph@codesourcery.com>
292
293 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
294 * init.c (struct lang_flags, lang_defaults): Add
295 extended_identifiers.
296 (cpp_set_lang): Use it.
297 * lex.c (forms_identifier_p): Check extended_identifiers.
298
f5eab47e
JJ
2992005-08-30 Jakub Jelinek <jakub@redhat.com>
300
301 PR preprocessor/20348
302 PR preprocessor/20356
303 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
304 2004-06-05 changes.
305
467129e6
KG
3062005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
307
308 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
309 -Wmissing-format-attribute.
310
311 * configure: Regenerate.
312
200031d1
KC
3132005-06-29 Kelley Cook <kcook@gcc.gnu.org>
314
315 * all files: Update FSF address in copyright headers.
316 * makeucnid.c (write_copyright): Update outputted FSF address.
317
f610dd5f
ZW
3182005-06-13 Zack Weinberg <zack@codesourcery.com>
319
320 * configure.ac: Invoke ZW_CREATE_DEPDIR and
321 ZW_PROG_COMPILER_DEPENDENCIES.
322 * aclocal.m4, configure: Regenerate.
323 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
324 New variables.
325 (distclean): Clean up $(DEPDIR) and its contents.
326 (.c.o): Use $(COMPILE).
327 Include $(DEPDIR)/*.Po for most object->header dependencies.
328
c3f829c1
GDR
3292005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
330
331 * configure.ac: Check declarations for asprintf and vasprintf.
332 * config.in: Regenerate.
333 * configure: Likewise.
334
335 * charset.c (conversion_loop): Use XRESIZEVEC.
336 (convert_no_conversion): Likewise.
337 (convert_using_iconv): Likewise.
338 (init_iconv_desc): Cast return value of alloca.
339 (cpp_host_to_exec_charset): Use XNEWVEC.
340 (emit_numeric_escape): Use XRESIZEVEC.
341 (cpp_interpret_string): Use XNEWVEC.
342 (cpp_interpret_string): Use XRESIZEVEC.
343 (_cpp_interpret_identifier): Cast return value of alloca.
344 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
345 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
346 (parse_include): Use XNEWVEC.
347 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 348 "new_entry".
c3f829c1
GDR
349 (save_registered_pragmas): Cast return value of xmemdup.
350 (destringize_and_run): Same for alloca.
351 (parse_assertion): Likewise.
352 (do_assert): Cast allocated storage to proper type.
353 (cpp_define): Likewise.
354 (_cpp_define_builtin): Likewise.
355 (cpp_undef): Likewise.
356 (handle_assertion): Likewise.
357 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
358 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
359 (CPP_UMINUS): Likewise.
360 (struct cpp_operator): Rename from struct operator.
361 (_cpp_expand_op_stack): Use XRESIZEVEC.
362 * files.c (pch_open_file): Use XNEWVEC.
363 (pch_open_file): Use XRESIZEVEC.
364 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
365 (dir_name_of_file): Use XNEWVEC.
366 (make_cpp_file): Use XCNEW.
367 (make_cpp_dir): Likewise.
368 (allocate_file_hash_entries): USE XNEWVEC.
369 (cpp_included): Cast return value of htab_find_with_hash.
370 (append_file_to_dir): Use XNEWVEC.
371 (read_filename_string): Likewise. Use XRESIZEVEC too.
372 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
373 (remap_filename): Use XNEWVEC.
374 (struct pchf_entry): Move definition out of struct pchf_data.
375 (_cpp_save_file_entries): Use XCNEWVAR.
376 (_cpp_read_file_entries): Use XNEWVAR.
377 * identifiers.c (alloc_node): Use XOBNEW.
378 * init.c (cpp_create_reader): Use XCNEW.
379 (cpp_init_builtins): Cast of b->value to enum builtin_type.
380 (read_original_directory): Cast return value of alloca.
381 * lex.c (add_line_note): Use XRESIZEVEC.
382 (warn_about_normalization): Use XNEWVEC.
383 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
384 (new_buff): Use XNEWVEC.
385 * line-map.c (linemap_add): Use XRESIZEVEC.
386 * macro.c (builtin_macro): Cast return value of alloca.
387 (paste_tokens): Likewise.
388 (expand_arg): Use XNEWVEC and XRESIZEVEC.
389 (_cpp_save_parameter): Use XRESIZEVEC.
390 (create_iso_definition): Cast allocated storage to proper type.
391 (_cpp_create_definition): Likewise.
392 (cpp_macro_definition): Use XRESIZEVEC.
393 * makedepend.c (add_clm): Use XNEW.
394 (add_dir): Likewise.
395 * mkdeps.c (munge): Use XNEWVEC.
396 (deps_init): Use XCNEW.
397 (deps_add_target): Use XRESIZEVEC.
398 (deps_add_default_target): Cast return value of alloca.
399 (deps_add_dep): Use XRESIZEVEC.
400 (deps_add_vpath): Likewise. Use XNEWVEC too.
401 (deps_restore): Likewise.
402 * pch.c (save_idents): Use XNEW and XNEWVEC.
403 (cpp_save_state): Use XNEW.
404 (count_defs): Cast return value of htab_find.
405 (write_defs): Likewise.
406 (cpp_write_pch_deps): Use XNEWVEC.
407 (collect_ht_nodes): Use XRESIZEVEC.
408 (cpp_valid_state): Use XNEWVEC.
409 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
410 * symtab.c (ht_create): Use XCNEW.
411 (ht_lookup_with_hash): Cast return value of obstack_copy0.
412 (ht_expand): Use XCNEWVEC.
413 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
414 (bool): Do not define if __cplusplus.
415
1ed17cd5
ZW
4162005-05-12 Zack Weinberg <zack@codesourcery.com>
417
418 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
419 (do_sccs): Delete function definition, #define to do_ident.
420 (do_ident): Don't hardwire directive name.
421
5a8c20ce
RK
4222005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
423
424 PR bootstrap/21230
425 * configure: Regenerate.
426
473c5bc9
AP
4272005-04-27 Andris Pavenis <pavenis@latnet.lv>
428
429 * files.c: Include io.h for DJGPP to get prototype of setmode.
430
c1fc5047
PB
4312005-04-19 Per Bothner <per@bothner.com>
432
433 PR preprocessor/20907
434 * line-map.c (linemap_line_start): Fix bug when we need to increse
435 column_bits but can re-use the current line_map.
436
042630ad
KG
4372005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
438
439 * system.h (fopen, fdopen, freopen): Define these to the unlocked
440 libiberty functions.
441
0d667716
KG
4422005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
443
444 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
445 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
446 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
447 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
448 _unlocked function.
449 (fwrite_unlocked): Fix prototype.
1ed17cd5 450
0d667716
KG
451 * configure, config.in: Regenerate.
452
cae064e7
JJ
4532005-04-05 Jakub Jelinek <jakub@redhat.com>
454
455 PR preprocessor/19475
456 * macro.c (create_iso_definition): For < ISO C99, don't
457 pedwarn if there is no whitespace between macro name and its
458 replacement, but the replacement starts with a basic character
459 set character.
460
cbada204
AJ
4612005-03-28 Andreas Jaeger <aj@suse.de>
462
463 * lex.c (warn_about_normalization): Cast field width to int to
464 avoid warning.
465
f42eccdb
JM
4662005-03-19 Joseph S. Myers <joseph@codesourcery.com>
467
468 * configure.ac: Consistently use solaris2.1[0-9]* instead of
469 solaris2.1[0-9].
470 * configure: Regenerate.
471
c79e602b
GK
4722005-03-15 Geoffrey Keating <geoffk@apple.com>
473
474 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
475 UCN rather than printing an error.
476
50668cf6
GK
4772005-03-14 Geoffrey Keating <geoffk@apple.com>
478
6baba9bb
GK
479 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
480
4812005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 482
50668cf6
GK
483 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
484 * charset.c: Update for new format of ucnid.h.
485 (ucn_valid_in_identifier): Update for new format of ucnid.h.
486 Add NST parameter, and update it; update callers.
487 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
488 with cpp_error.
489 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
490 * internal.h (struct normalize_state): New.
491 (INITIAL_NORMALIZE_STATE): New.
492 (NORMALIZE_STATE_RESULT): New.
493 (NORMALIZE_STATE_UPDATE_IDNUM): New.
494 (_cpp_valid_ucn): New.
495 * lex.c (warn_about_normalization): New.
496 (forms_identifier_p): Add normalize_state parameter, update callers.
497 (lex_identifier): Add normalize_state parameter, update callers. Keep
498 the state current.
499 (lex_number): Likewise.
500 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
501 it with warn_about_normalization.
502 * makeucnid.c: New.
503 * ucnid.h: Replace.
504 * ucnid.pl: Remove.
505 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
506 comments about obsolete version of C++.
507 * include/cpplib.h (enum cpp_normalize_level): New.
508 (struct cpp_options): Add warn_normalize field.
509
47e20491
GK
5102005-03-11 Geoffrey Keating <geoffk@apple.com>
511
512 * directives.c (glue_header_name): Update call to cpp_spell_token.
513 * internal.h (_cpp_interpret_identifier): New.
514 * charset.c (_cpp_interpret_identifier): New.
515 (_cpp_valid_ucn): Allow UCN version of '$'.
516 * lex.c (lex_identifier): Add extra parameter to indicate if initial
517 character was '$' or '\'. Support identifiers with UCNs.
518 (forms_identifier_p): Allow UCNs.
519 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
520 (utf8_to_ucn): New.
521 (cpp_spell_token): Add FORSTRING parameter. Use it.
522 (cpp_token_as_text): Update call to cpp_spell_token.
523 (cpp_output_token): Write UCNs back out.
524 (stringify_arg): Update call to cpp_spell_token.
525 (paste_tokens): Likewise.
526 (cpp_macro_definition): Likewise.
527 * macro.c (stringify_arg): Likewise.
528 (paste_tokens): Likewise.
529 (cpp_macro_definition): Likewise.
530 * include/cpplib.h: Add parameter to cpp_spell_token.
531
73096711
JJ
5322005-03-04 Jakub Jelinek <jakub@redhat.com>
533
534 PR bootstrap/20282
535 PR bootstrap/20305
536 * macro.c (replace_args, cpp_get_token): Copy whole
537 cpp_token_u instead of just cpp_string field from it.
538
2203a881
DP
5392005-02-28 Devang Patel <dpatel@apple.com>
540
541 * directives.c (do_line): Save sysp early before line table is
542 realloc'ed.
1ed17cd5 543
c5ff069d
ZW
5442005-02-20 Zack Weinberg <zack@codesourcery.com>
545
546 PR 18785
547 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
548 (cpp_host_to_exec_charset): New function.
549 * include/cpplib.h: Declare cpp_host_to_exec_charset.
550
04c90eea
DP
5512005-02-19 Devang Patel <dpatel@apple.com>
552
553 * charset.c (_cpp_convert_input): Check '\r' before inserting
554 '\n' at the end.
c5ff069d 555
6da55c00
EC
5562005-02-15 Eric Christopher <echristo@redhat.com>
557
558 PR preprocessor/19077
559 * macro.c (cpp_macro_definition): Move handling of whitespace
560 to PREV_WHITE conditional. Remove overloading of len
561 variable.
562
31c3e631
KH
5632005-02-14 Kazu Hirata <kazu@cs.umass.edu>
564
565 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
566 traditional.c: Update copyright.
567
be0f1e54
PB
5682005-02-14 Paolo Bonzini <bonzini@gnu.org>
569
570 PR bootstrap/19818
571 * configure.ac: Check for declaration of basename and getopt.
572 * config.in: Regenerate.
573 * configure: Regenerate.
574 * internal.h (ustrcspn): New.
575 * macro.c (create_iso_definition): Fix allocation of memory.
576 (padding_token): Add cast to remove const-ness.
577 * pch.c (cpp_read_state): Use ustrcspn.
578
ecddfb39
MS
5792005-02-08 Mike Stump <mrs@apple.com>
580
581 * files.c (pchf_adder): Remove.
582 (struct pchf_adder_info): Likewise.
583 (_cpp_save_file_entries): Write out all files so that #import works.
584
9fcdd891
JM
5852005-01-23 Joseph S. Myers <joseph@codesourcery.com>
586
587 * configure: Regenerate.
588
ecfd72e7
TS
5892005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
590
591 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
592
6c25a4f7 593 * include/cpplib.h: Also update copyright years.
c5ff069d 594
942926ad
GK
5952005-01-03 Geoffrey Keating <geoffk@apple.com>
596
597 * files.c (_cpp_find_file): Add files found by search_path_exhausted
598 to the list of all files.
599
a2566ae9
GDR
6002005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
601
602 * internal.h: Update references to Cpp lib filenames.
603 * directives.c: Likewise.
604 * init.c: Likewise.
605 * macro.c: Likewise.
606 * traditional.c: Likewise.
607
1b449375
EB
6082004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
609
610 PR preprocessor/15167
611 * files.c (destroy_cpp_file): New function.
612 (should_stack_file): Make a new file if the
613 compared file is still stacked.
614
28303828
NN
6152004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
616
c5ff069d 617 PR preprocessor/17610
28303828
NN
618 * directives.c (do_include_common): Error out if an empty filename
619 is given for #include (or #include_next or #import).
620
c812785a
RS
6212004-11-27 Roger Sayle <roger@eyesopen.com>
622 Zack Weinberg <zack@codesourcery.com>
623
624 * internal.h: Replace all uses of uchar with unsigned char.
625 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
626 with !IN_GCC, so uchar is only defined whilst building libcpp.
627
f91eaa01
KC
6282004-11-24 Kelley Cook <kcook@gcc.gnu.org>
629
630 * aclocal.m4: Regenerate.
631
f78ce0c2
RS
6322004-11-24 Roger Sayle <roger@eyesopen.com>
633
634 PR preprocessor/15824
635 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
636 directly, instead of the non-existant "system.h" and "ansidecl.h".
637 * configure: Regenerate.
638
b5b3e36a 6392004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 640 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
641
642 * internal.h (struct lexer_state): Add in_deferred_pragma.
643 * directives.c (struct pragma_entry): Add allow_expansion.
644 (insert_pragma_entry): Take allow_expansion flag.
645 (register_pragma): Likewise.
646 (cpp_register_pragma): Likewise.
647 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
648 (do_pragma): Honor allow_expansion.
649 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
650 * include/cpplib.h (cpp_register_pragma): Update prototype.
651
a8e68029 6522004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 653 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
654
655 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
656 need_64bit_hwint=yes.
657 * configure: Regenerate.
658
50f47ee0
JM
6592004-11-09 Joseph S. Myers <joseph@codesourcery.com>
660
661 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
662 po/$(PACKAGE).pot.
663 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
664 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
665 Remove local srcdir path from generated file.
666
968e08d6 6672004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 668 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
669
670 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
671 as well.
672
3da3d587
ZW
6732004-10-27 Zack Weinberg <zack@codesourcery.com>
674
675 PR 18075
676 * directives.c (do_pragma): Do not defer pragmas which are unknown.
677 (cpp_handle_deferred_pragma): Add cast to silence warning.
678
ac24fc25
JM
6792004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
680
681 * errors.c (_cpp_begin_message): Print "error: " for errors.
682
7731405b
AJ
6832004-10-10 Andreas Jaeger <aj@suse.de>
684
685 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
686 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
687
646544e3
AP
6882004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
689
690 * pch.c (cpp_write_pch_state): Remove variable z as it is not
691 used.
692 (cpp_read_state): Remove unused variables, m, d and mac_count.
693
67a74146
PB
6942004-09-29 Per Bothner <per@bothner.com>
695
696 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
697 cb.line_change. Otherwise do_pragma will call the line_change
698 call-back with a meaningless line number.
699
018a4785
ZW
7002004-09-24 Zack Weinberg <zack@codesourcery.com>
701
702 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
703 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
704 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
705 * aclocal.m4, configure: Regenerate.
706 * init.c: Include localedir.h.
707 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
708 (DEFS): Delete.
709 (.c.o): Use $(ALL_CFLAGS).
710 (localedir.h, localedir.hs): New rules.
711 (clean): Use rm -rf to remove directories.
712 (distclean): Also delete localedir.h and localedir.hs.
713 (init.o): Update dependencies.
714
88fa57d7
KC
7152004-09-22 Kelley Cook <kcook@gcc.gnu.org>
716
717 * Makefile.in (aclocal.m4): Update dependencies.
718 * configure.ac (AC_CONFIG_MACRO_DIR): New.
719 * aclocal.m4, configure: Regenerate.
720
8f8e9aa5
ZW
7212004-09-17 Zack Weinberg <zack@codesourcery.com>
722
a29f62d9
ZW
723 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
724 (_cpp_convert_input, _cpp_default_encoding): Add comments.
725 Some other comments in this file also tweaked.
726
8f8e9aa5
ZW
727 * directives.c (do_pragma): Save current buffer position
728 before lexing the pragma keywords; don't call
729 _cpp_backup_tokens in the defer_pragmas case.
730
a2981930
PB
7312004-09-15 Per Bothner <per@bothner.com>
732
733 * include/line-map.h (line_map_start): Add parameter names so
734 preceding comment makes sense.
735 (linemap_add): Remove from comment mention of non-existing parameter.
736
21b11495
ZW
7372004-09-09 Matt Austern <austern@apple.com>
738 Zack Weinberg <zack@codesourcery.com>
739
740 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
741 prefixes throughout. Add entry for PRAGMA. Remove
742 unnecessary "= 0" from EQ.
743 (enum cpp_ttype): Adjust OP and TK definitions to restore
744 prefixes, via token-paste.
745 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
746 Change from #defines to additional cpp_ttype enumerators.
747 (struct cpp_options): Add defer_pragmas.
748 (cpp_handle_deferred_pragma): Prototype new interface.
749
750 * internal.h (struct cpp_reader): Add directive_result.
751 * directives.c (struct pragma_entry): Add is_internal field;
752 give boolean fields type bool.
753 (start_directive): Initialize pfile->directive_result.type.
754 (_cpp_do__Pragma): Likewise.
755 (run_directive): Do not crash if pfile->buffer->prev is NULL.
756 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
757 from it.
758 (register_pragma): New static function, bulk of former
759 cpp_register_pragma here; add 'internal' argument, pass along
760 to insert_pragma_entry.
761 (cpp_register_pragma): Now a wrapper around register_pragma which
762 always passes false for 'internal' argument.
763 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
764 true for 'internal'.
765 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
766 an internal pragma, save text till the end of the line as a CPP_PRAGMA
767 token instead of executing the pragma.
768 (cpp_handle_deferred_pragma): New interface.
769 * lex.c (token_spellings): Adjust OP and TK definitions to
770 match changes to cpplib.h.
771 (_cpp_lex_token): Check for a directive-result token and
772 return it if present.
773 (cpp_token_val_index): Handle CPP_PRAGMA.
774 * macro.c (cpp_builtin_macro_text): Correct comment.
775 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
776
0fd9e8dd
SB
7772004-09-06 Serge Belyshev <belyshev@lubercy.com>
778
779 PR preprocessor/14699
780 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
781 from size_t to double.
782
39b8ce7f
AS
7832004-08-28 Andreas Schwab <schwab@suse.de>
784 Andreas Jaeger <aj@suse.de>
785
786 * configure.ac: Set PACKAGE correctly.
787 * configure: Regenerated.
788
5d1f4b27
PB
7892004-08-25 Paolo Bonzini <bonzini@gnu.org>
790
791 * Makefile.in: Add back top_builddir.
792
078e3ffe
PB
7932004-08-25 Paolo Bonzini <bonzini@gnu.org>
794
795 * configure.ac: Replace Automake macro invocations
796 with manual Autoconf checks and substitutions.
797 * configure: Regenerate.
798 * aclocal.m4: Regenerate.
799 * config.in: Regenerate.
800 * Makefile.am: Removed.
801 * Makefile.in: Heavy simplification and reorganization.
802
b3f8d95d
MM
8032004-08-09 Mark Mitchell <mark@codesourcery.com>
804
805 * configure.ac (arm*-*-eabi*): New target.
806 (arm*-*-symbianelf*): Likewise.
807 * configure: Regenerated.
808
72bb2c39
BI
8092004-07-24 Bernardo Innocenti <bernie@develer.com>
810
811 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
812 * directives.c: Use XNEW-family macros from libiberty.
813 * lex.c: Likewise.
814 * macro.c: Likewise.
815 * cpplib.h (cpp_deps_style): Export enum with name.
816
21b11495 8172004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 818
21b11495 819 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 820
a23ee064
AP
8212004-07-16 Andris Pavenis <pavenis@latnet.lv>
822
823 PR preprocessor/16366
824 * internal.h (struct cpp_reader): New field dir_hash.
825 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
826 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
827
a09d4744
NB
8282004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
829
830 PR preprocessor/16192
831 PR preprocessor/15913
832 PR preprocessor/15572
833 * expr.c (_cpp_parse_expr): Handle remaining cases where an
834 expression is missing.
835 * init.c (post_options): Traditional cpp doesn't do // comments.
836
f58f7def
PB
8372004-06-30 Per Bothner <per@bothner.com>
838
839 * include/line-map.h (fileline): Remove old typedef.
840 * internal.h (struct cpp_reader): Use source_location typedef instead.
841
e83d8d43
ZW
8422004-06-26 Zack Weinberg <zack@codesourcery.com>
843
844 Partially revert patch of 2004-06-05.
845 * files.c (search_cache): Remove pfile argument. Don't check
846 for file that would be found by "" or <> search here...
847 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
848 Do not apply directory-of-current-file correction to files
849 found by this check. Rearrange code slightly.
850
c0d578e6
GK
8512004-06-21 Geoffrey Keating <geoffk@apple.com>
852
853 * files.c (should_stack_file): Correct swapped parameters to call
854 to cb.read_pch.
855 * pch.c (cpp_valid_state): Handle -fpreprocessed.
856
159d5224
PB
8572004-06-15 Paolo Bonzini <bonzini@gnu.org>
858
859 * Makefile.in: Regenerate with automake 1.8.5.
860 * aclocal.m4: Likewise.
861 * configure: Regenerate.
862
2fac9c01
ZW
8632004-06-11 Zack Weinberg <zack@codesourcery.com>
864
865 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
866 * configure, config.in: Regenerate.
867 * system.h: Unconditionally define bool as unsigned char,
868 BOOL_BITFIELD as unsigned int.
869 * .cvsignore: New file.
870
d8044160
GK
8712004-06-09 Geoffrey Keating <geoffk@apple.com>
872
873 * traditional.c (push_replacement_text): Set macro->traditional.
874 (save_replacement_text): Likewise.
875 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
876 (struct save_macro_item): Delete.
877 (struct save_macro_data): Use a character array not the previous
878 structured format.
879 (save_macros): Save macro as text not as internal structures.
880 (cpp_prepare_state): Update for changes to save_macro_data.
881 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 882 -D macros as text.
d8044160
GK
883 * macro.c (create_iso_definition): Honour alloc_subobject.
884 Clear traditional flag.
885 (_cpp_create_definition): Honour alloc_subobject.
886 * lex.c (cpp_token_val_index): New.
887 * internal.h: Include cpp-id-data.h.
888 (uchar): Move definition to cpp-id-data.h.
889 (U): Likewise.
890 (cpp_macro): Likewise.
891 * directives.c (struct answer): Move to cpp-id-data.h.
892 (do_assert): Honour alloc_subobject.
2cf22451
ZW
893
894 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
895 * include/cpplib.h (struct cpp_string): Add GTY marker.
896 (enum cpp_token_fld_kind): New.
897 (struct cpp_token): Add GTY markers.
898 (cpp_token_val_index): Prototype.
899 (CPP_HASHNODE_VALUE_IDX): New.
900 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
901 * include/cpp-id-data.h: New file.
d8044160 902
0ca8e815
PB
9032004-06-09 Paolo Bonzini <bonzini@gnu.org>
904
905 * Makefile.am (all-local): New.
906 * Makefile.in: Regenerate.
907
b51fa00f
RS
9082004-06-06 Roger Sayle <roger@eyesopen.com>
909
910 * Makefile.am (LIBICONV): Declare.
911 (makedepend_LDADD): Use LIBICONV.
912 * Makefile.in: Regenerate.
913
5e2f3f39
AP
9142004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
915
916 * Makefile.am (LIBINTL): Declare
917 (makedepend_LDADD): Use LIBINTL.
918 * Makefile.in: Regenerate.
919
c6e83800
ZW
9202004-06-05 Zack Weinberg <zack@codesourcery.com>
921
922 * Makefile.am: Add makedepend.
923 * Makefile.in, aclocal.m4: Regenerate.
924 * charset.c: Insert a space to avoid a warning.
925 * directives.c: Include mkdeps.h.
926 (_cpp_handle_directive): Reenable macro expander if appropriate.
927 (undefine_macros): Inline body of _cpp_free_definition for speed.
928 Do not call undef callback or _cpp_warn_if_unused_macro.
929 (cpp_get_deps): New interface.
930 * files.c (search_cache): Add pfile argument. Check for file
931 that would be found by "" or <> search here...
932 (_cpp_find_file): ...not here. Correct recorded start_dir of
933 files found by directory-of-current-file search that would be
934 found by "" or <> search.
935 * init.c (cpp_add_dependency_target): Delete.
936 * internal.h (struct lexer_state): Add discarding_output flag.
937 * lex.c (lex_identifier): Compute hash function while scanning.
938 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
939 directives.
940 * makedepend.c: New file.
941 * mkdeps.c (struct deps): Add vpath vector.
942 (apply_vpath, deps_add_vpath): New function.
943 (deps_free): Free vpath vector.
944 (deps_add_dep, deps_add_target): Use apply_vpath.
945 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
946 (ht_lookup_with_hash): New function.
947 * cpplib.h, mkdeps.h: Update prototypes.
948 * symtab.h: Update prototypes.
949 (HT_HASHSTEP, HT_FINISH): New macros.
950
b453c95f
GK
9512004-05-29 Geoffrey Keating <geoffk@apple.com>
952
953 * symtab.c (ht_create): Set entries_owned.
954 (ht_destroy): Honour entries_owned.
955 (ht_expand): Likewise.
956 (ht_load): New.
2cf22451
ZW
957 * include/symtab.h (struct ht): New field 'entries_owned'
958 (ht_load): New prototype.
b453c95f 959
963e23c5
PB
9602004-05-26 Paolo Bonzini <bonzini@gnu.org>
961
962 PR bootstrap/15651
963 * configure.ac: Fix m4 quoting when picking
964 the size of HOST_WIDE_INT.
965 * configure: Regenerate.
966
0429bc77
PB
9672004-05-25 Paolo Bonzini <bonzini@gnu.org>
968
969 * Makefile.am: the correct directory for
970 gettext include files is given by @INCINTL@.
971 * Makefile.in: Regenerate.
972
c86dd7db
PB
9732004-05-24 Paolo Bonzini <bonzini@gnu.org>
974
975 * system.h [!ENABLE_NLS]: dgettext takes two
976 parameters.
977
4f4e53dd
PB
9782004-05-23 Paolo Bonzini <bonzini@gnu.org>
979
980 Moved libcpp from the gcc subdirectory to the toplevel.
981 * Makefile.am: New file.
982 * Makefile.in: Regenerate.
983 * configure.ac: New file.
984 * configure: Regenerate.
985 * config.in: Regenerate.
986 * charset.c: Moved from gcc/cppcharset.c. Add note about
987 brokenness of input charset detection. Adjust for change
988 in name of cppucnid.h.
989 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
990 * expr.c: Moved from gcc/cppexp.c.
991 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
992 Remove #define of O_BINARY, it is in system.h.
993 * identifiers.c: Moved from gcc/cpphash.c.
994 * internal.h: Moved from gcc/cpphash.h. Change header
995 guard name. All other files adjusted to match name change.
996 * init.c: Moved from gcc/cppinit.c.
997 (init_library) [ENABLE_NLS]: Call bindtextdomain.
998 * lex.c: Moved from gcc/cpplex.c.
999 * directives.c: Moved from gcc/cpplib.c.
1000 * macro.c: Moved from gcc/cppmacro.c.
1001 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
1002 * traditional.c: Moved from gcc/cpptrad.c.
1003 * ucnid.h: Moved from gcc/cppucnid.h. Change header
1004 guard name.
1005 * ucnid.pl: Moved from gcc/cppucnid.pl.
1006 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
1007 guard name.
1008 * symtab.c: Moved from gcc/hashtable.c.
1009 * line-map.c: Moved from gcc. Do not include intl.h.
1010 * mkdeps.c: Moved from gcc.
1011 * system.h: New file.
2cf22451
ZW
1012 * include/cpplib.h: Moved from gcc. Change header guard name.
1013 * include/line-map.h: Moved from gcc. Change header guard name.
1014 * include/mkdeps.h: Moved from gcc. Change header guard name.
1015 * include/symtab.h: Moved from gcc/hashtable.h. Change header
1016 guard name.