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