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