]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
re PR fortran/43040 (Wrong decl for mathbuiltins -> wrong code with LTO)
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
a9429e29
LB
12010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2
3 * include/symtab.h (ht_identifier_ptr): New.
4
c3f247f4
RW
52010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
6 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7
8 PR bootstrap/42798
9 * configure.ac: Check for declaration of 'basename(char *)'.
10 * configure: Regenerate.
11 * config.in: Regenerate.
12
2778d766
JM
132010-04-25 Joseph Myers <joseph@codesourcery.com>
14
15 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
16 * init.c (lang_defaults): Add entries for new language variants.
17 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
18 variants.
19
d8a12e84
MLI
202010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
21
22 PR cpp/43195
23 * files.c (report_missing_guard): Test for #pragma once.
24
87cf0651
SB
252010-04-07 Simon Baldwin <simonb@google.com>
26
27 * directives.c (do_diagnostic): Add warning reason argument,
28 call appropriate error reporting function for code.
29 (directive_diagnostics): Call specific warning functions with
30 warning reason where appropriate.
31 (do_error, do_warning, do_pragma_dependency): Add warning reason
32 argument to do_diagnostic calls.
33 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
34 _cpp_create_definition): Call specific warning functions with
35 warning reason where appropriate.
36 * Makefile.in: Add new diagnostic functions to gettext translations.
37 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
38 to error callback.
39 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
40 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
41 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
42 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
43 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
44 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
45 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
46 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
47 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
48 warning reason codes.
49 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
50 cpp_warning_with_line, cpp_pedwarning_with_line,
51 cpp_warning_with_line_syshdr): New specific error reporting functions.
52 * pch.c (cpp_valid_state): Call specific warning functions with
53 warning reason where appropriate.
54 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
55 diagnostic handlers.
56 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
57 cpp_warning_with_line, cpp_pedwarning_with_line,
58 cpp_warning_with_line_syshdr): New specific error reporting functions.
59 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
60 specific warning functions with warning reason where appropriate.
61 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
62 warn_about_normalization, lex_identifier_intern, lex_identifier,
63 _cpp_lex_direct): Ditto.
64 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
65 narrow_str_to_charconst): Ditto.
66
d947ada0
JJ
672010-04-06 Jakub Jelinek <jakub@redhat.com>
68
69 PR preprocessor/43642
70 * lex.c (lex_raw_string): Change type of TYPE variable to
71 unsigned char.
72
4d9e8446
RW
732010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
74
75 * aclocal.m4: Regenerate.
76
52150625
JM
772010-03-29 Jason Merrill <jason@redhat.com>
78
00a81b8b
JM
79 More N3077 raw string changes
80 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
81 strings.
82 * lex.c (bufring_append): Split out from...
83 (lex_raw_string): ...here. Undo trigraph and line splicing
84 transformations. Do process line notes in multi-line literals.
85 (_cpp_process_line_notes): Ignore notes that were already handled.
86
52150625
JM
87 Some raw string changes from N3077
88 * charset.c (cpp_interpret_string): Change inner delimiters to ().
89 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
90
709d7160
JJ
912010-02-11 Jakub Jelinek <jakub@redhat.com>
92
93 * init.c (read_original_filename): Don't call read_original_directory
94 if _cpp_handle_directive returns 0.
95
dadab4fd
JM
962010-01-01 Joseph Myers <joseph@codesourcery.com>
97
98 PR preprocessor/41947
99 * expr.c (cpp_classify_number): Give error for hexadecimal
100 floating-point constant with no digits before or after point.
101
3de8a540
AC
1022009-11-20 Arnaud Charlet <charlet@adacore.com>
103
104 * macro.c (enter_macro_context): Call cb.used callback if defined.
105 * directives.c (do_idef, do_ifndef): Ditto.
106 * include/cpplib.h (struct cpp_callbacks): Add used callback.
107
17e7cb85
KT
1082009-11-11 Kai Tietz <kai.tietz@onevision.com>
109
110 * directives.c (do_pragma_push_macro): New pragma handler.
111 (do_pragma_pop_macro): Likewise.
112 (_cpp_init_internal_pragmas): Add push_macro and
113 pop_macro handler to internal pragmas.
114 (lex_macro_node_from_str): Removed.
115 (cpp_push_definition): Replace lex_macro_node_from_str
116 by _cpp_lex_identifier.
117 (cpp_pop_definition): Likewise.
118 * internal.h (_cpp_lex_identifier): New prototype.
119 (def_pragma_macro): New structure.
120 (cpp_reader): New member pushed_macros.
121 * lex.c (_cpp_lex_identifier): New function.
122 (lex_identifier_intern): New function.
123 * init.c (cpp_create_reader): Initialize pushed_macros
124 member.
125 (cpp_destroy): Free elements in pushed_macros member.
126 * pch.c (_cpp_save_pushed_macros): New function.
127 (_cpp_restore_pushed_macros): Likewise.
128 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
129 (cpp_read_state): Use _cpp_restore_pushed_macros.
130
2c6e3f55
JJ
1312009-10-19 Jakub Jelinek <jakub@redhat.com>
132
133 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
134 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
135 and char32_cset_desc.
136 (converter_for_type): Handle CPP_UTF8STRING.
137 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
138 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
139 (parse_include): Reject raw strings.
140 * include/cpplib.h (CPP_UTF8STRING): New token type.
141 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
142 * lex.c (lex_raw_string): New function.
143 (lex_string): Handle u8 string literals, call lex_raw_string
144 for raw string literals.
145 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
146 sequences.
147 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
148
96c169e1
JJ
1492009-10-14 Jakub Jelinek <jakub@redhat.com>
150
151 PR preprocessor/41543
152 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
153 * line-map.c (linemap_init): Initialize highest_location and
154 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
155
30c99a9e
JM
1562009-10-09 Jason Merrill <jason@redhat.com>
157
158 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
159
2214382c
NV
1602009-10-09 Neil Vachharajani <nvachhar@google.com>
161
162 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
163 sccs.
164
e02222d2
LR
1652009-09-23 Loren J. Rittle <ljrittle@acm.org>
166
167 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
168 * configure: Rebuilt.
169
9a8a2b7a
RG
1702009-09-22 Richard Guenther <rguenther@suse.de>
171
172 PR pch/38987
173 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
174
74dc6a11
CD
1752009-09-18 Chris Demetriou <cgd@google.com>
176
177 PR preprocessor/28435:
178 * include/cpplib.h (struct cpp_options): Add new member
179 deps.need_preprocessor_output.
180 * files.c (open_file_failed): If preprocessor output is needed
181 always report an error.
182
933608b7
KT
1832009-09-13 Kai Tietz <kai.tietz@onevision.com>
184
185 * configure.ac: Set for i?86-w64-mingw*
186 need_64bit_hwint to yes.
187 * configure: Regenerated.
188
86373e7e
JM
1892009-09-10 Jason Merrill <jason@redhat.com>
190
191 * directives.c (cpp_define): constify.
192
fd2ab214
ILT
1932009-09-02 Ian Lance Taylor <iant@google.com>
194
195 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
196
df58e648
RW
1972009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
198
199 * configure.ac (AC_PREREQ): Bump to 2.64.
200
5213506e
RW
2012009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
202
203 * aclocal.m4: Regenerate.
204 * config.in: Regenerate.
205 * configure: Regenerate.
206
709a22df
TT
2072009-08-17 Tom Tromey <tromey@redhat.com>
208
209 PR preprocessor/41067:
210 * charset.c (convert_escape): Add missing ":" to error text.
211
0c539b47
DR
2122009-07-27 Douglas B Rupp <rupp@gnat.com>
213
214 * include/cpplib.h (INO_T_CPP): New macro.
215 (struct cpp_dir): Use it.
216
2b69c841
JQ
2172009-07-20 Jerry Quinn <jlquinn@optonline.net>
218
219 PR regression/40800
220 * configure.ac: Use = instead of == for testing
221 ENABLE_BUILD_WITH_CXX.
222 * configure: Rebuild.
223
f1bf410c
JQ
2242009-07-17 Jerry Quinn <jlquinn@optonline.net>
225
226 * directives.c (do_linemarker, do_line): Use CPP_STRING for
227 ignored enum value.
228 * files.c (find_file_in_dir): Add cast from void* to char*.
229 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
230 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
231 warnings.
232 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
233 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
234 COMPILER_FLAGS): New.
235 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
236 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
237 instead of ALL_CFLAGS.
238 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
239 from other warnings. Add -Wc++-compat to C-specific warnings.
240 Check for --enable-build-with-cxx. Set and substitute
241 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
242 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
243 AC_CHECK_HEADERS.
244 * configure: Rebuild.
245 * include/cpp-id-data.h: Remove extern "C".
246 * include/line-map.h: Likewise.
247 * include/mkdeps.h: Likewise.
248 * include/symtab.h: Likewise.
249 * internal.h: Likewise.
250
a28fbdba
MLI
2512009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
252
253 * directives.c (parse_include): Add location argument. Update all
254 calls.
255 (parse_answer): Likewise.
256 (do_include_common): Error with exact location.
257 (parse_assertion): Likewise.
258
b506a5a2
MLI
2592009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
260
261 * expr.c (num_div_op): Take explicit location.
262
7d8847a4
ILT
2632009-06-17 Ian Lance Taylor <iant@google.com>
264
265 * include/cpplib.h (progname): Don't declare.
266
3d8b2a98
ILT
2672009-06-12 Ian Lance Taylor <iant@google.com>
268
269 * include/cpplib.h (struct cpp_options): Add
270 warn_cxx_operator_names field.
271 (NODE_WARN_OPERATOR): Define.
272 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
273 type to 6 bits.
274 * init.c (mark_named_operators): Add flags parameter.
275 (cpp_post_options): Pick flags value to pass to
276 mark_named_operators.
277 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
278 identifier is an operator name in C++.
279
e74fe492
AH
2802009-06-01 Aldy Hernandez <aldyh@redhat.com>
281
282 * include/line-map.h (LAST_SOURCE_COLUMN): New.
283
4851089f
ILT
2842009-06-01 Ian Lance Taylor <iant@google.com>
285
286 * include/cpp-id-data.h: Add extern "C".
287 * include/line-map.h: Likewise.
288 * include/mkdeps.h: Likewise.
289 * include/symtab.h: Likewise.
290 * internal.h: Likewise.
291
7e5487a2
ILT
2922009-05-15 Ian Lance Taylor <iant@google.com>
293
294 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
295 builtin_type. Change all uses.
296
00b0c19b
MLI
2972009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
298
299 PR cpp/36674
300 * directives (do_linemarker): Compensate for the increment in
301 location that occurs when we reach the end of line.
302 * files (_cpp_stack_include): Mention _cpp_find_file in the
303 comment.
304
9a0c6187
JM
3052009-05-10 Joseph Myers <joseph@codesourcery.com>
306
307 * include/cpplib.h (enum cpp_token_fld_kind): Add
308 CPP_TOKEN_FLD_TOKEN_NO.
309 (struct cpp_macro_arg, struct cpp_identifier): Define.
310 (union cpp_token_u): Use struct cpp_identifier for identifiers.
311 Use struct cpp_macro_arg for macro arguments. Add token_no for
312 CPP_PASTE token numbers.
313 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
314 do_pragma_poison, parse_assertion): Use val.node.node in place of
315 val.node.
316 * expr.c (parse_defined, eval_token): Use val.node.node in place
317 of val.node.
318 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
319 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
320 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
321 place of val.arg_no. Use val.node.node in place of val.node.
322 * macro.c (replace_args, cpp_get_token, parse_params,
323 lex_expansion_token, create_iso_definition, cpp_macro_definition):
324 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
325 Use val.node.node in place of val.node.
326
9e322bc1
JM
3272009-05-03 Joseph Myers <joseph@codesourcery.com>
328
329 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
330 UTF-8 sequences.
331
f88d0772
JM
3322009-04-25 Joseph Myers <joseph@codesourcery.com>
333
334 PR preprocessor/39559
335 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
336 constants larger than intmax_t in C99 mode.
337
d1b38208
TG
3382009-04-21 Taras Glek <tglek@mozilla.com>
339
340 * include/cpp-id-data.h: Update GTY annotations to new syntax.
341 * include/cpplib.h: Likewise.
342 * include/line-map.h: Likewise.
343 * include/symtab.h: Likewise.
344
cfc93532
MLI
3452009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
346
347 PR c++/14875
348 * lex.c (cpp_type2name): Take a flags parameter. Call
349 cpp_named_operator2name for named operators and cpp_digraph2name
350 for digraphs.
351 (cpp_digraph2name): New.
352 (cpp_spell_token): Use it.
353 (cpp_output_token): Likewise.
354 * include/cpplib.h (cpp_type2name): Update declaration.
355 * init.c (cpp_named_operator2name): New.
356 * internal.h (cpp_named_operator2name): Declare.
357
9c650d90
MLI
3582009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
359
360 PR c++/13358
361 * init.c (cpp_create_reader): Wlong_long is disabled by default.
362 * expr.c (cpp_classify_number): Give different messages for C and
363 C++ front-ends.
364
aa508502
JM
3652009-04-19 Joseph Myers <joseph@codesourcery.com>
366
367 PR preprocessor/20078
368 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
369 field.
370 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
371 (struct cpp_token): Change flags to unsigned short.
372 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
373 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
374 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
375 tokens.
376 * macro.c (macro_real_token_count): New.
377 (enter_macro_context, replace_args): Use macro_real_token_count.
378 (create_iso_definition): Record whitespace surrounding and digraph
379 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
380 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
381 multiple consecutive ## tokens.
382 (_cpp_create_definition): Initialize extra_tokens.
383 (cpp_macro_definition): Use macro_real_token_count.
384
61cc8223
JM
3852009-04-18 Joseph Myers <joseph@codesourcery.com>
386
387 * directives.c (parse_include): Pass true to check_eol.
388
c7f9c0b9
JM
3892009-04-18 Joseph Myers <joseph@codesourcery.com>
390
391 PR preprocessor/39646
392 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
393 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
394 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
395 place of LC_RENAME.
396
a5cb563b
JM
3972009-04-18 Joseph Myers <joseph@codesourcery.com>
398
399 PR preprocessor/39647
400 * directives.c (check_eol): Add parameter expand.
401 (do_undef, parse_include, do_line, do_linemarker, do_ident,
402 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
403 do_else, do_endif, do_assert, do_unassert): All callers changed.
404 Pass true from do_line, false elsewhere.
405
18f41a1b
JM
4062009-04-12 Joseph Myers <joseph@codesourcery.com>
407
408 PR preprocessor/31869
409 * macro.c (stringify_arg): Handle NULL source token in padding
410 token where previous padding token did not have source token with
411 preceding whitespace.
412
748086b7
JJ
4132009-04-09 Jakub Jelinek <jakub@redhat.com>
414
415 * Makefile.in: Change copyright header to refer to version
416 3 of the GNU General Public License and to point readers at the
417 COPYING3 file and the FSF's license web page.
418 * charset.c: Likewise.
419 * directives-only.c: Likewise.
420 * directives.c: Likewise.
421 * errors.c: Likewise.
422 * expr.c: Likewise.
423 * files.c: Likewise.
424 * identifiers.c: Likewise.
425 * include/cpp-id-data.h: Likewise.
426 * include/cpplib.h: Likewise.
427 * include/line-map.h: Likewise.
428 * include/mkdeps.h: Likewise.
429 * include/symtab.h: Likewise.
430 * init.c: Likewise.
431 * internal.h: Likewise.
432 * lex.c: Likewise.
433 * line-map.c: Likewise.
434 * macro.c: Likewise.
435 * makeucnid.c: Likewise.
436 * mkdeps.c: Likewise.
437 * pch.c: Likewise.
438 * symtab.c: Likewise.
439 * system.h: Likewise.
440 * traditional.c: Likewise.
441 * ucnid.tab: Likewise.
442 * ucnid.h: Regenerate.
443
eec49116
JJ
4442009-04-01 Janis Johnson <janis187@us.ibm.com>
445
839a3b8a
JJ
446 PR c/39027
447 * include/cpplib.h (CPP_N_DEFAULT): Define.
448 * expr.c (interpret_float_suffix): Recognize d or D for double,
449 return new value for default.
450 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
451
eec49116
JJ
452 PR c/33466
453 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
454 letters from decimal float and fixed-point suffixes.
455
47580d22
JM
4562009-03-31 Joseph Myers <joseph@codesourcery.com>
457
458 PR preprocessor/15638
459 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
460 invalid PCH.
461 (open_file_failed): Make error for missing file fatal.
462 * include/cpplib.h (CPP_DL_FATAL): Define.
463
5a2df0fa
SV
4642009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
465
466 PR preprocessor/31932:
467 * internal.h: Don't mention HAVE_ICONV_H.
468 * configure, config.in: Rebuild.
469 * configure.ac: Don't check for iconv.h.
470
c1a8a3c6
TT
4712009-03-30 Tom Tromey <tromey@redhat.com>
472
473 PR preprocessor/39512:
474 * line-map.c (linemap_init): Initialize 'reallocator' field.
475
a37a7b8a
JJ
4762009-03-30 Jakub Jelinek <jakub@redhat.com>
477
478 PR target/39558
479 * macro.c (cpp_get_token): If macro_to_expand returns NULL
480 and used some tokens, add CPP_PADDING before next token.
481
148e4216
JM
4822009-03-29 Joseph Myers <joseph@codesourcery.com>
483
484 PR preprocessor/34695
485 * makedepend.c: Remove.
486 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
487 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
488 * directives.c (cpp_errors): Remove.
489 * errors.c (print_location, _cpp_begin_message, v_message):
490 Remove.
491 (cpp_error, cpp_error_with_line): Always use error callback.
492 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
493 * include/cpplib.h (cpp_options): Remove pedantic_errors,
494 inhibit_warnings, warn_system_headers, inhibit_errors,
495 warnings_are_errors, client_diagnostic.
496 (cpp_callbacks): Add extra arguments to error callback; make it
497 return bool.
498 (cpp_finish): Return void.
499 (cpp_destroy): Remove inaccurate comment about return value.
500 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
501 (CPP_DL_NOTE): Define.
502 * include/line-map.h (linemap_print_containing_files): Remove.
503 * init.c (cpp_finish): Do not check for or return number of
504 errors.
505 * internal.h (cpp_reader): Remove errors field.
506 * line-map.c (linemap_print_containing_files): Remove.
507 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
508 about previous definition. Only emit it if previous diagnostic
509 was emitted.
510
f1450211
JM
5112009-03-28 Joseph Myers <joseph@codesourcery.com>
512
513 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
514 mkinstalldirs.
515
8f5929e1
JJ
5162009-03-18 Jakub Jelinek <jakub@redhat.com>
517
518 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
519
4bb09c26
JM
5202009-02-21 Joseph Myers <joseph@codesourcery.com>
521
522 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
523 header name.
524 (_cpp_lex_direct): Handle this.
525
68c9ab45
RG
5262009-02-15 Richard Guenther <rguenther@suse.de>
527
528 Revert last change.
529
601b3e1a
RG
5302009-02-13 Richard Guenther <rguenther@suse.de>
531
532 * configure.ac: Enable LFS.
533 * configure: Re-generate.
534 * config.in: Likewise.
535
fc0cd180
BE
5362009-01-05 Ben Elliston <bje@au.ibm.com>
537
538 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
539 (.po.pox): Likewise.
540 (po/$(PACKAGE).pot): Likewise.
541
db89a3be
AO
5422008-12-10 Alexandre Oliva <aoliva@redhat.com>
543
544 PR target/37033
545 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
546 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
547
cc955282
JM
5482008-11-29 Joseph Myers <joseph@codesourcery.com>
549
550 * lex.c (cpp_token_len): Use 6 as default length.
551
47960aaf
MLI
5522008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
553
554 * expr.c (struct op): Add location.
555 (_cpp_parse_expr): Propagate locations throught the stack
556 of expressions.
557 (reduce): Likewise.
558 (check_promotion): Use explicit location in errors.
559
631d0d36
MG
5602008-10-05 Matthew Gingell <gingell@adacore.com>
561 Arnaud Charlet <charlet@adacore.com>
562
563 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
564 (cpp_get_comments): New function.
565 * internal.h (struct cpp_reader): Add comments field.
566 * init.c (cpp_destroy): Free comments.
567 * lex.c (store_comment, cpp_get_comments): New functions.
568 (comments): New struct.
569 (save_comment): Store comments in comments struct.
570
c047ce93
SB
5712008-09-18 Simon Baldwin <simonb@google.com>
572
573 * include/cpplib.h (struct cpp_options): Add new boolean flag
574 warn_builtin_macro_redefined.
575 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
576 * (struct builtin_operator): Split out from previous struct builtin,
577 enhance extra const correctness.
578 * (struct builtin_macro): Split out from previous struct builtin, add
579 new always_warn_if_redefined flag, enhance const correctness.
580 * (mark_named_operators): Use struct builtin_operator.
581 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
582 to builtins selectively.
583 * macro.c (warn_of_redefinition): Return false if a builtin macro
584 is not flagged with NODE_WARN.
585
affa55c6
JJ
5862008-07-31 Jakub Jelinek <jakub@redhat.com>
587
588 PR preprocessor/36649
589 * files.c (struct report_missing_guard_data): New type.
590 (report_missing_guard): Put paths into an array instead of printing
591 them right away. Return 1 rather than 0.
592 (report_missing_guard_cmp): New function.
593 (_cpp_report_missing_guards): Sort and print paths gathered by
594 report_missing_guard callback.
595
3b8f20a1
MLI
5962008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
597
598 PR 28079
599 * directives.c (strtolinenum): Handle overflow.
600 (do_line): Give a warning if line number overflowed.
601 (do_linemarker): Update call to strtolinenum.
602
1bb64668
MLI
6032008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
604
605 * include/line-map.h (linenum_type): New typedef.
606 (struct line_map): Use it.
607 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
608 (SOURCE_COLUMN): Likewise.
609 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
610 source_location values in a variable of type linenum_type.
611 * directives.c (struct if_stack): Use linenum_type.
612 (strtoul_for_line): Rename as strtolinenum.
613 (do_line): Use linenum_type.
614 (do_linemarker): Use linenum_type and strtolinenum.
615 (_cpp_do_file_change): Use linenum_t.
616 * line-map.c (linemap_add): Likewise.
617 (linemap_line_start): Likewise.
618 * traditional.c (struct fun_macro): 'line' is a source_location.
619 * errors.c (print_location): Use linenum_type.
620 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
621 * internal.h (CPP_INCREMENT_LINE): Likewise.
622 * lex.c (_cpp_skip_block_comment): Use source_location.
623
5950c3c9
BE
6242008-07-14 Ben Elliston <bje@au.ibm.com>
625
626 * include/cpplib.h (NODE_CONDITIONAL): New.
627 (struct cpp_callbacks): New macro_to_expand field.
628 (struct cpp_hashnode): Adjust size of flags and type fields.
629 (cpp_peek_token): Prototype.
630 * lex.c (cpp_peek_token): New function.
631 (_cpp_temp_token): Protect pre-existing lookaheads.
632 * macro.c (cpp_get_token): Expand any conditional macros.
633 (_cpp_backup_tokens_direct): New.
634 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
635 (warn_of_redefinition): Silently allow redefined conditional
636 macros.
637 (_cpp_create_definition): Remove the conditional flag when a user
638 defines one of the conditional macros.
639 * internal.h (_cpp_backup_tokens_direct): New prototype.
640
e85edc9e
AH
6412008-06-13 Andrew Haley <aph@redhat.com>
642
643 PR preprocessor/33305
644 * macro.c (replace_args): Print a warning for empty macro
645 arguments in C89 and C++.
646
18c04407
RW
6472008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
648
649 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
650 * configure: Regenerate.
651
2d09b640
RW
6522008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
653
654 * Makefile.in (datarootdir): New variable.
655
0b7c73cc
L
6562008-06-12 H.J. Lu <hongjiu.lu@intel.com>
657
658 PR preprocessor/36479
659 * charset.c (cpp_interpret_string_notranslate): Also set
660 narrow_cset_desc.width.
661
cd985f66
JM
6622008-06-07 Joseph Myers <joseph@codesourcery.com>
663
664 * configure.ac (parisc*64*-*-*): Remove.
665 * configure: Regenerate.
666
d750887f
TT
6672008-05-30 Tom Tromey <tromey@redhat.com>
668
669 PR preprocessor/36320:
670 * internal.h (_cpp_parse_expr): Update.
671 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
672 messages.
673 * directives.c (do_if): Update.
674 (do_elif): Require expression if processing group.
675
c100de59
DS
6762008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
677
678 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
679
5d6342eb
TT
6802008-05-21 Tom Tromey <tromey@redhat.com>
681
682 PR preprocessor/27777:
683 * lex.c (cpp_output_line_to_string): New function.
684 * internal.h (_cpp_begin_message): Don't declare.
685 * errors.c (_cpp_begin_message): Now static.
686 * include/cpplib.h (cpp_output_line_to_string): Declare.
687 * directives.c (do_diagnostic): Rewrote. Use
688 cpp_output_line_to_string. Don't use _cpp_begin_message.
689
dae4174e
TT
6902008-05-21 Tom Tromey <tromey@redhat.com>
691
692 * include/symtab.h (HT_ALLOCED): Remove.
693 (ht_purge): Declare.
694 * symtab.c (DELETED): New define.
695 (ht_lookup): Update comment.
696 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
697 code. Use subobject allocator for strings, if it exists.
698 (ht_expand): Handle deleted entries.
699 (ht_forall): Likewise.
700 (ht_purge): New function.
701 (ht_dump_statistics): Print deletion statistics.
702
899015a0
TT
7032008-05-13 Tom Tromey <tromey@redhat.com>
704
705 PR preprocessor/22168:
706 * include/cpplib.h (struct cpp_options) <objc>: Update
707 documentation.
708 * expr.c (eval_token): Warn for use of assertions.
709 * directives.c (directive_diagnostics): Warn about extensions.
710 (DEPRECATED): New define.
711 (DIRECTIVE_TABLE): Use it.
712
71c10038
TT
7132008-05-06 Tom Tromey <tromey@redhat.com>
714
715 PR preprocessor/35313, PR preprocessor/36088:
716 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
717 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
718
2bd0fe3d
DM
7192008-05-04 David S. Miller <davem@davemloft.net>
720
721 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
722 * configure: Regenerate.
723
28f68625
DF
7242008-04-22 Daniel Franke <franke.daniel@gmail.com>
725
726 * include/cpplib.h (cpp_define_formatted): New.
727 * directives.c (cpp_define_formatted): New.
728
688e7a53
TT
7292008-04-21 Tom Tromey <tromey@redhat.com>
730
731 PR libcpp/33415:
732 * charset.c (_cpp_convert_input): Add buffer_start argument.
733 Ignore UTF-8 BOM if seen.
734 * internal.h (_cpp_convert_input): Add argument.
735 * files.c (struct _cpp_file) <buffer_start>: New field.
736 (destroy_cpp_file): Free buffer_start, not buffer.
737 (_cpp_pop_file_buffer): Likewise.
738 (read_file_guts): Update.
739
b6baa67d
KVH
7402008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
741
742 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
743 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
744 (struct cpp_options): Added uliterals.
745 (cpp_interpret_string): Update prototype.
746 (cpp_interpret_string_notranslate): Idem.
747 * charset.c (init_iconv_desc): New width member in cset_converter.
748 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
749 (convert_ucn): Idem.
750 (emit_numeric_escape): Idem.
751 (convert_hex): Idem.
752 (convert_oct): Idem.
753 (convert_escape): Idem.
754 (converter_for_type): New function.
755 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
756 (cpp_interpret_string_notranslate): Match changed prototype.
757 (wide_str_to_charconst): Use converter_for_type.
758 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
759 * directives.c (linemarker_dir): Macro U changed to UC.
760 (parse_include): Idem.
761 (register_pragma_1): Idem.
762 (restore_registered_pragmas): Idem.
763 (get__Pragma_string): Support CPP_STRING{16,32}.
764 * expr.c (eval_token): Support CPP_CHAR{16,32}.
765 * init.c (struct lang_flags): Added uliterals.
766 (lang_defaults): Idem.
767 * internal.h (struct cset_converter) <width>: New field.
768 (struct cpp_reader) <char16_cset_desc>: Idem.
769 (struct cpp_reader) <char32_cset_desc>: Idem.
770 * lex.c (digraph_spellings): Macro U changed to UC.
771 (OP, TK): Idem.
772 (lex_string): Add support for u'...', U'...', u"..." and U"...".
773 (_cpp_lex_direct): Idem.
774 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
775 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
776
deb984e6
PB
7772008-04-18 Paolo Bonzini <bonzini@gnu.org>
778
779 PR bootstrap/35457
780 * aclocal.m4: Regenerate.
781 * configure: Regenerate.
782
bf048bea
TT
7832008-04-17 Tom Tromey <tromey@redhat.com>
784
785 PR libcpp/34866:
786 * errors.c (cpp_error): Don't reference a token before the start
787 of the current run.
788
7f27b0f8
TT
7892008-04-16 Tom Tromey <tromey@redhat.com>
790
791 * Makefile.in (TAGS_SOURCES): New variable.
792 (TAGS): New target.
793
a1fcb9a1
KK
7942008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
795
796 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
797 and shbe-*-*.
798 * configure: Rebuilt.
799
93d45d9e
JM
8002008-04-02 Joseph Myers <joseph@codesourcery.com>
801
802 * include/cpplib.h (struct cpp_callbacks): Add used_define,
803 used_undef and before_define.
804 (NODE_USED): Define.
805 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
806 do_ifndef, cpp_pop_definition): Handle new flag and use new
807 callbacks.
808 * expr.c (parse_defined): Handle new flag and use new callbacks.
809 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
810 flag and use new callbacks.
811
d4c32e1d
JJ
8122008-04-01 Jakub Jelinek <jakub@redhat.com>
813
814 PR pch/13675
815 * files.c (struct _cpp_file): Remove pch field.
816 (pch_open_file): Don't set file->pch, just file->pchname.
817 (should_stack_file): After pfile->cb.read_pch call
818 free pchname and clear pchname, don't close file->fd.
819 Test file->pchname instead of file->pch. Don't close fd after cb.
820 (_cpp_stack_include): Test file->pchname instead of file->pch.
821
161031e3
TT
8222008-03-28 Tom Tromey <tromey@redhat.com>
823
824 * Makefile.in (POSTCOMPILE): New variable.
825 (.c.o): Use it.
826
14ccf800
TT
8272008-03-13 Tom Tromey <tromey@redhat.com>
828
829 PR libcpp/35322:
830 * directives.c (destringize_and_run): Set pfile->directive.
831
830465c6
MM
8322008-03-06 Markus Milleder <markus.milleder@generali.at>
833
834 PR preprocessor/35458
835 * mkdeps.c (munge): Quote '#' with a '\'.
836
d482a073
RW
8372008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
838
839 PR preprocessor/35379
840 * mkdeps.c (deps_write): Ensure the first target always appears
841 in the first column, without leading backslash newline. Avoid
842 some more extra whitespace.
843
185a6cc1
TS
8442008-02-25 Thiemo Seufer <ths@mips.com>
845
d482a073 846 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 847
2bf41bf0
TT
8482008-02-19 Tom Tromey <tromey@redhat.com>
849
850 * traditional.c (lex_identifier): Use CPP_HASHNODE.
851 * lex.c (lex_identifier): Use CPP_HASHNODE.
852 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
853 do-while.
854 * identifiers.c (alloc_node): Change return type.
855 (_cpp_init_hashtable): Don't cast 'alloc_node'.
856 (proxy_assertion_broken): New declaration.
857 (cpp_forall_identifiers): Move comment.
858 * line-map.c (linemap_add): Comment fix.
859 (linemap_line_start): Indentation fix.
860
765d600a
JJ
8612008-01-25 Jakub Jelinek <jakub@redhat.com>
862
863 PR preprocessor/34692
864 * macro.c (collect_args): Add pragma_buff argument. Push
865 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
866 than into arguments. Reset prevent_expansion and parsing_args
867 state at CPP_PRAGMA_EOL/CPP_EOF.
868 (funlike_invocation_p): Add pragma_buff argument, pass it through
869 to collect_args.
870 (enter_macro_context): Add result argument. Adjust
871 funlike_invocation_p caller. Emit all deferred pragma tokens
872 gathered during collect_args before the expansion, add a padding
873 token. Return 2 instead of 1 if any pragma tokens were prepended.
874 (cpp_get_token): If enter_macro_context returns 2, don't return
875 a padding token, instead cycle to grab CPP_PRAGMA token.
876 * directives.c (_cpp_handle_directive): If was_parsing_args
877 in deferred pragma, leave parsing_args and prevent_expansion as is.
878
ec46053b
TT
8792008-01-22 Tom Tromey <tromey@redhat.com>
880
765d600a 881 PR c++/34859
ec46053b
TT
882 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
883 __STDC_CONSTANT_MACROS.
884
681c6ab0
FF
8852008-01-07 Fred Fish <fnf@specifix.com>
886
765d600a 887 PR preprocessor/30363
681c6ab0
FF
888 * traditional.c (replace_args_and_push): Add local variable
889 cxtquote, calculate the replacement text size assuming a
890 worst case of every input character quoted with backslash,
891 and properly handle output quoting of quote characters in
892 actual arguments used in function-like macros.
893
33ae4837
TT
8942008-01-03 Tom Tromey <tromey@redhat.com>
895
765d600a 896 PR preprocessor/34602
33ae4837
TT
897 * directives.c (do_line): Don't try to spell EOF token.
898 (do_linemarker): Add comment.
899
675575f5
DD
9002007-12-11 DJ Delorie <dj@redhat.com>
901
902 * charset.c (convert_using_iconv): Close out any shift states,
903 returning to the initial state.
904
97f6bd40
TT
9052007-12-06 Tom Tromey <tromey@redhat.com>
906
765d600a 907 PR c/29172
97f6bd40
TT
908 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
909 type.
910 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
911 * files.c (FILE_HASH_POOL_SIZE): New macro.
912 (struct file_hash_entry_pool): New.
913 (destroy_all_cpp_files): New function.
914 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
915 (new_file_hash_entry): Update.
916 (free_file_hash_entries): New function.
917 (_cpp_cleanup_files): Call free_file_hash_entries and
918 destroy_all_cpp_files.
919 (cpp_clear_file_cache): New function.
920 * include/cpplib.h (cpp_clear_file_cache): Declare.
921
d56a25e1
TT
9222007-12-03 Tom Tromey <tromey@redhat.com>
923
765d600a 924 PR preprocessor/34288
d56a25e1
TT
925 * configure.ac, config.in: Rebuilt.
926 * configure.ac: Check for ssize_t.
927
607f74e9
TT
9282007-11-30 Tom Tromey <tromey@redhat.com>
929
765d600a 930 PR preprocessor/32868
607f74e9
TT
931 * macro.c (_cpp_create_definition): Special case
932 __STDC_FORMAT_MACROS.
933
b0f4807f
MM
9342007-11-16 Michael Matz <matz@suse.de>
935
936 * files.c (search_path_head): Fix check for absolute paths.
937
f1e20710
TT
9382007-11-11 Tom Tromey <tromey@redhat.com>
939
765d600a 940 PR c++/17557
f1e20710
TT
941 * include/cpplib.h (cpp_included_before): Declare.
942 * files.c (struct file_hash_entry) <location>: New field.
943 (_cpp_find_file): Initialize new field.
944 (make_cpp_dir): Likewise.
945 (cpp_included_before): New function.
946
f373b44d
TT
9472007-11-01 Tom Tromey <tromey@redhat.com>
948
765d600a 949 PR preprocessor/30805
f373b44d
TT
950 * macro.c (paste_tokens): Handle padding token.
951 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
952
5b9a40df
TT
9532007-10-31 Tom Tromey <tromey@redhat.com>
954
765d600a 955 PR preprocessor/30786
5b9a40df
TT
956 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
957 * directives.c (_cpp_do__Pragma): Return error status.
958 * internal.h (_cpp_do__Pragma): Update.
959 * directives.c (get__Pragma_string): Back up if EOF seen.
960
5ffeb913
TT
9612007-09-06 Tom Tromey <tromey@redhat.com>
962
963 * internal.h (struct cpp_reader) <invocation_location>: New
964 field.
965 (struct cpp_reader) <set_invocation_location>: Likewise.
966 * init.c (cpp_set_line_map): New function.
967 * line-map.c (linemap_add): Use linemap's allocator.
968 * include/line-map.h (GTY): Define.
969 (line_map_realloc): New typedef.
970 (struct line_map): Mark with GTY.
971 (struct line_maps): Likewise.
972 (struct line_maps) <maps>: Likewise.
973 (struct line_maps) <reallocator>: New field.
974 * include/symtab.h (GTY): Conditionally define.
975 * include/cpplib.h (cpp_set_line_map): Declare.
976 (cpp_get_token_with_location): Declare.
977 * macro.c (cpp_get_token): Set invocation_location on the reader.
978 (cpp_get_token_with_location): New function.
979
ac6b1c67
CF
9802007-08-30 Chao-ying Fu <fu@mips.com>
981
982 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
983 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
984 (cpp_classify_number): Support decimal fixed-point constants without
985 exponents.
986 Warn about fixed-point constants when -pedantic.
987 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
988 comments to support fixed-point values.
989 (CPP_N_FRACT, CPP_N_ACCUM): Define.
990
cda5e672
TT
9912007-08-18 Tom Tromey <tromey@redhat.com>
992
765d600a 993 PR preprocessor/32974
cda5e672
TT
994 * directives.c (parse_include): Don't check for EOL when
995 processing #pragma dependency.
996
ccfc4c91
OW
9972007-07-30 Ollie Wild <aaw@google.com>
998
999 * directives-only.c: New file.
1000 * internal.h (struct _cpp_dir_only_callbacks): New.
1001 (_cpp_preprocess_dir_only): New function.
1002 * directives.c (_cpp_handle_directive): Check directives_only before
1003 disabling execution of indented directives.
1004 * files.c (_cpp_stack_file): Add directives_only check.
1005 * include/cpplib.h (struct cpp_options): Add directives_only.
1006 (cpp_init_special_builtins): New function.
1007 * init.c (cpp_init_special_builtins): New function.
1008 (cpp_init_builtins): Move builtin_array initialization to
1009 cpp_init_special_builtins.
1010 (post_options): Check directives_only before setting
1011 pfile->state.prevent_expansion = 1.
1012 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1013 is expanded inside a directive while -fdirectives-only is enabled.
1014 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1015 (libcpp_a_SOURCES): Add directives-only.c.
1016
a206413a
UB
10172007-07-04 Uros Bizjak <ubizjak@gmail.com>
1018
1019 * traditional.c (_cpp_scan_out_logical_line): Initialize
1020 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1021 fmacro.args to prevent 'may be used uninitialized' warning.
1022
c77cd3d1
UB
10232007-07-03 Uros Bizjak <ubizjak@gmail.com>
1024
1025 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1026 Add new constants.
1027 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1028 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1029 for 'q' or 'Q' suffixes.
1030
66938a1d
DS
10312007-06-17 Danny Smith <dannysmith@users.sourceforge.net
1032
e1311401 1033 * files.c (open_file): Correct typo.
66938a1d 1034
71995ede
VP
10352007-06-16 Vladimir Prus <vladimir@codesourcery.com>
1036
e1311401 1037 * files.c (open_file): Prevent the call
71995ede
VP
1038 for stat from overwriting errno.
1039
84152c25
VP
10402007-06-09 Vladimir Prus <vladimir@codesourcery.com>
1041
e1311401 1042 * files.c (open_file): Account for the
84152c25
VP
1043 fact that on windows, opening a directory gives
1044 EACCES.
1045
f7fd775f
JW
10462007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
1047
1048 PR preprocessor/23479
1049 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
1050 integer constants.
1051 (append_digit): Likewise.
1052 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
1053 binary integer constants.
1054
ed0e74e0
DK
10552007-05-31 Dave Korn <dave.korn@artimi.com>
1056
1057 PR preprocessor/14331
1058 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
1059
a702045a
OW
10602007-05-24 Ollie Wild <aaw@google.com>
1061
1062 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
1063 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
1064 (cpp_write_pch_state): Save __COUNTER__ state.
1065 (cpp_valid_state): Check valid __COUNTER__ state.
1066 (cpp_read_state): Read new __COUNTER__ state.
1067 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
1068 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
1069 * internal.h (struct cpp_reader): Add counter member.
1070
126e073b
SM
10712007-05-23 Simon Martin <simartin@users.sourceforge.net>
1072
1073 PR preprocessor/20077
1074 * macro.c (create_iso_definition): Fixed the method to determine
1075 whether the token-pasting operator appears at the beginning or the end
1076 of a macro.
1077
0b4cafec
ILT
10782007-05-21 Ian Lance Taylor <iant@google.com>
1079
1080 * internal.h (struct cpp_reader): Add new fields:
1081 nonexistent_file_hash and nonexistent_file_ob.
1082 * files.c: Include "obstack.h".
1083 (find_file_in_dir): Before trying to open the file, look up the
1084 path name in the hash table of nonexistent files. After failing
1085 to open the file, add the path name to the hash table.
1086 (_cpp_find_file): Cache the results of looking up the file name
1087 starting with the quote and bracket chain heads, if we can.
1088 (nonexistent_file_hash_eq): New static function.
1089 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
1090 pfile->nonexistent_file_ob.
1091 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
1092 pfile->nonexistent_file_ob.
1093
30e04921
JJ
10942007-05-14 Janis Johnson <janis187@us.ibm.com>
1095
5a6bb57e
JJ
1096 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
1097
30e04921
JJ
1098 PR c/31924
1099 * expr.c (interpret_float_suffix): Check for invalid suffix.
1100
22a8a52d
EC
11012007-05-02 Eric Christopher <echristo@apple.com>
1102
1103 * expr.c (num_div_op): Don't overflow if the result is
1104 zero.
1105
fca35e1b
TT
11062007-05-02 Tom Tromey <tromey@redhat.com>
1107
765d600a 1108 PR preprocessor/28709
fca35e1b
TT
1109 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
1110
4cd97075
MM
11112007-03-30 Michael Meissner <michael.meissner@amd.com>
1112
1113 * directives.c (lex_macro_node_from_str): Fix alloca call to be
1114 type correct.
1115
121de39f
RH
11162007-03-30 Richard Henderson <rth@redhat.com>
1117
1118 * directives.c (lex_macro_node_from_str): New.
1119 (cpp_push_definition, cpp_pop_definition): New.
1120 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
1121
4fcb360b
BM
11222007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1123
1124 * Makefile.in: Add dummy install-pdf target.
1125
67e64439
TT
11262007-01-30 Tom Tromey <tromey@redhat.com>
1127
765d600a 1128 PR preprocessor/30468
67e64439
TT
1129 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
1130 './'.
1131
ee380365
TT
11322007-01-30 Tom Tromey <tromey@redhat.com>
1133
765d600a 1134 PR preprocessor/29966
ee380365
TT
1135 * macro.c (lex_expansion_token): Save and restore cpp_reader's
1136 cur_token.
1137 (_cpp_create_definition): Don't restore cur_token here.
1138 * lex.c (_cpp_lex_token): Added assertion.
1139
024abeb3
TT
11402007-01-27 Tom Tromey <tromey@redhat.com>
1141
1142 * configure: Rebuilt.
1143
ee1c2a10
TT
11442007-01-12 Tom Tromey <tromey@redhat.com>
1145
765d600a 1146 PR preprocessor/28227
ee1c2a10
TT
1147 * directives.c (lex_macro_node): Added 'is_def_or_undef'
1148 argument.
1149 (do_define): Update.
1150 (do_undef): Update.
1151 (do_ifdef): Update.
1152 (do_ifndef): Update.
1153
67214c16
PB
11542007-01-11 Paolo Bonzini <bonzini@gnu.org>
1155
1156 * configure: Regenerate.
1157
1aa6ca40
PB
11582007-01-11 Paolo Bonzini <bonzini@gnu.org>
1159
1160 * configure: Regenerate.
1161
705e2d28
TT
11622007-01-04 Tom Tromey <tromey@redhat.com>
1163
765d600a 1164 PR preprocessor/28165
705e2d28
TT
1165 * internal.h (cpp_in_primary_file): New function.
1166 * directives.c (do_include_next): Use cpp_in_primary_file.
1167 (do_pragma_once): Likewise.
1168 (do_pragma_system_header): Likewise.
1169
7af45bd4
ILT
11702006-12-29 Ian Lance Taylor <iant@google.com>
1171
1172 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
1173 look backward at the end of the line unless we saw a backslash.
1174
9d30f270
JJ
11752006-12-29 Jakub Jelinek <jakub@redhat.com>
1176
1177 PR preprocessor/29612
1178 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
1179 only when new_sysp is non-zero.
1180
30b0edc0
TT
11812006-12-28 Tom Tromey <tromey@redhat.com>
1182
765d600a 1183 PR preprocessor/30001
30b0edc0
TT
1184 * charset.c (_cpp_convert_input): Check that to.len is greater
1185 than zero.
1186
85d9c13c
TS
11872006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1188
1189 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 1190 * configure: Rebuilt.
85d9c13c 1191
dfafdaa6
DG
11922006-11-01 Douglas Gregor <doug.gregor@gmail.com>
1193
1194 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
1195 for experimental C++0x mode.
1196 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
1197 adopted the preprocessor changes introduced in C99.
1198
0f45f0f5
JM
11992006-10-29 Joseph Myers <joseph@codesourcery.com>
1200
1201 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
1202 depending on --enable-targets=all.
1203 * configure: Regenerate.
1204
de000d22
JJ
12052006-10-12 Jakub Jelinek <jakub@redhat.com>
1206
1207 PR preprocessor/28709
1208 * macro.c (paste_tokens): Do error reporting here, use BUF with the
1209 spelled LHS token as opposed to spelling it again.
1210 (paste_all_tokens): Don't report errors here, just break on failure.
1211
b5422ad7
BM
12122006-10-10 Brooks Moses <bmoses@stanford.edu>
1213
1214 * Makefile.in: Added empty "pdf" target.
1215
aaf50ff2
GK
12162006-09-22 Geoffrey Keating <geoffk@apple.com>
1217
1218 * configure.ac: Make need_64_bit_hwint case for x86-darwin
1219 match exactly the glob in gcc/config.gcc.
1220 * configure: Regenerate.
1221
c663e301
JM
12222006-09-13 Joseph S. Myers <joseph@codesourcery.com>
1223
1224 PR c/28768
1225 PR preprocessor/14634
1226 * lex.c (lex_string): Pedwarn for unterminated literals.
1227
f7288899
EC
12282006-09-08 Eric Christopher <echristo@apple.com>
1229
1230 * configure.ac: Add 64-bit HWI support for i?86-darwin.
1231
b52dbbf8
SE
12322006-08-14 Steve Ellcey <sje@cup.hp.com>
1233
1234 PR c++/28288
1235 PR c++/14556
1236 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
1237 (CPP_LAST_EQ): Change.
1238 (CPP_LAST_PUNCTUATOR): Change.
1239 * expr.c (cpp_operator): Remove MIN and MAX.
1240 (reduce): Remove CPP_MIN and CPP_MAX.
1241 (num_binary_op): Ditto.
1242 * lex.c (_cpp_lex_direct): Ditto.
1243 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
1244
1c90c6f9
JJ
12452006-06-09 Jakub Jelinek <jakub@redhat.com>
1246
1247 PR preprocessor/27746
1248 * directives.c (do_pragma): Handle pragma with valid namespace
1249 and invalid name coming from macro expansion.
1250 * directives.c (destringize_and_run): Initialize next field in
1251 context.
1252
1253 PR c/27747
1254 PR c++/27748
1255 * directives.c (destringize_and_run): Set NO_EXPAND on the
1256 tokens.
1257
1258 * macro.c (_cpp_backup_tokens): Fix comment typo.
1259
5c3c3683
DJ
12602006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
1261
1262 * Makefile.in (CATALOGS): Add po/ prefix.
1263 * configure: Regenerated.
1264
b2bd74bc
CD
12652006-05-23 Carlos O'Donell <carlos@codesourcery.com>
1266
1267 * Makefile.in: Add install-html target. Add install-html to .PHONY
1268
be8ac3e2
GZ
12692006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
1270
1271 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
1272 * files.c (_cpp_get_file_stat): New function.
1273 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
1274 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
1275 * internal.h (_cpp_get_file_stat): Prototype.
1276 (struct cpp_buffer): Add timestamp.
1277
83900997
JJ
12782006-01-23 Jakub Jelinek <jakub@redhat.com>
1279
1280 PR preprocessor/25717
1281 * init.c (cpp_init_builtins): If __STDC__ will not change value
1282 between system headers and other sources, define it as a normal
1283 macro rather than a builtin.
1284 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
1285 cpp_in_system_header condition.
1286
12872006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
1288
1289 * Makefile.in: Use -MMD instead of -MD.
1290
bc4071dd
RH
12912006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
1292 Richard Henderson <rth@redhat.com>
1293
1294 Merge from gomp branch:
1295 * directives.c (struct pragma_entry): Add is_deferred. Add ident
1296 entry to value union.
1297 (end_directive): Don't eat the line if in_deferred_pragma.
1298 (run_directive): Remove pragma hacks.
1299 (insert_pragma_entry): Remove.
1300 (new_pragma_entry): New.
1301 (register_pragma_1): Split out of register_pragma. Only handle
1302 the lookup tree and return the new entry.
1303 (cpp_register_pragma): Fill in the pragma entry here.
1304 (cpp_register_deferred_pragma): New.
1305 (register_pragma_internal): New.
1306 (_cpp_init_internal_pragmas): Use register_pragma_internal.
1307 (do_pragma): Allow pragma expansion after namespace. For deferred
1308 pragmas, don't slurp the line into a string.
1309 (destringize_and_run): Save tokens for deferred pragmas.
1310 (cpp_handle_deferred_pragma): Remove.
1311 * macro.c (builtin_macro): Remove pragma token hack.
1312 (_cpp_push_token_context): Rename from push_token_context and export.
1313 * internal.h (struct lexer_state): Add pragma_allow_expansion.
1314 (_cpp_push_token_context): Declare.
1315 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
1316 a token. Update the line number correctly if so.
1317 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
1318 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
1319 * include/cpplib.h (PRAGMA_EOL): New.
1320 (CPP_TOKEN_FLD_PRAGMA): New.
1321 (struct cpp_token): Add val.pragma.
1322 (struct cpp_options): Remove defer_pragmas.
1323 (cpp_handle_deferred_pragma): Remove.
1324 (cpp_register_deferred_pragma): Declare.
1325
d09e893f
JJ
13262006-01-01 Jakub Jelinek <jakub@redhat.com>
1327
1328 PR c++/25294
1329 * directives.c (do_pragma): If pragma line ends with multi-line
1330 block comment, end the saved deferred pragma string before that
1331 comment. Handle embedded '\0' chars on the pragma line.
1332
ab84748a
VR
13332005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1334
1335 PR c++/23333
1336 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
1337
ad6ed77e
JG
13382005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
1339 Ben Elliston <bje@au.ibm.com>
1340
1341 * include/cpplib.h (CPP_N_DFLOAT): New.
1342 * expr.c (interpret_float_suffix): Identify df, dd, and dl
1343 suffixes as decimal floating point constants.
1344 (cpp_classify_number): Disallow hexadecimal DFP constants.
1345
ba096620 13462005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 1347 Ian Lance Taylor <ian@airs.com>
ba096620
GP
1348
1349 * include/cpplib.h (struct cpp_callbacks): Annotate error with
1350 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
1351
456b8ce5
UB
13522005-11-09 Per Bothner <per@bothner.com>
1353 Uros Bizjak <uros@kss-loka.si>
f7288899 1354
456b8ce5
UB
1355 PR c/24101
1356 * init.c (read_original_filename): Temporarily set
1357 state.in_directive before calling _cpp_lex_direct for
1358 CPP_HASH tokens.
1359
5571f74f
JW
13602005-11-03 James E Wilson <wilson@specifix.com>
1361
1362 PR preprocessor/24202
1363 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
1364
a63607ed
JM
13652005-11-04 Joseph S. Myers <joseph@codesourcery.com>
1366
1367 * include/cpplib.h (struct cpp_callbacks): Make error take
1368 va_list* parameter.
1369 * errors.c (cpp_error): Update call to callback.
1370
651ed942
AP
13712005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
1372
1373 PR preprocessor/22042
1374 * macro.c (_cpp_builtin_macro_text): Lower the needed max
1375 buffer size.
1376 (cpp_quote_string): Don't octalify non printable
1377 charactors.
1378
178b58b5
JM
13792005-11-03 Joseph S. Myers <joseph@codesourcery.com>
1380
1381 PR c++/17964
1382 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
1383 (struct cpp_callbacks): Add error.
1384 * errors.c (cpp_error): If client_diagnostic, use error callback.
1385 * charset.c (convert_escape): Don't use %03o in diagnostic.
1386
3ee5ed11 13872005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
1388
1389 PR preprocessor/15220
1390 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
1391 callers. Pass to open_file_failed.
1392 (open_file_failed): New parameter angle_brackets. Fix all callers.
1393 Use in print_dep assignment.
1394 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
1395 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 1396
077fc835
KH
13972005-10-08 Kazu Hirata <kazu@codesourcery.com>
1398
1399 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
1400 * configure: Regenerate.
1401
cbc43ae0
ILT
14022005-10-04 Ian Lance Taylor <ian@airs.com>
1403
1404 PR preprocessor/13726
1405 * directives.c (check_eol_return_comments): New static function.
1406 (parse_include): Add buf parameter. Change all callers.
1407 (do_include_common): If not discard comments, turn on
1408 save_comments. Pass collected comments to include callback.
1409 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
1410 include callback: cpp_token list.
1411
af15a2fe
JM
14122005-09-20 Joseph S. Myers <joseph@codesourcery.com>
1413
1414 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
1415 * init.c (struct lang_flags, lang_defaults): Add
1416 extended_identifiers.
1417 (cpp_set_lang): Use it.
1418 * lex.c (forms_identifier_p): Check extended_identifiers.
1419
f5eab47e
JJ
14202005-08-30 Jakub Jelinek <jakub@redhat.com>
1421
1422 PR preprocessor/20348
1423 PR preprocessor/20356
1424 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
1425 2004-06-05 changes.
1426
467129e6
KG
14272005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1428
1429 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
1430 -Wmissing-format-attribute.
1431
1432 * configure: Regenerate.
1433
200031d1
KC
14342005-06-29 Kelley Cook <kcook@gcc.gnu.org>
1435
1436 * all files: Update FSF address in copyright headers.
1437 * makeucnid.c (write_copyright): Update outputted FSF address.
1438
f610dd5f
ZW
14392005-06-13 Zack Weinberg <zack@codesourcery.com>
1440
1441 * configure.ac: Invoke ZW_CREATE_DEPDIR and
1442 ZW_PROG_COMPILER_DEPENDENCIES.
1443 * aclocal.m4, configure: Regenerate.
1444 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
1445 New variables.
1446 (distclean): Clean up $(DEPDIR) and its contents.
1447 (.c.o): Use $(COMPILE).
1448 Include $(DEPDIR)/*.Po for most object->header dependencies.
1449
c3f829c1
GDR
14502005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1451
1452 * configure.ac: Check declarations for asprintf and vasprintf.
1453 * config.in: Regenerate.
1454 * configure: Likewise.
1455
1456 * charset.c (conversion_loop): Use XRESIZEVEC.
1457 (convert_no_conversion): Likewise.
1458 (convert_using_iconv): Likewise.
1459 (init_iconv_desc): Cast return value of alloca.
1460 (cpp_host_to_exec_charset): Use XNEWVEC.
1461 (emit_numeric_escape): Use XRESIZEVEC.
1462 (cpp_interpret_string): Use XNEWVEC.
1463 (cpp_interpret_string): Use XRESIZEVEC.
1464 (_cpp_interpret_identifier): Cast return value of alloca.
1465 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
1466 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
1467 (parse_include): Use XNEWVEC.
1468 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 1469 "new_entry".
c3f829c1
GDR
1470 (save_registered_pragmas): Cast return value of xmemdup.
1471 (destringize_and_run): Same for alloca.
1472 (parse_assertion): Likewise.
1473 (do_assert): Cast allocated storage to proper type.
1474 (cpp_define): Likewise.
1475 (_cpp_define_builtin): Likewise.
1476 (cpp_undef): Likewise.
1477 (handle_assertion): Likewise.
1478 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
1479 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
1480 (CPP_UMINUS): Likewise.
1481 (struct cpp_operator): Rename from struct operator.
1482 (_cpp_expand_op_stack): Use XRESIZEVEC.
1483 * files.c (pch_open_file): Use XNEWVEC.
1484 (pch_open_file): Use XRESIZEVEC.
1485 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
1486 (dir_name_of_file): Use XNEWVEC.
1487 (make_cpp_file): Use XCNEW.
1488 (make_cpp_dir): Likewise.
1489 (allocate_file_hash_entries): USE XNEWVEC.
1490 (cpp_included): Cast return value of htab_find_with_hash.
1491 (append_file_to_dir): Use XNEWVEC.
1492 (read_filename_string): Likewise. Use XRESIZEVEC too.
1493 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
1494 (remap_filename): Use XNEWVEC.
1495 (struct pchf_entry): Move definition out of struct pchf_data.
1496 (_cpp_save_file_entries): Use XCNEWVAR.
1497 (_cpp_read_file_entries): Use XNEWVAR.
1498 * identifiers.c (alloc_node): Use XOBNEW.
1499 * init.c (cpp_create_reader): Use XCNEW.
1500 (cpp_init_builtins): Cast of b->value to enum builtin_type.
1501 (read_original_directory): Cast return value of alloca.
1502 * lex.c (add_line_note): Use XRESIZEVEC.
1503 (warn_about_normalization): Use XNEWVEC.
1504 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
1505 (new_buff): Use XNEWVEC.
1506 * line-map.c (linemap_add): Use XRESIZEVEC.
1507 * macro.c (builtin_macro): Cast return value of alloca.
1508 (paste_tokens): Likewise.
1509 (expand_arg): Use XNEWVEC and XRESIZEVEC.
1510 (_cpp_save_parameter): Use XRESIZEVEC.
1511 (create_iso_definition): Cast allocated storage to proper type.
1512 (_cpp_create_definition): Likewise.
1513 (cpp_macro_definition): Use XRESIZEVEC.
1514 * makedepend.c (add_clm): Use XNEW.
1515 (add_dir): Likewise.
1516 * mkdeps.c (munge): Use XNEWVEC.
1517 (deps_init): Use XCNEW.
1518 (deps_add_target): Use XRESIZEVEC.
1519 (deps_add_default_target): Cast return value of alloca.
1520 (deps_add_dep): Use XRESIZEVEC.
1521 (deps_add_vpath): Likewise. Use XNEWVEC too.
1522 (deps_restore): Likewise.
1523 * pch.c (save_idents): Use XNEW and XNEWVEC.
1524 (cpp_save_state): Use XNEW.
1525 (count_defs): Cast return value of htab_find.
1526 (write_defs): Likewise.
1527 (cpp_write_pch_deps): Use XNEWVEC.
1528 (collect_ht_nodes): Use XRESIZEVEC.
1529 (cpp_valid_state): Use XNEWVEC.
1530 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
1531 * symtab.c (ht_create): Use XCNEW.
1532 (ht_lookup_with_hash): Cast return value of obstack_copy0.
1533 (ht_expand): Use XCNEWVEC.
1534 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
1535 (bool): Do not define if __cplusplus.
1536
1ed17cd5
ZW
15372005-05-12 Zack Weinberg <zack@codesourcery.com>
1538
1539 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
1540 (do_sccs): Delete function definition, #define to do_ident.
1541 (do_ident): Don't hardwire directive name.
1542
5a8c20ce
RK
15432005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
1544
1545 PR bootstrap/21230
1546 * configure: Regenerate.
1547
473c5bc9
AP
15482005-04-27 Andris Pavenis <pavenis@latnet.lv>
1549
1550 * files.c: Include io.h for DJGPP to get prototype of setmode.
1551
c1fc5047
PB
15522005-04-19 Per Bothner <per@bothner.com>
1553
1554 PR preprocessor/20907
1555 * line-map.c (linemap_line_start): Fix bug when we need to increse
1556 column_bits but can re-use the current line_map.
1557
042630ad
KG
15582005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1559
1560 * system.h (fopen, fdopen, freopen): Define these to the unlocked
1561 libiberty functions.
1562
0d667716
KG
15632005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1564
1565 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
1566 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
1567 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
1568 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
1569 _unlocked function.
1570 (fwrite_unlocked): Fix prototype.
1ed17cd5 1571
0d667716
KG
1572 * configure, config.in: Regenerate.
1573
cae064e7
JJ
15742005-04-05 Jakub Jelinek <jakub@redhat.com>
1575
1576 PR preprocessor/19475
1577 * macro.c (create_iso_definition): For < ISO C99, don't
1578 pedwarn if there is no whitespace between macro name and its
1579 replacement, but the replacement starts with a basic character
1580 set character.
1581
cbada204
AJ
15822005-03-28 Andreas Jaeger <aj@suse.de>
1583
1584 * lex.c (warn_about_normalization): Cast field width to int to
1585 avoid warning.
1586
f42eccdb
JM
15872005-03-19 Joseph S. Myers <joseph@codesourcery.com>
1588
1589 * configure.ac: Consistently use solaris2.1[0-9]* instead of
1590 solaris2.1[0-9].
1591 * configure: Regenerate.
1592
c79e602b
GK
15932005-03-15 Geoffrey Keating <geoffk@apple.com>
1594
1595 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
1596 UCN rather than printing an error.
1597
50668cf6
GK
15982005-03-14 Geoffrey Keating <geoffk@apple.com>
1599
6baba9bb
GK
1600 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
1601
16022005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 1603
50668cf6
GK
1604 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
1605 * charset.c: Update for new format of ucnid.h.
1606 (ucn_valid_in_identifier): Update for new format of ucnid.h.
1607 Add NST parameter, and update it; update callers.
1608 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
1609 with cpp_error.
1610 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
1611 * internal.h (struct normalize_state): New.
1612 (INITIAL_NORMALIZE_STATE): New.
1613 (NORMALIZE_STATE_RESULT): New.
1614 (NORMALIZE_STATE_UPDATE_IDNUM): New.
1615 (_cpp_valid_ucn): New.
1616 * lex.c (warn_about_normalization): New.
1617 (forms_identifier_p): Add normalize_state parameter, update callers.
1618 (lex_identifier): Add normalize_state parameter, update callers. Keep
1619 the state current.
1620 (lex_number): Likewise.
1621 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
1622 it with warn_about_normalization.
1623 * makeucnid.c: New.
1624 * ucnid.h: Replace.
1625 * ucnid.pl: Remove.
1626 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
1627 comments about obsolete version of C++.
1628 * include/cpplib.h (enum cpp_normalize_level): New.
1629 (struct cpp_options): Add warn_normalize field.
1630
47e20491
GK
16312005-03-11 Geoffrey Keating <geoffk@apple.com>
1632
1633 * directives.c (glue_header_name): Update call to cpp_spell_token.
1634 * internal.h (_cpp_interpret_identifier): New.
1635 * charset.c (_cpp_interpret_identifier): New.
1636 (_cpp_valid_ucn): Allow UCN version of '$'.
1637 * lex.c (lex_identifier): Add extra parameter to indicate if initial
1638 character was '$' or '\'. Support identifiers with UCNs.
1639 (forms_identifier_p): Allow UCNs.
1640 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
1641 (utf8_to_ucn): New.
1642 (cpp_spell_token): Add FORSTRING parameter. Use it.
1643 (cpp_token_as_text): Update call to cpp_spell_token.
1644 (cpp_output_token): Write UCNs back out.
1645 (stringify_arg): Update call to cpp_spell_token.
1646 (paste_tokens): Likewise.
1647 (cpp_macro_definition): Likewise.
1648 * macro.c (stringify_arg): Likewise.
1649 (paste_tokens): Likewise.
1650 (cpp_macro_definition): Likewise.
1651 * include/cpplib.h: Add parameter to cpp_spell_token.
1652
73096711
JJ
16532005-03-04 Jakub Jelinek <jakub@redhat.com>
1654
1655 PR bootstrap/20282
1656 PR bootstrap/20305
1657 * macro.c (replace_args, cpp_get_token): Copy whole
1658 cpp_token_u instead of just cpp_string field from it.
1659
2203a881
DP
16602005-02-28 Devang Patel <dpatel@apple.com>
1661
1662 * directives.c (do_line): Save sysp early before line table is
1663 realloc'ed.
1ed17cd5 1664
c5ff069d
ZW
16652005-02-20 Zack Weinberg <zack@codesourcery.com>
1666
1667 PR 18785
1668 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1669 (cpp_host_to_exec_charset): New function.
1670 * include/cpplib.h: Declare cpp_host_to_exec_charset.
1671
04c90eea
DP
16722005-02-19 Devang Patel <dpatel@apple.com>
1673
1674 * charset.c (_cpp_convert_input): Check '\r' before inserting
1675 '\n' at the end.
c5ff069d 1676
6da55c00
EC
16772005-02-15 Eric Christopher <echristo@redhat.com>
1678
1679 PR preprocessor/19077
1680 * macro.c (cpp_macro_definition): Move handling of whitespace
1681 to PREV_WHITE conditional. Remove overloading of len
1682 variable.
1683
31c3e631
KH
16842005-02-14 Kazu Hirata <kazu@cs.umass.edu>
1685
1686 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1687 traditional.c: Update copyright.
1688
be0f1e54
PB
16892005-02-14 Paolo Bonzini <bonzini@gnu.org>
1690
1691 PR bootstrap/19818
1692 * configure.ac: Check for declaration of basename and getopt.
1693 * config.in: Regenerate.
1694 * configure: Regenerate.
1695 * internal.h (ustrcspn): New.
1696 * macro.c (create_iso_definition): Fix allocation of memory.
1697 (padding_token): Add cast to remove const-ness.
1698 * pch.c (cpp_read_state): Use ustrcspn.
1699
ecddfb39
MS
17002005-02-08 Mike Stump <mrs@apple.com>
1701
1702 * files.c (pchf_adder): Remove.
1703 (struct pchf_adder_info): Likewise.
1704 (_cpp_save_file_entries): Write out all files so that #import works.
1705
9fcdd891
JM
17062005-01-23 Joseph S. Myers <joseph@codesourcery.com>
1707
1708 * configure: Regenerate.
1709
ecfd72e7
TS
17102005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1711
1712 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1713
6c25a4f7 1714 * include/cpplib.h: Also update copyright years.
c5ff069d 1715
942926ad
GK
17162005-01-03 Geoffrey Keating <geoffk@apple.com>
1717
1718 * files.c (_cpp_find_file): Add files found by search_path_exhausted
1719 to the list of all files.
1720
a2566ae9
GDR
17212005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1722
1723 * internal.h: Update references to Cpp lib filenames.
1724 * directives.c: Likewise.
1725 * init.c: Likewise.
1726 * macro.c: Likewise.
1727 * traditional.c: Likewise.
1728
1b449375
EB
17292004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
1730
1731 PR preprocessor/15167
1732 * files.c (destroy_cpp_file): New function.
1733 (should_stack_file): Make a new file if the
1734 compared file is still stacked.
1735
28303828
NN
17362004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
1737
c5ff069d 1738 PR preprocessor/17610
28303828
NN
1739 * directives.c (do_include_common): Error out if an empty filename
1740 is given for #include (or #include_next or #import).
1741
c812785a
RS
17422004-11-27 Roger Sayle <roger@eyesopen.com>
1743 Zack Weinberg <zack@codesourcery.com>
1744
1745 * internal.h: Replace all uses of uchar with unsigned char.
1746 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
1747 with !IN_GCC, so uchar is only defined whilst building libcpp.
1748
f91eaa01
KC
17492004-11-24 Kelley Cook <kcook@gcc.gnu.org>
1750
1751 * aclocal.m4: Regenerate.
1752
f78ce0c2
RS
17532004-11-24 Roger Sayle <roger@eyesopen.com>
1754
1755 PR preprocessor/15824
1756 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1757 directly, instead of the non-existant "system.h" and "ansidecl.h".
1758 * configure: Regenerate.
1759
b5b3e36a 17602004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1761 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
1762
1763 * internal.h (struct lexer_state): Add in_deferred_pragma.
1764 * directives.c (struct pragma_entry): Add allow_expansion.
1765 (insert_pragma_entry): Take allow_expansion flag.
1766 (register_pragma): Likewise.
1767 (cpp_register_pragma): Likewise.
1768 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1769 (do_pragma): Honor allow_expansion.
1770 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1771 * include/cpplib.h (cpp_register_pragma): Update prototype.
1772
a8e68029 17732004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1774 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
1775
1776 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1777 need_64bit_hwint=yes.
1778 * configure: Regenerate.
1779
50f47ee0
JM
17802004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1781
1782 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1783 po/$(PACKAGE).pot.
1784 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1785 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1786 Remove local srcdir path from generated file.
1787
968e08d6 17882004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 1789 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
1790
1791 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1792 as well.
1793
3da3d587
ZW
17942004-10-27 Zack Weinberg <zack@codesourcery.com>
1795
1796 PR 18075
1797 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1798 (cpp_handle_deferred_pragma): Add cast to silence warning.
1799
ac24fc25
JM
18002004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1801
1802 * errors.c (_cpp_begin_message): Print "error: " for errors.
1803
7731405b
AJ
18042004-10-10 Andreas Jaeger <aj@suse.de>
1805
1806 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1807 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1808
646544e3
AP
18092004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1810
1811 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1812 used.
1813 (cpp_read_state): Remove unused variables, m, d and mac_count.
1814
67a74146
PB
18152004-09-29 Per Bothner <per@bothner.com>
1816
1817 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1818 cb.line_change. Otherwise do_pragma will call the line_change
1819 call-back with a meaningless line number.
1820
018a4785
ZW
18212004-09-24 Zack Weinberg <zack@codesourcery.com>
1822
1823 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1824 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1825 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1826 * aclocal.m4, configure: Regenerate.
1827 * init.c: Include localedir.h.
1828 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1829 (DEFS): Delete.
1830 (.c.o): Use $(ALL_CFLAGS).
1831 (localedir.h, localedir.hs): New rules.
1832 (clean): Use rm -rf to remove directories.
1833 (distclean): Also delete localedir.h and localedir.hs.
1834 (init.o): Update dependencies.
1835
88fa57d7
KC
18362004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1837
1838 * Makefile.in (aclocal.m4): Update dependencies.
1839 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1840 * aclocal.m4, configure: Regenerate.
1841
8f8e9aa5
ZW
18422004-09-17 Zack Weinberg <zack@codesourcery.com>
1843
a29f62d9
ZW
1844 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1845 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1846 Some other comments in this file also tweaked.
1847
8f8e9aa5
ZW
1848 * directives.c (do_pragma): Save current buffer position
1849 before lexing the pragma keywords; don't call
1850 _cpp_backup_tokens in the defer_pragmas case.
1851
a2981930
PB
18522004-09-15 Per Bothner <per@bothner.com>
1853
1854 * include/line-map.h (line_map_start): Add parameter names so
1855 preceding comment makes sense.
1856 (linemap_add): Remove from comment mention of non-existing parameter.
1857
21b11495
ZW
18582004-09-09 Matt Austern <austern@apple.com>
1859 Zack Weinberg <zack@codesourcery.com>
1860
1861 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1862 prefixes throughout. Add entry for PRAGMA. Remove
1863 unnecessary "= 0" from EQ.
1864 (enum cpp_ttype): Adjust OP and TK definitions to restore
1865 prefixes, via token-paste.
1866 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
1867 Change from #defines to additional cpp_ttype enumerators.
1868 (struct cpp_options): Add defer_pragmas.
1869 (cpp_handle_deferred_pragma): Prototype new interface.
1870
1871 * internal.h (struct cpp_reader): Add directive_result.
1872 * directives.c (struct pragma_entry): Add is_internal field;
1873 give boolean fields type bool.
1874 (start_directive): Initialize pfile->directive_result.type.
1875 (_cpp_do__Pragma): Likewise.
1876 (run_directive): Do not crash if pfile->buffer->prev is NULL.
1877 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
1878 from it.
1879 (register_pragma): New static function, bulk of former
1880 cpp_register_pragma here; add 'internal' argument, pass along
1881 to insert_pragma_entry.
1882 (cpp_register_pragma): Now a wrapper around register_pragma which
1883 always passes false for 'internal' argument.
1884 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
1885 true for 'internal'.
1886 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
1887 an internal pragma, save text till the end of the line as a CPP_PRAGMA
1888 token instead of executing the pragma.
1889 (cpp_handle_deferred_pragma): New interface.
1890 * lex.c (token_spellings): Adjust OP and TK definitions to
1891 match changes to cpplib.h.
1892 (_cpp_lex_token): Check for a directive-result token and
1893 return it if present.
1894 (cpp_token_val_index): Handle CPP_PRAGMA.
1895 * macro.c (cpp_builtin_macro_text): Correct comment.
1896 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
1897
0fd9e8dd
SB
18982004-09-06 Serge Belyshev <belyshev@lubercy.com>
1899
1900 PR preprocessor/14699
1901 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
1902 from size_t to double.
1903
39b8ce7f
AS
19042004-08-28 Andreas Schwab <schwab@suse.de>
1905 Andreas Jaeger <aj@suse.de>
1906
1907 * configure.ac: Set PACKAGE correctly.
1908 * configure: Regenerated.
1909
5d1f4b27
PB
19102004-08-25 Paolo Bonzini <bonzini@gnu.org>
1911
1912 * Makefile.in: Add back top_builddir.
1913
078e3ffe
PB
19142004-08-25 Paolo Bonzini <bonzini@gnu.org>
1915
1916 * configure.ac: Replace Automake macro invocations
1917 with manual Autoconf checks and substitutions.
1918 * configure: Regenerate.
1919 * aclocal.m4: Regenerate.
1920 * config.in: Regenerate.
1921 * Makefile.am: Removed.
1922 * Makefile.in: Heavy simplification and reorganization.
1923
b3f8d95d
MM
19242004-08-09 Mark Mitchell <mark@codesourcery.com>
1925
1926 * configure.ac (arm*-*-eabi*): New target.
1927 (arm*-*-symbianelf*): Likewise.
1928 * configure: Regenerated.
1929
72bb2c39
BI
19302004-07-24 Bernardo Innocenti <bernie@develer.com>
1931
1932 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
1933 * directives.c: Use XNEW-family macros from libiberty.
1934 * lex.c: Likewise.
1935 * macro.c: Likewise.
1936 * cpplib.h (cpp_deps_style): Export enum with name.
1937
21b11495 19382004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 1939
21b11495 1940 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 1941
a23ee064
AP
19422004-07-16 Andris Pavenis <pavenis@latnet.lv>
1943
1944 PR preprocessor/16366
1945 * internal.h (struct cpp_reader): New field dir_hash.
1946 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
1947 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
1948
a09d4744
NB
19492004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
1950
1951 PR preprocessor/16192
1952 PR preprocessor/15913
1953 PR preprocessor/15572
1954 * expr.c (_cpp_parse_expr): Handle remaining cases where an
1955 expression is missing.
1956 * init.c (post_options): Traditional cpp doesn't do // comments.
1957
f58f7def
PB
19582004-06-30 Per Bothner <per@bothner.com>
1959
1960 * include/line-map.h (fileline): Remove old typedef.
1961 * internal.h (struct cpp_reader): Use source_location typedef instead.
1962
e83d8d43
ZW
19632004-06-26 Zack Weinberg <zack@codesourcery.com>
1964
1965 Partially revert patch of 2004-06-05.
1966 * files.c (search_cache): Remove pfile argument. Don't check
1967 for file that would be found by "" or <> search here...
1968 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
1969 Do not apply directory-of-current-file correction to files
1970 found by this check. Rearrange code slightly.
1971
c0d578e6
GK
19722004-06-21 Geoffrey Keating <geoffk@apple.com>
1973
1974 * files.c (should_stack_file): Correct swapped parameters to call
1975 to cb.read_pch.
1976 * pch.c (cpp_valid_state): Handle -fpreprocessed.
1977
159d5224
PB
19782004-06-15 Paolo Bonzini <bonzini@gnu.org>
1979
1980 * Makefile.in: Regenerate with automake 1.8.5.
1981 * aclocal.m4: Likewise.
1982 * configure: Regenerate.
1983
2fac9c01
ZW
19842004-06-11 Zack Weinberg <zack@codesourcery.com>
1985
1986 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
1987 * configure, config.in: Regenerate.
1988 * system.h: Unconditionally define bool as unsigned char,
1989 BOOL_BITFIELD as unsigned int.
1990 * .cvsignore: New file.
1991
d8044160
GK
19922004-06-09 Geoffrey Keating <geoffk@apple.com>
1993
1994 * traditional.c (push_replacement_text): Set macro->traditional.
1995 (save_replacement_text): Likewise.
1996 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
1997 (struct save_macro_item): Delete.
1998 (struct save_macro_data): Use a character array not the previous
1999 structured format.
2000 (save_macros): Save macro as text not as internal structures.
2001 (cpp_prepare_state): Update for changes to save_macro_data.
2002 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 2003 -D macros as text.
d8044160
GK
2004 * macro.c (create_iso_definition): Honour alloc_subobject.
2005 Clear traditional flag.
2006 (_cpp_create_definition): Honour alloc_subobject.
2007 * lex.c (cpp_token_val_index): New.
2008 * internal.h: Include cpp-id-data.h.
2009 (uchar): Move definition to cpp-id-data.h.
2010 (U): Likewise.
2011 (cpp_macro): Likewise.
2012 * directives.c (struct answer): Move to cpp-id-data.h.
2013 (do_assert): Honour alloc_subobject.
2cf22451
ZW
2014
2015 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2016 * include/cpplib.h (struct cpp_string): Add GTY marker.
2017 (enum cpp_token_fld_kind): New.
2018 (struct cpp_token): Add GTY markers.
2019 (cpp_token_val_index): Prototype.
2020 (CPP_HASHNODE_VALUE_IDX): New.
2021 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2022 * include/cpp-id-data.h: New file.
d8044160 2023
0ca8e815
PB
20242004-06-09 Paolo Bonzini <bonzini@gnu.org>
2025
2026 * Makefile.am (all-local): New.
2027 * Makefile.in: Regenerate.
2028
b51fa00f
RS
20292004-06-06 Roger Sayle <roger@eyesopen.com>
2030
2031 * Makefile.am (LIBICONV): Declare.
2032 (makedepend_LDADD): Use LIBICONV.
2033 * Makefile.in: Regenerate.
2034
5e2f3f39
AP
20352004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
2036
2037 * Makefile.am (LIBINTL): Declare
2038 (makedepend_LDADD): Use LIBINTL.
2039 * Makefile.in: Regenerate.
2040
c6e83800
ZW
20412004-06-05 Zack Weinberg <zack@codesourcery.com>
2042
2043 * Makefile.am: Add makedepend.
2044 * Makefile.in, aclocal.m4: Regenerate.
2045 * charset.c: Insert a space to avoid a warning.
2046 * directives.c: Include mkdeps.h.
2047 (_cpp_handle_directive): Reenable macro expander if appropriate.
2048 (undefine_macros): Inline body of _cpp_free_definition for speed.
2049 Do not call undef callback or _cpp_warn_if_unused_macro.
2050 (cpp_get_deps): New interface.
2051 * files.c (search_cache): Add pfile argument. Check for file
2052 that would be found by "" or <> search here...
2053 (_cpp_find_file): ...not here. Correct recorded start_dir of
2054 files found by directory-of-current-file search that would be
2055 found by "" or <> search.
2056 * init.c (cpp_add_dependency_target): Delete.
2057 * internal.h (struct lexer_state): Add discarding_output flag.
2058 * lex.c (lex_identifier): Compute hash function while scanning.
2059 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
2060 directives.
2061 * makedepend.c: New file.
2062 * mkdeps.c (struct deps): Add vpath vector.
2063 (apply_vpath, deps_add_vpath): New function.
2064 (deps_free): Free vpath vector.
2065 (deps_add_dep, deps_add_target): Use apply_vpath.
2066 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
2067 (ht_lookup_with_hash): New function.
2068 * cpplib.h, mkdeps.h: Update prototypes.
2069 * symtab.h: Update prototypes.
2070 (HT_HASHSTEP, HT_FINISH): New macros.
2071
b453c95f
GK
20722004-05-29 Geoffrey Keating <geoffk@apple.com>
2073
2074 * symtab.c (ht_create): Set entries_owned.
2075 (ht_destroy): Honour entries_owned.
2076 (ht_expand): Likewise.
2077 (ht_load): New.
2cf22451
ZW
2078 * include/symtab.h (struct ht): New field 'entries_owned'
2079 (ht_load): New prototype.
b453c95f 2080
963e23c5
PB
20812004-05-26 Paolo Bonzini <bonzini@gnu.org>
2082
2083 PR bootstrap/15651
2084 * configure.ac: Fix m4 quoting when picking
2085 the size of HOST_WIDE_INT.
2086 * configure: Regenerate.
2087
0429bc77
PB
20882004-05-25 Paolo Bonzini <bonzini@gnu.org>
2089
2090 * Makefile.am: the correct directory for
2091 gettext include files is given by @INCINTL@.
2092 * Makefile.in: Regenerate.
2093
c86dd7db
PB
20942004-05-24 Paolo Bonzini <bonzini@gnu.org>
2095
2096 * system.h [!ENABLE_NLS]: dgettext takes two
2097 parameters.
2098
4f4e53dd
PB
20992004-05-23 Paolo Bonzini <bonzini@gnu.org>
2100
2101 Moved libcpp from the gcc subdirectory to the toplevel.
2102 * Makefile.am: New file.
2103 * Makefile.in: Regenerate.
2104 * configure.ac: New file.
2105 * configure: Regenerate.
2106 * config.in: Regenerate.
2107 * charset.c: Moved from gcc/cppcharset.c. Add note about
2108 brokenness of input charset detection. Adjust for change
2109 in name of cppucnid.h.
2110 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
2111 * expr.c: Moved from gcc/cppexp.c.
2112 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
2113 Remove #define of O_BINARY, it is in system.h.
2114 * identifiers.c: Moved from gcc/cpphash.c.
2115 * internal.h: Moved from gcc/cpphash.h. Change header
2116 guard name. All other files adjusted to match name change.
2117 * init.c: Moved from gcc/cppinit.c.
2118 (init_library) [ENABLE_NLS]: Call bindtextdomain.
2119 * lex.c: Moved from gcc/cpplex.c.
2120 * directives.c: Moved from gcc/cpplib.c.
2121 * macro.c: Moved from gcc/cppmacro.c.
2122 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
2123 * traditional.c: Moved from gcc/cpptrad.c.
2124 * ucnid.h: Moved from gcc/cppucnid.h. Change header
2125 guard name.
2126 * ucnid.pl: Moved from gcc/cppucnid.pl.
2127 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
2128 guard name.
2129 * symtab.c: Moved from gcc/hashtable.c.
2130 * line-map.c: Moved from gcc. Do not include intl.h.
2131 * mkdeps.c: Moved from gcc.
2132 * system.h: New file.
2cf22451
ZW
2133 * include/cpplib.h: Moved from gcc. Change header guard name.
2134 * include/line-map.h: Moved from gcc. Change header guard name.
2135 * include/mkdeps.h: Moved from gcc. Change header guard name.
2136 * include/symtab.h: Moved from gcc/hashtable.h. Change header
2137 guard name.