OSDN Git Service

7f069414f7e844498745451896e71d035af8ab41
[pf3gnuchains/gcc-fork.git] / libcpp / ChangeLog
1 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2
3         * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
4         * configure: Regenerate.
5
6 2008-06-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7
8         * Makefile.in (datarootdir): New variable.
9
10 2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>
11
12         PR preprocessor/36479
13         * charset.c (cpp_interpret_string_notranslate): Also set
14         narrow_cset_desc.width.
15
16 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
17
18         * configure.ac (parisc*64*-*-*): Remove.
19         * configure: Regenerate.
20
21 2008-05-30  Tom Tromey  <tromey@redhat.com>
22
23         PR preprocessor/36320:
24         * internal.h (_cpp_parse_expr): Update.
25         * expr.c (_cpp_parse_expr): Add 'is_if' argument.  Update error
26         messages.
27         * directives.c (do_if): Update.
28         (do_elif): Require expression if processing group.
29
30 2008-05-30  Danny Smith  <dannysmith@users.sourceforge.net>
31
32         * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
33
34 2008-05-21  Tom Tromey  <tromey@redhat.com>
35
36         PR preprocessor/27777:
37         * lex.c (cpp_output_line_to_string): New function.
38         * internal.h (_cpp_begin_message): Don't declare.
39         * errors.c (_cpp_begin_message): Now static.
40         * include/cpplib.h (cpp_output_line_to_string): Declare.
41         * directives.c (do_diagnostic): Rewrote.  Use
42         cpp_output_line_to_string.  Don't use _cpp_begin_message.
43
44 2008-05-21  Tom Tromey  <tromey@redhat.com>
45
46         * include/symtab.h (HT_ALLOCED): Remove.
47         (ht_purge): Declare.
48         * symtab.c (DELETED): New define.
49         (ht_lookup): Update comment.
50         (ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
51         code.  Use subobject allocator for strings, if it exists.
52         (ht_expand): Handle deleted entries.
53         (ht_forall): Likewise.
54         (ht_purge): New function.
55         (ht_dump_statistics): Print deletion statistics.
56
57 2008-05-13  Tom Tromey  <tromey@redhat.com>
58
59         PR preprocessor/22168:
60         * include/cpplib.h (struct cpp_options) <objc>: Update
61         documentation.
62         * expr.c (eval_token): Warn for use of assertions.
63         * directives.c (directive_diagnostics): Warn about extensions.
64         (DEPRECATED): New define.
65         (DIRECTIVE_TABLE): Use it.
66
67 2008-05-06  Tom Tromey  <tromey@redhat.com>
68
69         PR preprocessor/35313, PR preprocessor/36088:
70         * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
71         (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
72
73 2008-05-04  David S. Miller  <davem@davemloft.net>
74
75         * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
76         * configure: Regenerate.
77
78 2008-04-22  Daniel Franke  <franke.daniel@gmail.com>
79
80         * include/cpplib.h (cpp_define_formatted): New.
81         * directives.c (cpp_define_formatted): New.
82
83 2008-04-21  Tom Tromey  <tromey@redhat.com>
84
85         PR libcpp/33415:
86         * charset.c (_cpp_convert_input): Add buffer_start argument.
87         Ignore UTF-8 BOM if seen.
88         * internal.h (_cpp_convert_input): Add argument.
89         * files.c (struct _cpp_file) <buffer_start>: New field.
90         (destroy_cpp_file): Free buffer_start, not buffer.
91         (_cpp_pop_file_buffer): Likewise.
92         (read_file_guts): Update.
93
94 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
95
96         * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
97         * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
98         (struct cpp_options): Added uliterals.
99         (cpp_interpret_string): Update prototype.
100         (cpp_interpret_string_notranslate): Idem.
101         * charset.c (init_iconv_desc): New width member in cset_converter.
102         (cpp_init_iconv): Add support for char{16,32}_cset_desc.
103         (convert_ucn): Idem.
104         (emit_numeric_escape): Idem.
105         (convert_hex): Idem.
106         (convert_oct): Idem.
107         (convert_escape): Idem.
108         (converter_for_type): New function.
109         (cpp_interpret_string): Use converter_for_type, support u and U prefix.
110         (cpp_interpret_string_notranslate): Match changed prototype.
111         (wide_str_to_charconst): Use converter_for_type.
112         (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
113         * directives.c (linemarker_dir): Macro U changed to UC.
114         (parse_include): Idem.
115         (register_pragma_1): Idem.
116         (restore_registered_pragmas): Idem.
117         (get__Pragma_string): Support CPP_STRING{16,32}.
118         * expr.c (eval_token): Support CPP_CHAR{16,32}.
119         * init.c (struct lang_flags): Added uliterals.
120         (lang_defaults): Idem.
121         * internal.h (struct cset_converter) <width>: New field.
122         (struct cpp_reader) <char16_cset_desc>: Idem.
123         (struct cpp_reader) <char32_cset_desc>: Idem.
124         * lex.c (digraph_spellings): Macro U changed to UC.
125         (OP, TK): Idem.
126         (lex_string): Add support for u'...', U'...', u"..." and U"...".
127         (_cpp_lex_direct): Idem.
128         * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
129         (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
130
131 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
132
133         PR bootstrap/35457
134         * aclocal.m4: Regenerate.
135         * configure: Regenerate.
136
137 2008-04-17  Tom Tromey  <tromey@redhat.com>
138
139         PR libcpp/34866:
140         * errors.c (cpp_error): Don't reference a token before the start
141         of the current run.
142
143 2008-04-16  Tom Tromey  <tromey@redhat.com>
144
145         * Makefile.in (TAGS_SOURCES): New variable.
146         (TAGS): New target.
147
148 2008-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
149
150         * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
151         and shbe-*-*.
152         * configure: Rebuilt.
153
154 2008-04-02  Joseph Myers  <joseph@codesourcery.com>
155
156         * include/cpplib.h (struct cpp_callbacks): Add used_define,
157         used_undef and before_define.
158         (NODE_USED): Define.
159         * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
160         do_ifndef, cpp_pop_definition): Handle new flag and use new
161         callbacks.
162         * expr.c (parse_defined): Handle new flag and use new callbacks.
163         * macro.c (enter_macro_context, _cpp_free_definition): Handle new
164         flag and use new callbacks.
165
166 2008-04-01  Jakub Jelinek  <jakub@redhat.com>
167
168         PR pch/13675
169         * files.c (struct _cpp_file): Remove pch field.
170         (pch_open_file): Don't set file->pch, just file->pchname.
171         (should_stack_file): After pfile->cb.read_pch call
172         free pchname and clear pchname, don't close file->fd.
173         Test file->pchname instead of file->pch.  Don't close fd after cb.
174         (_cpp_stack_include): Test file->pchname instead of file->pch.
175
176 2008-03-28  Tom Tromey  <tromey@redhat.com>
177
178         * Makefile.in (POSTCOMPILE): New variable.
179         (.c.o): Use it.
180
181 2008-03-13  Tom Tromey  <tromey@redhat.com>
182
183         PR libcpp/35322:
184         * directives.c (destringize_and_run): Set pfile->directive.
185
186 2008-03-06  Markus Milleder  <markus.milleder@generali.at>
187
188         PR preprocessor/35458
189         * mkdeps.c (munge): Quote '#' with a '\'.
190
191 2008-02-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
192
193         PR preprocessor/35379
194         * mkdeps.c (deps_write): Ensure the first target always appears
195         in the first column, without leading backslash newline.  Avoid
196         some more extra whitespace.
197
198 2008-02-25  Thiemo Seufer <ths@mips.com>
199
200         * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
201
202 2008-02-19  Tom Tromey  <tromey@redhat.com>
203
204         * traditional.c (lex_identifier): Use CPP_HASHNODE.
205         * lex.c (lex_identifier): Use CPP_HASHNODE.
206         * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
207         do-while.
208         * identifiers.c (alloc_node): Change return type.
209         (_cpp_init_hashtable): Don't cast 'alloc_node'.
210         (proxy_assertion_broken): New declaration.
211         (cpp_forall_identifiers): Move comment.
212         * line-map.c (linemap_add): Comment fix.
213         (linemap_line_start): Indentation fix.
214
215 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
216
217         PR preprocessor/34692
218         * macro.c (collect_args): Add pragma_buff argument.  Push
219         CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
220         than into arguments.  Reset prevent_expansion and parsing_args
221         state at CPP_PRAGMA_EOL/CPP_EOF.
222         (funlike_invocation_p): Add pragma_buff argument, pass it through
223         to collect_args.
224         (enter_macro_context): Add result argument.  Adjust
225         funlike_invocation_p caller.  Emit all deferred pragma tokens
226         gathered during collect_args before the expansion, add a padding
227         token.  Return 2 instead of 1 if any pragma tokens were prepended.
228         (cpp_get_token): If enter_macro_context returns 2, don't return
229         a padding token, instead cycle to grab CPP_PRAGMA token.
230         * directives.c (_cpp_handle_directive): If was_parsing_args
231         in deferred pragma, leave parsing_args and prevent_expansion as is.
232
233 2008-01-22  Tom Tromey  <tromey@redhat.com>
234
235         PR c++/34859
236         * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
237         __STDC_CONSTANT_MACROS.
238
239 2008-01-07  Fred Fish  <fnf@specifix.com>
240
241         PR preprocessor/30363
242         * traditional.c (replace_args_and_push): Add local variable
243         cxtquote, calculate the replacement text size assuming a 
244         worst case of every input character quoted with backslash,
245         and properly handle output quoting of quote characters in
246         actual arguments used in function-like macros.
247
248 2008-01-03  Tom Tromey  <tromey@redhat.com>
249
250         PR preprocessor/34602
251         * directives.c (do_line): Don't try to spell EOF token.
252         (do_linemarker): Add comment.
253
254 2007-12-11  DJ Delorie  <dj@redhat.com>
255
256         * charset.c (convert_using_iconv): Close out any shift states,
257         returning to the initial state.
258
259 2007-12-06  Tom Tromey  <tromey@redhat.com>
260
261         PR c/29172
262         * internal.h (struct cpp_reader) <file_hash_entries>: Changed
263         type.
264         <file_hash_entries_allocated, file_hash_entries_used>: Removed.
265         * files.c (FILE_HASH_POOL_SIZE): New macro.
266         (struct file_hash_entry_pool): New.
267         (destroy_all_cpp_files): New function.
268         (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
269         (new_file_hash_entry): Update.
270         (free_file_hash_entries): New function.
271         (_cpp_cleanup_files): Call free_file_hash_entries and
272         destroy_all_cpp_files.
273         (cpp_clear_file_cache): New function.
274         * include/cpplib.h (cpp_clear_file_cache): Declare.
275
276 2007-12-03  Tom Tromey  <tromey@redhat.com>
277
278         PR preprocessor/34288
279         * configure.ac, config.in: Rebuilt.
280         * configure.ac: Check for ssize_t.
281
282 2007-11-30  Tom Tromey  <tromey@redhat.com>
283
284         PR preprocessor/32868
285         * macro.c (_cpp_create_definition): Special case
286         __STDC_FORMAT_MACROS.
287
288 2007-11-16  Michael Matz  <matz@suse.de>
289
290         * files.c (search_path_head): Fix check for absolute paths.
291
292 2007-11-11  Tom Tromey  <tromey@redhat.com>
293
294         PR c++/17557
295         * include/cpplib.h (cpp_included_before): Declare.
296         * files.c (struct file_hash_entry) <location>: New field.
297         (_cpp_find_file): Initialize new field.
298         (make_cpp_dir): Likewise.
299         (cpp_included_before): New function.
300
301 2007-11-01  Tom Tromey  <tromey@redhat.com>
302
303         PR preprocessor/30805
304         * macro.c (paste_tokens): Handle padding token.
305         (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
306
307 2007-10-31  Tom Tromey  <tromey@redhat.com>
308
309         PR preprocessor/30786
310         * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
311         * directives.c (_cpp_do__Pragma): Return error status.
312         * internal.h (_cpp_do__Pragma): Update.
313         * directives.c (get__Pragma_string): Back up if EOF seen.
314
315 2007-09-06  Tom Tromey  <tromey@redhat.com>
316
317         * internal.h (struct cpp_reader) <invocation_location>: New
318         field.
319         (struct cpp_reader) <set_invocation_location>: Likewise.
320         * init.c (cpp_set_line_map): New function.
321         * line-map.c (linemap_add): Use linemap's allocator.
322         * include/line-map.h (GTY): Define.
323         (line_map_realloc): New typedef.
324         (struct line_map): Mark with GTY.
325         (struct line_maps): Likewise.
326         (struct line_maps) <maps>: Likewise.
327         (struct line_maps) <reallocator>: New field.
328         * include/symtab.h (GTY): Conditionally define.
329         * include/cpplib.h (cpp_set_line_map): Declare.
330         (cpp_get_token_with_location): Declare.
331         * macro.c (cpp_get_token): Set invocation_location on the reader.
332         (cpp_get_token_with_location): New function.
333
334 2007-08-30  Chao-ying Fu  <fu@mips.com>
335
336         * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
337         ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
338         (cpp_classify_number): Support decimal fixed-point constants without
339         exponents.
340         Warn about fixed-point constants when -pedantic.
341         * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
342         comments to support fixed-point values.
343         (CPP_N_FRACT, CPP_N_ACCUM): Define.
344
345 2007-08-18  Tom Tromey  <tromey@redhat.com>
346
347         PR preprocessor/32974
348         * directives.c (parse_include): Don't check for EOL when
349         processing #pragma dependency.
350
351 2007-07-30  Ollie Wild  <aaw@google.com>
352
353         * directives-only.c: New file.
354         * internal.h (struct _cpp_dir_only_callbacks): New.
355         (_cpp_preprocess_dir_only): New function.
356         * directives.c (_cpp_handle_directive): Check directives_only before
357         disabling execution of indented directives.
358         * files.c (_cpp_stack_file): Add directives_only check.
359         * include/cpplib.h (struct cpp_options): Add directives_only.
360         (cpp_init_special_builtins): New function.
361         * init.c (cpp_init_special_builtins): New function.
362         (cpp_init_builtins): Move builtin_array initialization to
363         cpp_init_special_builtins.
364         (post_options): Check directives_only before setting
365         pfile->state.prevent_expansion = 1.
366         * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
367         is expanded inside a directive while -fdirectives-only is enabled.
368         * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
369         (libcpp_a_SOURCES): Add directives-only.c.
370
371 2007-07-04  Uros Bizjak  <ubizjak@gmail.com>
372
373         * traditional.c (_cpp_scan_out_logical_line): Initialize
374         fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
375         fmacro.args to prevent 'may be used uninitialized' warning.
376
377 2007-07-03  Uros Bizjak  <ubizjak@gmail.com>
378
379         * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
380         Add new constants.
381         * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
382         suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
383         for 'q' or 'Q' suffixes.
384
385 2007-06-17  Danny Smith  <dannysmith@users.sourceforge.net
386
387         * files.c (open_file): Correct typo.
388
389 2007-06-16  Vladimir Prus  <vladimir@codesourcery.com>
390
391         * files.c (open_file): Prevent the call
392         for stat from overwriting errno.
393
394 2007-06-09  Vladimir Prus  <vladimir@codesourcery.com>
395
396         * files.c (open_file): Account for the
397         fact that on windows, opening a directory gives
398         EACCES.
399
400 2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
401
402         PR preprocessor/23479
403         * expr.c (cpp_classify_number): Implement 0b-prefixed binary
404         integer constants.
405         (append_digit): Likewise.
406         * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
407         binary integer constants.
408
409 2007-05-31  Dave Korn  <dave.korn@artimi.com>
410
411         PR preprocessor/14331
412         * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
413
414 2007-05-24  Ollie Wild  <aaw@google.com>
415
416         * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
417         * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
418         (cpp_write_pch_state): Save __COUNTER__ state.
419         (cpp_valid_state): Check valid __COUNTER__ state.
420         (cpp_read_state): Read new __COUNTER__ state.
421         * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
422         * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
423         * internal.h (struct cpp_reader): Add counter member.
424
425 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
426
427         PR preprocessor/20077
428         * macro.c (create_iso_definition): Fixed the method to determine
429         whether the token-pasting operator appears at the beginning or the end
430         of a macro.
431
432 2007-05-21  Ian Lance Taylor  <iant@google.com>
433
434         * internal.h (struct cpp_reader): Add new fields:
435         nonexistent_file_hash and nonexistent_file_ob.
436         * files.c: Include "obstack.h".
437         (find_file_in_dir): Before trying to open the file, look up the
438         path name in the hash table of nonexistent files.  After failing
439         to open the file, add the path name to the hash table.
440         (_cpp_find_file): Cache the results of looking up the file name
441         starting with the quote and bracket chain heads, if we can.
442         (nonexistent_file_hash_eq): New static function.
443         (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
444         pfile->nonexistent_file_ob.
445         (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
446         pfile->nonexistent_file_ob.
447
448 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
449
450         * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
451
452         PR c/31924
453         * expr.c (interpret_float_suffix): Check for invalid suffix.
454
455 2007-05-02  Eric Christopher  <echristo@apple.com>
456
457         * expr.c (num_div_op): Don't overflow if the result is
458         zero.
459
460 2007-05-02  Tom Tromey  <tromey@redhat.com>
461
462         PR preprocessor/28709
463         * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
464
465 2007-03-30  Michael Meissner  <michael.meissner@amd.com>
466
467         * directives.c (lex_macro_node_from_str): Fix alloca call to be
468         type correct.
469
470 2007-03-30  Richard Henderson  <rth@redhat.com>
471
472         * directives.c (lex_macro_node_from_str): New.
473         (cpp_push_definition, cpp_pop_definition): New.
474         * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
475
476 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
477
478         * Makefile.in: Add dummy install-pdf target.
479
480 2007-01-30  Tom Tromey  <tromey@redhat.com>
481
482         PR preprocessor/30468
483         * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
484         './'.
485
486 2007-01-30  Tom Tromey  <tromey@redhat.com>
487
488         PR preprocessor/29966
489         * macro.c (lex_expansion_token): Save and restore cpp_reader's
490         cur_token.
491         (_cpp_create_definition): Don't restore cur_token here.
492         * lex.c (_cpp_lex_token): Added assertion.
493
494 2007-01-27  Tom Tromey  <tromey@redhat.com>
495
496         * configure: Rebuilt.
497
498 2007-01-12  Tom Tromey  <tromey@redhat.com>
499
500         PR preprocessor/28227
501         * directives.c (lex_macro_node): Added 'is_def_or_undef'
502         argument.
503         (do_define): Update.
504         (do_undef): Update.
505         (do_ifdef): Update.
506         (do_ifndef): Update.
507
508 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
509
510         * configure: Regenerate.
511
512 2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
513
514         * configure: Regenerate.
515
516 2007-01-04  Tom Tromey  <tromey@redhat.com>
517
518         PR preprocessor/28165
519         * internal.h (cpp_in_primary_file): New function.
520         * directives.c (do_include_next): Use cpp_in_primary_file.
521         (do_pragma_once): Likewise.
522         (do_pragma_system_header): Likewise.
523
524 2006-12-29  Ian Lance Taylor  <iant@google.com>
525
526         * lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
527         look backward at the end of the line unless we saw a backslash.
528
529 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
530
531         PR preprocessor/29612
532         * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
533         only when new_sysp is non-zero.
534
535 2006-12-28  Tom Tromey  <tromey@redhat.com>
536
537         PR preprocessor/30001
538         * charset.c (_cpp_convert_input): Check that to.len is greater
539         than zero.
540
541 2006-11-20  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
542
543         * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
544         * configure: Rebuilt.
545
546 2006-11-01      Douglas Gregor <doug.gregor@gmail.com>
547
548         * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
549         for experimental C++0x mode.
550         * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
551         adopted the preprocessor changes introduced in C99.
552
553 2006-10-29  Joseph Myers  <joseph@codesourcery.com>
554
555         * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
556         depending on --enable-targets=all.
557         * configure: Regenerate.
558
559 2006-10-12  Jakub Jelinek  <jakub@redhat.com>
560
561         PR preprocessor/28709
562         * macro.c (paste_tokens): Do error reporting here, use BUF with the
563         spelled LHS token as opposed to spelling it again.
564         (paste_all_tokens): Don't report errors here, just break on failure.
565
566 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
567
568         * Makefile.in: Added empty "pdf" target.
569
570 2006-09-22  Geoffrey Keating  <geoffk@apple.com>
571
572         * configure.ac: Make need_64_bit_hwint case for x86-darwin
573         match exactly the glob in gcc/config.gcc.
574         * configure: Regenerate.
575
576 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
577
578         PR c/28768
579         PR preprocessor/14634
580         * lex.c (lex_string): Pedwarn for unterminated literals.
581
582 2006-09-08  Eric Christopher  <echristo@apple.com>
583
584         * configure.ac: Add 64-bit HWI support for i?86-darwin.
585
586 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
587
588         PR c++/28288
589         PR c++/14556
590         * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
591         (CPP_LAST_EQ): Change.
592         (CPP_LAST_PUNCTUATOR): Change.
593         * expr.c (cpp_operator): Remove MIN and MAX.
594         (reduce): Remove CPP_MIN and CPP_MAX.
595         (num_binary_op): Ditto.
596         * lex.c (_cpp_lex_direct): Ditto.
597         (cpp_avoid_paste): Remove ? as legal symbol after > or <.
598
599 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
600
601         PR preprocessor/27746
602         * directives.c (do_pragma): Handle pragma with valid namespace
603         and invalid name coming from macro expansion.
604         * directives.c (destringize_and_run): Initialize next field in
605         context.
606
607         PR c/27747
608         PR c++/27748
609         * directives.c (destringize_and_run): Set NO_EXPAND on the
610         tokens.
611
612         * macro.c (_cpp_backup_tokens): Fix comment typo.
613
614 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
615
616         * Makefile.in (CATALOGS): Add po/ prefix.
617         * configure: Regenerated.
618
619 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
620
621         * Makefile.in: Add install-html target. Add install-html to .PHONY
622
623 2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
624
625         * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
626         * files.c (_cpp_get_file_stat): New function.
627         * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
628         * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
629         * internal.h (_cpp_get_file_stat): Prototype.
630         (struct cpp_buffer): Add timestamp.
631
632 2006-01-23  Jakub Jelinek  <jakub@redhat.com>
633
634         PR preprocessor/25717
635         * init.c (cpp_init_builtins): If __STDC__ will not change value
636         between system headers and other sources, define it as a normal
637         macro rather than a builtin.
638         * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
639         cpp_in_system_header condition.
640
641 2006-01-05  Paolo Bonzini  <bonzini@gnu.org>
642
643         * Makefile.in: Use -MMD instead of -MD.
644
645 2006-01-04  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
646             Richard Henderson  <rth@redhat.com>
647
648         Merge from gomp branch:
649         * directives.c (struct pragma_entry): Add is_deferred.  Add ident
650         entry to value union.
651         (end_directive): Don't eat the line if in_deferred_pragma.
652         (run_directive): Remove pragma hacks.
653         (insert_pragma_entry): Remove.
654         (new_pragma_entry): New.
655         (register_pragma_1): Split out of register_pragma.  Only handle
656         the lookup tree and return the new entry.
657         (cpp_register_pragma): Fill in the pragma entry here.
658         (cpp_register_deferred_pragma): New.
659         (register_pragma_internal): New.
660         (_cpp_init_internal_pragmas): Use register_pragma_internal.
661         (do_pragma): Allow pragma expansion after namespace.  For deferred
662         pragmas, don't slurp the line into a string.
663         (destringize_and_run): Save tokens for deferred pragmas.
664         (cpp_handle_deferred_pragma): Remove.
665         * macro.c (builtin_macro): Remove pragma token hack.
666         (_cpp_push_token_context): Rename from push_token_context and export.
667         * internal.h (struct lexer_state): Add pragma_allow_expansion.
668         (_cpp_push_token_context): Declare.
669         * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
670         a token.  Update the line number correctly if so.
671         (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
672         (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
673         * include/cpplib.h (PRAGMA_EOL): New.
674         (CPP_TOKEN_FLD_PRAGMA): New.
675         (struct cpp_token): Add val.pragma.
676         (struct cpp_options): Remove defer_pragmas.
677         (cpp_handle_deferred_pragma): Remove.
678         (cpp_register_deferred_pragma): Declare.
679
680 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
681
682         PR c++/25294
683         * directives.c (do_pragma): If pragma line ends with multi-line
684         block comment, end the saved deferred pragma string before that
685         comment.  Handle embedded '\0' chars on the pragma line.
686
687 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
688
689         PR c++/23333
690         * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
691
692 2005-12-07  Jon Grimm  <jgrimm2@us.ibm.com>
693             Ben Elliston  <bje@au.ibm.com>
694
695         * include/cpplib.h (CPP_N_DFLOAT): New.
696         * expr.c (interpret_float_suffix): Identify df, dd, and dl
697         suffixes as decimal floating point constants.
698         (cpp_classify_number): Disallow hexadecimal DFP constants.
699
700 2005-11-14  Gerald Pfeifer  <gerald@pfeifer.com>
701             Ian Lance Taylor  <ian@airs.com>
702
703         * include/cpplib.h (struct cpp_callbacks): Annotate error with
704         ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
705
706 2005-11-09  Per Bothner  <per@bothner.com>
707             Uros Bizjak  <uros@kss-loka.si>
708
709         PR c/24101
710         * init.c (read_original_filename): Temporarily set
711         state.in_directive before calling _cpp_lex_direct for
712         CPP_HASH tokens.
713
714 2005-11-03  James E Wilson  <wilson@specifix.com>
715
716         PR preprocessor/24202
717         * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
718
719 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
720
721         * include/cpplib.h (struct cpp_callbacks): Make error take
722         va_list* parameter.
723         * errors.c (cpp_error): Update call to callback.
724
725 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
726
727         PR preprocessor/22042
728         * macro.c (_cpp_builtin_macro_text): Lower the needed max
729         buffer size.
730         (cpp_quote_string): Don't octalify non printable
731         charactors.
732
733 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
734
735         PR c++/17964
736         * include/cpplib.h (struct cpp_options): Add client_diagnostic.
737         (struct cpp_callbacks): Add error.
738         * errors.c (cpp_error): If client_diagnostic, use error callback.
739         * charset.c (convert_escape): Don't use %03o in diagnostic.
740
741 2005-10-21  James E Wilson  <wilson@specifix.com>
742
743         PR preprocessor/15220
744         * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
745         callers.  Pass to open_file_failed.
746         (open_file_failed): New parameter angle_brackets.  Fix all callers.
747         Use in print_dep assignment.
748         * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
749         * internal.h (_cpp_find_file): Add new parm to declaration.
750
751 2005-10-08  Kazu Hirata  <kazu@codesourcery.com>
752
753         * configure.ac: Require 64-bit int for arm*-*-*eabi*.
754         * configure: Regenerate.
755
756 2005-10-04  Ian Lance Taylor  <ian@airs.com>
757
758         PR preprocessor/13726
759         * directives.c (check_eol_return_comments): New static function.
760         (parse_include): Add buf parameter.  Change all callers.
761         (do_include_common): If not discard comments, turn on
762         save_comments.  Pass collected comments to include callback.
763         * include/cpplib.h (struct cpp_callbacks): Add new parameter to
764         include callback: cpp_token list.
765
766 2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
767
768         * include/cpplib.h (struct cpp_options): Add extended_identifiers.
769         * init.c (struct lang_flags, lang_defaults): Add
770         extended_identifiers.
771         (cpp_set_lang): Use it.
772         * lex.c (forms_identifier_p): Check extended_identifiers.
773
774 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
775
776         PR preprocessor/20348
777         PR preprocessor/20356
778         * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
779         2004-06-05 changes.
780
781 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
782
783         * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
784         -Wmissing-format-attribute.
785
786         * configure: Regenerate.
787
788 2005-06-29  Kelley Cook  <kcook@gcc.gnu.org>
789
790         * all files: Update FSF address in copyright headers.
791         * makeucnid.c (write_copyright): Update outputted FSF address.
792
793 2005-06-13  Zack Weinberg  <zack@codesourcery.com>
794
795         * configure.ac: Invoke ZW_CREATE_DEPDIR and
796         ZW_PROG_COMPILER_DEPENDENCIES.
797         * aclocal.m4, configure: Regenerate.
798         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
799         New variables.
800         (distclean): Clean up $(DEPDIR) and its contents.
801         (.c.o): Use $(COMPILE).
802         Include $(DEPDIR)/*.Po for most object->header dependencies.
803
804 2005-05-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
805
806         * configure.ac: Check declarations for asprintf and vasprintf.
807         * config.in: Regenerate.
808         * configure: Likewise.
809
810         * charset.c (conversion_loop): Use XRESIZEVEC.
811         (convert_no_conversion): Likewise.
812         (convert_using_iconv): Likewise.
813         (init_iconv_desc): Cast return value of alloca.
814         (cpp_host_to_exec_charset): Use XNEWVEC.
815         (emit_numeric_escape): Use XRESIZEVEC.
816         (cpp_interpret_string): Use XNEWVEC.
817         (cpp_interpret_string): Use XRESIZEVEC.
818         (_cpp_interpret_identifier): Cast return value of alloca.
819         (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
820         * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
821         (parse_include): Use XNEWVEC.
822         (insert_pragma_entry): Rename local variable "new" to
823         "new_entry".
824         (save_registered_pragmas): Cast return value of xmemdup.
825         (destringize_and_run): Same for alloca.
826         (parse_assertion): Likewise.
827         (do_assert): Cast allocated storage to proper type.
828         (cpp_define): Likewise.
829         (_cpp_define_builtin): Likewise.
830         (cpp_undef): Likewise.
831         (handle_assertion): Likewise.
832         (cpp_push_buffer): Rename local variable "new" to "new_buffer".
833         * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
834         (CPP_UMINUS): Likewise.
835         (struct cpp_operator): Rename from struct operator.
836         (_cpp_expand_op_stack): Use XRESIZEVEC.
837         * files.c (pch_open_file): Use XNEWVEC.
838         (pch_open_file): Use XRESIZEVEC.
839         (read_file_guts): Use XNEWVEC and XRESIZEVEC.
840         (dir_name_of_file): Use XNEWVEC.
841         (make_cpp_file): Use XCNEW.
842         (make_cpp_dir): Likewise.
843         (allocate_file_hash_entries): USE XNEWVEC.
844         (cpp_included): Cast return value of htab_find_with_hash.
845         (append_file_to_dir): Use XNEWVEC.
846         (read_filename_string): Likewise. Use XRESIZEVEC too.
847         (read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
848         (remap_filename): Use XNEWVEC.
849         (struct pchf_entry): Move definition out of struct pchf_data.
850         (_cpp_save_file_entries): Use XCNEWVAR.
851         (_cpp_read_file_entries): Use XNEWVAR.
852         * identifiers.c (alloc_node): Use XOBNEW.
853         * init.c (cpp_create_reader): Use XCNEW.
854         (cpp_init_builtins): Cast of b->value to enum builtin_type.
855         (read_original_directory): Cast return value of alloca.
856         * lex.c (add_line_note): Use XRESIZEVEC.
857         (warn_about_normalization): Use XNEWVEC.
858         (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
859         (new_buff): Use XNEWVEC.
860         * line-map.c (linemap_add): Use XRESIZEVEC.
861         * macro.c (builtin_macro): Cast return value of alloca.
862         (paste_tokens): Likewise.
863         (expand_arg): Use XNEWVEC and XRESIZEVEC.
864         (_cpp_save_parameter): Use XRESIZEVEC.
865         (create_iso_definition): Cast allocated storage to proper type.
866         (_cpp_create_definition): Likewise.
867         (cpp_macro_definition): Use XRESIZEVEC.
868         * makedepend.c (add_clm): Use XNEW.
869         (add_dir): Likewise.
870         * mkdeps.c (munge): Use XNEWVEC.
871         (deps_init): Use XCNEW.
872         (deps_add_target): Use XRESIZEVEC.
873         (deps_add_default_target): Cast return value of alloca.
874         (deps_add_dep): Use XRESIZEVEC.
875         (deps_add_vpath): Likewise.  Use XNEWVEC too.
876         (deps_restore): Likewise.
877         * pch.c (save_idents): Use XNEW and XNEWVEC.
878         (cpp_save_state): Use XNEW.
879         (count_defs): Cast return value of htab_find.
880         (write_defs): Likewise.
881         (cpp_write_pch_deps): Use XNEWVEC.
882         (collect_ht_nodes): Use XRESIZEVEC.
883         (cpp_valid_state): Use XNEWVEC.
884         (save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
885         * symtab.c (ht_create): Use XCNEW.
886         (ht_lookup_with_hash): Cast return value of obstack_copy0.
887         (ht_expand): Use XCNEWVEC.
888         * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
889         (bool): Do not define if __cplusplus.
890
891 2005-05-12  Zack Weinberg  <zack@codesourcery.com>
892
893         * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
894         (do_sccs): Delete function definition, #define to do_ident.
895         (do_ident): Don't hardwire directive name.
896
897 2005-05-12  Ryota Kunisawa  <kunisawa@access.co.jp>
898
899         PR bootstrap/21230
900         * configure: Regenerate.
901
902 2005-04-27  Andris Pavenis  <pavenis@latnet.lv>
903
904         * files.c: Include io.h for DJGPP to get prototype of setmode.
905
906 2005-04-19  Per Bothner  <per@bothner.com>
907
908         PR preprocessor/20907
909         * line-map.c (linemap_line_start): Fix bug when we need to increse
910         column_bits but can re-use the current line_map.
911
912 2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
913
914         * system.h (fopen, fdopen, freopen): Define these to the unlocked
915         libiberty functions.
916
917 2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
918
919         * configure.ac (libcpp_UNLOCKED_FUNCS): New.
920         (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
921         * system.h (putchar, getc, getchar, clearerr, feof, fileno,
922         fflush, fgetc, fgets, ferror, fread): Redefine to the associated
923         _unlocked function.
924         (fwrite_unlocked): Fix prototype.
925
926         * configure, config.in: Regenerate.
927
928 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
929
930         PR preprocessor/19475
931         * macro.c (create_iso_definition): For < ISO C99, don't
932         pedwarn if there is no whitespace between macro name and its
933         replacement, but the replacement starts with a basic character
934         set character.
935
936 2005-03-28  Andreas Jaeger  <aj@suse.de>
937
938         * lex.c (warn_about_normalization): Cast field width to int to
939         avoid warning.
940
941 2005-03-19  Joseph S. Myers  <joseph@codesourcery.com>
942
943         * configure.ac: Consistently use solaris2.1[0-9]* instead of
944         solaris2.1[0-9].
945         * configure: Regenerate.
946
947 2005-03-15  Geoffrey Keating  <geoffk@apple.com>
948
949         * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
950         UCN rather than printing an error.
951
952 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
953
954         * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
955
956 2005-03-14  Geoffrey Keating  <geoffk@apple.com>
957
958         * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
959         * charset.c: Update for new format of ucnid.h.
960         (ucn_valid_in_identifier): Update for new format of ucnid.h.
961         Add NST parameter, and update it; update callers.
962         (cpp_valid_ucn): Add NST parameter, update callers.  Replace abort
963         with cpp_error.
964         (convert_ucn): Pass normalize_state to cpp_valid_ucn.
965         * internal.h (struct normalize_state): New.
966         (INITIAL_NORMALIZE_STATE): New.
967         (NORMALIZE_STATE_RESULT): New.
968         (NORMALIZE_STATE_UPDATE_IDNUM): New.
969         (_cpp_valid_ucn): New.
970         * lex.c (warn_about_normalization): New.
971         (forms_identifier_p): Add normalize_state parameter, update callers.
972         (lex_identifier): Add normalize_state parameter, update callers.  Keep
973         the state current.
974         (lex_number): Likewise.
975         (_cpp_lex_direct): Pass normalize_state to subroutines.  Check
976         it with warn_about_normalization.
977         * makeucnid.c: New.
978         * ucnid.h: Replace.
979         * ucnid.pl: Remove.
980         * ucnid.tab: Make appropriate for input to makeucnid.c.  Remove
981         comments about obsolete version of C++.
982         * include/cpplib.h (enum cpp_normalize_level): New.
983         (struct cpp_options): Add warn_normalize field.
984
985 2005-03-11  Geoffrey Keating  <geoffk@apple.com>
986
987         * directives.c (glue_header_name): Update call to cpp_spell_token.
988         * internal.h (_cpp_interpret_identifier): New.
989         * charset.c (_cpp_interpret_identifier): New.
990         (_cpp_valid_ucn): Allow UCN version of '$'.
991         * lex.c (lex_identifier): Add extra parameter to indicate if initial
992         character was '$' or '\'.  Support identifiers with UCNs.
993         (forms_identifier_p): Allow UCNs.
994         (_cpp_lex_direct): Pass extra parameter to lex_identifier.
995         (utf8_to_ucn): New.
996         (cpp_spell_token): Add FORSTRING parameter.  Use it.
997         (cpp_token_as_text): Update call to cpp_spell_token.
998         (cpp_output_token): Write UCNs back out.
999         (stringify_arg): Update call to cpp_spell_token.
1000         (paste_tokens): Likewise.
1001         (cpp_macro_definition): Likewise.
1002         * macro.c (stringify_arg): Likewise.
1003         (paste_tokens): Likewise.
1004         (cpp_macro_definition): Likewise.
1005         * include/cpplib.h: Add parameter to cpp_spell_token.
1006
1007 2005-03-04  Jakub Jelinek  <jakub@redhat.com>
1008
1009         PR bootstrap/20282
1010         PR bootstrap/20305
1011         * macro.c (replace_args, cpp_get_token): Copy whole
1012         cpp_token_u instead of just cpp_string field from it.
1013
1014 2005-02-28  Devang Patel  <dpatel@apple.com>
1015
1016         * directives.c (do_line): Save sysp early before line table is
1017         realloc'ed.
1018
1019 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
1020
1021         PR 18785
1022         * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1023         (cpp_host_to_exec_charset): New function.
1024         * include/cpplib.h: Declare cpp_host_to_exec_charset.
1025
1026 2005-02-19  Devang Patel  <dpatel@apple.com>
1027
1028         * charset.c (_cpp_convert_input): Check '\r' before inserting
1029         '\n' at the end.
1030
1031 2005-02-15  Eric Christopher  <echristo@redhat.com>
1032
1033         PR preprocessor/19077
1034         * macro.c (cpp_macro_definition): Move handling of whitespace
1035         to PREV_WHITE conditional. Remove overloading of len
1036         variable.
1037
1038 2005-02-14  Kazu Hirata  <kazu@cs.umass.edu>
1039
1040         * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1041         traditional.c: Update copyright.
1042
1043 2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
1044
1045         PR bootstrap/19818
1046         * configure.ac: Check for declaration of basename and getopt.
1047         * config.in: Regenerate.
1048         * configure: Regenerate.
1049         * internal.h (ustrcspn): New.
1050         * macro.c (create_iso_definition): Fix allocation of memory.
1051         (padding_token): Add cast to remove const-ness.
1052         * pch.c (cpp_read_state): Use ustrcspn.
1053
1054 2005-02-08  Mike Stump  <mrs@apple.com>
1055
1056         * files.c (pchf_adder): Remove.
1057         (struct pchf_adder_info): Likewise.
1058         (_cpp_save_file_entries): Write out all files so that #import works.
1059
1060 2005-01-23  Joseph S. Myers  <joseph@codesourcery.com>
1061
1062         * configure: Regenerate.
1063
1064 2005-01-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1065
1066         * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1067
1068         * include/cpplib.h: Also update copyright years.
1069
1070 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
1071
1072         * files.c (_cpp_find_file): Add files found by search_path_exhausted
1073         to the list of all files.
1074
1075 2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1076
1077         * internal.h: Update references to Cpp lib filenames.
1078         * directives.c: Likewise.
1079         * init.c: Likewise.
1080         * macro.c: Likewise.
1081         * traditional.c: Likewise.
1082
1083 2004-12-15  Eric Botcazou  <ebotcazou@libertysurf.fr>
1084
1085         PR preprocessor/15167
1086         * files.c (destroy_cpp_file): New function.
1087         (should_stack_file): Make a new file if the
1088         compared file is still stacked.
1089
1090 2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>
1091
1092         PR preprocessor/17610
1093         * directives.c (do_include_common): Error out if an empty filename
1094         is given for #include (or #include_next or #import).
1095
1096 2004-11-27  Roger Sayle  <roger@eyesopen.com>
1097             Zack Weinberg  <zack@codesourcery.com>
1098
1099         * internal.h: Replace all uses of uchar with unsigned char.
1100         * include/cpp-id-data.h: Likewise.  Guard typedef of uchar
1101         with !IN_GCC, so uchar is only defined whilst building libcpp.
1102
1103 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
1104
1105         * aclocal.m4: Regenerate.
1106
1107 2004-11-24  Roger Sayle  <roger@eyesopen.com>
1108
1109         PR preprocessor/15824
1110         * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1111         directly, instead of the non-existant "system.h" and "ansidecl.h".
1112         * configure: Regenerate.
1113
1114 2004-11-23  Daniel Jacobowitz  <dan@codesourcery.com>
1115             Joseph Myers  <joseph@codesourcery.com>
1116
1117         * internal.h (struct lexer_state): Add in_deferred_pragma.
1118         * directives.c (struct pragma_entry): Add allow_expansion.
1119         (insert_pragma_entry): Take allow_expansion flag.
1120         (register_pragma): Likewise.
1121         (cpp_register_pragma): Likewise.
1122         (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1123         (do_pragma): Honor allow_expansion.
1124         (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1125         * include/cpplib.h (cpp_register_pragma): Update prototype.
1126
1127 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
1128             Mark Mitchell  <mark@codesourcery.com>
1129
1130         * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1131         need_64bit_hwint=yes.
1132         * configure: Regenerate.
1133
1134 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
1135
1136         * Makefile.in ($(PACKAGE).pot): New rule.  Depend on
1137         po/$(PACKAGE).pot.
1138         (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1139         arguments.  Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1140         Remove local srcdir path from generated file.
1141
1142 2004-11-04  Zack Weinberg  <zack@codesourcery.com>
1143             Gerald Pfeifer  <gerald@pfeifer.com>
1144
1145         * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1146         as well.
1147
1148 2004-10-27  Zack Weinberg  <zack@codesourcery.com>
1149
1150         PR 18075
1151         * directives.c (do_pragma): Do not defer pragmas which are unknown.
1152         (cpp_handle_deferred_pragma): Add cast to silence warning.
1153
1154 2004-10-14  Joseph S. Myers  <jsm@polyomino.org.uk>
1155
1156         * errors.c (_cpp_begin_message): Print "error: " for errors.
1157
1158 2004-10-10  Andreas Jaeger  <aj@suse.de>
1159
1160         * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1161         * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1162
1163 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
1164
1165         * pch.c (cpp_write_pch_state): Remove variable z as it is not
1166         used.
1167         (cpp_read_state): Remove unused variables, m, d and mac_count.
1168
1169 2004-09-29  Per Bothner  <per@bothner.com>
1170
1171         * directives.c (cpp_handle_deferred_pragma):  Save, clear and restore
1172         cb.line_change.  Otherwise do_pragma will call the line_change
1173         call-back with a meaningless line number.
1174
1175 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
1176
1177         * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1178         programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1179         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1180         * aclocal.m4, configure: Regenerate.
1181         * init.c: Include localedir.h.
1182         * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1183         (DEFS): Delete.
1184         (.c.o): Use $(ALL_CFLAGS).
1185         (localedir.h, localedir.hs): New rules.
1186         (clean): Use rm -rf to remove directories.
1187         (distclean): Also delete localedir.h and localedir.hs.
1188         (init.o): Update dependencies.
1189
1190 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
1191
1192         * Makefile.in (aclocal.m4): Update dependencies.
1193         * configure.ac (AC_CONFIG_MACRO_DIR): New.
1194         * aclocal.m4, configure: Regenerate.
1195
1196 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
1197
1198         * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1199         (_cpp_convert_input, _cpp_default_encoding): Add comments.
1200         Some other comments in this file also tweaked.
1201
1202         * directives.c (do_pragma): Save current buffer position
1203         before lexing the pragma keywords; don't call
1204         _cpp_backup_tokens in the defer_pragmas case.
1205
1206 2004-09-15  Per Bothner  <per@bothner.com>
1207
1208         * include/line-map.h (line_map_start):  Add parameter names so
1209         preceding comment makes sense.
1210         (linemap_add):  Remove from comment mention of non-existing parameter.
1211
1212 2004-09-09  Matt Austern  <austern@apple.com>
1213             Zack Weinberg  <zack@codesourcery.com>
1214
1215         * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1216         prefixes throughout.  Add entry for PRAGMA.  Remove
1217         unnecessary "= 0" from EQ.
1218         (enum cpp_ttype): Adjust OP and TK definitions to restore
1219         prefixes, via token-paste.
1220         (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1221         Change from #defines to additional cpp_ttype enumerators.
1222         (struct cpp_options): Add defer_pragmas.
1223         (cpp_handle_deferred_pragma): Prototype new interface.
1224
1225         * internal.h (struct cpp_reader): Add directive_result.
1226         * directives.c (struct pragma_entry): Add is_internal field;
1227         give boolean fields type bool.
1228         (start_directive): Initialize pfile->directive_result.type.
1229         (_cpp_do__Pragma): Likewise.
1230         (run_directive): Do not crash if pfile->buffer->prev is NULL.
1231         (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1232         from it.
1233         (register_pragma): New static function, bulk of former
1234         cpp_register_pragma here; add 'internal' argument, pass along
1235         to insert_pragma_entry.
1236         (cpp_register_pragma): Now a wrapper around register_pragma which
1237         always passes false for 'internal' argument.
1238         (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1239         true for 'internal'.
1240         (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1241         an internal pragma, save text till the end of the line as a CPP_PRAGMA
1242         token instead of executing the pragma.
1243         (cpp_handle_deferred_pragma): New interface.
1244         * lex.c (token_spellings): Adjust OP and TK definitions to
1245         match changes to cpplib.h.
1246         (_cpp_lex_token): Check for a directive-result token and
1247         return it if present.
1248         (cpp_token_val_index): Handle CPP_PRAGMA.
1249         * macro.c (cpp_builtin_macro_text): Correct comment.
1250         (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1251
1252 2004-09-06  Serge Belyshev  <belyshev@lubercy.com>
1253
1254         PR preprocessor/14699
1255         * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1256         from size_t to double.
1257
1258 2004-08-28  Andreas Schwab  <schwab@suse.de>
1259             Andreas Jaeger <aj@suse.de>
1260
1261         * configure.ac: Set PACKAGE correctly.
1262         * configure: Regenerated.
1263
1264 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
1265
1266         * Makefile.in: Add back top_builddir.
1267
1268 2004-08-25  Paolo Bonzini  <bonzini@gnu.org>
1269
1270         * configure.ac: Replace Automake macro invocations
1271         with manual Autoconf checks and substitutions.
1272         * configure: Regenerate.
1273         * aclocal.m4: Regenerate.
1274         * config.in: Regenerate.
1275         * Makefile.am: Removed.
1276         * Makefile.in: Heavy simplification and reorganization.
1277
1278 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
1279
1280         * configure.ac (arm*-*-eabi*): New target.
1281         (arm*-*-symbianelf*): Likewise.
1282         * configure: Regenerated.
1283
1284 2004-07-24  Bernardo Innocenti  <bernie@develer.com>
1285
1286         * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1287         * directives.c: Use XNEW-family macros from libiberty.
1288         * lex.c: Likewise.
1289         * macro.c: Likewise.
1290         * cpplib.h (cpp_deps_style): Export enum with name.
1291
1292 2004-07-23  Matthias Klose  <doko@debian.org>
1293
1294         * init.c (init_library): Use PACKAGE for the text domain.
1295
1296 2004-07-16  Andris Pavenis  <pavenis@latnet.lv>
1297
1298         PR preprocessor/16366
1299         * internal.h (struct cpp_reader): New field dir_hash.
1300         * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1301         (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1302
1303 2004-07-04  Neil Booth  <neil@duron.akihabara.co.uk>
1304
1305         PR preprocessor/16192
1306         PR preprocessor/15913
1307         PR preprocessor/15572
1308         * expr.c (_cpp_parse_expr): Handle remaining cases where an
1309         expression is missing.
1310         * init.c (post_options): Traditional cpp doesn't do // comments.
1311
1312 2004-06-30  Per Bothner  <per@bothner.com>
1313
1314         * include/line-map.h (fileline):  Remove old typedef.
1315         * internal.h (struct cpp_reader):  Use source_location typedef instead.
1316
1317 2004-06-26  Zack Weinberg  <zack@codesourcery.com>
1318
1319         Partially revert patch of 2004-06-05.
1320         * files.c (search_cache): Remove pfile argument.  Don't check
1321         for file that would be found by "" or <> search here...
1322         (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1323         Do not apply directory-of-current-file correction to files
1324         found by this check.  Rearrange code slightly.
1325
1326 2004-06-21  Geoffrey Keating  <geoffk@apple.com>
1327
1328         * files.c (should_stack_file): Correct swapped parameters to call
1329         to cb.read_pch.
1330         * pch.c (cpp_valid_state): Handle -fpreprocessed.
1331
1332 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1333
1334         * Makefile.in: Regenerate with automake 1.8.5.
1335         * aclocal.m4: Likewise.
1336         * configure: Regenerate.
1337
1338 2004-06-11  Zack Weinberg  <zack@codesourcery.com>
1339
1340         * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1341         * configure, config.in: Regenerate.
1342         * system.h: Unconditionally define bool as unsigned char,
1343         BOOL_BITFIELD as unsigned int.
1344         * .cvsignore: New file.
1345
1346 2004-06-09  Geoffrey Keating  <geoffk@apple.com>
1347
1348         * traditional.c (push_replacement_text): Set macro->traditional.
1349         (save_replacement_text): Likewise.
1350         * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1351         (struct save_macro_item): Delete.
1352         (struct save_macro_data): Use a character array not the previous
1353         structured format.
1354         (save_macros): Save macro as text not as internal structures.
1355         (cpp_prepare_state): Update for changes to save_macro_data.
1356         (cpp_read_state): Don't read macros defined in PCH.  Restore
1357         -D macros as text.
1358         * macro.c (create_iso_definition): Honour alloc_subobject.
1359         Clear traditional flag.
1360         (_cpp_create_definition): Honour alloc_subobject.
1361         * lex.c (cpp_token_val_index): New.
1362         * internal.h: Include cpp-id-data.h.
1363         (uchar): Move definition to cpp-id-data.h.
1364         (U): Likewise.
1365         (cpp_macro): Likewise.
1366         * directives.c (struct answer): Move to cpp-id-data.h.
1367         (do_assert): Honour alloc_subobject.
1368
1369         * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1370         * include/cpplib.h (struct cpp_string): Add GTY marker.
1371         (enum cpp_token_fld_kind): New.
1372         (struct cpp_token): Add GTY markers.
1373         (cpp_token_val_index): Prototype.
1374         (CPP_HASHNODE_VALUE_IDX): New.
1375         (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1376         * include/cpp-id-data.h: New file.
1377
1378 2004-06-09  Paolo Bonzini  <bonzini@gnu.org>
1379
1380         * Makefile.am (all-local): New.
1381         * Makefile.in: Regenerate.
1382
1383 2004-06-06  Roger Sayle  <roger@eyesopen.com>
1384
1385         * Makefile.am (LIBICONV): Declare.
1386         (makedepend_LDADD): Use LIBICONV.
1387         * Makefile.in: Regenerate.
1388
1389 2004-06-05  Andrew Pinski  <pinskia@physics.uc.edu>
1390
1391         * Makefile.am (LIBINTL): Declare
1392         (makedepend_LDADD): Use LIBINTL.
1393         * Makefile.in: Regenerate.
1394
1395 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
1396
1397         * Makefile.am: Add makedepend.
1398         * Makefile.in, aclocal.m4: Regenerate.
1399         * charset.c: Insert a space to avoid a warning.
1400         * directives.c: Include mkdeps.h.
1401         (_cpp_handle_directive): Reenable macro expander if appropriate.
1402         (undefine_macros): Inline body of _cpp_free_definition for speed.
1403         Do not call undef callback or _cpp_warn_if_unused_macro.
1404         (cpp_get_deps): New interface.
1405         * files.c (search_cache): Add pfile argument.  Check for file
1406         that would be found by "" or <> search here...
1407         (_cpp_find_file): ...not here.  Correct recorded start_dir of
1408         files found by directory-of-current-file search that would be
1409         found by "" or <> search.
1410         * init.c (cpp_add_dependency_target): Delete.
1411         * internal.h (struct lexer_state): Add discarding_output flag.
1412         * lex.c (lex_identifier): Compute hash function while scanning.
1413         * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1414         directives.
1415         * makedepend.c: New file.
1416         * mkdeps.c (struct deps): Add vpath vector.
1417         (apply_vpath, deps_add_vpath): New function.
1418         (deps_free): Free vpath vector.
1419         (deps_add_dep, deps_add_target): Use apply_vpath.
1420         * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1421         (ht_lookup_with_hash): New function.
1422         * cpplib.h, mkdeps.h: Update prototypes.
1423         * symtab.h: Update prototypes.
1424         (HT_HASHSTEP, HT_FINISH): New macros.
1425
1426 2004-05-29  Geoffrey Keating  <geoffk@apple.com>
1427
1428         * symtab.c (ht_create): Set entries_owned.
1429         (ht_destroy): Honour entries_owned.
1430         (ht_expand): Likewise.
1431         (ht_load): New.
1432         * include/symtab.h (struct ht): New field 'entries_owned'
1433         (ht_load): New prototype.
1434
1435 2004-05-26  Paolo Bonzini  <bonzini@gnu.org>
1436
1437         PR bootstrap/15651
1438         * configure.ac: Fix m4 quoting when picking
1439         the size of HOST_WIDE_INT.
1440         * configure: Regenerate.
1441
1442 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
1443
1444         * Makefile.am: the correct directory for
1445         gettext include files is given by @INCINTL@.
1446         * Makefile.in: Regenerate.
1447
1448 2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
1449
1450         * system.h [!ENABLE_NLS]: dgettext takes two
1451         parameters.
1452
1453 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
1454
1455         Moved libcpp from the gcc subdirectory to the toplevel.
1456         * Makefile.am: New file.
1457         * Makefile.in: Regenerate.
1458         * configure.ac: New file.
1459         * configure: Regenerate.
1460         * config.in: Regenerate.
1461         * charset.c: Moved from gcc/cppcharset.c.  Add note about
1462         brokenness of input charset detection.  Adjust for change
1463         in name of cppucnid.h.
1464         * errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
1465         * expr.c: Moved from gcc/cppexp.c.
1466         * files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
1467         Remove #define of O_BINARY, it is in system.h.
1468         * identifiers.c: Moved from gcc/cpphash.c.
1469         * internal.h: Moved from gcc/cpphash.h.  Change header
1470         guard name.  All other files adjusted to match name change.
1471         * init.c: Moved from gcc/cppinit.c.
1472         (init_library) [ENABLE_NLS]: Call bindtextdomain.
1473         * lex.c: Moved from gcc/cpplex.c.
1474         * directives.c: Moved from gcc/cpplib.c.
1475         * macro.c: Moved from gcc/cppmacro.c.
1476         * pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
1477         * traditional.c: Moved from gcc/cpptrad.c.
1478         * ucnid.h: Moved from gcc/cppucnid.h.  Change header
1479         guard name.
1480         * ucnid.pl: Moved from gcc/cppucnid.pl.
1481         * ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
1482         guard name.
1483         * symtab.c: Moved from gcc/hashtable.c.
1484         * line-map.c: Moved from gcc.  Do not include intl.h.
1485         * mkdeps.c: Moved from gcc.
1486         * system.h: New file.
1487         * include/cpplib.h: Moved from gcc.  Change header guard name.
1488         * include/line-map.h: Moved from gcc.  Change header guard name.
1489         * include/mkdeps.h: Moved from gcc.  Change header guard name.
1490         * include/symtab.h: Moved from gcc/hashtable.h.  Change header
1491         guard name.