]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
params.def (lto-min-partition): Fix typo.
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
01956319
RH
12011-03-18 Richard Henderson <rth@redhat.com>
2
3 PR bootstrap/45381
4 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
5
c5a62c6f
EB
62011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7 Jakub Jelinek <jakub@redhat.com>
8
9 PR preprocessor/39213
10 * directives.c (end_directive): Call _cpp_remove_overlay for deferred
11 pragmas as well in traditional mode.
12
0e1a989c
ILT
132010-11-17 Ian Lance Taylor <iant@google.com>
14
15 PR bootstrap/45538
16 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of
17 AC_LANG based on ENABLE_BUILD_WITH_CXX.
18
651a20b5
KT
192010-11-16 Kai Tietz <kai.tietz@onevision.com>
20
21 PR preprocessor/17349
22 * lex.c (save_comment): Handle in argument passing c++
23 comments special.
24
480767a9
ILT
252010-11-02 Ian Lance Taylor <iant@google.com>
26
27 * configure.ac: Use AC_SYS_LARGEFILE.
28 * configure: Rebuild.
29 * config.in: Rebuild.
30
078419c9 312010-10-19 Basile Starynkevitch <basile@starynkevitch.net>
480767a9 32
078419c9
BS
33 * line-map.h (source_location): Remove obsolete comment
34 mentioning location_s.
35
d6874138
KT
362010-09-29 Kai Tietz <kai.tietz@onevision.com>
37
38 PR preprocessor/45362
39 * directives.c (cpp_pop_definition): Make static.
40 (do_pragma_push_macro): Reworked to store text
41 definition.
42 (do_pragma_pop_macro): Add free text definition.
43 (cpp_push_definition): Removed.
44 * include/cpplib.h (cpp_push_definition): Removed.
45 (cpp_pop_definition): Likewise.
46 * internal.h (def_pragma_macro): Remove member 'value'
47 and add new members 'definition', 'line',
48 'syshdr', 'sued' and 'is_undef'.
49 * pch.c (_cpp_restore_pushed_macros): Rework to work
50 on text definition and store additional macro flags.
51 (_cpp_save_pushed_macros): Likewise.
52
e3339d0f
JM
532010-09-29 Joseph Myers <joseph@codesourcery.com>
54
55 * include/cpplib.h (cpp_options): Rename warn_deprecated,
56 warn_traditional, warn_long_long and pedantic.
57 * directives.c (directive_diagnostics, _cpp_handle_directive):
58 Update names of cpp_options members.
59 * expr.c (cpp_classify_number, eval_token): Update names of
60 cpp_options members.
61 * init.c (cpp_create_reader, post_options): Update names of
62 cpp_options members.
63 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
64 cpp_options members.
65 * macro.c (parse_params): Update names of cpp_options members.
66
128465e6
ILT
672010-09-15 Ian Lance Taylor <iant@google.com>
68
69 * init.c: Fix type name in comment.
70
a69d2520
JJ
712010-08-31 Jakub Jelinek <jakub@redhat.com>
72
73 PR preprocessor/45457
74 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
75 needed.
76 * directives.c (do_ifdef, do_ifndef): Likewise.
77
707bcb7a
RO
782010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
79
80 * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
81
6f173e52
RH
822010-08-24 Richard Henderson <rth@redhat.com>
83
84 PR bootstrap/45376
85 * configure.ac (HAVE_SSE4): New check.
86 * configure, config.in: Rebuild.
87 * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
88
789d73cb
RO
892010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
90
91 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
92 etc. on Solaris 2/x86.
93
246a2fcb
RH
942010-08-21 Richard Henderson <rth@redhat.com>
95 Andi Kleen <ak@linux.intel.com>
96 David S. Miller <davem@davemloft.net>
97
98 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
99 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
100 (ptrdiff_t): Check via AC_CHECK_TYPE.
101 * config.in, configure: Rebuild.
102 * system.h: Include stdint.h, if available.
103 * lex.c (WORDS_BIGENDIAN): Provide default.
104 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
105 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
106 search_line_sse2, search_line_sse42, init_vectorized_lexer,
107 search_line_fast): New.
108 (_cpp_clean_line): Use search_line_fast. Restructure the fast
109 loop to make it clear when we're leaving the loop. Stay in the
110 fast loop for non-trigraph '?'.
111
8e680db5
JJ
1122010-06-11 Jakub Jelinek <jakub@redhat.com>
113
114 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
115 callback.
116 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
117 (cpp_macro_definition): Remove const qual from second argument.
118 * macro.c (enter_macro_context): Call user_builtin_macro callback for
119 NODE_BUILTIN !NODE_USED macros.
120 (warn_of_redefinition): Likewise. Remove const qual from second
121 argument.
122 (cpp_macro_definition): Likewise.
123 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
124 for NODE_BUILTIN !NODE_USED macros.
125
1cb42611
JM
1262010-06-10 Joseph Myers <joseph@codesourcery.com>
127
128 * include/cpplib.h (struct cpp_options): Remove show_column.
129 * init.c (cpp_create_reader, post_options): Don't set show_column.
130
ff5dfc48
JR
1312010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
132
133 PR bootstrap/44432
134 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
135 check that C++ compiler works.
136 * configure: Regenerate.
137
a9429e29
LB
1382010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
139
140 * include/symtab.h (ht_identifier_ptr): New.
141
c3f247f4
RW
1422010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
143 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
144
145 PR bootstrap/42798
146 * configure.ac: Check for declaration of 'basename(char *)'.
147 * configure: Regenerate.
148 * config.in: Regenerate.
149
2778d766
JM
1502010-04-25 Joseph Myers <joseph@codesourcery.com>
151
152 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
153 * init.c (lang_defaults): Add entries for new language variants.
154 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
155 variants.
156
d8a12e84
MLI
1572010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
158
159 PR cpp/43195
160 * files.c (report_missing_guard): Test for #pragma once.
161
87cf0651
SB
1622010-04-07 Simon Baldwin <simonb@google.com>
163
164 * directives.c (do_diagnostic): Add warning reason argument,
165 call appropriate error reporting function for code.
166 (directive_diagnostics): Call specific warning functions with
167 warning reason where appropriate.
168 (do_error, do_warning, do_pragma_dependency): Add warning reason
169 argument to do_diagnostic calls.
170 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
171 _cpp_create_definition): Call specific warning functions with
172 warning reason where appropriate.
173 * Makefile.in: Add new diagnostic functions to gettext translations.
174 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
175 to error callback.
176 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
177 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
178 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
179 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
180 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
181 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
182 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
183 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
184 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
185 warning reason codes.
186 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
187 cpp_warning_with_line, cpp_pedwarning_with_line,
188 cpp_warning_with_line_syshdr): New specific error reporting functions.
189 * pch.c (cpp_valid_state): Call specific warning functions with
190 warning reason where appropriate.
191 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
192 diagnostic handlers.
193 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
194 cpp_warning_with_line, cpp_pedwarning_with_line,
195 cpp_warning_with_line_syshdr): New specific error reporting functions.
196 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
197 specific warning functions with warning reason where appropriate.
198 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
199 warn_about_normalization, lex_identifier_intern, lex_identifier,
200 _cpp_lex_direct): Ditto.
201 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
202 narrow_str_to_charconst): Ditto.
203
d947ada0
JJ
2042010-04-06 Jakub Jelinek <jakub@redhat.com>
205
206 PR preprocessor/43642
207 * lex.c (lex_raw_string): Change type of TYPE variable to
208 unsigned char.
209
4d9e8446
RW
2102010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
211
212 * aclocal.m4: Regenerate.
213
52150625
JM
2142010-03-29 Jason Merrill <jason@redhat.com>
215
00a81b8b
JM
216 More N3077 raw string changes
217 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
218 strings.
219 * lex.c (bufring_append): Split out from...
220 (lex_raw_string): ...here. Undo trigraph and line splicing
221 transformations. Do process line notes in multi-line literals.
222 (_cpp_process_line_notes): Ignore notes that were already handled.
223
52150625
JM
224 Some raw string changes from N3077
225 * charset.c (cpp_interpret_string): Change inner delimiters to ().
226 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
227
709d7160
JJ
2282010-02-11 Jakub Jelinek <jakub@redhat.com>
229
230 * init.c (read_original_filename): Don't call read_original_directory
231 if _cpp_handle_directive returns 0.
232
dadab4fd
JM
2332010-01-01 Joseph Myers <joseph@codesourcery.com>
234
235 PR preprocessor/41947
236 * expr.c (cpp_classify_number): Give error for hexadecimal
237 floating-point constant with no digits before or after point.
238
3de8a540
AC
2392009-11-20 Arnaud Charlet <charlet@adacore.com>
240
241 * macro.c (enter_macro_context): Call cb.used callback if defined.
242 * directives.c (do_idef, do_ifndef): Ditto.
243 * include/cpplib.h (struct cpp_callbacks): Add used callback.
244
17e7cb85
KT
2452009-11-11 Kai Tietz <kai.tietz@onevision.com>
246
247 * directives.c (do_pragma_push_macro): New pragma handler.
248 (do_pragma_pop_macro): Likewise.
249 (_cpp_init_internal_pragmas): Add push_macro and
250 pop_macro handler to internal pragmas.
251 (lex_macro_node_from_str): Removed.
252 (cpp_push_definition): Replace lex_macro_node_from_str
253 by _cpp_lex_identifier.
254 (cpp_pop_definition): Likewise.
255 * internal.h (_cpp_lex_identifier): New prototype.
256 (def_pragma_macro): New structure.
257 (cpp_reader): New member pushed_macros.
258 * lex.c (_cpp_lex_identifier): New function.
259 (lex_identifier_intern): New function.
260 * init.c (cpp_create_reader): Initialize pushed_macros
261 member.
262 (cpp_destroy): Free elements in pushed_macros member.
263 * pch.c (_cpp_save_pushed_macros): New function.
264 (_cpp_restore_pushed_macros): Likewise.
265 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
266 (cpp_read_state): Use _cpp_restore_pushed_macros.
267
2c6e3f55
JJ
2682009-10-19 Jakub Jelinek <jakub@redhat.com>
269
270 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
271 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
272 and char32_cset_desc.
273 (converter_for_type): Handle CPP_UTF8STRING.
274 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
275 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
276 (parse_include): Reject raw strings.
277 * include/cpplib.h (CPP_UTF8STRING): New token type.
278 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
279 * lex.c (lex_raw_string): New function.
280 (lex_string): Handle u8 string literals, call lex_raw_string
281 for raw string literals.
282 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
283 sequences.
284 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
285
96c169e1
JJ
2862009-10-14 Jakub Jelinek <jakub@redhat.com>
287
288 PR preprocessor/41543
289 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
290 * line-map.c (linemap_init): Initialize highest_location and
291 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
292
30c99a9e
JM
2932009-10-09 Jason Merrill <jason@redhat.com>
294
295 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
296
2214382c
NV
2972009-10-09 Neil Vachharajani <nvachhar@google.com>
298
299 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
300 sccs.
301
e02222d2
LR
3022009-09-23 Loren J. Rittle <ljrittle@acm.org>
303
304 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
305 * configure: Rebuilt.
306
9a8a2b7a
RG
3072009-09-22 Richard Guenther <rguenther@suse.de>
308
309 PR pch/38987
310 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
311
74dc6a11
CD
3122009-09-18 Chris Demetriou <cgd@google.com>
313
314 PR preprocessor/28435:
315 * include/cpplib.h (struct cpp_options): Add new member
316 deps.need_preprocessor_output.
317 * files.c (open_file_failed): If preprocessor output is needed
318 always report an error.
319
933608b7
KT
3202009-09-13 Kai Tietz <kai.tietz@onevision.com>
321
322 * configure.ac: Set for i?86-w64-mingw*
323 need_64bit_hwint to yes.
324 * configure: Regenerated.
325
86373e7e
JM
3262009-09-10 Jason Merrill <jason@redhat.com>
327
328 * directives.c (cpp_define): constify.
329
fd2ab214
ILT
3302009-09-02 Ian Lance Taylor <iant@google.com>
331
332 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
333
df58e648
RW
3342009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
335
336 * configure.ac (AC_PREREQ): Bump to 2.64.
337
5213506e
RW
3382009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
339
340 * aclocal.m4: Regenerate.
341 * config.in: Regenerate.
342 * configure: Regenerate.
343
709a22df
TT
3442009-08-17 Tom Tromey <tromey@redhat.com>
345
346 PR preprocessor/41067:
347 * charset.c (convert_escape): Add missing ":" to error text.
348
0c539b47
DR
3492009-07-27 Douglas B Rupp <rupp@gnat.com>
350
351 * include/cpplib.h (INO_T_CPP): New macro.
352 (struct cpp_dir): Use it.
353
2b69c841
JQ
3542009-07-20 Jerry Quinn <jlquinn@optonline.net>
355
356 PR regression/40800
357 * configure.ac: Use = instead of == for testing
358 ENABLE_BUILD_WITH_CXX.
359 * configure: Rebuild.
360
f1bf410c
JQ
3612009-07-17 Jerry Quinn <jlquinn@optonline.net>
362
363 * directives.c (do_linemarker, do_line): Use CPP_STRING for
364 ignored enum value.
365 * files.c (find_file_in_dir): Add cast from void* to char*.
366 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
367 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
368 warnings.
369 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
370 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
371 COMPILER_FLAGS): New.
372 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
373 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
374 instead of ALL_CFLAGS.
375 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
376 from other warnings. Add -Wc++-compat to C-specific warnings.
377 Check for --enable-build-with-cxx. Set and substitute
378 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
379 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
380 AC_CHECK_HEADERS.
381 * configure: Rebuild.
382 * include/cpp-id-data.h: Remove extern "C".
383 * include/line-map.h: Likewise.
384 * include/mkdeps.h: Likewise.
385 * include/symtab.h: Likewise.
386 * internal.h: Likewise.
387
a28fbdba
MLI
3882009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
389
390 * directives.c (parse_include): Add location argument. Update all
391 calls.
392 (parse_answer): Likewise.
393 (do_include_common): Error with exact location.
394 (parse_assertion): Likewise.
395
b506a5a2
MLI
3962009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
397
398 * expr.c (num_div_op): Take explicit location.
399
7d8847a4
ILT
4002009-06-17 Ian Lance Taylor <iant@google.com>
401
402 * include/cpplib.h (progname): Don't declare.
403
3d8b2a98
ILT
4042009-06-12 Ian Lance Taylor <iant@google.com>
405
406 * include/cpplib.h (struct cpp_options): Add
407 warn_cxx_operator_names field.
408 (NODE_WARN_OPERATOR): Define.
409 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
410 type to 6 bits.
411 * init.c (mark_named_operators): Add flags parameter.
412 (cpp_post_options): Pick flags value to pass to
413 mark_named_operators.
414 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
415 identifier is an operator name in C++.
416
e74fe492
AH
4172009-06-01 Aldy Hernandez <aldyh@redhat.com>
418
419 * include/line-map.h (LAST_SOURCE_COLUMN): New.
420
4851089f
ILT
4212009-06-01 Ian Lance Taylor <iant@google.com>
422
423 * include/cpp-id-data.h: Add extern "C".
424 * include/line-map.h: Likewise.
425 * include/mkdeps.h: Likewise.
426 * include/symtab.h: Likewise.
427 * internal.h: Likewise.
428
7e5487a2
ILT
4292009-05-15 Ian Lance Taylor <iant@google.com>
430
431 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
432 builtin_type. Change all uses.
433
00b0c19b
MLI
4342009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
435
436 PR cpp/36674
437 * directives (do_linemarker): Compensate for the increment in
438 location that occurs when we reach the end of line.
439 * files (_cpp_stack_include): Mention _cpp_find_file in the
440 comment.
441
9a0c6187
JM
4422009-05-10 Joseph Myers <joseph@codesourcery.com>
443
444 * include/cpplib.h (enum cpp_token_fld_kind): Add
445 CPP_TOKEN_FLD_TOKEN_NO.
446 (struct cpp_macro_arg, struct cpp_identifier): Define.
447 (union cpp_token_u): Use struct cpp_identifier for identifiers.
448 Use struct cpp_macro_arg for macro arguments. Add token_no for
449 CPP_PASTE token numbers.
450 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
451 do_pragma_poison, parse_assertion): Use val.node.node in place of
452 val.node.
453 * expr.c (parse_defined, eval_token): Use val.node.node in place
454 of val.node.
455 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
456 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
457 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
458 place of val.arg_no. Use val.node.node in place of val.node.
459 * macro.c (replace_args, cpp_get_token, parse_params,
460 lex_expansion_token, create_iso_definition, cpp_macro_definition):
461 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
462 Use val.node.node in place of val.node.
463
9e322bc1
JM
4642009-05-03 Joseph Myers <joseph@codesourcery.com>
465
466 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
467 UTF-8 sequences.
468
f88d0772
JM
4692009-04-25 Joseph Myers <joseph@codesourcery.com>
470
471 PR preprocessor/39559
472 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
473 constants larger than intmax_t in C99 mode.
474
d1b38208
TG
4752009-04-21 Taras Glek <tglek@mozilla.com>
476
477 * include/cpp-id-data.h: Update GTY annotations to new syntax.
478 * include/cpplib.h: Likewise.
479 * include/line-map.h: Likewise.
480 * include/symtab.h: Likewise.
481
cfc93532
MLI
4822009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
483
484 PR c++/14875
485 * lex.c (cpp_type2name): Take a flags parameter. Call
486 cpp_named_operator2name for named operators and cpp_digraph2name
487 for digraphs.
488 (cpp_digraph2name): New.
489 (cpp_spell_token): Use it.
490 (cpp_output_token): Likewise.
491 * include/cpplib.h (cpp_type2name): Update declaration.
492 * init.c (cpp_named_operator2name): New.
493 * internal.h (cpp_named_operator2name): Declare.
494
9c650d90
MLI
4952009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
496
497 PR c++/13358
498 * init.c (cpp_create_reader): Wlong_long is disabled by default.
499 * expr.c (cpp_classify_number): Give different messages for C and
500 C++ front-ends.
501
aa508502
JM
5022009-04-19 Joseph Myers <joseph@codesourcery.com>
503
504 PR preprocessor/20078
505 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
506 field.
507 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
508 (struct cpp_token): Change flags to unsigned short.
509 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
510 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
511 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
512 tokens.
513 * macro.c (macro_real_token_count): New.
514 (enter_macro_context, replace_args): Use macro_real_token_count.
515 (create_iso_definition): Record whitespace surrounding and digraph
516 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
517 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
518 multiple consecutive ## tokens.
519 (_cpp_create_definition): Initialize extra_tokens.
520 (cpp_macro_definition): Use macro_real_token_count.
521
61cc8223
JM
5222009-04-18 Joseph Myers <joseph@codesourcery.com>
523
524 * directives.c (parse_include): Pass true to check_eol.
525
c7f9c0b9
JM
5262009-04-18 Joseph Myers <joseph@codesourcery.com>
527
528 PR preprocessor/39646
529 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
530 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
531 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
532 place of LC_RENAME.
533
a5cb563b
JM
5342009-04-18 Joseph Myers <joseph@codesourcery.com>
535
536 PR preprocessor/39647
537 * directives.c (check_eol): Add parameter expand.
538 (do_undef, parse_include, do_line, do_linemarker, do_ident,
539 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
540 do_else, do_endif, do_assert, do_unassert): All callers changed.
541 Pass true from do_line, false elsewhere.
542
18f41a1b
JM
5432009-04-12 Joseph Myers <joseph@codesourcery.com>
544
545 PR preprocessor/31869
546 * macro.c (stringify_arg): Handle NULL source token in padding
547 token where previous padding token did not have source token with
548 preceding whitespace.
549
748086b7
JJ
5502009-04-09 Jakub Jelinek <jakub@redhat.com>
551
552 * Makefile.in: Change copyright header to refer to version
553 3 of the GNU General Public License and to point readers at the
554 COPYING3 file and the FSF's license web page.
555 * charset.c: Likewise.
556 * directives-only.c: Likewise.
557 * directives.c: Likewise.
558 * errors.c: Likewise.
559 * expr.c: Likewise.
560 * files.c: Likewise.
561 * identifiers.c: Likewise.
562 * include/cpp-id-data.h: Likewise.
563 * include/cpplib.h: Likewise.
564 * include/line-map.h: Likewise.
565 * include/mkdeps.h: Likewise.
566 * include/symtab.h: Likewise.
567 * init.c: Likewise.
568 * internal.h: Likewise.
569 * lex.c: Likewise.
570 * line-map.c: Likewise.
571 * macro.c: Likewise.
572 * makeucnid.c: Likewise.
573 * mkdeps.c: Likewise.
574 * pch.c: Likewise.
575 * symtab.c: Likewise.
576 * system.h: Likewise.
577 * traditional.c: Likewise.
578 * ucnid.tab: Likewise.
579 * ucnid.h: Regenerate.
580
eec49116
JJ
5812009-04-01 Janis Johnson <janis187@us.ibm.com>
582
839a3b8a
JJ
583 PR c/39027
584 * include/cpplib.h (CPP_N_DEFAULT): Define.
585 * expr.c (interpret_float_suffix): Recognize d or D for double,
586 return new value for default.
587 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
588
eec49116
JJ
589 PR c/33466
590 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
591 letters from decimal float and fixed-point suffixes.
592
47580d22
JM
5932009-03-31 Joseph Myers <joseph@codesourcery.com>
594
595 PR preprocessor/15638
596 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
597 invalid PCH.
598 (open_file_failed): Make error for missing file fatal.
599 * include/cpplib.h (CPP_DL_FATAL): Define.
600
5a2df0fa
SV
6012009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
602
603 PR preprocessor/31932:
604 * internal.h: Don't mention HAVE_ICONV_H.
605 * configure, config.in: Rebuild.
606 * configure.ac: Don't check for iconv.h.
607
c1a8a3c6
TT
6082009-03-30 Tom Tromey <tromey@redhat.com>
609
610 PR preprocessor/39512:
611 * line-map.c (linemap_init): Initialize 'reallocator' field.
612
a37a7b8a
JJ
6132009-03-30 Jakub Jelinek <jakub@redhat.com>
614
615 PR target/39558
616 * macro.c (cpp_get_token): If macro_to_expand returns NULL
617 and used some tokens, add CPP_PADDING before next token.
618
148e4216
JM
6192009-03-29 Joseph Myers <joseph@codesourcery.com>
620
621 PR preprocessor/34695
622 * makedepend.c: Remove.
623 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
624 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
625 * directives.c (cpp_errors): Remove.
626 * errors.c (print_location, _cpp_begin_message, v_message):
627 Remove.
628 (cpp_error, cpp_error_with_line): Always use error callback.
629 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
630 * include/cpplib.h (cpp_options): Remove pedantic_errors,
631 inhibit_warnings, warn_system_headers, inhibit_errors,
632 warnings_are_errors, client_diagnostic.
633 (cpp_callbacks): Add extra arguments to error callback; make it
634 return bool.
635 (cpp_finish): Return void.
636 (cpp_destroy): Remove inaccurate comment about return value.
637 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
638 (CPP_DL_NOTE): Define.
639 * include/line-map.h (linemap_print_containing_files): Remove.
640 * init.c (cpp_finish): Do not check for or return number of
641 errors.
642 * internal.h (cpp_reader): Remove errors field.
643 * line-map.c (linemap_print_containing_files): Remove.
644 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
645 about previous definition. Only emit it if previous diagnostic
646 was emitted.
647
f1450211
JM
6482009-03-28 Joseph Myers <joseph@codesourcery.com>
649
650 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
651 mkinstalldirs.
652
8f5929e1
JJ
6532009-03-18 Jakub Jelinek <jakub@redhat.com>
654
655 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
656
4bb09c26
JM
6572009-02-21 Joseph Myers <joseph@codesourcery.com>
658
659 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
660 header name.
661 (_cpp_lex_direct): Handle this.
662
68c9ab45
RG
6632009-02-15 Richard Guenther <rguenther@suse.de>
664
665 Revert last change.
666
601b3e1a
RG
6672009-02-13 Richard Guenther <rguenther@suse.de>
668
669 * configure.ac: Enable LFS.
670 * configure: Re-generate.
671 * config.in: Likewise.
672
fc0cd180
BE
6732009-01-05 Ben Elliston <bje@au.ibm.com>
674
675 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
676 (.po.pox): Likewise.
677 (po/$(PACKAGE).pot): Likewise.
678
db89a3be
AO
6792008-12-10 Alexandre Oliva <aoliva@redhat.com>
680
681 PR target/37033
682 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
683 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
684
cc955282
JM
6852008-11-29 Joseph Myers <joseph@codesourcery.com>
686
687 * lex.c (cpp_token_len): Use 6 as default length.
688
47960aaf
MLI
6892008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
690
691 * expr.c (struct op): Add location.
692 (_cpp_parse_expr): Propagate locations throught the stack
693 of expressions.
694 (reduce): Likewise.
695 (check_promotion): Use explicit location in errors.
696
631d0d36
MG
6972008-10-05 Matthew Gingell <gingell@adacore.com>
698 Arnaud Charlet <charlet@adacore.com>
699
700 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
701 (cpp_get_comments): New function.
702 * internal.h (struct cpp_reader): Add comments field.
703 * init.c (cpp_destroy): Free comments.
704 * lex.c (store_comment, cpp_get_comments): New functions.
705 (comments): New struct.
706 (save_comment): Store comments in comments struct.
707
c047ce93
SB
7082008-09-18 Simon Baldwin <simonb@google.com>
709
710 * include/cpplib.h (struct cpp_options): Add new boolean flag
711 warn_builtin_macro_redefined.
712 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
713 * (struct builtin_operator): Split out from previous struct builtin,
714 enhance extra const correctness.
715 * (struct builtin_macro): Split out from previous struct builtin, add
716 new always_warn_if_redefined flag, enhance const correctness.
717 * (mark_named_operators): Use struct builtin_operator.
718 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
719 to builtins selectively.
720 * macro.c (warn_of_redefinition): Return false if a builtin macro
721 is not flagged with NODE_WARN.
722
affa55c6
JJ
7232008-07-31 Jakub Jelinek <jakub@redhat.com>
724
725 PR preprocessor/36649
726 * files.c (struct report_missing_guard_data): New type.
727 (report_missing_guard): Put paths into an array instead of printing
728 them right away. Return 1 rather than 0.
729 (report_missing_guard_cmp): New function.
730 (_cpp_report_missing_guards): Sort and print paths gathered by
731 report_missing_guard callback.
732
3b8f20a1
MLI
7332008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
734
735 PR 28079
736 * directives.c (strtolinenum): Handle overflow.
737 (do_line): Give a warning if line number overflowed.
738 (do_linemarker): Update call to strtolinenum.
739
1bb64668
MLI
7402008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
741
742 * include/line-map.h (linenum_type): New typedef.
743 (struct line_map): Use it.
744 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
745 (SOURCE_COLUMN): Likewise.
746 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
747 source_location values in a variable of type linenum_type.
748 * directives.c (struct if_stack): Use linenum_type.
749 (strtoul_for_line): Rename as strtolinenum.
750 (do_line): Use linenum_type.
751 (do_linemarker): Use linenum_type and strtolinenum.
752 (_cpp_do_file_change): Use linenum_t.
753 * line-map.c (linemap_add): Likewise.
754 (linemap_line_start): Likewise.
755 * traditional.c (struct fun_macro): 'line' is a source_location.
756 * errors.c (print_location): Use linenum_type.
757 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
758 * internal.h (CPP_INCREMENT_LINE): Likewise.
759 * lex.c (_cpp_skip_block_comment): Use source_location.
760
5950c3c9
BE
7612008-07-14 Ben Elliston <bje@au.ibm.com>
762
763 * include/cpplib.h (NODE_CONDITIONAL): New.
764 (struct cpp_callbacks): New macro_to_expand field.
765 (struct cpp_hashnode): Adjust size of flags and type fields.
766 (cpp_peek_token): Prototype.
767 * lex.c (cpp_peek_token): New function.
768 (_cpp_temp_token): Protect pre-existing lookaheads.
769 * macro.c (cpp_get_token): Expand any conditional macros.
770 (_cpp_backup_tokens_direct): New.
771 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
772 (warn_of_redefinition): Silently allow redefined conditional
773 macros.
774 (_cpp_create_definition): Remove the conditional flag when a user
775 defines one of the conditional macros.
776 * internal.h (_cpp_backup_tokens_direct): New prototype.
777
e85edc9e
AH
7782008-06-13 Andrew Haley <aph@redhat.com>
779
780 PR preprocessor/33305
781 * macro.c (replace_args): Print a warning for empty macro
782 arguments in C89 and C++.
783
18c04407
RW
7842008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
785
786 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
787 * configure: Regenerate.
788
2d09b640
RW
7892008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
790
791 * Makefile.in (datarootdir): New variable.
792
0b7c73cc
L
7932008-06-12 H.J. Lu <hongjiu.lu@intel.com>
794
795 PR preprocessor/36479
796 * charset.c (cpp_interpret_string_notranslate): Also set
797 narrow_cset_desc.width.
798
cd985f66
JM
7992008-06-07 Joseph Myers <joseph@codesourcery.com>
800
801 * configure.ac (parisc*64*-*-*): Remove.
802 * configure: Regenerate.
803
d750887f
TT
8042008-05-30 Tom Tromey <tromey@redhat.com>
805
806 PR preprocessor/36320:
807 * internal.h (_cpp_parse_expr): Update.
808 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
809 messages.
810 * directives.c (do_if): Update.
811 (do_elif): Require expression if processing group.
812
c100de59
DS
8132008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
814
815 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
816
5d6342eb
TT
8172008-05-21 Tom Tromey <tromey@redhat.com>
818
819 PR preprocessor/27777:
820 * lex.c (cpp_output_line_to_string): New function.
821 * internal.h (_cpp_begin_message): Don't declare.
822 * errors.c (_cpp_begin_message): Now static.
823 * include/cpplib.h (cpp_output_line_to_string): Declare.
824 * directives.c (do_diagnostic): Rewrote. Use
825 cpp_output_line_to_string. Don't use _cpp_begin_message.
826
dae4174e
TT
8272008-05-21 Tom Tromey <tromey@redhat.com>
828
829 * include/symtab.h (HT_ALLOCED): Remove.
830 (ht_purge): Declare.
831 * symtab.c (DELETED): New define.
832 (ht_lookup): Update comment.
833 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
834 code. Use subobject allocator for strings, if it exists.
835 (ht_expand): Handle deleted entries.
836 (ht_forall): Likewise.
837 (ht_purge): New function.
838 (ht_dump_statistics): Print deletion statistics.
839
899015a0
TT
8402008-05-13 Tom Tromey <tromey@redhat.com>
841
842 PR preprocessor/22168:
843 * include/cpplib.h (struct cpp_options) <objc>: Update
844 documentation.
845 * expr.c (eval_token): Warn for use of assertions.
846 * directives.c (directive_diagnostics): Warn about extensions.
847 (DEPRECATED): New define.
848 (DIRECTIVE_TABLE): Use it.
849
71c10038
TT
8502008-05-06 Tom Tromey <tromey@redhat.com>
851
852 PR preprocessor/35313, PR preprocessor/36088:
853 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
854 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
855
2bd0fe3d
DM
8562008-05-04 David S. Miller <davem@davemloft.net>
857
858 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
859 * configure: Regenerate.
860
28f68625
DF
8612008-04-22 Daniel Franke <franke.daniel@gmail.com>
862
863 * include/cpplib.h (cpp_define_formatted): New.
864 * directives.c (cpp_define_formatted): New.
865
688e7a53
TT
8662008-04-21 Tom Tromey <tromey@redhat.com>
867
868 PR libcpp/33415:
869 * charset.c (_cpp_convert_input): Add buffer_start argument.
870 Ignore UTF-8 BOM if seen.
871 * internal.h (_cpp_convert_input): Add argument.
872 * files.c (struct _cpp_file) <buffer_start>: New field.
873 (destroy_cpp_file): Free buffer_start, not buffer.
874 (_cpp_pop_file_buffer): Likewise.
875 (read_file_guts): Update.
876
b6baa67d
KVH
8772008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
878
879 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
880 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
881 (struct cpp_options): Added uliterals.
882 (cpp_interpret_string): Update prototype.
883 (cpp_interpret_string_notranslate): Idem.
884 * charset.c (init_iconv_desc): New width member in cset_converter.
885 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
886 (convert_ucn): Idem.
887 (emit_numeric_escape): Idem.
888 (convert_hex): Idem.
889 (convert_oct): Idem.
890 (convert_escape): Idem.
891 (converter_for_type): New function.
892 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
893 (cpp_interpret_string_notranslate): Match changed prototype.
894 (wide_str_to_charconst): Use converter_for_type.
895 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
896 * directives.c (linemarker_dir): Macro U changed to UC.
897 (parse_include): Idem.
898 (register_pragma_1): Idem.
899 (restore_registered_pragmas): Idem.
900 (get__Pragma_string): Support CPP_STRING{16,32}.
901 * expr.c (eval_token): Support CPP_CHAR{16,32}.
902 * init.c (struct lang_flags): Added uliterals.
903 (lang_defaults): Idem.
904 * internal.h (struct cset_converter) <width>: New field.
905 (struct cpp_reader) <char16_cset_desc>: Idem.
906 (struct cpp_reader) <char32_cset_desc>: Idem.
907 * lex.c (digraph_spellings): Macro U changed to UC.
908 (OP, TK): Idem.
909 (lex_string): Add support for u'...', U'...', u"..." and U"...".
910 (_cpp_lex_direct): Idem.
911 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
912 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
913
deb984e6
PB
9142008-04-18 Paolo Bonzini <bonzini@gnu.org>
915
916 PR bootstrap/35457
917 * aclocal.m4: Regenerate.
918 * configure: Regenerate.
919
bf048bea
TT
9202008-04-17 Tom Tromey <tromey@redhat.com>
921
922 PR libcpp/34866:
923 * errors.c (cpp_error): Don't reference a token before the start
924 of the current run.
925
7f27b0f8
TT
9262008-04-16 Tom Tromey <tromey@redhat.com>
927
928 * Makefile.in (TAGS_SOURCES): New variable.
929 (TAGS): New target.
930
a1fcb9a1
KK
9312008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
932
933 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
934 and shbe-*-*.
935 * configure: Rebuilt.
936
93d45d9e
JM
9372008-04-02 Joseph Myers <joseph@codesourcery.com>
938
939 * include/cpplib.h (struct cpp_callbacks): Add used_define,
940 used_undef and before_define.
941 (NODE_USED): Define.
942 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
943 do_ifndef, cpp_pop_definition): Handle new flag and use new
944 callbacks.
945 * expr.c (parse_defined): Handle new flag and use new callbacks.
946 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
947 flag and use new callbacks.
948
d4c32e1d
JJ
9492008-04-01 Jakub Jelinek <jakub@redhat.com>
950
951 PR pch/13675
952 * files.c (struct _cpp_file): Remove pch field.
953 (pch_open_file): Don't set file->pch, just file->pchname.
954 (should_stack_file): After pfile->cb.read_pch call
955 free pchname and clear pchname, don't close file->fd.
956 Test file->pchname instead of file->pch. Don't close fd after cb.
957 (_cpp_stack_include): Test file->pchname instead of file->pch.
958
161031e3
TT
9592008-03-28 Tom Tromey <tromey@redhat.com>
960
961 * Makefile.in (POSTCOMPILE): New variable.
962 (.c.o): Use it.
963
14ccf800
TT
9642008-03-13 Tom Tromey <tromey@redhat.com>
965
966 PR libcpp/35322:
967 * directives.c (destringize_and_run): Set pfile->directive.
968
830465c6
MM
9692008-03-06 Markus Milleder <markus.milleder@generali.at>
970
971 PR preprocessor/35458
972 * mkdeps.c (munge): Quote '#' with a '\'.
973
d482a073
RW
9742008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
975
976 PR preprocessor/35379
977 * mkdeps.c (deps_write): Ensure the first target always appears
978 in the first column, without leading backslash newline. Avoid
979 some more extra whitespace.
980
185a6cc1
TS
9812008-02-25 Thiemo Seufer <ths@mips.com>
982
d482a073 983 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 984
2bf41bf0
TT
9852008-02-19 Tom Tromey <tromey@redhat.com>
986
987 * traditional.c (lex_identifier): Use CPP_HASHNODE.
988 * lex.c (lex_identifier): Use CPP_HASHNODE.
989 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
990 do-while.
991 * identifiers.c (alloc_node): Change return type.
992 (_cpp_init_hashtable): Don't cast 'alloc_node'.
993 (proxy_assertion_broken): New declaration.
994 (cpp_forall_identifiers): Move comment.
995 * line-map.c (linemap_add): Comment fix.
996 (linemap_line_start): Indentation fix.
997
765d600a
JJ
9982008-01-25 Jakub Jelinek <jakub@redhat.com>
999
1000 PR preprocessor/34692
1001 * macro.c (collect_args): Add pragma_buff argument. Push
1002 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1003 than into arguments. Reset prevent_expansion and parsing_args
1004 state at CPP_PRAGMA_EOL/CPP_EOF.
1005 (funlike_invocation_p): Add pragma_buff argument, pass it through
1006 to collect_args.
1007 (enter_macro_context): Add result argument. Adjust
1008 funlike_invocation_p caller. Emit all deferred pragma tokens
1009 gathered during collect_args before the expansion, add a padding
1010 token. Return 2 instead of 1 if any pragma tokens were prepended.
1011 (cpp_get_token): If enter_macro_context returns 2, don't return
1012 a padding token, instead cycle to grab CPP_PRAGMA token.
1013 * directives.c (_cpp_handle_directive): If was_parsing_args
1014 in deferred pragma, leave parsing_args and prevent_expansion as is.
1015
ec46053b
TT
10162008-01-22 Tom Tromey <tromey@redhat.com>
1017
765d600a 1018 PR c++/34859
ec46053b
TT
1019 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1020 __STDC_CONSTANT_MACROS.
1021
681c6ab0
FF
10222008-01-07 Fred Fish <fnf@specifix.com>
1023
765d600a 1024 PR preprocessor/30363
681c6ab0
FF
1025 * traditional.c (replace_args_and_push): Add local variable
1026 cxtquote, calculate the replacement text size assuming a
1027 worst case of every input character quoted with backslash,
1028 and properly handle output quoting of quote characters in
1029 actual arguments used in function-like macros.
1030
33ae4837
TT
10312008-01-03 Tom Tromey <tromey@redhat.com>
1032
765d600a 1033 PR preprocessor/34602
33ae4837
TT
1034 * directives.c (do_line): Don't try to spell EOF token.
1035 (do_linemarker): Add comment.
1036
675575f5
DD
10372007-12-11 DJ Delorie <dj@redhat.com>
1038
1039 * charset.c (convert_using_iconv): Close out any shift states,
1040 returning to the initial state.
1041
97f6bd40
TT
10422007-12-06 Tom Tromey <tromey@redhat.com>
1043
765d600a 1044 PR c/29172
97f6bd40
TT
1045 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1046 type.
1047 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1048 * files.c (FILE_HASH_POOL_SIZE): New macro.
1049 (struct file_hash_entry_pool): New.
1050 (destroy_all_cpp_files): New function.
1051 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1052 (new_file_hash_entry): Update.
1053 (free_file_hash_entries): New function.
1054 (_cpp_cleanup_files): Call free_file_hash_entries and
1055 destroy_all_cpp_files.
1056 (cpp_clear_file_cache): New function.
1057 * include/cpplib.h (cpp_clear_file_cache): Declare.
1058
d56a25e1
TT
10592007-12-03 Tom Tromey <tromey@redhat.com>
1060
765d600a 1061 PR preprocessor/34288
d56a25e1
TT
1062 * configure.ac, config.in: Rebuilt.
1063 * configure.ac: Check for ssize_t.
1064
607f74e9
TT
10652007-11-30 Tom Tromey <tromey@redhat.com>
1066
765d600a 1067 PR preprocessor/32868
607f74e9
TT
1068 * macro.c (_cpp_create_definition): Special case
1069 __STDC_FORMAT_MACROS.
1070
b0f4807f
MM
10712007-11-16 Michael Matz <matz@suse.de>
1072
1073 * files.c (search_path_head): Fix check for absolute paths.
1074
f1e20710
TT
10752007-11-11 Tom Tromey <tromey@redhat.com>
1076
765d600a 1077 PR c++/17557
f1e20710
TT
1078 * include/cpplib.h (cpp_included_before): Declare.
1079 * files.c (struct file_hash_entry) <location>: New field.
1080 (_cpp_find_file): Initialize new field.
1081 (make_cpp_dir): Likewise.
1082 (cpp_included_before): New function.
1083
f373b44d
TT
10842007-11-01 Tom Tromey <tromey@redhat.com>
1085
765d600a 1086 PR preprocessor/30805
f373b44d
TT
1087 * macro.c (paste_tokens): Handle padding token.
1088 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1089
5b9a40df
TT
10902007-10-31 Tom Tromey <tromey@redhat.com>
1091
765d600a 1092 PR preprocessor/30786
5b9a40df
TT
1093 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1094 * directives.c (_cpp_do__Pragma): Return error status.
1095 * internal.h (_cpp_do__Pragma): Update.
1096 * directives.c (get__Pragma_string): Back up if EOF seen.
1097
5ffeb913
TT
10982007-09-06 Tom Tromey <tromey@redhat.com>
1099
1100 * internal.h (struct cpp_reader) <invocation_location>: New
1101 field.
1102 (struct cpp_reader) <set_invocation_location>: Likewise.
1103 * init.c (cpp_set_line_map): New function.
1104 * line-map.c (linemap_add): Use linemap's allocator.
1105 * include/line-map.h (GTY): Define.
1106 (line_map_realloc): New typedef.
1107 (struct line_map): Mark with GTY.
1108 (struct line_maps): Likewise.
1109 (struct line_maps) <maps>: Likewise.
1110 (struct line_maps) <reallocator>: New field.
1111 * include/symtab.h (GTY): Conditionally define.
1112 * include/cpplib.h (cpp_set_line_map): Declare.
1113 (cpp_get_token_with_location): Declare.
1114 * macro.c (cpp_get_token): Set invocation_location on the reader.
1115 (cpp_get_token_with_location): New function.
1116
ac6b1c67
CF
11172007-08-30 Chao-ying Fu <fu@mips.com>
1118
1119 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1120 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1121 (cpp_classify_number): Support decimal fixed-point constants without
1122 exponents.
1123 Warn about fixed-point constants when -pedantic.
1124 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1125 comments to support fixed-point values.
1126 (CPP_N_FRACT, CPP_N_ACCUM): Define.
1127
cda5e672
TT
11282007-08-18 Tom Tromey <tromey@redhat.com>
1129
765d600a 1130 PR preprocessor/32974
cda5e672
TT
1131 * directives.c (parse_include): Don't check for EOL when
1132 processing #pragma dependency.
1133
ccfc4c91
OW
11342007-07-30 Ollie Wild <aaw@google.com>
1135
1136 * directives-only.c: New file.
1137 * internal.h (struct _cpp_dir_only_callbacks): New.
1138 (_cpp_preprocess_dir_only): New function.
1139 * directives.c (_cpp_handle_directive): Check directives_only before
1140 disabling execution of indented directives.
1141 * files.c (_cpp_stack_file): Add directives_only check.
1142 * include/cpplib.h (struct cpp_options): Add directives_only.
1143 (cpp_init_special_builtins): New function.
1144 * init.c (cpp_init_special_builtins): New function.
1145 (cpp_init_builtins): Move builtin_array initialization to
1146 cpp_init_special_builtins.
1147 (post_options): Check directives_only before setting
1148 pfile->state.prevent_expansion = 1.
1149 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1150 is expanded inside a directive while -fdirectives-only is enabled.
1151 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1152 (libcpp_a_SOURCES): Add directives-only.c.
1153
a206413a
UB
11542007-07-04 Uros Bizjak <ubizjak@gmail.com>
1155
1156 * traditional.c (_cpp_scan_out_logical_line): Initialize
1157 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1158 fmacro.args to prevent 'may be used uninitialized' warning.
1159
c77cd3d1
UB
11602007-07-03 Uros Bizjak <ubizjak@gmail.com>
1161
1162 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1163 Add new constants.
1164 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1165 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1166 for 'q' or 'Q' suffixes.
1167
66938a1d
DS
11682007-06-17 Danny Smith <dannysmith@users.sourceforge.net
1169
e1311401 1170 * files.c (open_file): Correct typo.
66938a1d 1171
71995ede
VP
11722007-06-16 Vladimir Prus <vladimir@codesourcery.com>
1173
e1311401 1174 * files.c (open_file): Prevent the call
71995ede
VP
1175 for stat from overwriting errno.
1176
84152c25
VP
11772007-06-09 Vladimir Prus <vladimir@codesourcery.com>
1178
e1311401 1179 * files.c (open_file): Account for the
84152c25
VP
1180 fact that on windows, opening a directory gives
1181 EACCES.
1182
f7fd775f
JW
11832007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
1184
1185 PR preprocessor/23479
1186 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
1187 integer constants.
1188 (append_digit): Likewise.
1189 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
1190 binary integer constants.
1191
ed0e74e0
DK
11922007-05-31 Dave Korn <dave.korn@artimi.com>
1193
1194 PR preprocessor/14331
1195 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
1196
a702045a
OW
11972007-05-24 Ollie Wild <aaw@google.com>
1198
1199 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
1200 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
1201 (cpp_write_pch_state): Save __COUNTER__ state.
1202 (cpp_valid_state): Check valid __COUNTER__ state.
1203 (cpp_read_state): Read new __COUNTER__ state.
1204 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
1205 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
1206 * internal.h (struct cpp_reader): Add counter member.
1207
126e073b
SM
12082007-05-23 Simon Martin <simartin@users.sourceforge.net>
1209
1210 PR preprocessor/20077
1211 * macro.c (create_iso_definition): Fixed the method to determine
1212 whether the token-pasting operator appears at the beginning or the end
1213 of a macro.
1214
0b4cafec
ILT
12152007-05-21 Ian Lance Taylor <iant@google.com>
1216
1217 * internal.h (struct cpp_reader): Add new fields:
1218 nonexistent_file_hash and nonexistent_file_ob.
1219 * files.c: Include "obstack.h".
1220 (find_file_in_dir): Before trying to open the file, look up the
1221 path name in the hash table of nonexistent files. After failing
1222 to open the file, add the path name to the hash table.
1223 (_cpp_find_file): Cache the results of looking up the file name
1224 starting with the quote and bracket chain heads, if we can.
1225 (nonexistent_file_hash_eq): New static function.
1226 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
1227 pfile->nonexistent_file_ob.
1228 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
1229 pfile->nonexistent_file_ob.
1230
30e04921
JJ
12312007-05-14 Janis Johnson <janis187@us.ibm.com>
1232
5a6bb57e
JJ
1233 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
1234
30e04921
JJ
1235 PR c/31924
1236 * expr.c (interpret_float_suffix): Check for invalid suffix.
1237
22a8a52d
EC
12382007-05-02 Eric Christopher <echristo@apple.com>
1239
1240 * expr.c (num_div_op): Don't overflow if the result is
1241 zero.
1242
fca35e1b
TT
12432007-05-02 Tom Tromey <tromey@redhat.com>
1244
765d600a 1245 PR preprocessor/28709
fca35e1b
TT
1246 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
1247
4cd97075
MM
12482007-03-30 Michael Meissner <michael.meissner@amd.com>
1249
1250 * directives.c (lex_macro_node_from_str): Fix alloca call to be
1251 type correct.
1252
121de39f
RH
12532007-03-30 Richard Henderson <rth@redhat.com>
1254
1255 * directives.c (lex_macro_node_from_str): New.
1256 (cpp_push_definition, cpp_pop_definition): New.
1257 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
1258
4fcb360b
BM
12592007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1260
1261 * Makefile.in: Add dummy install-pdf target.
1262
67e64439
TT
12632007-01-30 Tom Tromey <tromey@redhat.com>
1264
765d600a 1265 PR preprocessor/30468
67e64439
TT
1266 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
1267 './'.
1268
ee380365
TT
12692007-01-30 Tom Tromey <tromey@redhat.com>
1270
765d600a 1271 PR preprocessor/29966
ee380365
TT
1272 * macro.c (lex_expansion_token): Save and restore cpp_reader's
1273 cur_token.
1274 (_cpp_create_definition): Don't restore cur_token here.
1275 * lex.c (_cpp_lex_token): Added assertion.
1276
024abeb3
TT
12772007-01-27 Tom Tromey <tromey@redhat.com>
1278
1279 * configure: Rebuilt.
1280
ee1c2a10
TT
12812007-01-12 Tom Tromey <tromey@redhat.com>
1282
765d600a 1283 PR preprocessor/28227
ee1c2a10
TT
1284 * directives.c (lex_macro_node): Added 'is_def_or_undef'
1285 argument.
1286 (do_define): Update.
1287 (do_undef): Update.
1288 (do_ifdef): Update.
1289 (do_ifndef): Update.
1290
67214c16
PB
12912007-01-11 Paolo Bonzini <bonzini@gnu.org>
1292
1293 * configure: Regenerate.
1294
1aa6ca40
PB
12952007-01-11 Paolo Bonzini <bonzini@gnu.org>
1296
1297 * configure: Regenerate.
1298
705e2d28
TT
12992007-01-04 Tom Tromey <tromey@redhat.com>
1300
765d600a 1301 PR preprocessor/28165
705e2d28
TT
1302 * internal.h (cpp_in_primary_file): New function.
1303 * directives.c (do_include_next): Use cpp_in_primary_file.
1304 (do_pragma_once): Likewise.
1305 (do_pragma_system_header): Likewise.
1306
7af45bd4
ILT
13072006-12-29 Ian Lance Taylor <iant@google.com>
1308
1309 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
1310 look backward at the end of the line unless we saw a backslash.
1311
9d30f270
JJ
13122006-12-29 Jakub Jelinek <jakub@redhat.com>
1313
1314 PR preprocessor/29612
1315 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
1316 only when new_sysp is non-zero.
1317
30b0edc0
TT
13182006-12-28 Tom Tromey <tromey@redhat.com>
1319
765d600a 1320 PR preprocessor/30001
30b0edc0
TT
1321 * charset.c (_cpp_convert_input): Check that to.len is greater
1322 than zero.
1323
85d9c13c
TS
13242006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1325
1326 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 1327 * configure: Rebuilt.
85d9c13c 1328
dfafdaa6
DG
13292006-11-01 Douglas Gregor <doug.gregor@gmail.com>
1330
1331 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
1332 for experimental C++0x mode.
1333 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
1334 adopted the preprocessor changes introduced in C99.
1335
0f45f0f5
JM
13362006-10-29 Joseph Myers <joseph@codesourcery.com>
1337
1338 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
1339 depending on --enable-targets=all.
1340 * configure: Regenerate.
1341
de000d22
JJ
13422006-10-12 Jakub Jelinek <jakub@redhat.com>
1343
1344 PR preprocessor/28709
1345 * macro.c (paste_tokens): Do error reporting here, use BUF with the
1346 spelled LHS token as opposed to spelling it again.
1347 (paste_all_tokens): Don't report errors here, just break on failure.
1348
b5422ad7
BM
13492006-10-10 Brooks Moses <bmoses@stanford.edu>
1350
1351 * Makefile.in: Added empty "pdf" target.
1352
aaf50ff2
GK
13532006-09-22 Geoffrey Keating <geoffk@apple.com>
1354
1355 * configure.ac: Make need_64_bit_hwint case for x86-darwin
1356 match exactly the glob in gcc/config.gcc.
1357 * configure: Regenerate.
1358
c663e301
JM
13592006-09-13 Joseph S. Myers <joseph@codesourcery.com>
1360
1361 PR c/28768
1362 PR preprocessor/14634
1363 * lex.c (lex_string): Pedwarn for unterminated literals.
1364
f7288899
EC
13652006-09-08 Eric Christopher <echristo@apple.com>
1366
1367 * configure.ac: Add 64-bit HWI support for i?86-darwin.
1368
b52dbbf8
SE
13692006-08-14 Steve Ellcey <sje@cup.hp.com>
1370
1371 PR c++/28288
1372 PR c++/14556
1373 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
1374 (CPP_LAST_EQ): Change.
1375 (CPP_LAST_PUNCTUATOR): Change.
1376 * expr.c (cpp_operator): Remove MIN and MAX.
1377 (reduce): Remove CPP_MIN and CPP_MAX.
1378 (num_binary_op): Ditto.
1379 * lex.c (_cpp_lex_direct): Ditto.
1380 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
1381
1c90c6f9
JJ
13822006-06-09 Jakub Jelinek <jakub@redhat.com>
1383
1384 PR preprocessor/27746
1385 * directives.c (do_pragma): Handle pragma with valid namespace
1386 and invalid name coming from macro expansion.
1387 * directives.c (destringize_and_run): Initialize next field in
1388 context.
1389
1390 PR c/27747
1391 PR c++/27748
1392 * directives.c (destringize_and_run): Set NO_EXPAND on the
1393 tokens.
1394
1395 * macro.c (_cpp_backup_tokens): Fix comment typo.
1396
5c3c3683
DJ
13972006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
1398
1399 * Makefile.in (CATALOGS): Add po/ prefix.
1400 * configure: Regenerated.
1401
b2bd74bc
CD
14022006-05-23 Carlos O'Donell <carlos@codesourcery.com>
1403
1404 * Makefile.in: Add install-html target. Add install-html to .PHONY
1405
be8ac3e2
GZ
14062006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
1407
1408 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
1409 * files.c (_cpp_get_file_stat): New function.
1410 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
1411 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
1412 * internal.h (_cpp_get_file_stat): Prototype.
1413 (struct cpp_buffer): Add timestamp.
1414
83900997
JJ
14152006-01-23 Jakub Jelinek <jakub@redhat.com>
1416
1417 PR preprocessor/25717
1418 * init.c (cpp_init_builtins): If __STDC__ will not change value
1419 between system headers and other sources, define it as a normal
1420 macro rather than a builtin.
1421 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
1422 cpp_in_system_header condition.
1423
14242006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
1425
1426 * Makefile.in: Use -MMD instead of -MD.
1427
bc4071dd
RH
14282006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
1429 Richard Henderson <rth@redhat.com>
1430
1431 Merge from gomp branch:
1432 * directives.c (struct pragma_entry): Add is_deferred. Add ident
1433 entry to value union.
1434 (end_directive): Don't eat the line if in_deferred_pragma.
1435 (run_directive): Remove pragma hacks.
1436 (insert_pragma_entry): Remove.
1437 (new_pragma_entry): New.
1438 (register_pragma_1): Split out of register_pragma. Only handle
1439 the lookup tree and return the new entry.
1440 (cpp_register_pragma): Fill in the pragma entry here.
1441 (cpp_register_deferred_pragma): New.
1442 (register_pragma_internal): New.
1443 (_cpp_init_internal_pragmas): Use register_pragma_internal.
1444 (do_pragma): Allow pragma expansion after namespace. For deferred
1445 pragmas, don't slurp the line into a string.
1446 (destringize_and_run): Save tokens for deferred pragmas.
1447 (cpp_handle_deferred_pragma): Remove.
1448 * macro.c (builtin_macro): Remove pragma token hack.
1449 (_cpp_push_token_context): Rename from push_token_context and export.
1450 * internal.h (struct lexer_state): Add pragma_allow_expansion.
1451 (_cpp_push_token_context): Declare.
1452 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
1453 a token. Update the line number correctly if so.
1454 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
1455 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
1456 * include/cpplib.h (PRAGMA_EOL): New.
1457 (CPP_TOKEN_FLD_PRAGMA): New.
1458 (struct cpp_token): Add val.pragma.
1459 (struct cpp_options): Remove defer_pragmas.
1460 (cpp_handle_deferred_pragma): Remove.
1461 (cpp_register_deferred_pragma): Declare.
1462
d09e893f
JJ
14632006-01-01 Jakub Jelinek <jakub@redhat.com>
1464
1465 PR c++/25294
1466 * directives.c (do_pragma): If pragma line ends with multi-line
1467 block comment, end the saved deferred pragma string before that
1468 comment. Handle embedded '\0' chars on the pragma line.
1469
ab84748a
VR
14702005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1471
1472 PR c++/23333
1473 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
1474
ad6ed77e
JG
14752005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
1476 Ben Elliston <bje@au.ibm.com>
1477
1478 * include/cpplib.h (CPP_N_DFLOAT): New.
1479 * expr.c (interpret_float_suffix): Identify df, dd, and dl
1480 suffixes as decimal floating point constants.
1481 (cpp_classify_number): Disallow hexadecimal DFP constants.
1482
ba096620 14832005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 1484 Ian Lance Taylor <ian@airs.com>
ba096620
GP
1485
1486 * include/cpplib.h (struct cpp_callbacks): Annotate error with
1487 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
1488
456b8ce5
UB
14892005-11-09 Per Bothner <per@bothner.com>
1490 Uros Bizjak <uros@kss-loka.si>
f7288899 1491
456b8ce5
UB
1492 PR c/24101
1493 * init.c (read_original_filename): Temporarily set
1494 state.in_directive before calling _cpp_lex_direct for
1495 CPP_HASH tokens.
1496
5571f74f
JW
14972005-11-03 James E Wilson <wilson@specifix.com>
1498
1499 PR preprocessor/24202
1500 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
1501
a63607ed
JM
15022005-11-04 Joseph S. Myers <joseph@codesourcery.com>
1503
1504 * include/cpplib.h (struct cpp_callbacks): Make error take
1505 va_list* parameter.
1506 * errors.c (cpp_error): Update call to callback.
1507
651ed942
AP
15082005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
1509
1510 PR preprocessor/22042
1511 * macro.c (_cpp_builtin_macro_text): Lower the needed max
1512 buffer size.
1513 (cpp_quote_string): Don't octalify non printable
1514 charactors.
1515
178b58b5
JM
15162005-11-03 Joseph S. Myers <joseph@codesourcery.com>
1517
1518 PR c++/17964
1519 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
1520 (struct cpp_callbacks): Add error.
1521 * errors.c (cpp_error): If client_diagnostic, use error callback.
1522 * charset.c (convert_escape): Don't use %03o in diagnostic.
1523
3ee5ed11 15242005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
1525
1526 PR preprocessor/15220
1527 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
1528 callers. Pass to open_file_failed.
1529 (open_file_failed): New parameter angle_brackets. Fix all callers.
1530 Use in print_dep assignment.
1531 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
1532 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 1533
077fc835
KH
15342005-10-08 Kazu Hirata <kazu@codesourcery.com>
1535
1536 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
1537 * configure: Regenerate.
1538
cbc43ae0
ILT
15392005-10-04 Ian Lance Taylor <ian@airs.com>
1540
1541 PR preprocessor/13726
1542 * directives.c (check_eol_return_comments): New static function.
1543 (parse_include): Add buf parameter. Change all callers.
1544 (do_include_common): If not discard comments, turn on
1545 save_comments. Pass collected comments to include callback.
1546 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
1547 include callback: cpp_token list.
1548
af15a2fe
JM
15492005-09-20 Joseph S. Myers <joseph@codesourcery.com>
1550
1551 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
1552 * init.c (struct lang_flags, lang_defaults): Add
1553 extended_identifiers.
1554 (cpp_set_lang): Use it.
1555 * lex.c (forms_identifier_p): Check extended_identifiers.
1556
f5eab47e
JJ
15572005-08-30 Jakub Jelinek <jakub@redhat.com>
1558
1559 PR preprocessor/20348
1560 PR preprocessor/20356
1561 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
1562 2004-06-05 changes.
1563
467129e6
KG
15642005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1565
1566 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
1567 -Wmissing-format-attribute.
1568
1569 * configure: Regenerate.
1570
200031d1
KC
15712005-06-29 Kelley Cook <kcook@gcc.gnu.org>
1572
1573 * all files: Update FSF address in copyright headers.
1574 * makeucnid.c (write_copyright): Update outputted FSF address.
1575
f610dd5f
ZW
15762005-06-13 Zack Weinberg <zack@codesourcery.com>
1577
1578 * configure.ac: Invoke ZW_CREATE_DEPDIR and
1579 ZW_PROG_COMPILER_DEPENDENCIES.
1580 * aclocal.m4, configure: Regenerate.
1581 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
1582 New variables.
1583 (distclean): Clean up $(DEPDIR) and its contents.
1584 (.c.o): Use $(COMPILE).
1585 Include $(DEPDIR)/*.Po for most object->header dependencies.
1586
c3f829c1
GDR
15872005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1588
1589 * configure.ac: Check declarations for asprintf and vasprintf.
1590 * config.in: Regenerate.
1591 * configure: Likewise.
1592
1593 * charset.c (conversion_loop): Use XRESIZEVEC.
1594 (convert_no_conversion): Likewise.
1595 (convert_using_iconv): Likewise.
1596 (init_iconv_desc): Cast return value of alloca.
1597 (cpp_host_to_exec_charset): Use XNEWVEC.
1598 (emit_numeric_escape): Use XRESIZEVEC.
1599 (cpp_interpret_string): Use XNEWVEC.
1600 (cpp_interpret_string): Use XRESIZEVEC.
1601 (_cpp_interpret_identifier): Cast return value of alloca.
1602 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
1603 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
1604 (parse_include): Use XNEWVEC.
1605 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 1606 "new_entry".
c3f829c1
GDR
1607 (save_registered_pragmas): Cast return value of xmemdup.
1608 (destringize_and_run): Same for alloca.
1609 (parse_assertion): Likewise.
1610 (do_assert): Cast allocated storage to proper type.
1611 (cpp_define): Likewise.
1612 (_cpp_define_builtin): Likewise.
1613 (cpp_undef): Likewise.
1614 (handle_assertion): Likewise.
1615 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
1616 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
1617 (CPP_UMINUS): Likewise.
1618 (struct cpp_operator): Rename from struct operator.
1619 (_cpp_expand_op_stack): Use XRESIZEVEC.
1620 * files.c (pch_open_file): Use XNEWVEC.
1621 (pch_open_file): Use XRESIZEVEC.
1622 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
1623 (dir_name_of_file): Use XNEWVEC.
1624 (make_cpp_file): Use XCNEW.
1625 (make_cpp_dir): Likewise.
1626 (allocate_file_hash_entries): USE XNEWVEC.
1627 (cpp_included): Cast return value of htab_find_with_hash.
1628 (append_file_to_dir): Use XNEWVEC.
1629 (read_filename_string): Likewise. Use XRESIZEVEC too.
1630 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
1631 (remap_filename): Use XNEWVEC.
1632 (struct pchf_entry): Move definition out of struct pchf_data.
1633 (_cpp_save_file_entries): Use XCNEWVAR.
1634 (_cpp_read_file_entries): Use XNEWVAR.
1635 * identifiers.c (alloc_node): Use XOBNEW.
1636 * init.c (cpp_create_reader): Use XCNEW.
1637 (cpp_init_builtins): Cast of b->value to enum builtin_type.
1638 (read_original_directory): Cast return value of alloca.
1639 * lex.c (add_line_note): Use XRESIZEVEC.
1640 (warn_about_normalization): Use XNEWVEC.
1641 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
1642 (new_buff): Use XNEWVEC.
1643 * line-map.c (linemap_add): Use XRESIZEVEC.
1644 * macro.c (builtin_macro): Cast return value of alloca.
1645 (paste_tokens): Likewise.
1646 (expand_arg): Use XNEWVEC and XRESIZEVEC.
1647 (_cpp_save_parameter): Use XRESIZEVEC.
1648 (create_iso_definition): Cast allocated storage to proper type.
1649 (_cpp_create_definition): Likewise.
1650 (cpp_macro_definition): Use XRESIZEVEC.
1651 * makedepend.c (add_clm): Use XNEW.
1652 (add_dir): Likewise.
1653 * mkdeps.c (munge): Use XNEWVEC.
1654 (deps_init): Use XCNEW.
1655 (deps_add_target): Use XRESIZEVEC.
1656 (deps_add_default_target): Cast return value of alloca.
1657 (deps_add_dep): Use XRESIZEVEC.
1658 (deps_add_vpath): Likewise. Use XNEWVEC too.
1659 (deps_restore): Likewise.
1660 * pch.c (save_idents): Use XNEW and XNEWVEC.
1661 (cpp_save_state): Use XNEW.
1662 (count_defs): Cast return value of htab_find.
1663 (write_defs): Likewise.
1664 (cpp_write_pch_deps): Use XNEWVEC.
1665 (collect_ht_nodes): Use XRESIZEVEC.
1666 (cpp_valid_state): Use XNEWVEC.
1667 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
1668 * symtab.c (ht_create): Use XCNEW.
1669 (ht_lookup_with_hash): Cast return value of obstack_copy0.
1670 (ht_expand): Use XCNEWVEC.
1671 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
1672 (bool): Do not define if __cplusplus.
1673
1ed17cd5
ZW
16742005-05-12 Zack Weinberg <zack@codesourcery.com>
1675
1676 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
1677 (do_sccs): Delete function definition, #define to do_ident.
1678 (do_ident): Don't hardwire directive name.
1679
5a8c20ce
RK
16802005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
1681
1682 PR bootstrap/21230
1683 * configure: Regenerate.
1684
473c5bc9
AP
16852005-04-27 Andris Pavenis <pavenis@latnet.lv>
1686
1687 * files.c: Include io.h for DJGPP to get prototype of setmode.
1688
c1fc5047
PB
16892005-04-19 Per Bothner <per@bothner.com>
1690
1691 PR preprocessor/20907
1692 * line-map.c (linemap_line_start): Fix bug when we need to increse
1693 column_bits but can re-use the current line_map.
1694
042630ad
KG
16952005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1696
1697 * system.h (fopen, fdopen, freopen): Define these to the unlocked
1698 libiberty functions.
1699
0d667716
KG
17002005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1701
1702 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
1703 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
1704 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
1705 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
1706 _unlocked function.
1707 (fwrite_unlocked): Fix prototype.
1ed17cd5 1708
0d667716
KG
1709 * configure, config.in: Regenerate.
1710
cae064e7
JJ
17112005-04-05 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR preprocessor/19475
1714 * macro.c (create_iso_definition): For < ISO C99, don't
1715 pedwarn if there is no whitespace between macro name and its
1716 replacement, but the replacement starts with a basic character
1717 set character.
1718
cbada204
AJ
17192005-03-28 Andreas Jaeger <aj@suse.de>
1720
1721 * lex.c (warn_about_normalization): Cast field width to int to
1722 avoid warning.
1723
f42eccdb
JM
17242005-03-19 Joseph S. Myers <joseph@codesourcery.com>
1725
1726 * configure.ac: Consistently use solaris2.1[0-9]* instead of
1727 solaris2.1[0-9].
1728 * configure: Regenerate.
1729
c79e602b
GK
17302005-03-15 Geoffrey Keating <geoffk@apple.com>
1731
1732 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
1733 UCN rather than printing an error.
1734
50668cf6
GK
17352005-03-14 Geoffrey Keating <geoffk@apple.com>
1736
6baba9bb
GK
1737 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
1738
17392005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 1740
50668cf6
GK
1741 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
1742 * charset.c: Update for new format of ucnid.h.
1743 (ucn_valid_in_identifier): Update for new format of ucnid.h.
1744 Add NST parameter, and update it; update callers.
1745 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
1746 with cpp_error.
1747 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
1748 * internal.h (struct normalize_state): New.
1749 (INITIAL_NORMALIZE_STATE): New.
1750 (NORMALIZE_STATE_RESULT): New.
1751 (NORMALIZE_STATE_UPDATE_IDNUM): New.
1752 (_cpp_valid_ucn): New.
1753 * lex.c (warn_about_normalization): New.
1754 (forms_identifier_p): Add normalize_state parameter, update callers.
1755 (lex_identifier): Add normalize_state parameter, update callers. Keep
1756 the state current.
1757 (lex_number): Likewise.
1758 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
1759 it with warn_about_normalization.
1760 * makeucnid.c: New.
1761 * ucnid.h: Replace.
1762 * ucnid.pl: Remove.
1763 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
1764 comments about obsolete version of C++.
1765 * include/cpplib.h (enum cpp_normalize_level): New.
1766 (struct cpp_options): Add warn_normalize field.
1767
47e20491
GK
17682005-03-11 Geoffrey Keating <geoffk@apple.com>
1769
1770 * directives.c (glue_header_name): Update call to cpp_spell_token.
1771 * internal.h (_cpp_interpret_identifier): New.
1772 * charset.c (_cpp_interpret_identifier): New.
1773 (_cpp_valid_ucn): Allow UCN version of '$'.
1774 * lex.c (lex_identifier): Add extra parameter to indicate if initial
1775 character was '$' or '\'. Support identifiers with UCNs.
1776 (forms_identifier_p): Allow UCNs.
1777 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
1778 (utf8_to_ucn): New.
1779 (cpp_spell_token): Add FORSTRING parameter. Use it.
1780 (cpp_token_as_text): Update call to cpp_spell_token.
1781 (cpp_output_token): Write UCNs back out.
1782 (stringify_arg): Update call to cpp_spell_token.
1783 (paste_tokens): Likewise.
1784 (cpp_macro_definition): Likewise.
1785 * macro.c (stringify_arg): Likewise.
1786 (paste_tokens): Likewise.
1787 (cpp_macro_definition): Likewise.
1788 * include/cpplib.h: Add parameter to cpp_spell_token.
1789
73096711
JJ
17902005-03-04 Jakub Jelinek <jakub@redhat.com>
1791
1792 PR bootstrap/20282
1793 PR bootstrap/20305
1794 * macro.c (replace_args, cpp_get_token): Copy whole
1795 cpp_token_u instead of just cpp_string field from it.
1796
2203a881
DP
17972005-02-28 Devang Patel <dpatel@apple.com>
1798
1799 * directives.c (do_line): Save sysp early before line table is
1800 realloc'ed.
1ed17cd5 1801
c5ff069d
ZW
18022005-02-20 Zack Weinberg <zack@codesourcery.com>
1803
1804 PR 18785
1805 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
1806 (cpp_host_to_exec_charset): New function.
1807 * include/cpplib.h: Declare cpp_host_to_exec_charset.
1808
04c90eea
DP
18092005-02-19 Devang Patel <dpatel@apple.com>
1810
1811 * charset.c (_cpp_convert_input): Check '\r' before inserting
1812 '\n' at the end.
c5ff069d 1813
6da55c00
EC
18142005-02-15 Eric Christopher <echristo@redhat.com>
1815
1816 PR preprocessor/19077
1817 * macro.c (cpp_macro_definition): Move handling of whitespace
1818 to PREV_WHITE conditional. Remove overloading of len
1819 variable.
1820
31c3e631
KH
18212005-02-14 Kazu Hirata <kazu@cs.umass.edu>
1822
1823 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
1824 traditional.c: Update copyright.
1825
be0f1e54
PB
18262005-02-14 Paolo Bonzini <bonzini@gnu.org>
1827
1828 PR bootstrap/19818
1829 * configure.ac: Check for declaration of basename and getopt.
1830 * config.in: Regenerate.
1831 * configure: Regenerate.
1832 * internal.h (ustrcspn): New.
1833 * macro.c (create_iso_definition): Fix allocation of memory.
1834 (padding_token): Add cast to remove const-ness.
1835 * pch.c (cpp_read_state): Use ustrcspn.
1836
ecddfb39
MS
18372005-02-08 Mike Stump <mrs@apple.com>
1838
1839 * files.c (pchf_adder): Remove.
1840 (struct pchf_adder_info): Likewise.
1841 (_cpp_save_file_entries): Write out all files so that #import works.
1842
9fcdd891
JM
18432005-01-23 Joseph S. Myers <joseph@codesourcery.com>
1844
1845 * configure: Regenerate.
1846
ecfd72e7
TS
18472005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1848
1849 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
1850
6c25a4f7 1851 * include/cpplib.h: Also update copyright years.
c5ff069d 1852
942926ad
GK
18532005-01-03 Geoffrey Keating <geoffk@apple.com>
1854
1855 * files.c (_cpp_find_file): Add files found by search_path_exhausted
1856 to the list of all files.
1857
a2566ae9
GDR
18582005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1859
1860 * internal.h: Update references to Cpp lib filenames.
1861 * directives.c: Likewise.
1862 * init.c: Likewise.
1863 * macro.c: Likewise.
1864 * traditional.c: Likewise.
1865
1b449375
EB
18662004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
1867
1868 PR preprocessor/15167
1869 * files.c (destroy_cpp_file): New function.
1870 (should_stack_file): Make a new file if the
1871 compared file is still stacked.
1872
28303828
NN
18732004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
1874
c5ff069d 1875 PR preprocessor/17610
28303828
NN
1876 * directives.c (do_include_common): Error out if an empty filename
1877 is given for #include (or #include_next or #import).
1878
c812785a
RS
18792004-11-27 Roger Sayle <roger@eyesopen.com>
1880 Zack Weinberg <zack@codesourcery.com>
1881
1882 * internal.h: Replace all uses of uchar with unsigned char.
1883 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
1884 with !IN_GCC, so uchar is only defined whilst building libcpp.
1885
f91eaa01
KC
18862004-11-24 Kelley Cook <kcook@gcc.gnu.org>
1887
1888 * aclocal.m4: Regenerate.
1889
f78ce0c2
RS
18902004-11-24 Roger Sayle <roger@eyesopen.com>
1891
1892 PR preprocessor/15824
1893 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
1894 directly, instead of the non-existant "system.h" and "ansidecl.h".
1895 * configure: Regenerate.
1896
b5b3e36a 18972004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1898 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
1899
1900 * internal.h (struct lexer_state): Add in_deferred_pragma.
1901 * directives.c (struct pragma_entry): Add allow_expansion.
1902 (insert_pragma_entry): Take allow_expansion flag.
1903 (register_pragma): Likewise.
1904 (cpp_register_pragma): Likewise.
1905 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
1906 (do_pragma): Honor allow_expansion.
1907 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
1908 * include/cpplib.h (cpp_register_pragma): Update prototype.
1909
a8e68029 19102004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 1911 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
1912
1913 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
1914 need_64bit_hwint=yes.
1915 * configure: Regenerate.
1916
50f47ee0
JM
19172004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1918
1919 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
1920 po/$(PACKAGE).pot.
1921 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
1922 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
1923 Remove local srcdir path from generated file.
1924
968e08d6 19252004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 1926 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
1927
1928 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1929 as well.
1930
3da3d587
ZW
19312004-10-27 Zack Weinberg <zack@codesourcery.com>
1932
1933 PR 18075
1934 * directives.c (do_pragma): Do not defer pragmas which are unknown.
1935 (cpp_handle_deferred_pragma): Add cast to silence warning.
1936
ac24fc25
JM
19372004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
1938
1939 * errors.c (_cpp_begin_message): Print "error: " for errors.
1940
7731405b
AJ
19412004-10-10 Andreas Jaeger <aj@suse.de>
1942
1943 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
1944 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
1945
646544e3
AP
19462004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1947
1948 * pch.c (cpp_write_pch_state): Remove variable z as it is not
1949 used.
1950 (cpp_read_state): Remove unused variables, m, d and mac_count.
1951
67a74146
PB
19522004-09-29 Per Bothner <per@bothner.com>
1953
1954 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
1955 cb.line_change. Otherwise do_pragma will call the line_change
1956 call-back with a meaningless line number.
1957
018a4785
ZW
19582004-09-24 Zack Weinberg <zack@codesourcery.com>
1959
1960 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
1961 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
1962 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
1963 * aclocal.m4, configure: Regenerate.
1964 * init.c: Include localedir.h.
1965 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
1966 (DEFS): Delete.
1967 (.c.o): Use $(ALL_CFLAGS).
1968 (localedir.h, localedir.hs): New rules.
1969 (clean): Use rm -rf to remove directories.
1970 (distclean): Also delete localedir.h and localedir.hs.
1971 (init.o): Update dependencies.
1972
88fa57d7
KC
19732004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1974
1975 * Makefile.in (aclocal.m4): Update dependencies.
1976 * configure.ac (AC_CONFIG_MACRO_DIR): New.
1977 * aclocal.m4, configure: Regenerate.
1978
8f8e9aa5
ZW
19792004-09-17 Zack Weinberg <zack@codesourcery.com>
1980
a29f62d9
ZW
1981 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
1982 (_cpp_convert_input, _cpp_default_encoding): Add comments.
1983 Some other comments in this file also tweaked.
1984
8f8e9aa5
ZW
1985 * directives.c (do_pragma): Save current buffer position
1986 before lexing the pragma keywords; don't call
1987 _cpp_backup_tokens in the defer_pragmas case.
1988
a2981930
PB
19892004-09-15 Per Bothner <per@bothner.com>
1990
1991 * include/line-map.h (line_map_start): Add parameter names so
1992 preceding comment makes sense.
1993 (linemap_add): Remove from comment mention of non-existing parameter.
1994
21b11495
ZW
19952004-09-09 Matt Austern <austern@apple.com>
1996 Zack Weinberg <zack@codesourcery.com>
1997
1998 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
1999 prefixes throughout. Add entry for PRAGMA. Remove
2000 unnecessary "= 0" from EQ.
2001 (enum cpp_ttype): Adjust OP and TK definitions to restore
2002 prefixes, via token-paste.
2003 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2004 Change from #defines to additional cpp_ttype enumerators.
2005 (struct cpp_options): Add defer_pragmas.
2006 (cpp_handle_deferred_pragma): Prototype new interface.
2007
2008 * internal.h (struct cpp_reader): Add directive_result.
2009 * directives.c (struct pragma_entry): Add is_internal field;
2010 give boolean fields type bool.
2011 (start_directive): Initialize pfile->directive_result.type.
2012 (_cpp_do__Pragma): Likewise.
2013 (run_directive): Do not crash if pfile->buffer->prev is NULL.
2014 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2015 from it.
2016 (register_pragma): New static function, bulk of former
2017 cpp_register_pragma here; add 'internal' argument, pass along
2018 to insert_pragma_entry.
2019 (cpp_register_pragma): Now a wrapper around register_pragma which
2020 always passes false for 'internal' argument.
2021 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2022 true for 'internal'.
2023 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2024 an internal pragma, save text till the end of the line as a CPP_PRAGMA
2025 token instead of executing the pragma.
2026 (cpp_handle_deferred_pragma): New interface.
2027 * lex.c (token_spellings): Adjust OP and TK definitions to
2028 match changes to cpplib.h.
2029 (_cpp_lex_token): Check for a directive-result token and
2030 return it if present.
2031 (cpp_token_val_index): Handle CPP_PRAGMA.
2032 * macro.c (cpp_builtin_macro_text): Correct comment.
2033 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2034
0fd9e8dd
SB
20352004-09-06 Serge Belyshev <belyshev@lubercy.com>
2036
2037 PR preprocessor/14699
2038 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2039 from size_t to double.
2040
39b8ce7f
AS
20412004-08-28 Andreas Schwab <schwab@suse.de>
2042 Andreas Jaeger <aj@suse.de>
2043
2044 * configure.ac: Set PACKAGE correctly.
2045 * configure: Regenerated.
2046
5d1f4b27
PB
20472004-08-25 Paolo Bonzini <bonzini@gnu.org>
2048
2049 * Makefile.in: Add back top_builddir.
2050
078e3ffe
PB
20512004-08-25 Paolo Bonzini <bonzini@gnu.org>
2052
2053 * configure.ac: Replace Automake macro invocations
2054 with manual Autoconf checks and substitutions.
2055 * configure: Regenerate.
2056 * aclocal.m4: Regenerate.
2057 * config.in: Regenerate.
2058 * Makefile.am: Removed.
2059 * Makefile.in: Heavy simplification and reorganization.
2060
b3f8d95d
MM
20612004-08-09 Mark Mitchell <mark@codesourcery.com>
2062
2063 * configure.ac (arm*-*-eabi*): New target.
2064 (arm*-*-symbianelf*): Likewise.
2065 * configure: Regenerated.
2066
72bb2c39
BI
20672004-07-24 Bernardo Innocenti <bernie@develer.com>
2068
2069 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2070 * directives.c: Use XNEW-family macros from libiberty.
2071 * lex.c: Likewise.
2072 * macro.c: Likewise.
2073 * cpplib.h (cpp_deps_style): Export enum with name.
2074
21b11495 20752004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 2076
21b11495 2077 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 2078
a23ee064
AP
20792004-07-16 Andris Pavenis <pavenis@latnet.lv>
2080
2081 PR preprocessor/16366
2082 * internal.h (struct cpp_reader): New field dir_hash.
2083 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2084 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2085
a09d4744
NB
20862004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
2087
2088 PR preprocessor/16192
2089 PR preprocessor/15913
2090 PR preprocessor/15572
2091 * expr.c (_cpp_parse_expr): Handle remaining cases where an
2092 expression is missing.
2093 * init.c (post_options): Traditional cpp doesn't do // comments.
2094
f58f7def
PB
20952004-06-30 Per Bothner <per@bothner.com>
2096
2097 * include/line-map.h (fileline): Remove old typedef.
2098 * internal.h (struct cpp_reader): Use source_location typedef instead.
2099
e83d8d43
ZW
21002004-06-26 Zack Weinberg <zack@codesourcery.com>
2101
2102 Partially revert patch of 2004-06-05.
2103 * files.c (search_cache): Remove pfile argument. Don't check
2104 for file that would be found by "" or <> search here...
2105 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2106 Do not apply directory-of-current-file correction to files
2107 found by this check. Rearrange code slightly.
2108
c0d578e6
GK
21092004-06-21 Geoffrey Keating <geoffk@apple.com>
2110
2111 * files.c (should_stack_file): Correct swapped parameters to call
2112 to cb.read_pch.
2113 * pch.c (cpp_valid_state): Handle -fpreprocessed.
2114
159d5224
PB
21152004-06-15 Paolo Bonzini <bonzini@gnu.org>
2116
2117 * Makefile.in: Regenerate with automake 1.8.5.
2118 * aclocal.m4: Likewise.
2119 * configure: Regenerate.
2120
2fac9c01
ZW
21212004-06-11 Zack Weinberg <zack@codesourcery.com>
2122
2123 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2124 * configure, config.in: Regenerate.
2125 * system.h: Unconditionally define bool as unsigned char,
2126 BOOL_BITFIELD as unsigned int.
2127 * .cvsignore: New file.
2128
d8044160
GK
21292004-06-09 Geoffrey Keating <geoffk@apple.com>
2130
2131 * traditional.c (push_replacement_text): Set macro->traditional.
2132 (save_replacement_text): Likewise.
2133 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2134 (struct save_macro_item): Delete.
2135 (struct save_macro_data): Use a character array not the previous
2136 structured format.
2137 (save_macros): Save macro as text not as internal structures.
2138 (cpp_prepare_state): Update for changes to save_macro_data.
2139 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 2140 -D macros as text.
d8044160
GK
2141 * macro.c (create_iso_definition): Honour alloc_subobject.
2142 Clear traditional flag.
2143 (_cpp_create_definition): Honour alloc_subobject.
2144 * lex.c (cpp_token_val_index): New.
2145 * internal.h: Include cpp-id-data.h.
2146 (uchar): Move definition to cpp-id-data.h.
2147 (U): Likewise.
2148 (cpp_macro): Likewise.
2149 * directives.c (struct answer): Move to cpp-id-data.h.
2150 (do_assert): Honour alloc_subobject.
2cf22451
ZW
2151
2152 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2153 * include/cpplib.h (struct cpp_string): Add GTY marker.
2154 (enum cpp_token_fld_kind): New.
2155 (struct cpp_token): Add GTY markers.
2156 (cpp_token_val_index): Prototype.
2157 (CPP_HASHNODE_VALUE_IDX): New.
2158 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2159 * include/cpp-id-data.h: New file.
d8044160 2160
0ca8e815
PB
21612004-06-09 Paolo Bonzini <bonzini@gnu.org>
2162
2163 * Makefile.am (all-local): New.
2164 * Makefile.in: Regenerate.
2165
b51fa00f
RS
21662004-06-06 Roger Sayle <roger@eyesopen.com>
2167
2168 * Makefile.am (LIBICONV): Declare.
2169 (makedepend_LDADD): Use LIBICONV.
2170 * Makefile.in: Regenerate.
2171
5e2f3f39
AP
21722004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
2173
2174 * Makefile.am (LIBINTL): Declare
2175 (makedepend_LDADD): Use LIBINTL.
2176 * Makefile.in: Regenerate.
2177
c6e83800
ZW
21782004-06-05 Zack Weinberg <zack@codesourcery.com>
2179
2180 * Makefile.am: Add makedepend.
2181 * Makefile.in, aclocal.m4: Regenerate.
2182 * charset.c: Insert a space to avoid a warning.
2183 * directives.c: Include mkdeps.h.
2184 (_cpp_handle_directive): Reenable macro expander if appropriate.
2185 (undefine_macros): Inline body of _cpp_free_definition for speed.
2186 Do not call undef callback or _cpp_warn_if_unused_macro.
2187 (cpp_get_deps): New interface.
2188 * files.c (search_cache): Add pfile argument. Check for file
2189 that would be found by "" or <> search here...
2190 (_cpp_find_file): ...not here. Correct recorded start_dir of
2191 files found by directory-of-current-file search that would be
2192 found by "" or <> search.
2193 * init.c (cpp_add_dependency_target): Delete.
2194 * internal.h (struct lexer_state): Add discarding_output flag.
2195 * lex.c (lex_identifier): Compute hash function while scanning.
2196 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
2197 directives.
2198 * makedepend.c: New file.
2199 * mkdeps.c (struct deps): Add vpath vector.
2200 (apply_vpath, deps_add_vpath): New function.
2201 (deps_free): Free vpath vector.
2202 (deps_add_dep, deps_add_target): Use apply_vpath.
2203 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
2204 (ht_lookup_with_hash): New function.
2205 * cpplib.h, mkdeps.h: Update prototypes.
2206 * symtab.h: Update prototypes.
2207 (HT_HASHSTEP, HT_FINISH): New macros.
2208
b453c95f
GK
22092004-05-29 Geoffrey Keating <geoffk@apple.com>
2210
2211 * symtab.c (ht_create): Set entries_owned.
2212 (ht_destroy): Honour entries_owned.
2213 (ht_expand): Likewise.
2214 (ht_load): New.
2cf22451
ZW
2215 * include/symtab.h (struct ht): New field 'entries_owned'
2216 (ht_load): New prototype.
b453c95f 2217
963e23c5
PB
22182004-05-26 Paolo Bonzini <bonzini@gnu.org>
2219
2220 PR bootstrap/15651
2221 * configure.ac: Fix m4 quoting when picking
2222 the size of HOST_WIDE_INT.
2223 * configure: Regenerate.
2224
0429bc77
PB
22252004-05-25 Paolo Bonzini <bonzini@gnu.org>
2226
2227 * Makefile.am: the correct directory for
2228 gettext include files is given by @INCINTL@.
2229 * Makefile.in: Regenerate.
2230
c86dd7db
PB
22312004-05-24 Paolo Bonzini <bonzini@gnu.org>
2232
2233 * system.h [!ENABLE_NLS]: dgettext takes two
2234 parameters.
2235
4f4e53dd
PB
22362004-05-23 Paolo Bonzini <bonzini@gnu.org>
2237
2238 Moved libcpp from the gcc subdirectory to the toplevel.
2239 * Makefile.am: New file.
2240 * Makefile.in: Regenerate.
2241 * configure.ac: New file.
2242 * configure: Regenerate.
2243 * config.in: Regenerate.
2244 * charset.c: Moved from gcc/cppcharset.c. Add note about
2245 brokenness of input charset detection. Adjust for change
2246 in name of cppucnid.h.
2247 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
2248 * expr.c: Moved from gcc/cppexp.c.
2249 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
2250 Remove #define of O_BINARY, it is in system.h.
2251 * identifiers.c: Moved from gcc/cpphash.c.
2252 * internal.h: Moved from gcc/cpphash.h. Change header
2253 guard name. All other files adjusted to match name change.
2254 * init.c: Moved from gcc/cppinit.c.
2255 (init_library) [ENABLE_NLS]: Call bindtextdomain.
2256 * lex.c: Moved from gcc/cpplex.c.
2257 * directives.c: Moved from gcc/cpplib.c.
2258 * macro.c: Moved from gcc/cppmacro.c.
2259 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
2260 * traditional.c: Moved from gcc/cpptrad.c.
2261 * ucnid.h: Moved from gcc/cppucnid.h. Change header
2262 guard name.
2263 * ucnid.pl: Moved from gcc/cppucnid.pl.
2264 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
2265 guard name.
2266 * symtab.c: Moved from gcc/hashtable.c.
2267 * line-map.c: Moved from gcc. Do not include intl.h.
2268 * mkdeps.c: Moved from gcc.
2269 * system.h: New file.
2cf22451
ZW
2270 * include/cpplib.h: Moved from gcc. Change header guard name.
2271 * include/line-map.h: Moved from gcc. Change header guard name.
2272 * include/mkdeps.h: Moved from gcc. Change header guard name.
2273 * include/symtab.h: Moved from gcc/hashtable.h. Change header
2274 guard name.