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