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