]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
plugins.texi (Registering custom attributes): section renamed as (Registering custom...
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
2c6e3f55
JJ
12009-10-19 Jakub Jelinek <jakub@redhat.com>
2
3 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
4 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
5 and char32_cset_desc.
6 (converter_for_type): Handle CPP_UTF8STRING.
7 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
8 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
9 (parse_include): Reject raw strings.
10 * include/cpplib.h (CPP_UTF8STRING): New token type.
11 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
12 * lex.c (lex_raw_string): New function.
13 (lex_string): Handle u8 string literals, call lex_raw_string
14 for raw string literals.
15 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
16 sequences.
17 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
18
96c169e1
JJ
192009-10-14 Jakub Jelinek <jakub@redhat.com>
20
21 PR preprocessor/41543
22 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
23 * line-map.c (linemap_init): Initialize highest_location and
24 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
25
30c99a9e
JM
262009-10-09 Jason Merrill <jason@redhat.com>
27
28 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
29
2214382c
NV
302009-10-09 Neil Vachharajani <nvachhar@google.com>
31
32 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
33 sccs.
34
e02222d2
LR
352009-09-23 Loren J. Rittle <ljrittle@acm.org>
36
37 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
38 * configure: Rebuilt.
39
9a8a2b7a
RG
402009-09-22 Richard Guenther <rguenther@suse.de>
41
42 PR pch/38987
43 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
44
74dc6a11
CD
452009-09-18 Chris Demetriou <cgd@google.com>
46
47 PR preprocessor/28435:
48 * include/cpplib.h (struct cpp_options): Add new member
49 deps.need_preprocessor_output.
50 * files.c (open_file_failed): If preprocessor output is needed
51 always report an error.
52
933608b7
KT
532009-09-13 Kai Tietz <kai.tietz@onevision.com>
54
55 * configure.ac: Set for i?86-w64-mingw*
56 need_64bit_hwint to yes.
57 * configure: Regenerated.
58
86373e7e
JM
592009-09-10 Jason Merrill <jason@redhat.com>
60
61 * directives.c (cpp_define): constify.
62
fd2ab214
ILT
632009-09-02 Ian Lance Taylor <iant@google.com>
64
65 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
66
df58e648
RW
672009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
68
69 * configure.ac (AC_PREREQ): Bump to 2.64.
70
5213506e
RW
712009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
72
73 * aclocal.m4: Regenerate.
74 * config.in: Regenerate.
75 * configure: Regenerate.
76
709a22df
TT
772009-08-17 Tom Tromey <tromey@redhat.com>
78
79 PR preprocessor/41067:
80 * charset.c (convert_escape): Add missing ":" to error text.
81
0c539b47
DR
822009-07-27 Douglas B Rupp <rupp@gnat.com>
83
84 * include/cpplib.h (INO_T_CPP): New macro.
85 (struct cpp_dir): Use it.
86
2b69c841
JQ
872009-07-20 Jerry Quinn <jlquinn@optonline.net>
88
89 PR regression/40800
90 * configure.ac: Use = instead of == for testing
91 ENABLE_BUILD_WITH_CXX.
92 * configure: Rebuild.
93
f1bf410c
JQ
942009-07-17 Jerry Quinn <jlquinn@optonline.net>
95
96 * directives.c (do_linemarker, do_line): Use CPP_STRING for
97 ignored enum value.
98 * files.c (find_file_in_dir): Add cast from void* to char*.
99 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
100 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
101 warnings.
102 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
103 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
104 COMPILER_FLAGS): New.
105 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
106 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
107 instead of ALL_CFLAGS.
108 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
109 from other warnings. Add -Wc++-compat to C-specific warnings.
110 Check for --enable-build-with-cxx. Set and substitute
111 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
112 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
113 AC_CHECK_HEADERS.
114 * configure: Rebuild.
115 * include/cpp-id-data.h: Remove extern "C".
116 * include/line-map.h: Likewise.
117 * include/mkdeps.h: Likewise.
118 * include/symtab.h: Likewise.
119 * internal.h: Likewise.
120
a28fbdba
MLI
1212009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
122
123 * directives.c (parse_include): Add location argument. Update all
124 calls.
125 (parse_answer): Likewise.
126 (do_include_common): Error with exact location.
127 (parse_assertion): Likewise.
128
b506a5a2
MLI
1292009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
130
131 * expr.c (num_div_op): Take explicit location.
132
7d8847a4
ILT
1332009-06-17 Ian Lance Taylor <iant@google.com>
134
135 * include/cpplib.h (progname): Don't declare.
136
3d8b2a98
ILT
1372009-06-12 Ian Lance Taylor <iant@google.com>
138
139 * include/cpplib.h (struct cpp_options): Add
140 warn_cxx_operator_names field.
141 (NODE_WARN_OPERATOR): Define.
142 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
143 type to 6 bits.
144 * init.c (mark_named_operators): Add flags parameter.
145 (cpp_post_options): Pick flags value to pass to
146 mark_named_operators.
147 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
148 identifier is an operator name in C++.
149
e74fe492
AH
1502009-06-01 Aldy Hernandez <aldyh@redhat.com>
151
152 * include/line-map.h (LAST_SOURCE_COLUMN): New.
153
4851089f
ILT
1542009-06-01 Ian Lance Taylor <iant@google.com>
155
156 * include/cpp-id-data.h: Add extern "C".
157 * include/line-map.h: Likewise.
158 * include/mkdeps.h: Likewise.
159 * include/symtab.h: Likewise.
160 * internal.h: Likewise.
161
7e5487a2
ILT
1622009-05-15 Ian Lance Taylor <iant@google.com>
163
164 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
165 builtin_type. Change all uses.
166
00b0c19b
MLI
1672009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
168
169 PR cpp/36674
170 * directives (do_linemarker): Compensate for the increment in
171 location that occurs when we reach the end of line.
172 * files (_cpp_stack_include): Mention _cpp_find_file in the
173 comment.
174
9a0c6187
JM
1752009-05-10 Joseph Myers <joseph@codesourcery.com>
176
177 * include/cpplib.h (enum cpp_token_fld_kind): Add
178 CPP_TOKEN_FLD_TOKEN_NO.
179 (struct cpp_macro_arg, struct cpp_identifier): Define.
180 (union cpp_token_u): Use struct cpp_identifier for identifiers.
181 Use struct cpp_macro_arg for macro arguments. Add token_no for
182 CPP_PASTE token numbers.
183 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
184 do_pragma_poison, parse_assertion): Use val.node.node in place of
185 val.node.
186 * expr.c (parse_defined, eval_token): Use val.node.node in place
187 of val.node.
188 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
189 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
190 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
191 place of val.arg_no. Use val.node.node in place of val.node.
192 * macro.c (replace_args, cpp_get_token, parse_params,
193 lex_expansion_token, create_iso_definition, cpp_macro_definition):
194 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
195 Use val.node.node in place of val.node.
196
9e322bc1
JM
1972009-05-03 Joseph Myers <joseph@codesourcery.com>
198
199 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
200 UTF-8 sequences.
201
f88d0772
JM
2022009-04-25 Joseph Myers <joseph@codesourcery.com>
203
204 PR preprocessor/39559
205 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
206 constants larger than intmax_t in C99 mode.
207
d1b38208
TG
2082009-04-21 Taras Glek <tglek@mozilla.com>
209
210 * include/cpp-id-data.h: Update GTY annotations to new syntax.
211 * include/cpplib.h: Likewise.
212 * include/line-map.h: Likewise.
213 * include/symtab.h: Likewise.
214
cfc93532
MLI
2152009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
216
217 PR c++/14875
218 * lex.c (cpp_type2name): Take a flags parameter. Call
219 cpp_named_operator2name for named operators and cpp_digraph2name
220 for digraphs.
221 (cpp_digraph2name): New.
222 (cpp_spell_token): Use it.
223 (cpp_output_token): Likewise.
224 * include/cpplib.h (cpp_type2name): Update declaration.
225 * init.c (cpp_named_operator2name): New.
226 * internal.h (cpp_named_operator2name): Declare.
227
9c650d90
MLI
2282009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
229
230 PR c++/13358
231 * init.c (cpp_create_reader): Wlong_long is disabled by default.
232 * expr.c (cpp_classify_number): Give different messages for C and
233 C++ front-ends.
234
aa508502
JM
2352009-04-19 Joseph Myers <joseph@codesourcery.com>
236
237 PR preprocessor/20078
238 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
239 field.
240 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
241 (struct cpp_token): Change flags to unsigned short.
242 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
243 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
244 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
245 tokens.
246 * macro.c (macro_real_token_count): New.
247 (enter_macro_context, replace_args): Use macro_real_token_count.
248 (create_iso_definition): Record whitespace surrounding and digraph
249 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
250 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
251 multiple consecutive ## tokens.
252 (_cpp_create_definition): Initialize extra_tokens.
253 (cpp_macro_definition): Use macro_real_token_count.
254
61cc8223
JM
2552009-04-18 Joseph Myers <joseph@codesourcery.com>
256
257 * directives.c (parse_include): Pass true to check_eol.
258
c7f9c0b9
JM
2592009-04-18 Joseph Myers <joseph@codesourcery.com>
260
261 PR preprocessor/39646
262 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
263 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
264 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
265 place of LC_RENAME.
266
a5cb563b
JM
2672009-04-18 Joseph Myers <joseph@codesourcery.com>
268
269 PR preprocessor/39647
270 * directives.c (check_eol): Add parameter expand.
271 (do_undef, parse_include, do_line, do_linemarker, do_ident,
272 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
273 do_else, do_endif, do_assert, do_unassert): All callers changed.
274 Pass true from do_line, false elsewhere.
275
18f41a1b
JM
2762009-04-12 Joseph Myers <joseph@codesourcery.com>
277
278 PR preprocessor/31869
279 * macro.c (stringify_arg): Handle NULL source token in padding
280 token where previous padding token did not have source token with
281 preceding whitespace.
282
748086b7
JJ
2832009-04-09 Jakub Jelinek <jakub@redhat.com>
284
285 * Makefile.in: Change copyright header to refer to version
286 3 of the GNU General Public License and to point readers at the
287 COPYING3 file and the FSF's license web page.
288 * charset.c: Likewise.
289 * directives-only.c: Likewise.
290 * directives.c: Likewise.
291 * errors.c: Likewise.
292 * expr.c: Likewise.
293 * files.c: Likewise.
294 * identifiers.c: Likewise.
295 * include/cpp-id-data.h: Likewise.
296 * include/cpplib.h: Likewise.
297 * include/line-map.h: Likewise.
298 * include/mkdeps.h: Likewise.
299 * include/symtab.h: Likewise.
300 * init.c: Likewise.
301 * internal.h: Likewise.
302 * lex.c: Likewise.
303 * line-map.c: Likewise.
304 * macro.c: Likewise.
305 * makeucnid.c: Likewise.
306 * mkdeps.c: Likewise.
307 * pch.c: Likewise.
308 * symtab.c: Likewise.
309 * system.h: Likewise.
310 * traditional.c: Likewise.
311 * ucnid.tab: Likewise.
312 * ucnid.h: Regenerate.
313
eec49116
JJ
3142009-04-01 Janis Johnson <janis187@us.ibm.com>
315
839a3b8a
JJ
316 PR c/39027
317 * include/cpplib.h (CPP_N_DEFAULT): Define.
318 * expr.c (interpret_float_suffix): Recognize d or D for double,
319 return new value for default.
320 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
321
eec49116
JJ
322 PR c/33466
323 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
324 letters from decimal float and fixed-point suffixes.
325
47580d22
JM
3262009-03-31 Joseph Myers <joseph@codesourcery.com>
327
328 PR preprocessor/15638
329 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
330 invalid PCH.
331 (open_file_failed): Make error for missing file fatal.
332 * include/cpplib.h (CPP_DL_FATAL): Define.
333
5a2df0fa
SV
3342009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
335
336 PR preprocessor/31932:
337 * internal.h: Don't mention HAVE_ICONV_H.
338 * configure, config.in: Rebuild.
339 * configure.ac: Don't check for iconv.h.
340
c1a8a3c6
TT
3412009-03-30 Tom Tromey <tromey@redhat.com>
342
343 PR preprocessor/39512:
344 * line-map.c (linemap_init): Initialize 'reallocator' field.
345
a37a7b8a
JJ
3462009-03-30 Jakub Jelinek <jakub@redhat.com>
347
348 PR target/39558
349 * macro.c (cpp_get_token): If macro_to_expand returns NULL
350 and used some tokens, add CPP_PADDING before next token.
351
148e4216
JM
3522009-03-29 Joseph Myers <joseph@codesourcery.com>
353
354 PR preprocessor/34695
355 * makedepend.c: Remove.
356 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
357 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
358 * directives.c (cpp_errors): Remove.
359 * errors.c (print_location, _cpp_begin_message, v_message):
360 Remove.
361 (cpp_error, cpp_error_with_line): Always use error callback.
362 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
363 * include/cpplib.h (cpp_options): Remove pedantic_errors,
364 inhibit_warnings, warn_system_headers, inhibit_errors,
365 warnings_are_errors, client_diagnostic.
366 (cpp_callbacks): Add extra arguments to error callback; make it
367 return bool.
368 (cpp_finish): Return void.
369 (cpp_destroy): Remove inaccurate comment about return value.
370 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
371 (CPP_DL_NOTE): Define.
372 * include/line-map.h (linemap_print_containing_files): Remove.
373 * init.c (cpp_finish): Do not check for or return number of
374 errors.
375 * internal.h (cpp_reader): Remove errors field.
376 * line-map.c (linemap_print_containing_files): Remove.
377 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
378 about previous definition. Only emit it if previous diagnostic
379 was emitted.
380
f1450211
JM
3812009-03-28 Joseph Myers <joseph@codesourcery.com>
382
383 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
384 mkinstalldirs.
385
8f5929e1
JJ
3862009-03-18 Jakub Jelinek <jakub@redhat.com>
387
388 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
389
4bb09c26
JM
3902009-02-21 Joseph Myers <joseph@codesourcery.com>
391
392 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
393 header name.
394 (_cpp_lex_direct): Handle this.
395
68c9ab45
RG
3962009-02-15 Richard Guenther <rguenther@suse.de>
397
398 Revert last change.
399
601b3e1a
RG
4002009-02-13 Richard Guenther <rguenther@suse.de>
401
402 * configure.ac: Enable LFS.
403 * configure: Re-generate.
404 * config.in: Likewise.
405
fc0cd180
BE
4062009-01-05 Ben Elliston <bje@au.ibm.com>
407
408 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
409 (.po.pox): Likewise.
410 (po/$(PACKAGE).pot): Likewise.
411
db89a3be
AO
4122008-12-10 Alexandre Oliva <aoliva@redhat.com>
413
414 PR target/37033
415 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
416 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
417
cc955282
JM
4182008-11-29 Joseph Myers <joseph@codesourcery.com>
419
420 * lex.c (cpp_token_len): Use 6 as default length.
421
47960aaf
MLI
4222008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
423
424 * expr.c (struct op): Add location.
425 (_cpp_parse_expr): Propagate locations throught the stack
426 of expressions.
427 (reduce): Likewise.
428 (check_promotion): Use explicit location in errors.
429
631d0d36
MG
4302008-10-05 Matthew Gingell <gingell@adacore.com>
431 Arnaud Charlet <charlet@adacore.com>
432
433 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
434 (cpp_get_comments): New function.
435 * internal.h (struct cpp_reader): Add comments field.
436 * init.c (cpp_destroy): Free comments.
437 * lex.c (store_comment, cpp_get_comments): New functions.
438 (comments): New struct.
439 (save_comment): Store comments in comments struct.
440
c047ce93
SB
4412008-09-18 Simon Baldwin <simonb@google.com>
442
443 * include/cpplib.h (struct cpp_options): Add new boolean flag
444 warn_builtin_macro_redefined.
445 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
446 * (struct builtin_operator): Split out from previous struct builtin,
447 enhance extra const correctness.
448 * (struct builtin_macro): Split out from previous struct builtin, add
449 new always_warn_if_redefined flag, enhance const correctness.
450 * (mark_named_operators): Use struct builtin_operator.
451 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
452 to builtins selectively.
453 * macro.c (warn_of_redefinition): Return false if a builtin macro
454 is not flagged with NODE_WARN.
455
affa55c6
JJ
4562008-07-31 Jakub Jelinek <jakub@redhat.com>
457
458 PR preprocessor/36649
459 * files.c (struct report_missing_guard_data): New type.
460 (report_missing_guard): Put paths into an array instead of printing
461 them right away. Return 1 rather than 0.
462 (report_missing_guard_cmp): New function.
463 (_cpp_report_missing_guards): Sort and print paths gathered by
464 report_missing_guard callback.
465
3b8f20a1
MLI
4662008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
467
468 PR 28079
469 * directives.c (strtolinenum): Handle overflow.
470 (do_line): Give a warning if line number overflowed.
471 (do_linemarker): Update call to strtolinenum.
472
1bb64668
MLI
4732008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
474
475 * include/line-map.h (linenum_type): New typedef.
476 (struct line_map): Use it.
477 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
478 (SOURCE_COLUMN): Likewise.
479 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
480 source_location values in a variable of type linenum_type.
481 * directives.c (struct if_stack): Use linenum_type.
482 (strtoul_for_line): Rename as strtolinenum.
483 (do_line): Use linenum_type.
484 (do_linemarker): Use linenum_type and strtolinenum.
485 (_cpp_do_file_change): Use linenum_t.
486 * line-map.c (linemap_add): Likewise.
487 (linemap_line_start): Likewise.
488 * traditional.c (struct fun_macro): 'line' is a source_location.
489 * errors.c (print_location): Use linenum_type.
490 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
491 * internal.h (CPP_INCREMENT_LINE): Likewise.
492 * lex.c (_cpp_skip_block_comment): Use source_location.
493
5950c3c9
BE
4942008-07-14 Ben Elliston <bje@au.ibm.com>
495
496 * include/cpplib.h (NODE_CONDITIONAL): New.
497 (struct cpp_callbacks): New macro_to_expand field.
498 (struct cpp_hashnode): Adjust size of flags and type fields.
499 (cpp_peek_token): Prototype.
500 * lex.c (cpp_peek_token): New function.
501 (_cpp_temp_token): Protect pre-existing lookaheads.
502 * macro.c (cpp_get_token): Expand any conditional macros.
503 (_cpp_backup_tokens_direct): New.
504 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
505 (warn_of_redefinition): Silently allow redefined conditional
506 macros.
507 (_cpp_create_definition): Remove the conditional flag when a user
508 defines one of the conditional macros.
509 * internal.h (_cpp_backup_tokens_direct): New prototype.
510
e85edc9e
AH
5112008-06-13 Andrew Haley <aph@redhat.com>
512
513 PR preprocessor/33305
514 * macro.c (replace_args): Print a warning for empty macro
515 arguments in C89 and C++.
516
18c04407
RW
5172008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
518
519 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
520 * configure: Regenerate.
521
2d09b640
RW
5222008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
523
524 * Makefile.in (datarootdir): New variable.
525
0b7c73cc
L
5262008-06-12 H.J. Lu <hongjiu.lu@intel.com>
527
528 PR preprocessor/36479
529 * charset.c (cpp_interpret_string_notranslate): Also set
530 narrow_cset_desc.width.
531
cd985f66
JM
5322008-06-07 Joseph Myers <joseph@codesourcery.com>
533
534 * configure.ac (parisc*64*-*-*): Remove.
535 * configure: Regenerate.
536
d750887f
TT
5372008-05-30 Tom Tromey <tromey@redhat.com>
538
539 PR preprocessor/36320:
540 * internal.h (_cpp_parse_expr): Update.
541 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
542 messages.
543 * directives.c (do_if): Update.
544 (do_elif): Require expression if processing group.
545
c100de59
DS
5462008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
547
548 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
549
5d6342eb
TT
5502008-05-21 Tom Tromey <tromey@redhat.com>
551
552 PR preprocessor/27777:
553 * lex.c (cpp_output_line_to_string): New function.
554 * internal.h (_cpp_begin_message): Don't declare.
555 * errors.c (_cpp_begin_message): Now static.
556 * include/cpplib.h (cpp_output_line_to_string): Declare.
557 * directives.c (do_diagnostic): Rewrote. Use
558 cpp_output_line_to_string. Don't use _cpp_begin_message.
559
dae4174e
TT
5602008-05-21 Tom Tromey <tromey@redhat.com>
561
562 * include/symtab.h (HT_ALLOCED): Remove.
563 (ht_purge): Declare.
564 * symtab.c (DELETED): New define.
565 (ht_lookup): Update comment.
566 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
567 code. Use subobject allocator for strings, if it exists.
568 (ht_expand): Handle deleted entries.
569 (ht_forall): Likewise.
570 (ht_purge): New function.
571 (ht_dump_statistics): Print deletion statistics.
572
899015a0
TT
5732008-05-13 Tom Tromey <tromey@redhat.com>
574
575 PR preprocessor/22168:
576 * include/cpplib.h (struct cpp_options) <objc>: Update
577 documentation.
578 * expr.c (eval_token): Warn for use of assertions.
579 * directives.c (directive_diagnostics): Warn about extensions.
580 (DEPRECATED): New define.
581 (DIRECTIVE_TABLE): Use it.
582
71c10038
TT
5832008-05-06 Tom Tromey <tromey@redhat.com>
584
585 PR preprocessor/35313, PR preprocessor/36088:
586 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
587 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
588
2bd0fe3d
DM
5892008-05-04 David S. Miller <davem@davemloft.net>
590
591 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
592 * configure: Regenerate.
593
28f68625
DF
5942008-04-22 Daniel Franke <franke.daniel@gmail.com>
595
596 * include/cpplib.h (cpp_define_formatted): New.
597 * directives.c (cpp_define_formatted): New.
598
688e7a53
TT
5992008-04-21 Tom Tromey <tromey@redhat.com>
600
601 PR libcpp/33415:
602 * charset.c (_cpp_convert_input): Add buffer_start argument.
603 Ignore UTF-8 BOM if seen.
604 * internal.h (_cpp_convert_input): Add argument.
605 * files.c (struct _cpp_file) <buffer_start>: New field.
606 (destroy_cpp_file): Free buffer_start, not buffer.
607 (_cpp_pop_file_buffer): Likewise.
608 (read_file_guts): Update.
609
b6baa67d
KVH
6102008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
611
612 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
613 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
614 (struct cpp_options): Added uliterals.
615 (cpp_interpret_string): Update prototype.
616 (cpp_interpret_string_notranslate): Idem.
617 * charset.c (init_iconv_desc): New width member in cset_converter.
618 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
619 (convert_ucn): Idem.
620 (emit_numeric_escape): Idem.
621 (convert_hex): Idem.
622 (convert_oct): Idem.
623 (convert_escape): Idem.
624 (converter_for_type): New function.
625 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
626 (cpp_interpret_string_notranslate): Match changed prototype.
627 (wide_str_to_charconst): Use converter_for_type.
628 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
629 * directives.c (linemarker_dir): Macro U changed to UC.
630 (parse_include): Idem.
631 (register_pragma_1): Idem.
632 (restore_registered_pragmas): Idem.
633 (get__Pragma_string): Support CPP_STRING{16,32}.
634 * expr.c (eval_token): Support CPP_CHAR{16,32}.
635 * init.c (struct lang_flags): Added uliterals.
636 (lang_defaults): Idem.
637 * internal.h (struct cset_converter) <width>: New field.
638 (struct cpp_reader) <char16_cset_desc>: Idem.
639 (struct cpp_reader) <char32_cset_desc>: Idem.
640 * lex.c (digraph_spellings): Macro U changed to UC.
641 (OP, TK): Idem.
642 (lex_string): Add support for u'...', U'...', u"..." and U"...".
643 (_cpp_lex_direct): Idem.
644 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
645 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
646
deb984e6
PB
6472008-04-18 Paolo Bonzini <bonzini@gnu.org>
648
649 PR bootstrap/35457
650 * aclocal.m4: Regenerate.
651 * configure: Regenerate.
652
bf048bea
TT
6532008-04-17 Tom Tromey <tromey@redhat.com>
654
655 PR libcpp/34866:
656 * errors.c (cpp_error): Don't reference a token before the start
657 of the current run.
658
7f27b0f8
TT
6592008-04-16 Tom Tromey <tromey@redhat.com>
660
661 * Makefile.in (TAGS_SOURCES): New variable.
662 (TAGS): New target.
663
a1fcb9a1
KK
6642008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
665
666 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
667 and shbe-*-*.
668 * configure: Rebuilt.
669
93d45d9e
JM
6702008-04-02 Joseph Myers <joseph@codesourcery.com>
671
672 * include/cpplib.h (struct cpp_callbacks): Add used_define,
673 used_undef and before_define.
674 (NODE_USED): Define.
675 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
676 do_ifndef, cpp_pop_definition): Handle new flag and use new
677 callbacks.
678 * expr.c (parse_defined): Handle new flag and use new callbacks.
679 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
680 flag and use new callbacks.
681
d4c32e1d
JJ
6822008-04-01 Jakub Jelinek <jakub@redhat.com>
683
684 PR pch/13675
685 * files.c (struct _cpp_file): Remove pch field.
686 (pch_open_file): Don't set file->pch, just file->pchname.
687 (should_stack_file): After pfile->cb.read_pch call
688 free pchname and clear pchname, don't close file->fd.
689 Test file->pchname instead of file->pch. Don't close fd after cb.
690 (_cpp_stack_include): Test file->pchname instead of file->pch.
691
161031e3
TT
6922008-03-28 Tom Tromey <tromey@redhat.com>
693
694 * Makefile.in (POSTCOMPILE): New variable.
695 (.c.o): Use it.
696
14ccf800
TT
6972008-03-13 Tom Tromey <tromey@redhat.com>
698
699 PR libcpp/35322:
700 * directives.c (destringize_and_run): Set pfile->directive.
701
830465c6
MM
7022008-03-06 Markus Milleder <markus.milleder@generali.at>
703
704 PR preprocessor/35458
705 * mkdeps.c (munge): Quote '#' with a '\'.
706
d482a073
RW
7072008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
708
709 PR preprocessor/35379
710 * mkdeps.c (deps_write): Ensure the first target always appears
711 in the first column, without leading backslash newline. Avoid
712 some more extra whitespace.
713
185a6cc1
TS
7142008-02-25 Thiemo Seufer <ths@mips.com>
715
d482a073 716 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 717
2bf41bf0
TT
7182008-02-19 Tom Tromey <tromey@redhat.com>
719
720 * traditional.c (lex_identifier): Use CPP_HASHNODE.
721 * lex.c (lex_identifier): Use CPP_HASHNODE.
722 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
723 do-while.
724 * identifiers.c (alloc_node): Change return type.
725 (_cpp_init_hashtable): Don't cast 'alloc_node'.
726 (proxy_assertion_broken): New declaration.
727 (cpp_forall_identifiers): Move comment.
728 * line-map.c (linemap_add): Comment fix.
729 (linemap_line_start): Indentation fix.
730
765d600a
JJ
7312008-01-25 Jakub Jelinek <jakub@redhat.com>
732
733 PR preprocessor/34692
734 * macro.c (collect_args): Add pragma_buff argument. Push
735 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
736 than into arguments. Reset prevent_expansion and parsing_args
737 state at CPP_PRAGMA_EOL/CPP_EOF.
738 (funlike_invocation_p): Add pragma_buff argument, pass it through
739 to collect_args.
740 (enter_macro_context): Add result argument. Adjust
741 funlike_invocation_p caller. Emit all deferred pragma tokens
742 gathered during collect_args before the expansion, add a padding
743 token. Return 2 instead of 1 if any pragma tokens were prepended.
744 (cpp_get_token): If enter_macro_context returns 2, don't return
745 a padding token, instead cycle to grab CPP_PRAGMA token.
746 * directives.c (_cpp_handle_directive): If was_parsing_args
747 in deferred pragma, leave parsing_args and prevent_expansion as is.
748
ec46053b
TT
7492008-01-22 Tom Tromey <tromey@redhat.com>
750
765d600a 751 PR c++/34859
ec46053b
TT
752 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
753 __STDC_CONSTANT_MACROS.
754
681c6ab0
FF
7552008-01-07 Fred Fish <fnf@specifix.com>
756
765d600a 757 PR preprocessor/30363
681c6ab0
FF
758 * traditional.c (replace_args_and_push): Add local variable
759 cxtquote, calculate the replacement text size assuming a
760 worst case of every input character quoted with backslash,
761 and properly handle output quoting of quote characters in
762 actual arguments used in function-like macros.
763
33ae4837
TT
7642008-01-03 Tom Tromey <tromey@redhat.com>
765
765d600a 766 PR preprocessor/34602
33ae4837
TT
767 * directives.c (do_line): Don't try to spell EOF token.
768 (do_linemarker): Add comment.
769
675575f5
DD
7702007-12-11 DJ Delorie <dj@redhat.com>
771
772 * charset.c (convert_using_iconv): Close out any shift states,
773 returning to the initial state.
774
97f6bd40
TT
7752007-12-06 Tom Tromey <tromey@redhat.com>
776
765d600a 777 PR c/29172
97f6bd40
TT
778 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
779 type.
780 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
781 * files.c (FILE_HASH_POOL_SIZE): New macro.
782 (struct file_hash_entry_pool): New.
783 (destroy_all_cpp_files): New function.
784 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
785 (new_file_hash_entry): Update.
786 (free_file_hash_entries): New function.
787 (_cpp_cleanup_files): Call free_file_hash_entries and
788 destroy_all_cpp_files.
789 (cpp_clear_file_cache): New function.
790 * include/cpplib.h (cpp_clear_file_cache): Declare.
791
d56a25e1
TT
7922007-12-03 Tom Tromey <tromey@redhat.com>
793
765d600a 794 PR preprocessor/34288
d56a25e1
TT
795 * configure.ac, config.in: Rebuilt.
796 * configure.ac: Check for ssize_t.
797
607f74e9
TT
7982007-11-30 Tom Tromey <tromey@redhat.com>
799
765d600a 800 PR preprocessor/32868
607f74e9
TT
801 * macro.c (_cpp_create_definition): Special case
802 __STDC_FORMAT_MACROS.
803
b0f4807f
MM
8042007-11-16 Michael Matz <matz@suse.de>
805
806 * files.c (search_path_head): Fix check for absolute paths.
807
f1e20710
TT
8082007-11-11 Tom Tromey <tromey@redhat.com>
809
765d600a 810 PR c++/17557
f1e20710
TT
811 * include/cpplib.h (cpp_included_before): Declare.
812 * files.c (struct file_hash_entry) <location>: New field.
813 (_cpp_find_file): Initialize new field.
814 (make_cpp_dir): Likewise.
815 (cpp_included_before): New function.
816
f373b44d
TT
8172007-11-01 Tom Tromey <tromey@redhat.com>
818
765d600a 819 PR preprocessor/30805
f373b44d
TT
820 * macro.c (paste_tokens): Handle padding token.
821 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
822
5b9a40df
TT
8232007-10-31 Tom Tromey <tromey@redhat.com>
824
765d600a 825 PR preprocessor/30786
5b9a40df
TT
826 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
827 * directives.c (_cpp_do__Pragma): Return error status.
828 * internal.h (_cpp_do__Pragma): Update.
829 * directives.c (get__Pragma_string): Back up if EOF seen.
830
5ffeb913
TT
8312007-09-06 Tom Tromey <tromey@redhat.com>
832
833 * internal.h (struct cpp_reader) <invocation_location>: New
834 field.
835 (struct cpp_reader) <set_invocation_location>: Likewise.
836 * init.c (cpp_set_line_map): New function.
837 * line-map.c (linemap_add): Use linemap's allocator.
838 * include/line-map.h (GTY): Define.
839 (line_map_realloc): New typedef.
840 (struct line_map): Mark with GTY.
841 (struct line_maps): Likewise.
842 (struct line_maps) <maps>: Likewise.
843 (struct line_maps) <reallocator>: New field.
844 * include/symtab.h (GTY): Conditionally define.
845 * include/cpplib.h (cpp_set_line_map): Declare.
846 (cpp_get_token_with_location): Declare.
847 * macro.c (cpp_get_token): Set invocation_location on the reader.
848 (cpp_get_token_with_location): New function.
849
ac6b1c67
CF
8502007-08-30 Chao-ying Fu <fu@mips.com>
851
852 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
853 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
854 (cpp_classify_number): Support decimal fixed-point constants without
855 exponents.
856 Warn about fixed-point constants when -pedantic.
857 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
858 comments to support fixed-point values.
859 (CPP_N_FRACT, CPP_N_ACCUM): Define.
860
cda5e672
TT
8612007-08-18 Tom Tromey <tromey@redhat.com>
862
765d600a 863 PR preprocessor/32974
cda5e672
TT
864 * directives.c (parse_include): Don't check for EOL when
865 processing #pragma dependency.
866
ccfc4c91
OW
8672007-07-30 Ollie Wild <aaw@google.com>
868
869 * directives-only.c: New file.
870 * internal.h (struct _cpp_dir_only_callbacks): New.
871 (_cpp_preprocess_dir_only): New function.
872 * directives.c (_cpp_handle_directive): Check directives_only before
873 disabling execution of indented directives.
874 * files.c (_cpp_stack_file): Add directives_only check.
875 * include/cpplib.h (struct cpp_options): Add directives_only.
876 (cpp_init_special_builtins): New function.
877 * init.c (cpp_init_special_builtins): New function.
878 (cpp_init_builtins): Move builtin_array initialization to
879 cpp_init_special_builtins.
880 (post_options): Check directives_only before setting
881 pfile->state.prevent_expansion = 1.
882 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
883 is expanded inside a directive while -fdirectives-only is enabled.
884 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
885 (libcpp_a_SOURCES): Add directives-only.c.
886
a206413a
UB
8872007-07-04 Uros Bizjak <ubizjak@gmail.com>
888
889 * traditional.c (_cpp_scan_out_logical_line): Initialize
890 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
891 fmacro.args to prevent 'may be used uninitialized' warning.
892
c77cd3d1
UB
8932007-07-03 Uros Bizjak <ubizjak@gmail.com>
894
895 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
896 Add new constants.
897 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
898 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
899 for 'q' or 'Q' suffixes.
900
66938a1d
DS
9012007-06-17 Danny Smith <dannysmith@users.sourceforge.net
902
e1311401 903 * files.c (open_file): Correct typo.
66938a1d 904
71995ede
VP
9052007-06-16 Vladimir Prus <vladimir@codesourcery.com>
906
e1311401 907 * files.c (open_file): Prevent the call
71995ede
VP
908 for stat from overwriting errno.
909
84152c25
VP
9102007-06-09 Vladimir Prus <vladimir@codesourcery.com>
911
e1311401 912 * files.c (open_file): Account for the
84152c25
VP
913 fact that on windows, opening a directory gives
914 EACCES.
915
f7fd775f
JW
9162007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
917
918 PR preprocessor/23479
919 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
920 integer constants.
921 (append_digit): Likewise.
922 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
923 binary integer constants.
924
ed0e74e0
DK
9252007-05-31 Dave Korn <dave.korn@artimi.com>
926
927 PR preprocessor/14331
928 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
929
a702045a
OW
9302007-05-24 Ollie Wild <aaw@google.com>
931
932 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
933 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
934 (cpp_write_pch_state): Save __COUNTER__ state.
935 (cpp_valid_state): Check valid __COUNTER__ state.
936 (cpp_read_state): Read new __COUNTER__ state.
937 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
938 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
939 * internal.h (struct cpp_reader): Add counter member.
940
126e073b
SM
9412007-05-23 Simon Martin <simartin@users.sourceforge.net>
942
943 PR preprocessor/20077
944 * macro.c (create_iso_definition): Fixed the method to determine
945 whether the token-pasting operator appears at the beginning or the end
946 of a macro.
947
0b4cafec
ILT
9482007-05-21 Ian Lance Taylor <iant@google.com>
949
950 * internal.h (struct cpp_reader): Add new fields:
951 nonexistent_file_hash and nonexistent_file_ob.
952 * files.c: Include "obstack.h".
953 (find_file_in_dir): Before trying to open the file, look up the
954 path name in the hash table of nonexistent files. After failing
955 to open the file, add the path name to the hash table.
956 (_cpp_find_file): Cache the results of looking up the file name
957 starting with the quote and bracket chain heads, if we can.
958 (nonexistent_file_hash_eq): New static function.
959 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
960 pfile->nonexistent_file_ob.
961 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
962 pfile->nonexistent_file_ob.
963
30e04921
JJ
9642007-05-14 Janis Johnson <janis187@us.ibm.com>
965
5a6bb57e
JJ
966 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
967
30e04921
JJ
968 PR c/31924
969 * expr.c (interpret_float_suffix): Check for invalid suffix.
970
22a8a52d
EC
9712007-05-02 Eric Christopher <echristo@apple.com>
972
973 * expr.c (num_div_op): Don't overflow if the result is
974 zero.
975
fca35e1b
TT
9762007-05-02 Tom Tromey <tromey@redhat.com>
977
765d600a 978 PR preprocessor/28709
fca35e1b
TT
979 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
980
4cd97075
MM
9812007-03-30 Michael Meissner <michael.meissner@amd.com>
982
983 * directives.c (lex_macro_node_from_str): Fix alloca call to be
984 type correct.
985
121de39f
RH
9862007-03-30 Richard Henderson <rth@redhat.com>
987
988 * directives.c (lex_macro_node_from_str): New.
989 (cpp_push_definition, cpp_pop_definition): New.
990 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
991
4fcb360b
BM
9922007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
993
994 * Makefile.in: Add dummy install-pdf target.
995
67e64439
TT
9962007-01-30 Tom Tromey <tromey@redhat.com>
997
765d600a 998 PR preprocessor/30468
67e64439
TT
999 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
1000 './'.
1001
ee380365
TT
10022007-01-30 Tom Tromey <tromey@redhat.com>
1003
765d600a 1004 PR preprocessor/29966
ee380365
TT
1005 * macro.c (lex_expansion_token): Save and restore cpp_reader's
1006 cur_token.
1007 (_cpp_create_definition): Don't restore cur_token here.
1008 * lex.c (_cpp_lex_token): Added assertion.
1009
024abeb3
TT
10102007-01-27 Tom Tromey <tromey@redhat.com>
1011
1012 * configure: Rebuilt.
1013
ee1c2a10
TT
10142007-01-12 Tom Tromey <tromey@redhat.com>
1015
765d600a 1016 PR preprocessor/28227
ee1c2a10
TT
1017 * directives.c (lex_macro_node): Added 'is_def_or_undef'
1018 argument.
1019 (do_define): Update.
1020 (do_undef): Update.
1021 (do_ifdef): Update.
1022 (do_ifndef): Update.
1023
67214c16
PB
10242007-01-11 Paolo Bonzini <bonzini@gnu.org>
1025
1026 * configure: Regenerate.
1027
1aa6ca40
PB
10282007-01-11 Paolo Bonzini <bonzini@gnu.org>
1029
1030 * configure: Regenerate.
1031
705e2d28
TT
10322007-01-04 Tom Tromey <tromey@redhat.com>
1033
765d600a 1034 PR preprocessor/28165
705e2d28
TT
1035 * internal.h (cpp_in_primary_file): New function.
1036 * directives.c (do_include_next): Use cpp_in_primary_file.
1037 (do_pragma_once): Likewise.
1038 (do_pragma_system_header): Likewise.
1039
7af45bd4
ILT
10402006-12-29 Ian Lance Taylor <iant@google.com>
1041
1042 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
1043 look backward at the end of the line unless we saw a backslash.
1044
9d30f270
JJ
10452006-12-29 Jakub Jelinek <jakub@redhat.com>
1046
1047 PR preprocessor/29612
1048 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
1049 only when new_sysp is non-zero.
1050
30b0edc0
TT
10512006-12-28 Tom Tromey <tromey@redhat.com>
1052
765d600a 1053 PR preprocessor/30001
30b0edc0
TT
1054 * charset.c (_cpp_convert_input): Check that to.len is greater
1055 than zero.
1056
85d9c13c
TS
10572006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1058
1059 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 1060 * configure: Rebuilt.
85d9c13c 1061
dfafdaa6
DG
10622006-11-01 Douglas Gregor <doug.gregor@gmail.com>
1063
1064 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
1065 for experimental C++0x mode.
1066 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
1067 adopted the preprocessor changes introduced in C99.
1068
0f45f0f5
JM
10692006-10-29 Joseph Myers <joseph@codesourcery.com>
1070
1071 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
1072 depending on --enable-targets=all.
1073 * configure: Regenerate.
1074
de000d22
JJ
10752006-10-12 Jakub Jelinek <jakub@redhat.com>
1076
1077 PR preprocessor/28709
1078 * macro.c (paste_tokens): Do error reporting here, use BUF with the
1079 spelled LHS token as opposed to spelling it again.
1080 (paste_all_tokens): Don't report errors here, just break on failure.
1081
b5422ad7
BM
10822006-10-10 Brooks Moses <bmoses@stanford.edu>
1083
1084 * Makefile.in: Added empty "pdf" target.
1085
aaf50ff2
GK
10862006-09-22 Geoffrey Keating <geoffk@apple.com>
1087
1088 * configure.ac: Make need_64_bit_hwint case for x86-darwin
1089 match exactly the glob in gcc/config.gcc.
1090 * configure: Regenerate.
1091
c663e301
JM
10922006-09-13 Joseph S. Myers <joseph@codesourcery.com>
1093
1094 PR c/28768
1095 PR preprocessor/14634
1096 * lex.c (lex_string): Pedwarn for unterminated literals.
1097
f7288899
EC
10982006-09-08 Eric Christopher <echristo@apple.com>
1099
1100 * configure.ac: Add 64-bit HWI support for i?86-darwin.
1101
b52dbbf8
SE
11022006-08-14 Steve Ellcey <sje@cup.hp.com>
1103
1104 PR c++/28288
1105 PR c++/14556
1106 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
1107 (CPP_LAST_EQ): Change.
1108 (CPP_LAST_PUNCTUATOR): Change.
1109 * expr.c (cpp_operator): Remove MIN and MAX.
1110 (reduce): Remove CPP_MIN and CPP_MAX.
1111 (num_binary_op): Ditto.
1112 * lex.c (_cpp_lex_direct): Ditto.
1113 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
1114
1c90c6f9
JJ
11152006-06-09 Jakub Jelinek <jakub@redhat.com>
1116
1117 PR preprocessor/27746
1118 * directives.c (do_pragma): Handle pragma with valid namespace
1119 and invalid name coming from macro expansion.
1120 * directives.c (destringize_and_run): Initialize next field in
1121 context.
1122
1123 PR c/27747
1124 PR c++/27748
1125 * directives.c (destringize_and_run): Set NO_EXPAND on the
1126 tokens.
1127
1128 * macro.c (_cpp_backup_tokens): Fix comment typo.
1129
5c3c3683
DJ
11302006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
1131
1132 * Makefile.in (CATALOGS): Add po/ prefix.
1133 * configure: Regenerated.
1134
b2bd74bc
CD
11352006-05-23 Carlos O'Donell <carlos@codesourcery.com>
1136
1137 * Makefile.in: Add install-html target. Add install-html to .PHONY
1138
be8ac3e2
GZ
11392006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
1140
1141 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
1142 * files.c (_cpp_get_file_stat): New function.
1143 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
1144 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
1145 * internal.h (_cpp_get_file_stat): Prototype.
1146 (struct cpp_buffer): Add timestamp.
1147
83900997
JJ
11482006-01-23 Jakub Jelinek <jakub@redhat.com>
1149
1150 PR preprocessor/25717
1151 * init.c (cpp_init_builtins): If __STDC__ will not change value
1152 between system headers and other sources, define it as a normal
1153 macro rather than a builtin.
1154 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
1155 cpp_in_system_header condition.
1156
11572006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
1158
1159 * Makefile.in: Use -MMD instead of -MD.
1160
bc4071dd
RH
11612006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
1162 Richard Henderson <rth@redhat.com>
1163
1164 Merge from gomp branch:
1165 * directives.c (struct pragma_entry): Add is_deferred. Add ident
1166 entry to value union.
1167 (end_directive): Don't eat the line if in_deferred_pragma.
1168 (run_directive): Remove pragma hacks.
1169 (insert_pragma_entry): Remove.
1170 (new_pragma_entry): New.
1171 (register_pragma_1): Split out of register_pragma. Only handle
1172 the lookup tree and return the new entry.
1173 (cpp_register_pragma): Fill in the pragma entry here.
1174 (cpp_register_deferred_pragma): New.
1175 (register_pragma_internal): New.
1176 (_cpp_init_internal_pragmas): Use register_pragma_internal.
1177 (do_pragma): Allow pragma expansion after namespace. For deferred
1178 pragmas, don't slurp the line into a string.
1179 (destringize_and_run): Save tokens for deferred pragmas.
1180 (cpp_handle_deferred_pragma): Remove.
1181 * macro.c (builtin_macro): Remove pragma token hack.
1182 (_cpp_push_token_context): Rename from push_token_context and export.
1183 * internal.h (struct lexer_state): Add pragma_allow_expansion.
1184 (_cpp_push_token_context): Declare.
1185 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
1186 a token. Update the line number correctly if so.
1187 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
1188 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
1189 * include/cpplib.h (PRAGMA_EOL): New.
1190 (CPP_TOKEN_FLD_PRAGMA): New.
1191 (struct cpp_token): Add val.pragma.
1192 (struct cpp_options): Remove defer_pragmas.
1193 (cpp_handle_deferred_pragma): Remove.
1194 (cpp_register_deferred_pragma): Declare.
1195
d09e893f
JJ
11962006-01-01 Jakub Jelinek <jakub@redhat.com>
1197
1198 PR c++/25294
1199 * directives.c (do_pragma): If pragma line ends with multi-line
1200 block comment, end the saved deferred pragma string before that
1201 comment. Handle embedded '\0' chars on the pragma line.
1202
ab84748a
VR
12032005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1204
1205 PR c++/23333
1206 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
1207
ad6ed77e
JG
12082005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
1209 Ben Elliston <bje@au.ibm.com>
1210
1211 * include/cpplib.h (CPP_N_DFLOAT): New.
1212 * expr.c (interpret_float_suffix): Identify df, dd, and dl
1213 suffixes as decimal floating point constants.
1214 (cpp_classify_number): Disallow hexadecimal DFP constants.
1215
ba096620 12162005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 1217 Ian Lance Taylor <ian@airs.com>
ba096620
GP
1218
1219 * include/cpplib.h (struct cpp_callbacks): Annotate error with
1220 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
1221
456b8ce5
UB
12222005-11-09 Per Bothner <per@bothner.com>
1223 Uros Bizjak <uros@kss-loka.si>
f7288899 1224
456b8ce5
UB
1225 PR c/24101
1226 * init.c (read_original_filename): Temporarily set
1227 state.in_directive before calling _cpp_lex_direct for
1228 CPP_HASH tokens.
1229
5571f74f
JW
12302005-11-03 James E Wilson <wilson@specifix.com>
1231
1232 PR preprocessor/24202
1233 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
1234
a63607ed
JM
12352005-11-04 Joseph S. Myers <joseph@codesourcery.com>
1236
1237 * include/cpplib.h (struct cpp_callbacks): Make error take
1238 va_list* parameter.
1239 * errors.c (cpp_error): Update call to callback.
1240
651ed942
AP
12412005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
1242
1243 PR preprocessor/22042
1244 * macro.c (_cpp_builtin_macro_text): Lower the needed max
1245 buffer size.
1246 (cpp_quote_string): Don't octalify non printable
1247 charactors.
1248
178b58b5
JM
12492005-11-03 Joseph S. Myers <joseph@codesourcery.com>
1250
1251 PR c++/17964
1252 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
1253 (struct cpp_callbacks): Add error.
1254 * errors.c (cpp_error): If client_diagnostic, use error callback.
1255 * charset.c (convert_escape): Don't use %03o in diagnostic.
1256
3ee5ed11 12572005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
1258
1259 PR preprocessor/15220
1260 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
1261 callers. Pass to open_file_failed.
1262 (open_file_failed): New parameter angle_brackets. Fix all callers.
1263 Use in print_dep assignment.
1264 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
1265 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 1266
077fc835
KH
12672005-10-08 Kazu Hirata <kazu@codesourcery.com>
1268
1269 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
1270 * configure: Regenerate.
1271
cbc43ae0
ILT
12722005-10-04 Ian Lance Taylor <ian@airs.com>
1273
1274 PR preprocessor/13726
1275 * directives.c (check_eol_return_comments): New static function.
1276 (parse_include): Add buf parameter. Change all callers.
1277 (do_include_common): If not discard comments, turn on
1278 save_comments. Pass collected comments to include callback.
1279 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
1280 include callback: cpp_token list.
1281
af15a2fe
JM
12822005-09-20 Joseph S. Myers <joseph@codesourcery.com>
1283
1284 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
1285 * init.c (struct lang_flags, lang_defaults): Add
1286 extended_identifiers.
1287 (cpp_set_lang): Use it.
1288 * lex.c (forms_identifier_p): Check extended_identifiers.
1289
f5eab47e
JJ
12902005-08-30 Jakub Jelinek <jakub@redhat.com>
1291
1292 PR preprocessor/20348
1293 PR preprocessor/20356
1294 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
1295 2004-06-05 changes.
1296
467129e6
KG
12972005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1298
1299 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
1300 -Wmissing-format-attribute.
1301
1302 * configure: Regenerate.
1303
200031d1
KC
13042005-06-29 Kelley Cook <kcook@gcc.gnu.org>
1305
1306 * all files: Update FSF address in copyright headers.
1307 * makeucnid.c (write_copyright): Update outputted FSF address.
1308
f610dd5f
ZW
13092005-06-13 Zack Weinberg <zack@codesourcery.com>
1310
1311 * configure.ac: Invoke ZW_CREATE_DEPDIR and
1312 ZW_PROG_COMPILER_DEPENDENCIES.
1313 * aclocal.m4, configure: Regenerate.
1314 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
1315 New variables.
1316 (distclean): Clean up $(DEPDIR) and its contents.
1317 (.c.o): Use $(COMPILE).
1318 Include $(DEPDIR)/*.Po for most object->header dependencies.
1319
c3f829c1
GDR
13202005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1321
1322 * configure.ac: Check declarations for asprintf and vasprintf.
1323 * config.in: Regenerate.
1324 * configure: Likewise.
1325
1326 * charset.c (conversion_loop): Use XRESIZEVEC.
1327 (convert_no_conversion): Likewise.
1328 (convert_using_iconv): Likewise.
1329 (init_iconv_desc): Cast return value of alloca.
1330 (cpp_host_to_exec_charset): Use XNEWVEC.
1331 (emit_numeric_escape): Use XRESIZEVEC.
1332 (cpp_interpret_string): Use XNEWVEC.
1333 (cpp_interpret_string): Use XRESIZEVEC.
1334 (_cpp_interpret_identifier): Cast return value of alloca.
1335 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
1336 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
1337 (parse_include): Use XNEWVEC.
1338 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 1339 "new_entry".
c3f829c1
GDR
1340 (save_registered_pragmas): Cast return value of xmemdup.
1341 (destringize_and_run): Same for alloca.
1342 (parse_assertion): Likewise.
1343 (do_assert): Cast allocated storage to proper type.
1344 (cpp_define): Likewise.
1345 (_cpp_define_builtin): Likewise.
1346 (cpp_undef): Likewise.
1347 (handle_assertion): Likewise.
1348 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
1349 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
1350 (CPP_UMINUS): Likewise.
1351 (struct cpp_operator): Rename from struct operator.
1352 (_cpp_expand_op_stack): Use XRESIZEVEC.
1353 * files.c (pch_open_file): Use XNEWVEC.
1354 (pch_open_file): Use XRESIZEVEC.
1355 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
1356 (dir_name_of_file): Use XNEWVEC.
1357 (make_cpp_file): Use XCNEW.
1358 (make_cpp_dir): Likewise.
1359 (allocate_file_hash_entries): USE XNEWVEC.
1360 (cpp_included): Cast return value of htab_find_with_hash.
1361 (append_file_to_dir): Use XNEWVEC.
1362 (read_filename_string): Likewise. Use XRESIZEVEC too.
1363 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
1364 (remap_filename): Use XNEWVEC.
1365 (struct pchf_entry): Move definition out of struct pchf_data.
1366 (_cpp_save_file_entries): Use XCNEWVAR.
1367 (_cpp_read_file_entries): Use XNEWVAR.
1368 * identifiers.c (alloc_node): Use XOBNEW.
1369 * init.c (cpp_create_reader): Use XCNEW.
1370 (cpp_init_builtins): Cast of b->value to enum builtin_type.
1371 (read_original_directory): Cast return value of alloca.
1372 * lex.c (add_line_note): Use XRESIZEVEC.
1373 (warn_about_normalization): Use XNEWVEC.
1374 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
1375 (new_buff): Use XNEWVEC.
1376 * line-map.c (linemap_add): Use XRESIZEVEC.
1377 * macro.c (builtin_macro): Cast return value of alloca.
1378 (paste_tokens): Likewise.
1379 (expand_arg): Use XNEWVEC and XRESIZEVEC.
1380 (_cpp_save_parameter): Use XRESIZEVEC.
1381 (create_iso_definition): Cast allocated storage to proper type.
1382 (_cpp_create_definition): Likewise.
1383 (cpp_macro_definition): Use XRESIZEVEC.
1384 * makedepend.c (add_clm): Use XNEW.
1385 (add_dir): Likewise.
1386 * mkdeps.c (munge): Use XNEWVEC.
1387 (deps_init): Use XCNEW.
1388 (deps_add_target): Use XRESIZEVEC.
1389 (deps_add_default_target): Cast return value of alloca.
1390 (deps_add_dep): Use XRESIZEVEC.
1391 (deps_add_vpath): Likewise. Use XNEWVEC too.
1392 (deps_restore): Likewise.
1393 * pch.c (save_idents): Use XNEW and XNEWVEC.
1394 (cpp_save_state): Use XNEW.
1395 (count_defs): Cast return value of htab_find.
1396 (write_defs): Likewise.
1397 (cpp_write_pch_deps): Use XNEWVEC.
1398 (collect_ht_nodes): Use XRESIZEVEC.
1399 (cpp_valid_state): Use XNEWVEC.
1400 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
1401 * symtab.c (ht_create): Use XCNEW.
1402 (ht_lookup_with_hash): Cast return value of obstack_copy0.
1403 (ht_expand): Use XCNEWVEC.
1404 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
1405 (bool): Do not define if __cplusplus.
1406
1ed17cd5
ZW
14072005-05-12 Zack Weinberg <zack@codesourcery.com>
1408
1409 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
1410 (do_sccs): Delete function definition, #define to do_ident.
1411 (do_ident): Don't hardwire directive name.
1412
5a8c20ce
RK
14132005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
1414
1415 PR bootstrap/21230
1416 * configure: Regenerate.
1417
473c5bc9
AP
14182005-04-27 Andris Pavenis <pavenis@latnet.lv>
1419
1420 * files.c: Include io.h for DJGPP to get prototype of setmode.
1421
c1fc5047
PB
14222005-04-19 Per Bothner <per@bothner.com>
1423
1424 PR preprocessor/20907
1425 * line-map.c (linemap_line_start): Fix bug when we need to increse
1426 column_bits but can re-use the current line_map.
1427
042630ad
KG
14282005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1429
1430 * system.h (fopen, fdopen, freopen): Define these to the unlocked
1431 libiberty functions.
1432
0d667716
KG
14332005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1434
1435 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
1436 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
1437 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
1438 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
1439 _unlocked function.
1440 (fwrite_unlocked): Fix prototype.
1ed17cd5 1441
0d667716
KG
1442 * configure, config.in: Regenerate.
1443
cae064e7
JJ
14442005-04-05 Jakub Jelinek <jakub@redhat.com>
1445
1446 PR preprocessor/19475
1447 * macro.c (create_iso_definition): For < ISO C99, don't
1448 pedwarn if there is no whitespace between macro name and its
1449 replacement, but the replacement starts with a basic character
1450 set character.
1451
cbada204
AJ
14522005-03-28 Andreas Jaeger <aj@suse.de>
1453
1454 * lex.c (warn_about_normalization): Cast field width to int to
1455 avoid warning.
1456
f42eccdb
JM
14572005-03-19 Joseph S. Myers <joseph@codesourcery.com>
1458
1459 * configure.ac: Consistently use solaris2.1[0-9]* instead of
1460 solaris2.1[0-9].
1461 * configure: Regenerate.
1462
c79e602b
GK
14632005-03-15 Geoffrey Keating <geoffk@apple.com>
1464
1465 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
1466 UCN rather than printing an error.
1467
50668cf6
GK
14682005-03-14 Geoffrey Keating <geoffk@apple.com>
1469
6baba9bb
GK
1470 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
1471
14722005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 1473
50668cf6
GK
1474 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
1475 * charset.c: Update for new format of ucnid.h.
1476 (ucn_valid_in_identifier): Update for new format of ucnid.h.
1477 Add NST parameter, and update it; update callers.
1478 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
1479 with cpp_error.
1480 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
1481 * internal.h (struct normalize_state): New.
1482 (INITIAL_NORMALIZE_STATE): New.
1483 (NORMALIZE_STATE_RESULT): New.
1484 (NORMALIZE_STATE_UPDATE_IDNUM): New.
1485 (_cpp_valid_ucn): New.
1486 * lex.c (warn_about_normalization): New.
1487 (forms_identifier_p): Add normalize_state parameter, update callers.
1488 (lex_identifier): Add normalize_state parameter, update callers. Keep
1489 the state current.
1490 (lex_number): Likewise.
1491 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
1492 it with warn_about_normalization.
1493 * makeucnid.c: New.
1494 * ucnid.h: Replace.
1495 * ucnid.pl: Remove.
1496 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
1497 comments about obsolete version of C++.
1498 * include/cpplib.h (enum cpp_normalize_level): New.
1499 (struct cpp_options): Add warn_normalize field.
1500
47e20491
GK
15012005-03-11 Geoffrey Keating <geoffk@apple.com>
1502
1503 * directives.c (glue_header_name): Update call to cpp_spell_token.
1504 * internal.h (_cpp_interpret_identifier): New.
1505 * charset.c (_cpp_interpret_identifier): New.
1506 (_cpp_valid_ucn): Allow UCN version of '$'.
1507 * lex.c (lex_identifier): Add extra parameter to indicate if initial
1508 character was '$' or '\'. Support identifiers with UCNs.
1509 (forms_identifier_p): Allow UCNs.
1510 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
1511 (utf8_to_ucn): New.
1512 (cpp_spell_token): Add FORSTRING parameter. Use it.
1513 (cpp_token_as_text): Update call to cpp_spell_token.
1514 (cpp_output_token): Write UCNs back out.
1515 (stringify_arg): Update call to cpp_spell_token.
1516 (paste_tokens): Likewise.
1517 (cpp_macro_definition): Likewise.
1518 * macro.c (stringify_arg): Likewise.
1519 (paste_tokens): Likewise.
1520 (cpp_macro_definition): Likewise.
1521 * include/cpplib.h: Add parameter to cpp_spell_token.
1522
73096711
JJ
15232005-03-04 Jakub Jelinek <jakub@redhat.com>
1524
1525 PR bootstrap/20282
1526 PR bootstrap/20305
1527 * macro.c (replace_args, cpp_get_token): Copy whole
1528 cpp_token_u instead of just cpp_string field from it.
1529
2203a881
DP
15302005-02-28 Devang Patel <dpatel@apple.com>
1531
1532 * directives.c (do_line): Save sysp early before line table is
1533 realloc'ed.
1ed17cd5 1534
c5ff069d
ZW
15352005-02-20 Zack Weinberg <zack@codesourcery.com>
1536
1537 PR 18785
1538 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1539 (cpp_host_to_exec_charset): New function.
1540 * include/cpplib.h: Declare cpp_host_to_exec_charset.
1541
04c90eea
DP
15422005-02-19 Devang Patel <dpatel@apple.com>
1543
1544 * charset.c (_cpp_convert_input): Check '\r' before inserting
1545 '\n' at the end.
c5ff069d 1546
6da55c00
EC
15472005-02-15 Eric Christopher <echristo@redhat.com>
1548
1549 PR preprocessor/19077
1550 * macro.c (cpp_macro_definition): Move handling of whitespace
1551 to PREV_WHITE conditional. Remove overloading of len
1552 variable.
1553
31c3e631
KH
15542005-02-14 Kazu Hirata <kazu@cs.umass.edu>
1555
1556 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1557 traditional.c: Update copyright.
1558
be0f1e54
PB
15592005-02-14 Paolo Bonzini <bonzini@gnu.org>
1560
1561 PR bootstrap/19818
1562 * configure.ac: Check for declaration of basename and getopt.
1563 * config.in: Regenerate.
1564 * configure: Regenerate.
1565 * internal.h (ustrcspn): New.
1566 * macro.c (create_iso_definition): Fix allocation of memory.
1567 (padding_token): Add cast to remove const-ness.
1568 * pch.c (cpp_read_state): Use ustrcspn.
1569
ecddfb39
MS
15702005-02-08 Mike Stump <mrs@apple.com>
1571
1572 * files.c (pchf_adder): Remove.
1573 (struct pchf_adder_info): Likewise.
1574 (_cpp_save_file_entries): Write out all files so that #import works.
1575
9fcdd891
JM
15762005-01-23 Joseph S. Myers <joseph@codesourcery.com>
1577
1578 * configure: Regenerate.
1579
ecfd72e7
TS
15802005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1581
1582 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1583
6c25a4f7 1584 * include/cpplib.h: Also update copyright years.
c5ff069d 1585
942926ad
GK
15862005-01-03 Geoffrey Keating <geoffk@apple.com>
1587
1588 * files.c (_cpp_find_file): Add files found by search_path_exhausted
1589 to the list of all files.
1590
a2566ae9
GDR
15912005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1592
1593 * internal.h: Update references to Cpp lib filenames.
1594 * directives.c: Likewise.
1595 * init.c: Likewise.
1596 * macro.c: Likewise.
1597 * traditional.c: Likewise.
1598
1b449375
EB
15992004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
1600
1601 PR preprocessor/15167
1602 * files.c (destroy_cpp_file): New function.
1603 (should_stack_file): Make a new file if the
1604 compared file is still stacked.
1605
28303828
NN
16062004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
1607
c5ff069d 1608 PR preprocessor/17610
28303828
NN
1609 * directives.c (do_include_common): Error out if an empty filename
1610 is given for #include (or #include_next or #import).
1611
c812785a
RS
16122004-11-27 Roger Sayle <roger@eyesopen.com>
1613 Zack Weinberg <zack@codesourcery.com>
1614
1615 * internal.h: Replace all uses of uchar with unsigned char.
1616 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
1617 with !IN_GCC, so uchar is only defined whilst building libcpp.
1618
f91eaa01
KC
16192004-11-24 Kelley Cook <kcook@gcc.gnu.org>
1620
1621 * aclocal.m4: Regenerate.
1622
f78ce0c2
RS
16232004-11-24 Roger Sayle <roger@eyesopen.com>
1624
1625 PR preprocessor/15824
1626 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1627 directly, instead of the non-existant "system.h" and "ansidecl.h".
1628 * configure: Regenerate.
1629
b5b3e36a 16302004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1631 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
1632
1633 * internal.h (struct lexer_state): Add in_deferred_pragma.
1634 * directives.c (struct pragma_entry): Add allow_expansion.
1635 (insert_pragma_entry): Take allow_expansion flag.
1636 (register_pragma): Likewise.
1637 (cpp_register_pragma): Likewise.
1638 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1639 (do_pragma): Honor allow_expansion.
1640 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1641 * include/cpplib.h (cpp_register_pragma): Update prototype.
1642
a8e68029 16432004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1644 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
1645
1646 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1647 need_64bit_hwint=yes.
1648 * configure: Regenerate.
1649
50f47ee0
JM
16502004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1651
1652 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1653 po/$(PACKAGE).pot.
1654 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1655 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1656 Remove local srcdir path from generated file.
1657
968e08d6 16582004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 1659 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
1660
1661 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1662 as well.
1663
3da3d587
ZW
16642004-10-27 Zack Weinberg <zack@codesourcery.com>
1665
1666 PR 18075
1667 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1668 (cpp_handle_deferred_pragma): Add cast to silence warning.
1669
ac24fc25
JM
16702004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1671
1672 * errors.c (_cpp_begin_message): Print "error: " for errors.
1673
7731405b
AJ
16742004-10-10 Andreas Jaeger <aj@suse.de>
1675
1676 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1677 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1678
646544e3
AP
16792004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1680
1681 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1682 used.
1683 (cpp_read_state): Remove unused variables, m, d and mac_count.
1684
67a74146
PB
16852004-09-29 Per Bothner <per@bothner.com>
1686
1687 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1688 cb.line_change. Otherwise do_pragma will call the line_change
1689 call-back with a meaningless line number.
1690
018a4785
ZW
16912004-09-24 Zack Weinberg <zack@codesourcery.com>
1692
1693 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1694 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1695 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1696 * aclocal.m4, configure: Regenerate.
1697 * init.c: Include localedir.h.
1698 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1699 (DEFS): Delete.
1700 (.c.o): Use $(ALL_CFLAGS).
1701 (localedir.h, localedir.hs): New rules.
1702 (clean): Use rm -rf to remove directories.
1703 (distclean): Also delete localedir.h and localedir.hs.
1704 (init.o): Update dependencies.
1705
88fa57d7
KC
17062004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1707
1708 * Makefile.in (aclocal.m4): Update dependencies.
1709 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1710 * aclocal.m4, configure: Regenerate.
1711
8f8e9aa5
ZW
17122004-09-17 Zack Weinberg <zack@codesourcery.com>
1713
a29f62d9
ZW
1714 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1715 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1716 Some other comments in this file also tweaked.
1717
8f8e9aa5
ZW
1718 * directives.c (do_pragma): Save current buffer position
1719 before lexing the pragma keywords; don't call
1720 _cpp_backup_tokens in the defer_pragmas case.
1721
a2981930
PB
17222004-09-15 Per Bothner <per@bothner.com>
1723
1724 * include/line-map.h (line_map_start): Add parameter names so
1725 preceding comment makes sense.
1726 (linemap_add): Remove from comment mention of non-existing parameter.
1727
21b11495
ZW
17282004-09-09 Matt Austern <austern@apple.com>
1729 Zack Weinberg <zack@codesourcery.com>
1730
1731 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1732 prefixes throughout. Add entry for PRAGMA. Remove
1733 unnecessary "= 0" from EQ.
1734 (enum cpp_ttype): Adjust OP and TK definitions to restore
1735 prefixes, via token-paste.
1736 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1737 Change from #defines to additional cpp_ttype enumerators.
1738 (struct cpp_options): Add defer_pragmas.
1739 (cpp_handle_deferred_pragma): Prototype new interface.
1740
1741 * internal.h (struct cpp_reader): Add directive_result.
1742 * directives.c (struct pragma_entry): Add is_internal field;
1743 give boolean fields type bool.
1744 (start_directive): Initialize pfile->directive_result.type.
1745 (_cpp_do__Pragma): Likewise.
1746 (run_directive): Do not crash if pfile->buffer->prev is NULL.
1747 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1748 from it.
1749 (register_pragma): New static function, bulk of former
1750 cpp_register_pragma here; add 'internal' argument, pass along
1751 to insert_pragma_entry.
1752 (cpp_register_pragma): Now a wrapper around register_pragma which
1753 always passes false for 'internal' argument.
1754 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1755 true for 'internal'.
1756 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1757 an internal pragma, save text till the end of the line as a CPP_PRAGMA
1758 token instead of executing the pragma.
1759 (cpp_handle_deferred_pragma): New interface.
1760 * lex.c (token_spellings): Adjust OP and TK definitions to
1761 match changes to cpplib.h.
1762 (_cpp_lex_token): Check for a directive-result token and
1763 return it if present.
1764 (cpp_token_val_index): Handle CPP_PRAGMA.
1765 * macro.c (cpp_builtin_macro_text): Correct comment.
1766 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1767
0fd9e8dd
SB
17682004-09-06 Serge Belyshev <belyshev@lubercy.com>
1769
1770 PR preprocessor/14699
1771 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1772 from size_t to double.
1773
39b8ce7f
AS
17742004-08-28 Andreas Schwab <schwab@suse.de>
1775 Andreas Jaeger <aj@suse.de>
1776
1777 * configure.ac: Set PACKAGE correctly.
1778 * configure: Regenerated.
1779
5d1f4b27
PB
17802004-08-25 Paolo Bonzini <bonzini@gnu.org>
1781
1782 * Makefile.in: Add back top_builddir.
1783
078e3ffe
PB
17842004-08-25 Paolo Bonzini <bonzini@gnu.org>
1785
1786 * configure.ac: Replace Automake macro invocations
1787 with manual Autoconf checks and substitutions.
1788 * configure: Regenerate.
1789 * aclocal.m4: Regenerate.
1790 * config.in: Regenerate.
1791 * Makefile.am: Removed.
1792 * Makefile.in: Heavy simplification and reorganization.
1793
b3f8d95d
MM
17942004-08-09 Mark Mitchell <mark@codesourcery.com>
1795
1796 * configure.ac (arm*-*-eabi*): New target.
1797 (arm*-*-symbianelf*): Likewise.
1798 * configure: Regenerated.
1799
72bb2c39
BI
18002004-07-24 Bernardo Innocenti <bernie@develer.com>
1801
1802 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1803 * directives.c: Use XNEW-family macros from libiberty.
1804 * lex.c: Likewise.
1805 * macro.c: Likewise.
1806 * cpplib.h (cpp_deps_style): Export enum with name.
1807
21b11495 18082004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 1809
21b11495 1810 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 1811
a23ee064
AP
18122004-07-16 Andris Pavenis <pavenis@latnet.lv>
1813
1814 PR preprocessor/16366
1815 * internal.h (struct cpp_reader): New field dir_hash.
1816 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1817 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1818
a09d4744
NB
18192004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
1820
1821 PR preprocessor/16192
1822 PR preprocessor/15913
1823 PR preprocessor/15572
1824 * expr.c (_cpp_parse_expr): Handle remaining cases where an
1825 expression is missing.
1826 * init.c (post_options): Traditional cpp doesn't do // comments.
1827
f58f7def
PB
18282004-06-30 Per Bothner <per@bothner.com>
1829
1830 * include/line-map.h (fileline): Remove old typedef.
1831 * internal.h (struct cpp_reader): Use source_location typedef instead.
1832
e83d8d43
ZW
18332004-06-26 Zack Weinberg <zack@codesourcery.com>
1834
1835 Partially revert patch of 2004-06-05.
1836 * files.c (search_cache): Remove pfile argument. Don't check
1837 for file that would be found by "" or <> search here...
1838 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1839 Do not apply directory-of-current-file correction to files
1840 found by this check. Rearrange code slightly.
1841
c0d578e6
GK
18422004-06-21 Geoffrey Keating <geoffk@apple.com>
1843
1844 * files.c (should_stack_file): Correct swapped parameters to call
1845 to cb.read_pch.
1846 * pch.c (cpp_valid_state): Handle -fpreprocessed.
1847
159d5224
PB
18482004-06-15 Paolo Bonzini <bonzini@gnu.org>
1849
1850 * Makefile.in: Regenerate with automake 1.8.5.
1851 * aclocal.m4: Likewise.
1852 * configure: Regenerate.
1853
2fac9c01
ZW
18542004-06-11 Zack Weinberg <zack@codesourcery.com>
1855
1856 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1857 * configure, config.in: Regenerate.
1858 * system.h: Unconditionally define bool as unsigned char,
1859 BOOL_BITFIELD as unsigned int.
1860 * .cvsignore: New file.
1861
d8044160
GK
18622004-06-09 Geoffrey Keating <geoffk@apple.com>
1863
1864 * traditional.c (push_replacement_text): Set macro->traditional.
1865 (save_replacement_text): Likewise.
1866 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1867 (struct save_macro_item): Delete.
1868 (struct save_macro_data): Use a character array not the previous
1869 structured format.
1870 (save_macros): Save macro as text not as internal structures.
1871 (cpp_prepare_state): Update for changes to save_macro_data.
1872 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 1873 -D macros as text.
d8044160
GK
1874 * macro.c (create_iso_definition): Honour alloc_subobject.
1875 Clear traditional flag.
1876 (_cpp_create_definition): Honour alloc_subobject.
1877 * lex.c (cpp_token_val_index): New.
1878 * internal.h: Include cpp-id-data.h.
1879 (uchar): Move definition to cpp-id-data.h.
1880 (U): Likewise.
1881 (cpp_macro): Likewise.
1882 * directives.c (struct answer): Move to cpp-id-data.h.
1883 (do_assert): Honour alloc_subobject.
2cf22451
ZW
1884
1885 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
1886 * include/cpplib.h (struct cpp_string): Add GTY marker.
1887 (enum cpp_token_fld_kind): New.
1888 (struct cpp_token): Add GTY markers.
1889 (cpp_token_val_index): Prototype.
1890 (CPP_HASHNODE_VALUE_IDX): New.
1891 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
1892 * include/cpp-id-data.h: New file.
d8044160 1893
0ca8e815
PB
18942004-06-09 Paolo Bonzini <bonzini@gnu.org>
1895
1896 * Makefile.am (all-local): New.
1897 * Makefile.in: Regenerate.
1898
b51fa00f
RS
18992004-06-06 Roger Sayle <roger@eyesopen.com>
1900
1901 * Makefile.am (LIBICONV): Declare.
1902 (makedepend_LDADD): Use LIBICONV.
1903 * Makefile.in: Regenerate.
1904
5e2f3f39
AP
19052004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
1906
1907 * Makefile.am (LIBINTL): Declare
1908 (makedepend_LDADD): Use LIBINTL.
1909 * Makefile.in: Regenerate.
1910
c6e83800
ZW
19112004-06-05 Zack Weinberg <zack@codesourcery.com>
1912
1913 * Makefile.am: Add makedepend.
1914 * Makefile.in, aclocal.m4: Regenerate.
1915 * charset.c: Insert a space to avoid a warning.
1916 * directives.c: Include mkdeps.h.
1917 (_cpp_handle_directive): Reenable macro expander if appropriate.
1918 (undefine_macros): Inline body of _cpp_free_definition for speed.
1919 Do not call undef callback or _cpp_warn_if_unused_macro.
1920 (cpp_get_deps): New interface.
1921 * files.c (search_cache): Add pfile argument. Check for file
1922 that would be found by "" or <> search here...
1923 (_cpp_find_file): ...not here. Correct recorded start_dir of
1924 files found by directory-of-current-file search that would be
1925 found by "" or <> search.
1926 * init.c (cpp_add_dependency_target): Delete.
1927 * internal.h (struct lexer_state): Add discarding_output flag.
1928 * lex.c (lex_identifier): Compute hash function while scanning.
1929 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
1930 directives.
1931 * makedepend.c: New file.
1932 * mkdeps.c (struct deps): Add vpath vector.
1933 (apply_vpath, deps_add_vpath): New function.
1934 (deps_free): Free vpath vector.
1935 (deps_add_dep, deps_add_target): Use apply_vpath.
1936 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
1937 (ht_lookup_with_hash): New function.
1938 * cpplib.h, mkdeps.h: Update prototypes.
1939 * symtab.h: Update prototypes.
1940 (HT_HASHSTEP, HT_FINISH): New macros.
1941
b453c95f
GK
19422004-05-29 Geoffrey Keating <geoffk@apple.com>
1943
1944 * symtab.c (ht_create): Set entries_owned.
1945 (ht_destroy): Honour entries_owned.
1946 (ht_expand): Likewise.
1947 (ht_load): New.
2cf22451
ZW
1948 * include/symtab.h (struct ht): New field 'entries_owned'
1949 (ht_load): New prototype.
b453c95f 1950
963e23c5
PB
19512004-05-26 Paolo Bonzini <bonzini@gnu.org>
1952
1953 PR bootstrap/15651
1954 * configure.ac: Fix m4 quoting when picking
1955 the size of HOST_WIDE_INT.
1956 * configure: Regenerate.
1957
0429bc77
PB
19582004-05-25 Paolo Bonzini <bonzini@gnu.org>
1959
1960 * Makefile.am: the correct directory for
1961 gettext include files is given by @INCINTL@.
1962 * Makefile.in: Regenerate.
1963
c86dd7db
PB
19642004-05-24 Paolo Bonzini <bonzini@gnu.org>
1965
1966 * system.h [!ENABLE_NLS]: dgettext takes two
1967 parameters.
1968
4f4e53dd
PB
19692004-05-23 Paolo Bonzini <bonzini@gnu.org>
1970
1971 Moved libcpp from the gcc subdirectory to the toplevel.
1972 * Makefile.am: New file.
1973 * Makefile.in: Regenerate.
1974 * configure.ac: New file.
1975 * configure: Regenerate.
1976 * config.in: Regenerate.
1977 * charset.c: Moved from gcc/cppcharset.c. Add note about
1978 brokenness of input charset detection. Adjust for change
1979 in name of cppucnid.h.
1980 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
1981 * expr.c: Moved from gcc/cppexp.c.
1982 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
1983 Remove #define of O_BINARY, it is in system.h.
1984 * identifiers.c: Moved from gcc/cpphash.c.
1985 * internal.h: Moved from gcc/cpphash.h. Change header
1986 guard name. All other files adjusted to match name change.
1987 * init.c: Moved from gcc/cppinit.c.
1988 (init_library) [ENABLE_NLS]: Call bindtextdomain.
1989 * lex.c: Moved from gcc/cpplex.c.
1990 * directives.c: Moved from gcc/cpplib.c.
1991 * macro.c: Moved from gcc/cppmacro.c.
1992 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
1993 * traditional.c: Moved from gcc/cpptrad.c.
1994 * ucnid.h: Moved from gcc/cppucnid.h. Change header
1995 guard name.
1996 * ucnid.pl: Moved from gcc/cppucnid.pl.
1997 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
1998 guard name.
1999 * symtab.c: Moved from gcc/hashtable.c.
2000 * line-map.c: Moved from gcc. Do not include intl.h.
2001 * mkdeps.c: Moved from gcc.
2002 * system.h: New file.
2cf22451
ZW
2003 * include/cpplib.h: Moved from gcc. Change header guard name.
2004 * include/line-map.h: Moved from gcc. Change header guard name.
2005 * include/mkdeps.h: Moved from gcc. Change header guard name.
2006 * include/symtab.h: Moved from gcc/hashtable.h. Change header
2007 guard name.