OSDN Git Service

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