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