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