OSDN Git Service

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