]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/ChangeLog
Update Go library to r60.3 release.
[thirdparty/gcc.git] / libcpp / ChangeLog
CommitLineData
cbbcf655
DS
12011-10-20 Dodji Seketeli <dodji@redhat.com>
2
3 PR bootstrap/50801
4 * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
5 number of tokens.
6
d17687f6
DS
72011-10-18 Dodji Seketeli <dodji@redhat.com>
8
9 PR bootstrap/50760
10 * include/line-map.h (struct linemap_stats): Change the type of
11 the members from size_t to long.
12 * macro.c (macro_arg_token_iter_init): Unconditionally initialize
13 iter->location_ptr.
14
411f92de
DS
152011-10-17 Dodji Seketeli <dodji@redhat.com>
16
17 * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
18 variable without using it if ENABLE_CHECKING is not defined. Mark
19 the LOCATION parameter as being unused.
20
b9bd6f74
TT
212011-10-15 Tom Tromey <tromey@redhat.com>
22 Dodji Seketeli <dodji@redhat.com>
23
24 * include/line-map.h (struct line_maps::alloced_size_for_request):
25 New member.
26 * line-map.c (new_linemap): Use set->alloced_size_for_request to
27 get the actual allocated size of line maps.
28
64a1a422
TT
292011-10-15 Tom Tromey <tromey@redhat.com>
30 Dodji Seketeli <dodji@redhat.com>
31
32 * line-map.h (struct linemap_stats): Declare new struct.
33 (linemap_get_statistics): Declare ...
34 * line-map.c (linemap_get_statistics): ... new function.
35 * macro.c (num_expanded_macros_counter, num_macro_tokens_counter):
36 Declare new counters.
37 (enter_macro_context, replace_args): Update
38 num_macro_tokens_counter.
39 (cpp_get_token_1): Update num_expanded_macros_counter.
40
847e697a
TT
412011-10-15 Tom Tromey <tromey@redhat.com>
42 Dodji Seketeli <dodji@redhat.com>
43
44 * include/cpplib.h (struct cpp_options)<debug>: New struct member.
45 * include/line-map.h (linemap_dump_location): Declare ...
46 * line-map.c (linemap_dump_location): ... new function.
47
92582b75
TT
482011-10-15 Tom Tromey <tromey@redhat.com>
49 Dodji Seketeli <dodji@redhat.com>
50
51 * include/cpplib.h (struct cpp_options)<track_macro_expansion>:
52 New option.
53 * internal.h (struct macro_context): New struct.
54 (enum context_tokens_kind): New enum.
55 (struct cpp_context)<tokens_kind>: New member of type enum
56 context_tokens_kind.
57 (struct cpp_context)<macro>: Remove this. Replace it with an enum
58 of macro and macro_context.
59 (struct cpp_context)<direct_p>: Remove.
60 (_cpp_remaining_tokens_num_in_context): Declare new function.
61 * directives.c (destringize_and_run): Adjust.
62 * lex.c (_cpp_remaining_tokens_num_in_context)
63 (_cpp_token_from_context_at): Define new functions
64 (cpp_peek_token): Use them.
65 * init.c (cpp_create_reader): Initialize the base context to zero.
66 (_cpp_token_from_context_at): Define new static function.
67 (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and
68 _cpp_token_from_context_at.
69 * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New
70 members.
71 (enum macro_arg_token_kind): New enum.
72 (struct macro_arg_token_iter): New struct.
73 (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context)
74 (alloc_expanded_arg_mem, ensure_expanded_arg_room)
75 (delete_macro_args, set_arg_token, get_arg_token_location)
76 (arg_token_ptr_at, macro_arg_token_iter_init)
77 (macro_arg_token_iter_get_token)
78 (macro_arg_token_iter_get_location, macro_arg_token_iter_forward)
79 (expanded_token_index, tokens_buff_new, tokens_buff_count)
80 (tokens_buff_last_token_ptr, tokens_buff_put_token_to)
81 (tokens_buff_add_token, tokens_buff_remove_last_token)
82 (reached_end_of_context, consume_next_token_from_context): New
83 static functions.
84 (cpp_get_token_1): New static function. Split and extended from
85 cpp_get_token. Use reached_end_of_context and
86 consume_next_token_from_context. Unify its return point. Move
87 the location tweaking from cpp_get_token_with_location in here.
88 (cpp_get_token): Use cpp_get_token_1
89 (stringify_arg): Use the new arg_token_at.
90 (paste_all_tokens): Support tokens coming from extended tokens
91 contexts.
92 (collect_args): Return the number of collected arguments, by
93 parameter. Store virtual locations of tokens that constitute the
94 collected args.
95 (funlike_invocation_p): Return the number of collected arguments,
96 by parameter.
97 (enter_macro_context): Add a parameter for macro expansion point.
98 Pass it to replace_args and to the "used" cpp callback. Get the
99 number of function-like macro arguments from funlike_invocation_p,
100 pass it to the new delete_macro_args to free the memory used by
101 macro args. When -ftrack-macro-expansion is in effect, for macros
102 that have no arguments, create a macro map for the macro expansion
103 and use it to allocate proper virtual locations for tokens
104 resulting from the expansion. Push an extended tokens context
105 containing the tokens resulting from macro expansion and their
106 virtual locations.
107 (replace_args): Rename the different variables named 'count' into
108 variables with more meaningful names. Create a macro map;
109 allocate virtual locations of tokens resulting from this
110 expansion. Use macro_arg_token_iter to iterate over tokens of a
111 given macro. Handle the case of the argument of
112 -ftrack-macro-expansion being < 2. Don't free macro arguments
113 memory resulting from expand_arg here, as these are freed by the
114 caller of replace_arg using delete_macro_args now. Push extended
115 token context.
116 (next_context, push_ptoken_context, _cpp_push_token_context)
117 (_cpp_push_text_context): Properly initialize the context.
118 (expand_arg): Use the new alloc_expanded_arg_mem,
119 push_extended_tokens_context, cpp_get_token_1, and set_arg_token.
120 (_cpp_pop_context): Really free the memory held by the context.
121 Handle freeing memory used by extended tokens contexts.
122 (cpp_get_token_with_location): Use cpp_get_token_1.
123 (cpp_sys_macro_p): Adjust.
124 (_cpp_backup_tokens): Support the new kinds of token contexts.
125 * traditional.c (recursive_macro): Adjust.
126
46427374
TT
1272011-10-15 Tom Tromey <tromey@redhat>
128 Dodji Seketeli <dodji@redhat.com>
129
130 * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum
131 member.
132 (MAX_SOURCE_LOCATION): New constant.
133 (struct line_map_ordinary, struct line_map_macro): New structs.
134 (struct line_map): Turn this into a union of the two above. Add
135 comments.
136 (struct maps_info): New struct.
137 (struct line_maps)<info_ordinary, info_macro>: Two new fields.
138 These now carry the map information that was previously scattered
139 in struct line_maps.
140 (struct map_info::allocated): Fix comment.
141 (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME)
142 (ORDINARY_MAP_STARTING_LINE_NUMBER)
143 (ORDINARY_MAP_INCLUDER_FILE_INDEX)
144 (ORDINARY_MAP_IN_SYSTEM_HEADER_P)
145 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO)
146 (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS)
147 (MACRO_MAP_EXPANSION_POINT_LOCATION)
148 (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO)
149 (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE)
150 (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP)
151 (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED)
152 (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE)
153 (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP)
154 (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED)
155 (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE)
156 (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP)
157 (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT)
158 (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map
159 information.
160 (linemap_check_ordinary, linemap_assert)
161 (linemap_location_before_p): New macros.
162 (linemap_position_for_line_and_column)
163 (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token)
164 (linemap_macro_expansion_map_p)
165 (linemap_macro_map_loc_to_def_point)
166 (linemap_macro_map_loc_unwind_once)
167 (linemap_macro_map_loc_to_exp_point, linemap_step_out_once)
168 (linemap_get_source_line linemap_get_source_column)
169 (linemap_map_get_macro_name, linemap_get_file_path)
170 (linemap_location_in_system_header_p)
171 (linemap_location_from_macro_expansion_p): Declare new functions.
172 (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION)
173 (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this
174 accessors act on ordinary maps only.
175 (INCLUDED_FROM): Return NULL for main files; use the new
176 accessors.
177 (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors.
178 (struct expanded_location): Move here from gcc/input.h
179 (linemap_resolve_location, linemap_expand_location)
180 (linemap_expand_location_full): Declare new functions.
181 * line-map.c: Include cpplib.h, internal.h
182 (linemap_enter_macro, linemap_add_macro_token)
183 (linemap_get_expansion_line, linemap_get_expansion_filename): New
184 functions that are private to libcpp.
185 (linemap_assert): New macro.
186 (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point)
187 (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point)
188 (linemap_macro_map_loc_unwind_toward_spelling)
189 (linemap_macro_map_loc_to_exp_point)
190 (first_map_in_common_1, first_map_in_common): New static
191 functions.
192 (new_linemap): Define new static functions. Extracted and
193 enhanced from ...
194 (linemap_add): ... here. Use linemap_assert in lieu of abort
195 previously.
196 (linemap_tracks_macro_expansion_locs_p)
197 (linemap_add_macro_token, linemap_macro_expansion_map_p)
198 (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point)
199 (linemap_macro_map_loc_to_def_point)
200 (linemap_macro_map_loc_unwind_once)
201 (linemap_step_out_once, linemap_map_get_index)
202 (linemap_get_source_line,linemap_get_source_column)
203 (linemap_get_file_path, linemap_map_get_macro_name)
204 (linemap_location_in_system_header_p)
205 (linemap_location_originated_from_system_header_p)
206 (linemap_location_from_macro_expansion_p)
207 (linemap_tracks_macro_expansion_locs_p)
208 (linemap_resolve_location, linemap_expand_location)
209 (linemap_expand_location_full)
210 (linemap_tracks_macro_expansion_locs_p)
211 (linemap_position_for_line_and_column, linemap_compare_locations):
212 Define new public functions.
213 (linemap_init): Initialize ordinary and macro maps information in
214 the map set.
215 (linemap_check_files_exited): Use the new accessors.
216 (linemap_free): Remove this dead code.
217 (linemap_line_start): Assert this uses an ordinary map. Adjust to
218 use the new ordinary map accessors and data structures. Don't
219 overflow past the lowest possible macro token's location.
220 (linemap_position_for_column): Assert the ordinary maps of the map
221 set are really ordinary. Use ordinary map accessors.
222 (linemap_lookup): Keep the same logic but generalize to allow
223 lookup of both ordinary and macro maps. Do not crash when called
224 with an empty line table.
225 * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the
226 new API of line-map.h.
227 * directives.c (start_directive, do_line, do_linemarker)
228 (do_linemarker): Likewise.
229 * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed)
230 (make_cpp_dir, cpp_make_system_header): Likewise.
231 * init.c (cpp_read_main_file): Likewise.
232 * internal.h (CPP_INCREMENT_LINE): Likewise.
233 (linemap_enter_macro, linemap_add_macro_token)
234 (linemap_get_expansion_line, linemap_get_expansion_filename): New
235 functions private to libcpp.
236 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment)
237 (skip_line_comment, skip_whitespace, lex_raw_string)
238 (_cpp_lex_direct): Likewise.
239 * macro.c (_cpp_builtin_macro_text): Likewise.
240 (_cpp_aligned_alloc): Initialize the new name member of the macro.
241 * traditional.c (copy_comment, _cpp_scan_out_logical_line):
242 Likewise.
243 * errors.c (cpp_diagnostic): Adjust to new linemap API.
244
892a371f
DS
2452011-08-28 Dodji Seketeli <dodji@redhat.com>
246
247 * line-map.c (linemap_add): Assert that reason must not be
248 LC_RENAME when called for the first time on a "main input file".
249
e3dfef44
GC
2502011-08-22 Gabriel Charette <gchare@google.com>
251
252 * init.c (cpp_create_reader): Inititalize forced_token_location_p.
253 * internal.h (struct cpp_reader): Add field forced_token_location_p.
254 * lex.c (_cpp_lex_direct): Use forced_token_location_p.
255 (cpp_force_token_locations): New.
256 (cpp_stop_forcing_token_locations): New.
257
32fe396e
RO
2582011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
259
260 PR libstdc++/1773
261 * init.c (cpp_init_builtins): Define __cplusplus 19971L.
262
7c1ffff9
JM
2632011-08-18 Joseph Myers <joseph@codesourcery.com>
264
265 * include/cpplib.h (struct cpp_options): Fix typo.
266
a48e3dd1
JM
2672011-08-18 Joseph Myers <joseph@codesourcery.com>
268
269 * include/cpplib.h (struct cpp_options): Add rliterals.
270 * init.c (struct lang_flags, lang_defaults): Add rliterals.
271 (cpp_set_lang): Set rliterals option.
272 (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__.
273 * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals.
274
3f6ced10
GC
2752011-08-15 Gabriel Charette <gchare@google.com>
276
277 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
278 Update all users to use linemap_position_for_column instead.
279
0681d04c
GC
2802011-07-28 Gabriel Charette <gchare@google.com>
281
282 * include/line-map.h (struct line_maps):
283 Remove unused field last_listed. Update all users.
284
5e9627ca
L
2852011-07-28 H.J. Lu <hongjiu.lu@intel.com>
286
287 * configure.ac: Set need_64bit_hwint to yes for x86 targets.
288 * configure: Regenerated.
289
a024b70f
RO
2902011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
291
292 * system.h [__cplusplus]: Wrap C function declarations in extern "C".
293
5b6d595b
RO
2942011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
295 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
296
297 PR bootstrap/49794
298 * configure.ac: Test AM_ICONV with CXX.
299 * configure: Regenerate.
300 * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
301
d0a9fbe1
DS
3022011-07-15 Dodji Seketeli <dodji@redhat.com>
303
304 * directives.c (struct if_stack): Use source_location as type
305 here.
306 * include/cpplib.h (struct cpp_callbacks)<include, define, undef,
307 indent, def_pragma, used_define, used_undef>: Properly use
308 source_location as parameter type, rather than unsigned int.
309
fbdd5d87
RO
3102011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
311
312 PR target/39150
313 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9]
314 like i[34567]86-*-solaris2.1[0-9]*.
315 * configure: Regenerate.
316
8787a05a
JM
3172011-06-16 Jason Merrill <jason@redhat.com>
318
319 PR c++/45399
320 * lex.c (lex_raw_string): Don't check for embedded NUL.
321
38fbfaf6
DS
3222011-06-06 Dodji Seketeli <dodji@redhat.com>
323
324 PR preprocessor/48532
325 * directives.c (do_pragma): Don't forget the invocation location
326 when parsing the pragma name of a namespaced pragma directive.
327
fc0993ac
JT
3282011-05-29 John Tytgat <John.Tytgat@aaug.net>
329
330 * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
331
ef230b38
UB
3322011-05-22 Uros Bizjak <ubizjak@gmail.com>
333
334 PR target/49104
335 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__
336 is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx.
337
e5b0dad8
JK
3382011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com>
339
340 * system.h (ENUM_BITFIELD): Remove.
341
6cfae070
JJ
3422011-04-24 Jakub Jelinek <jakub@redhat.com>
343
344 PR preprocessor/48740
345 * lex.c (lex_raw_string): When raw string ends with
346 ??) followed by raw prefix and ", ensure it is preprocessed
347 with ??) rather than ??].
348
04695783
JM
3492011-04-20 Jim Meyering <meyering@redhat.com>
350
351 * files.c (destroy_cpp_file): Remove useless if-before-free.
352 * init.c (cpp_destroy): Likewise.
353 * macro.c (replace_args): Likewise.
354 * pch.c (cpp_valid_state): Likewise.
355
4489800d
KT
3562011-03-25 Kai Tietz <ktietz@redhat.com>
357
358 * files.c (file_hash_eq): Use filename_cmp
359 instead of strcmp.
360 (nonexistent_file_hash_eq): Likewise.
361 (remap_filename): Likewise.
362 Handle absolute DOS-path,
363 (append_file_to_dir): Check for IS_DIR_SEPARATOR
364 instead of slash.
365 (read_name_map): Likewise.
366 * linemap.c (linemap_add): Use filename_cmp
367 instead of strcmp.
368 * mkdeps.c (apply_vpath): Use filename_ncmp
369 instead of strncmp.
370 (deps_restore): Use filename_cmp instead of
371 strcmp.
372 * init.c (read_original_directory): Use
373 IS_DIR_SEPARATOR instead of checking for slash.
374
f3c33d9d
MM
3752011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
376
377 PR preprocessor/48192
378 * directives.c (do_ifdef): Do not consider conditional macros as
379 being defined.
380 (do_ifndef): Ditto.
381 * expr.c (parse_defined): Ditto.
382
01956319
RH
3832011-03-18 Richard Henderson <rth@redhat.com>
384
385 PR bootstrap/45381
386 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5.
387
c5a62c6f
EB
3882011-11-04 Eric Botcazou <ebotcazou@adacore.com>
389 Jakub Jelinek <jakub@redhat.com>
390
391 PR preprocessor/39213
392 * directives.c (end_directive): Call _cpp_remove_overlay for deferred
393 pragmas as well in traditional mode.
394
0e1a989c
ILT
3952010-11-17 Ian Lance Taylor <iant@google.com>
396
397 PR bootstrap/45538
398 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of
399 AC_LANG based on ENABLE_BUILD_WITH_CXX.
400
651a20b5
KT
4012010-11-16 Kai Tietz <kai.tietz@onevision.com>
402
403 PR preprocessor/17349
404 * lex.c (save_comment): Handle in argument passing c++
405 comments special.
406
480767a9
ILT
4072010-11-02 Ian Lance Taylor <iant@google.com>
408
409 * configure.ac: Use AC_SYS_LARGEFILE.
410 * configure: Rebuild.
411 * config.in: Rebuild.
412
078419c9 4132010-10-19 Basile Starynkevitch <basile@starynkevitch.net>
480767a9 414
078419c9
BS
415 * line-map.h (source_location): Remove obsolete comment
416 mentioning location_s.
417
d6874138
KT
4182010-09-29 Kai Tietz <kai.tietz@onevision.com>
419
420 PR preprocessor/45362
421 * directives.c (cpp_pop_definition): Make static.
422 (do_pragma_push_macro): Reworked to store text
423 definition.
424 (do_pragma_pop_macro): Add free text definition.
425 (cpp_push_definition): Removed.
426 * include/cpplib.h (cpp_push_definition): Removed.
427 (cpp_pop_definition): Likewise.
428 * internal.h (def_pragma_macro): Remove member 'value'
429 and add new members 'definition', 'line',
430 'syshdr', 'sued' and 'is_undef'.
431 * pch.c (_cpp_restore_pushed_macros): Rework to work
432 on text definition and store additional macro flags.
433 (_cpp_save_pushed_macros): Likewise.
434
e3339d0f
JM
4352010-09-29 Joseph Myers <joseph@codesourcery.com>
436
437 * include/cpplib.h (cpp_options): Rename warn_deprecated,
438 warn_traditional, warn_long_long and pedantic.
439 * directives.c (directive_diagnostics, _cpp_handle_directive):
440 Update names of cpp_options members.
441 * expr.c (cpp_classify_number, eval_token): Update names of
442 cpp_options members.
443 * init.c (cpp_create_reader, post_options): Update names of
444 cpp_options members.
445 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
446 cpp_options members.
447 * macro.c (parse_params): Update names of cpp_options members.
448
128465e6
ILT
4492010-09-15 Ian Lance Taylor <iant@google.com>
450
451 * init.c: Fix type name in comment.
452
a69d2520
JJ
4532010-08-31 Jakub Jelinek <jakub@redhat.com>
454
455 PR preprocessor/45457
456 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
457 needed.
458 * directives.c (do_ifdef, do_ifndef): Likewise.
459
707bcb7a
RO
4602010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
461
462 * system.h [HAVE_INTTYPES_H]: Include inttypes.h.
463
6f173e52
RH
4642010-08-24 Richard Henderson <rth@redhat.com>
465
466 PR bootstrap/45376
467 * configure.ac (HAVE_SSE4): New check.
468 * configure, config.in: Rebuild.
469 * lex.c (search_line_sse42): Omit if !HAVE_SSE4.
470
789d73cb
RO
4712010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
472
473 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
474 etc. on Solaris 2/x86.
475
246a2fcb
RH
4762010-08-21 Richard Henderson <rth@redhat.com>
477 Andi Kleen <ak@linux.intel.com>
478 David S. Miller <davem@davemloft.net>
479
480 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
481 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
482 (ptrdiff_t): Check via AC_CHECK_TYPE.
483 * config.in, configure: Rebuild.
484 * system.h: Include stdint.h, if available.
485 * lex.c (WORDS_BIGENDIAN): Provide default.
486 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
487 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
488 search_line_sse2, search_line_sse42, init_vectorized_lexer,
489 search_line_fast): New.
490 (_cpp_clean_line): Use search_line_fast. Restructure the fast
491 loop to make it clear when we're leaving the loop. Stay in the
492 fast loop for non-trigraph '?'.
493
8e680db5
JJ
4942010-06-11 Jakub Jelinek <jakub@redhat.com>
495
496 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro
497 callback.
498 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER.
499 (cpp_macro_definition): Remove const qual from second argument.
500 * macro.c (enter_macro_context): Call user_builtin_macro callback for
501 NODE_BUILTIN !NODE_USED macros.
502 (warn_of_redefinition): Likewise. Remove const qual from second
503 argument.
504 (cpp_macro_definition): Likewise.
505 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback
506 for NODE_BUILTIN !NODE_USED macros.
507
1cb42611
JM
5082010-06-10 Joseph Myers <joseph@codesourcery.com>
509
510 * include/cpplib.h (struct cpp_options): Remove show_column.
511 * init.c (cpp_create_reader, post_options): Don't set show_column.
512
ff5dfc48
JR
5132010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
514
515 PR bootstrap/44432
516 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
517 check that C++ compiler works.
518 * configure: Regenerate.
519
a9429e29
LB
5202010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
521
522 * include/symtab.h (ht_identifier_ptr): New.
523
c3f247f4
RW
5242010-06-03 Joern Rennecke <joern.rennecke@embecosm.com>
525 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
526
527 PR bootstrap/42798
528 * configure.ac: Check for declaration of 'basename(char *)'.
529 * configure: Regenerate.
530 * config.in: Regenerate.
531
2778d766
JM
5322010-04-25 Joseph Myers <joseph@codesourcery.com>
533
534 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
535 * init.c (lang_defaults): Add entries for new language variants.
536 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
537 variants.
538
d8a12e84
MLI
5392010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
540
541 PR cpp/43195
542 * files.c (report_missing_guard): Test for #pragma once.
543
87cf0651
SB
5442010-04-07 Simon Baldwin <simonb@google.com>
545
546 * directives.c (do_diagnostic): Add warning reason argument,
547 call appropriate error reporting function for code.
548 (directive_diagnostics): Call specific warning functions with
549 warning reason where appropriate.
550 (do_error, do_warning, do_pragma_dependency): Add warning reason
551 argument to do_diagnostic calls.
552 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
553 _cpp_create_definition): Call specific warning functions with
554 warning reason where appropriate.
555 * Makefile.in: Add new diagnostic functions to gettext translations.
556 * include/cpplib.h (struct cpp_callbacks): Add warning reason code
557 to error callback.
558 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
559 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
560 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
561 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
562 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
563 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
564 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
565 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
566 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
567 warning reason codes.
568 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
569 cpp_warning_with_line, cpp_pedwarning_with_line,
570 cpp_warning_with_line_syshdr): New specific error reporting functions.
571 * pch.c (cpp_valid_state): Call specific warning functions with
572 warning reason where appropriate.
573 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
574 diagnostic handlers.
575 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
576 cpp_warning_with_line, cpp_pedwarning_with_line,
577 cpp_warning_with_line_syshdr): New specific error reporting functions.
578 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call
579 specific warning functions with warning reason where appropriate.
580 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
581 warn_about_normalization, lex_identifier_intern, lex_identifier,
582 _cpp_lex_direct): Ditto.
583 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
584 narrow_str_to_charconst): Ditto.
585
d947ada0
JJ
5862010-04-06 Jakub Jelinek <jakub@redhat.com>
587
588 PR preprocessor/43642
589 * lex.c (lex_raw_string): Change type of TYPE variable to
590 unsigned char.
591
4d9e8446
RW
5922010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
593
594 * aclocal.m4: Regenerate.
595
52150625
JM
5962010-03-29 Jason Merrill <jason@redhat.com>
597
00a81b8b
JM
598 More N3077 raw string changes
599 * charset.c (cpp_interpret_string): Don't transform UCNs in raw
600 strings.
601 * lex.c (bufring_append): Split out from...
602 (lex_raw_string): ...here. Undo trigraph and line splicing
603 transformations. Do process line notes in multi-line literals.
604 (_cpp_process_line_notes): Ignore notes that were already handled.
605
52150625
JM
606 Some raw string changes from N3077
607 * charset.c (cpp_interpret_string): Change inner delimiters to ().
608 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter.
609
709d7160
JJ
6102010-02-11 Jakub Jelinek <jakub@redhat.com>
611
612 * init.c (read_original_filename): Don't call read_original_directory
613 if _cpp_handle_directive returns 0.
614
dadab4fd
JM
6152010-01-01 Joseph Myers <joseph@codesourcery.com>
616
617 PR preprocessor/41947
618 * expr.c (cpp_classify_number): Give error for hexadecimal
619 floating-point constant with no digits before or after point.
620
3de8a540
AC
6212009-11-20 Arnaud Charlet <charlet@adacore.com>
622
623 * macro.c (enter_macro_context): Call cb.used callback if defined.
624 * directives.c (do_idef, do_ifndef): Ditto.
625 * include/cpplib.h (struct cpp_callbacks): Add used callback.
626
17e7cb85
KT
6272009-11-11 Kai Tietz <kai.tietz@onevision.com>
628
629 * directives.c (do_pragma_push_macro): New pragma handler.
630 (do_pragma_pop_macro): Likewise.
631 (_cpp_init_internal_pragmas): Add push_macro and
632 pop_macro handler to internal pragmas.
633 (lex_macro_node_from_str): Removed.
634 (cpp_push_definition): Replace lex_macro_node_from_str
635 by _cpp_lex_identifier.
636 (cpp_pop_definition): Likewise.
637 * internal.h (_cpp_lex_identifier): New prototype.
638 (def_pragma_macro): New structure.
639 (cpp_reader): New member pushed_macros.
640 * lex.c (_cpp_lex_identifier): New function.
641 (lex_identifier_intern): New function.
642 * init.c (cpp_create_reader): Initialize pushed_macros
643 member.
644 (cpp_destroy): Free elements in pushed_macros member.
645 * pch.c (_cpp_save_pushed_macros): New function.
646 (_cpp_restore_pushed_macros): Likewise.
647 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
648 (cpp_read_state): Use _cpp_restore_pushed_macros.
649
2c6e3f55
JJ
6502009-10-19 Jakub Jelinek <jakub@redhat.com>
651
652 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
653 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
654 and char32_cset_desc.
655 (converter_for_type): Handle CPP_UTF8STRING.
656 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
657 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
658 (parse_include): Reject raw strings.
659 * include/cpplib.h (CPP_UTF8STRING): New token type.
660 * internal.h (struct cpp_reader): Add utf8_cset_desc field.
661 * lex.c (lex_raw_string): New function.
662 (lex_string): Handle u8 string literals, call lex_raw_string
663 for raw string literals.
664 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
665 sequences.
666 * macro.c (stringify_arg): Handle CPP_UTF8STRING.
667
96c169e1
JJ
6682009-10-14 Jakub Jelinek <jakub@redhat.com>
669
670 PR preprocessor/41543
671 * include/line-map.h (RESERVED_LOCATION_COUNT): Define.
672 * line-map.c (linemap_init): Initialize highest_location and
673 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.
674
30c99a9e
JM
6752009-10-09 Jason Merrill <jason@redhat.com>
676
677 * charset.c (_cpp_valid_ucn): Update C++0x restrictions.
678
2214382c
NV
6792009-10-09 Neil Vachharajani <nvachhar@google.com>
680
681 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
682 sccs.
683
e02222d2
LR
6842009-09-23 Loren J. Rittle <ljrittle@acm.org>
685
686 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.
687 * configure: Rebuilt.
688
9a8a2b7a
RG
6892009-09-22 Richard Guenther <rguenther@suse.de>
690
691 PR pch/38987
692 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
693
74dc6a11
CD
6942009-09-18 Chris Demetriou <cgd@google.com>
695
696 PR preprocessor/28435:
697 * include/cpplib.h (struct cpp_options): Add new member
698 deps.need_preprocessor_output.
699 * files.c (open_file_failed): If preprocessor output is needed
700 always report an error.
701
933608b7
KT
7022009-09-13 Kai Tietz <kai.tietz@onevision.com>
703
704 * configure.ac: Set for i?86-w64-mingw*
705 need_64bit_hwint to yes.
706 * configure: Regenerated.
707
86373e7e
JM
7082009-09-10 Jason Merrill <jason@redhat.com>
709
710 * directives.c (cpp_define): constify.
711
fd2ab214
ILT
7122009-09-02 Ian Lance Taylor <iant@google.com>
713
714 * macro.c (stringify_arg): Escape CPP_WCHAR tokens.
715
df58e648
RW
7162009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
717
718 * configure.ac (AC_PREREQ): Bump to 2.64.
719
5213506e
RW
7202009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
721
722 * aclocal.m4: Regenerate.
723 * config.in: Regenerate.
724 * configure: Regenerate.
725
709a22df
TT
7262009-08-17 Tom Tromey <tromey@redhat.com>
727
728 PR preprocessor/41067:
729 * charset.c (convert_escape): Add missing ":" to error text.
730
0c539b47
DR
7312009-07-27 Douglas B Rupp <rupp@gnat.com>
732
733 * include/cpplib.h (INO_T_CPP): New macro.
734 (struct cpp_dir): Use it.
735
2b69c841
JQ
7362009-07-20 Jerry Quinn <jlquinn@optonline.net>
737
738 PR regression/40800
739 * configure.ac: Use = instead of == for testing
740 ENABLE_BUILD_WITH_CXX.
741 * configure: Rebuild.
742
f1bf410c
JQ
7432009-07-17 Jerry Quinn <jlquinn@optonline.net>
744
745 * directives.c (do_linemarker, do_line): Use CPP_STRING for
746 ignored enum value.
747 * files.c (find_file_in_dir): Add cast from void* to char*.
748 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
749 * Makefile.in: (WARN_CFLAGS): Use general and C-specific
750 warnings.
751 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
752 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
753 COMPILER_FLAGS): New.
754 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
755 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS
756 instead of ALL_CFLAGS.
757 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings
758 from other warnings. Add -Wc++-compat to C-specific warnings.
759 Check for --enable-build-with-cxx. Set and substitute
760 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES
761 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before
762 AC_CHECK_HEADERS.
763 * configure: Rebuild.
764 * include/cpp-id-data.h: Remove extern "C".
765 * include/line-map.h: Likewise.
766 * include/mkdeps.h: Likewise.
767 * include/symtab.h: Likewise.
768 * internal.h: Likewise.
769
a28fbdba
MLI
7702009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
771
772 * directives.c (parse_include): Add location argument. Update all
773 calls.
774 (parse_answer): Likewise.
775 (do_include_common): Error with exact location.
776 (parse_assertion): Likewise.
777
b506a5a2
MLI
7782009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
779
780 * expr.c (num_div_op): Take explicit location.
781
7d8847a4
ILT
7822009-06-17 Ian Lance Taylor <iant@google.com>
783
784 * include/cpplib.h (progname): Don't declare.
785
3d8b2a98
ILT
7862009-06-12 Ian Lance Taylor <iant@google.com>
787
788 * include/cpplib.h (struct cpp_options): Add
789 warn_cxx_operator_names field.
790 (NODE_WARN_OPERATOR): Define.
791 (struct cpp_hashnode): Increase flags field to 10 bits, decrease
792 type to 6 bits.
793 * init.c (mark_named_operators): Add flags parameter.
794 (cpp_post_options): Pick flags value to pass to
795 mark_named_operators.
796 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
797 identifier is an operator name in C++.
798
e74fe492
AH
7992009-06-01 Aldy Hernandez <aldyh@redhat.com>
800
801 * include/line-map.h (LAST_SOURCE_COLUMN): New.
802
4851089f
ILT
8032009-06-01 Ian Lance Taylor <iant@google.com>
804
805 * include/cpp-id-data.h: Add extern "C".
806 * include/line-map.h: Likewise.
807 * include/mkdeps.h: Likewise.
808 * include/symtab.h: Likewise.
809 * internal.h: Likewise.
810
7e5487a2
ILT
8112009-05-15 Ian Lance Taylor <iant@google.com>
812
813 * include/cpplib.h (enum cpp_builtin_type): Rename from enum
814 builtin_type. Change all uses.
815
00b0c19b
MLI
8162009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
817
818 PR cpp/36674
819 * directives (do_linemarker): Compensate for the increment in
820 location that occurs when we reach the end of line.
821 * files (_cpp_stack_include): Mention _cpp_find_file in the
822 comment.
823
9a0c6187
JM
8242009-05-10 Joseph Myers <joseph@codesourcery.com>
825
826 * include/cpplib.h (enum cpp_token_fld_kind): Add
827 CPP_TOKEN_FLD_TOKEN_NO.
828 (struct cpp_macro_arg, struct cpp_identifier): Define.
829 (union cpp_token_u): Use struct cpp_identifier for identifiers.
830 Use struct cpp_macro_arg for macro arguments. Add token_no for
831 CPP_PASTE token numbers.
832 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
833 do_pragma_poison, parse_assertion): Use val.node.node in place of
834 val.node.
835 * expr.c (parse_defined, eval_token): Use val.node.node in place
836 of val.node.
837 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
838 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
839 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
840 place of val.arg_no. Use val.node.node in place of val.node.
841 * macro.c (replace_args, cpp_get_token, parse_params,
842 lex_expansion_token, create_iso_definition, cpp_macro_definition):
843 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
844 Use val.node.node in place of val.node.
845
9e322bc1
JM
8462009-05-03 Joseph Myers <joseph@codesourcery.com>
847
848 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
849 UTF-8 sequences.
850
f88d0772
JM
8512009-04-25 Joseph Myers <joseph@codesourcery.com>
852
853 PR preprocessor/39559
854 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal
855 constants larger than intmax_t in C99 mode.
856
d1b38208
TG
8572009-04-21 Taras Glek <tglek@mozilla.com>
858
859 * include/cpp-id-data.h: Update GTY annotations to new syntax.
860 * include/cpplib.h: Likewise.
861 * include/line-map.h: Likewise.
862 * include/symtab.h: Likewise.
863
cfc93532
MLI
8642009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
865
866 PR c++/14875
867 * lex.c (cpp_type2name): Take a flags parameter. Call
868 cpp_named_operator2name for named operators and cpp_digraph2name
869 for digraphs.
870 (cpp_digraph2name): New.
871 (cpp_spell_token): Use it.
872 (cpp_output_token): Likewise.
873 * include/cpplib.h (cpp_type2name): Update declaration.
874 * init.c (cpp_named_operator2name): New.
875 * internal.h (cpp_named_operator2name): Declare.
876
9c650d90
MLI
8772009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
878
879 PR c++/13358
880 * init.c (cpp_create_reader): Wlong_long is disabled by default.
881 * expr.c (cpp_classify_number): Give different messages for C and
882 C++ front-ends.
883
aa508502
JM
8842009-04-19 Joseph Myers <joseph@codesourcery.com>
885
886 PR preprocessor/20078
887 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
888 field.
889 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
890 (struct cpp_token): Change flags to unsigned short.
891 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
892 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
893 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
894 tokens.
895 * macro.c (macro_real_token_count): New.
896 (enter_macro_context, replace_args): Use macro_real_token_count.
897 (create_iso_definition): Record whitespace surrounding and digraph
898 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
899 Set extra_tokens and save CPP_PASTE tokens with arg_no set for
900 multiple consecutive ## tokens.
901 (_cpp_create_definition): Initialize extra_tokens.
902 (cpp_macro_definition): Use macro_real_token_count.
903
61cc8223
JM
9042009-04-18 Joseph Myers <joseph@codesourcery.com>
905
906 * directives.c (parse_include): Pass true to check_eol.
907
c7f9c0b9
JM
9082009-04-18 Joseph Myers <joseph@codesourcery.com>
909
910 PR preprocessor/39646
911 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
912 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
913 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
914 place of LC_RENAME.
915
a5cb563b
JM
9162009-04-18 Joseph Myers <joseph@codesourcery.com>
917
918 PR preprocessor/39647
919 * directives.c (check_eol): Add parameter expand.
920 (do_undef, parse_include, do_line, do_linemarker, do_ident,
921 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
922 do_else, do_endif, do_assert, do_unassert): All callers changed.
923 Pass true from do_line, false elsewhere.
924
18f41a1b
JM
9252009-04-12 Joseph Myers <joseph@codesourcery.com>
926
927 PR preprocessor/31869
928 * macro.c (stringify_arg): Handle NULL source token in padding
929 token where previous padding token did not have source token with
930 preceding whitespace.
931
748086b7
JJ
9322009-04-09 Jakub Jelinek <jakub@redhat.com>
933
934 * Makefile.in: Change copyright header to refer to version
935 3 of the GNU General Public License and to point readers at the
936 COPYING3 file and the FSF's license web page.
937 * charset.c: Likewise.
938 * directives-only.c: Likewise.
939 * directives.c: Likewise.
940 * errors.c: Likewise.
941 * expr.c: Likewise.
942 * files.c: Likewise.
943 * identifiers.c: Likewise.
944 * include/cpp-id-data.h: Likewise.
945 * include/cpplib.h: Likewise.
946 * include/line-map.h: Likewise.
947 * include/mkdeps.h: Likewise.
948 * include/symtab.h: Likewise.
949 * init.c: Likewise.
950 * internal.h: Likewise.
951 * lex.c: Likewise.
952 * line-map.c: Likewise.
953 * macro.c: Likewise.
954 * makeucnid.c: Likewise.
955 * mkdeps.c: Likewise.
956 * pch.c: Likewise.
957 * symtab.c: Likewise.
958 * system.h: Likewise.
959 * traditional.c: Likewise.
960 * ucnid.tab: Likewise.
961 * ucnid.h: Regenerate.
962
eec49116
JJ
9632009-04-01 Janis Johnson <janis187@us.ibm.com>
964
839a3b8a
JJ
965 PR c/39027
966 * include/cpplib.h (CPP_N_DEFAULT): Define.
967 * expr.c (interpret_float_suffix): Recognize d or D for double,
968 return new value for default.
969 (cpp_classify_number): Issue pedwarn for use of d or D in suffix.
970
eec49116
JJ
971 PR c/33466
972 * expr.c (interpret_float_suffix): Reject invalid suffix that uses
973 letters from decimal float and fixed-point suffixes.
974
47580d22
JM
9752009-03-31 Joseph Myers <joseph@codesourcery.com>
976
977 PR preprocessor/15638
978 * files.c (_cpp_find_file): Call open_file_failed after diagnosing
979 invalid PCH.
980 (open_file_failed): Make error for missing file fatal.
981 * include/cpplib.h (CPP_DL_FATAL): Define.
982
5a2df0fa
SV
9832009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net>
984
985 PR preprocessor/31932:
986 * internal.h: Don't mention HAVE_ICONV_H.
987 * configure, config.in: Rebuild.
988 * configure.ac: Don't check for iconv.h.
989
c1a8a3c6
TT
9902009-03-30 Tom Tromey <tromey@redhat.com>
991
992 PR preprocessor/39512:
993 * line-map.c (linemap_init): Initialize 'reallocator' field.
994
a37a7b8a
JJ
9952009-03-30 Jakub Jelinek <jakub@redhat.com>
996
997 PR target/39558
998 * macro.c (cpp_get_token): If macro_to_expand returns NULL
999 and used some tokens, add CPP_PADDING before next token.
1000
148e4216
JM
10012009-03-29 Joseph Myers <joseph@codesourcery.com>
1002
1003 PR preprocessor/34695
1004 * makedepend.c: Remove.
1005 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
1006 (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
1007 * directives.c (cpp_errors): Remove.
1008 * errors.c (print_location, _cpp_begin_message, v_message):
1009 Remove.
1010 (cpp_error, cpp_error_with_line): Always use error callback.
1011 (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
1012 * include/cpplib.h (cpp_options): Remove pedantic_errors,
1013 inhibit_warnings, warn_system_headers, inhibit_errors,
1014 warnings_are_errors, client_diagnostic.
1015 (cpp_callbacks): Add extra arguments to error callback; make it
1016 return bool.
1017 (cpp_finish): Return void.
1018 (cpp_destroy): Remove inaccurate comment about return value.
1019 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
1020 (CPP_DL_NOTE): Define.
1021 * include/line-map.h (linemap_print_containing_files): Remove.
1022 * init.c (cpp_finish): Do not check for or return number of
1023 errors.
1024 * internal.h (cpp_reader): Remove errors field.
1025 * line-map.c (linemap_print_containing_files): Remove.
1026 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
1027 about previous definition. Only emit it if previous diagnostic
1028 was emitted.
1029
f1450211
JM
10302009-03-28 Joseph Myers <joseph@codesourcery.com>
1031
1032 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
1033 mkinstalldirs.
1034
8f5929e1
JJ
10352009-03-18 Jakub Jelinek <jakub@redhat.com>
1036
1037 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
1038
4bb09c26
JM
10392009-02-21 Joseph Myers <joseph@codesourcery.com>
1040
1041 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
1042 header name.
1043 (_cpp_lex_direct): Handle this.
1044
68c9ab45
RG
10452009-02-15 Richard Guenther <rguenther@suse.de>
1046
1047 Revert last change.
1048
601b3e1a
RG
10492009-02-13 Richard Guenther <rguenther@suse.de>
1050
1051 * configure.ac: Enable LFS.
1052 * configure: Re-generate.
1053 * config.in: Likewise.
1054
fc0cd180
BE
10552009-01-05 Ben Elliston <bje@au.ibm.com>
1056
1057 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
1058 (.po.pox): Likewise.
1059 (po/$(PACKAGE).pot): Likewise.
1060
db89a3be
AO
10612008-12-10 Alexandre Oliva <aoliva@redhat.com>
1062
1063 PR target/37033
1064 * pch.c (cpp_valid_state): Improve message for poisoned symbols.
1065 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.
1066
cc955282
JM
10672008-11-29 Joseph Myers <joseph@codesourcery.com>
1068
1069 * lex.c (cpp_token_len): Use 6 as default length.
1070
47960aaf
MLI
10712008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
1072
1073 * expr.c (struct op): Add location.
1074 (_cpp_parse_expr): Propagate locations throught the stack
1075 of expressions.
1076 (reduce): Likewise.
1077 (check_promotion): Use explicit location in errors.
1078
631d0d36
MG
10792008-10-05 Matthew Gingell <gingell@adacore.com>
1080 Arnaud Charlet <charlet@adacore.com>
1081
1082 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
1083 (cpp_get_comments): New function.
1084 * internal.h (struct cpp_reader): Add comments field.
1085 * init.c (cpp_destroy): Free comments.
1086 * lex.c (store_comment, cpp_get_comments): New functions.
1087 (comments): New struct.
1088 (save_comment): Store comments in comments struct.
1089
c047ce93
SB
10902008-09-18 Simon Baldwin <simonb@google.com>
1091
1092 * include/cpplib.h (struct cpp_options): Add new boolean flag
1093 warn_builtin_macro_redefined.
1094 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
1095 * (struct builtin_operator): Split out from previous struct builtin,
1096 enhance extra const correctness.
1097 * (struct builtin_macro): Split out from previous struct builtin, add
1098 new always_warn_if_redefined flag, enhance const correctness.
1099 * (mark_named_operators): Use struct builtin_operator.
1100 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
1101 to builtins selectively.
1102 * macro.c (warn_of_redefinition): Return false if a builtin macro
1103 is not flagged with NODE_WARN.
1104
affa55c6
JJ
11052008-07-31 Jakub Jelinek <jakub@redhat.com>
1106
1107 PR preprocessor/36649
1108 * files.c (struct report_missing_guard_data): New type.
1109 (report_missing_guard): Put paths into an array instead of printing
1110 them right away. Return 1 rather than 0.
1111 (report_missing_guard_cmp): New function.
1112 (_cpp_report_missing_guards): Sort and print paths gathered by
1113 report_missing_guard callback.
1114
3b8f20a1
MLI
11152008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1116
1117 PR 28079
1118 * directives.c (strtolinenum): Handle overflow.
1119 (do_line): Give a warning if line number overflowed.
1120 (do_linemarker): Update call to strtolinenum.
1121
1bb64668
MLI
11222008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1123
1124 * include/line-map.h (linenum_type): New typedef.
1125 (struct line_map): Use it.
1126 (SOURCE_LINE): Second arguments is a LOCATION not a LINE.
1127 (SOURCE_COLUMN): Likewise.
1128 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
1129 source_location values in a variable of type linenum_type.
1130 * directives.c (struct if_stack): Use linenum_type.
1131 (strtoul_for_line): Rename as strtolinenum.
1132 (do_line): Use linenum_type.
1133 (do_linemarker): Use linenum_type and strtolinenum.
1134 (_cpp_do_file_change): Use linenum_t.
1135 * line-map.c (linemap_add): Likewise.
1136 (linemap_line_start): Likewise.
1137 * traditional.c (struct fun_macro): 'line' is a source_location.
1138 * errors.c (print_location): Use linenum_type.
1139 * directives-only.c (_cpp_preprocess_dir_only): Likewise.
1140 * internal.h (CPP_INCREMENT_LINE): Likewise.
1141 * lex.c (_cpp_skip_block_comment): Use source_location.
1142
5950c3c9
BE
11432008-07-14 Ben Elliston <bje@au.ibm.com>
1144
1145 * include/cpplib.h (NODE_CONDITIONAL): New.
1146 (struct cpp_callbacks): New macro_to_expand field.
1147 (struct cpp_hashnode): Adjust size of flags and type fields.
1148 (cpp_peek_token): Prototype.
1149 * lex.c (cpp_peek_token): New function.
1150 (_cpp_temp_token): Protect pre-existing lookaheads.
1151 * macro.c (cpp_get_token): Expand any conditional macros.
1152 (_cpp_backup_tokens_direct): New.
1153 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
1154 (warn_of_redefinition): Silently allow redefined conditional
1155 macros.
1156 (_cpp_create_definition): Remove the conditional flag when a user
1157 defines one of the conditional macros.
1158 * internal.h (_cpp_backup_tokens_direct): New prototype.
1159
e85edc9e
AH
11602008-06-13 Andrew Haley <aph@redhat.com>
1161
1162 PR preprocessor/33305
1163 * macro.c (replace_args): Print a warning for empty macro
1164 arguments in C89 and C++.
1165
18c04407
RW
11662008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1167
1168 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
1169 * configure: Regenerate.
1170
2d09b640
RW
11712008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1172
1173 * Makefile.in (datarootdir): New variable.
1174
0b7c73cc
L
11752008-06-12 H.J. Lu <hongjiu.lu@intel.com>
1176
1177 PR preprocessor/36479
1178 * charset.c (cpp_interpret_string_notranslate): Also set
1179 narrow_cset_desc.width.
1180
cd985f66
JM
11812008-06-07 Joseph Myers <joseph@codesourcery.com>
1182
1183 * configure.ac (parisc*64*-*-*): Remove.
1184 * configure: Regenerate.
1185
d750887f
TT
11862008-05-30 Tom Tromey <tromey@redhat.com>
1187
1188 PR preprocessor/36320:
1189 * internal.h (_cpp_parse_expr): Update.
1190 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error
1191 messages.
1192 * directives.c (do_if): Update.
1193 (do_elif): Require expression if processing group.
1194
c100de59
DS
11952008-05-30 Danny Smith <dannysmith@users.sourceforge.net>
1196
1197 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name.
1198
5d6342eb
TT
11992008-05-21 Tom Tromey <tromey@redhat.com>
1200
1201 PR preprocessor/27777:
1202 * lex.c (cpp_output_line_to_string): New function.
1203 * internal.h (_cpp_begin_message): Don't declare.
1204 * errors.c (_cpp_begin_message): Now static.
1205 * include/cpplib.h (cpp_output_line_to_string): Declare.
1206 * directives.c (do_diagnostic): Rewrote. Use
1207 cpp_output_line_to_string. Don't use _cpp_begin_message.
1208
dae4174e
TT
12092008-05-21 Tom Tromey <tromey@redhat.com>
1210
1211 * include/symtab.h (HT_ALLOCED): Remove.
1212 (ht_purge): Declare.
1213 * symtab.c (DELETED): New define.
1214 (ht_lookup): Update comment.
1215 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED
1216 code. Use subobject allocator for strings, if it exists.
1217 (ht_expand): Handle deleted entries.
1218 (ht_forall): Likewise.
1219 (ht_purge): New function.
1220 (ht_dump_statistics): Print deletion statistics.
1221
899015a0
TT
12222008-05-13 Tom Tromey <tromey@redhat.com>
1223
1224 PR preprocessor/22168:
1225 * include/cpplib.h (struct cpp_options) <objc>: Update
1226 documentation.
1227 * expr.c (eval_token): Warn for use of assertions.
1228 * directives.c (directive_diagnostics): Warn about extensions.
1229 (DEPRECATED): New define.
1230 (DIRECTIVE_TABLE): Use it.
1231
71c10038
TT
12322008-05-06 Tom Tromey <tromey@redhat.com>
1233
1234 PR preprocessor/35313, PR preprocessor/36088:
1235 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
1236 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
1237
2bd0fe3d
DM
12382008-05-04 David S. Miller <davem@davemloft.net>
1239
1240 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
1241 * configure: Regenerate.
1242
28f68625
DF
12432008-04-22 Daniel Franke <franke.daniel@gmail.com>
1244
1245 * include/cpplib.h (cpp_define_formatted): New.
1246 * directives.c (cpp_define_formatted): New.
1247
688e7a53
TT
12482008-04-21 Tom Tromey <tromey@redhat.com>
1249
1250 PR libcpp/33415:
1251 * charset.c (_cpp_convert_input): Add buffer_start argument.
1252 Ignore UTF-8 BOM if seen.
1253 * internal.h (_cpp_convert_input): Add argument.
1254 * files.c (struct _cpp_file) <buffer_start>: New field.
1255 (destroy_cpp_file): Free buffer_start, not buffer.
1256 (_cpp_pop_file_buffer): Likewise.
1257 (read_file_guts): Update.
1258
b6baa67d
KVH
12592008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1260
1261 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal.
1262 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
1263 (struct cpp_options): Added uliterals.
1264 (cpp_interpret_string): Update prototype.
1265 (cpp_interpret_string_notranslate): Idem.
1266 * charset.c (init_iconv_desc): New width member in cset_converter.
1267 (cpp_init_iconv): Add support for char{16,32}_cset_desc.
1268 (convert_ucn): Idem.
1269 (emit_numeric_escape): Idem.
1270 (convert_hex): Idem.
1271 (convert_oct): Idem.
1272 (convert_escape): Idem.
1273 (converter_for_type): New function.
1274 (cpp_interpret_string): Use converter_for_type, support u and U prefix.
1275 (cpp_interpret_string_notranslate): Match changed prototype.
1276 (wide_str_to_charconst): Use converter_for_type.
1277 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
1278 * directives.c (linemarker_dir): Macro U changed to UC.
1279 (parse_include): Idem.
1280 (register_pragma_1): Idem.
1281 (restore_registered_pragmas): Idem.
1282 (get__Pragma_string): Support CPP_STRING{16,32}.
1283 * expr.c (eval_token): Support CPP_CHAR{16,32}.
1284 * init.c (struct lang_flags): Added uliterals.
1285 (lang_defaults): Idem.
1286 * internal.h (struct cset_converter) <width>: New field.
1287 (struct cpp_reader) <char16_cset_desc>: Idem.
1288 (struct cpp_reader) <char32_cset_desc>: Idem.
1289 * lex.c (digraph_spellings): Macro U changed to UC.
1290 (OP, TK): Idem.
1291 (lex_string): Add support for u'...', U'...', u"..." and U"...".
1292 (_cpp_lex_direct): Idem.
1293 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
1294 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
1295
deb984e6
PB
12962008-04-18 Paolo Bonzini <bonzini@gnu.org>
1297
1298 PR bootstrap/35457
1299 * aclocal.m4: Regenerate.
1300 * configure: Regenerate.
1301
bf048bea
TT
13022008-04-17 Tom Tromey <tromey@redhat.com>
1303
1304 PR libcpp/34866:
1305 * errors.c (cpp_error): Don't reference a token before the start
1306 of the current run.
1307
7f27b0f8
TT
13082008-04-16 Tom Tromey <tromey@redhat.com>
1309
1310 * Makefile.in (TAGS_SOURCES): New variable.
1311 (TAGS): New target.
1312
a1fcb9a1
KK
13132008-04-11 Kaz Kojima <kkojima@gcc.gnu.org>
1314
1315 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
1316 and shbe-*-*.
1317 * configure: Rebuilt.
1318
93d45d9e
JM
13192008-04-02 Joseph Myers <joseph@codesourcery.com>
1320
1321 * include/cpplib.h (struct cpp_callbacks): Add used_define,
1322 used_undef and before_define.
1323 (NODE_USED): Define.
1324 * directives.c (do_define, do_undef, undefine_macros, do_ifdef,
1325 do_ifndef, cpp_pop_definition): Handle new flag and use new
1326 callbacks.
1327 * expr.c (parse_defined): Handle new flag and use new callbacks.
1328 * macro.c (enter_macro_context, _cpp_free_definition): Handle new
1329 flag and use new callbacks.
1330
d4c32e1d
JJ
13312008-04-01 Jakub Jelinek <jakub@redhat.com>
1332
1333 PR pch/13675
1334 * files.c (struct _cpp_file): Remove pch field.
1335 (pch_open_file): Don't set file->pch, just file->pchname.
1336 (should_stack_file): After pfile->cb.read_pch call
1337 free pchname and clear pchname, don't close file->fd.
1338 Test file->pchname instead of file->pch. Don't close fd after cb.
1339 (_cpp_stack_include): Test file->pchname instead of file->pch.
1340
161031e3
TT
13412008-03-28 Tom Tromey <tromey@redhat.com>
1342
1343 * Makefile.in (POSTCOMPILE): New variable.
1344 (.c.o): Use it.
1345
14ccf800
TT
13462008-03-13 Tom Tromey <tromey@redhat.com>
1347
1348 PR libcpp/35322:
1349 * directives.c (destringize_and_run): Set pfile->directive.
1350
830465c6
MM
13512008-03-06 Markus Milleder <markus.milleder@generali.at>
1352
1353 PR preprocessor/35458
1354 * mkdeps.c (munge): Quote '#' with a '\'.
1355
d482a073
RW
13562008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1357
1358 PR preprocessor/35379
1359 * mkdeps.c (deps_write): Ensure the first target always appears
1360 in the first column, without leading backslash newline. Avoid
1361 some more extra whitespace.
1362
185a6cc1
TS
13632008-02-25 Thiemo Seufer <ths@mips.com>
1364
d482a073 1365 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
185a6cc1 1366
2bf41bf0
TT
13672008-02-19 Tom Tromey <tromey@redhat.com>
1368
1369 * traditional.c (lex_identifier): Use CPP_HASHNODE.
1370 * lex.c (lex_identifier): Use CPP_HASHNODE.
1371 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
1372 do-while.
1373 * identifiers.c (alloc_node): Change return type.
1374 (_cpp_init_hashtable): Don't cast 'alloc_node'.
1375 (proxy_assertion_broken): New declaration.
1376 (cpp_forall_identifiers): Move comment.
1377 * line-map.c (linemap_add): Comment fix.
1378 (linemap_line_start): Indentation fix.
1379
765d600a
JJ
13802008-01-25 Jakub Jelinek <jakub@redhat.com>
1381
1382 PR preprocessor/34692
1383 * macro.c (collect_args): Add pragma_buff argument. Push
1384 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
1385 than into arguments. Reset prevent_expansion and parsing_args
1386 state at CPP_PRAGMA_EOL/CPP_EOF.
1387 (funlike_invocation_p): Add pragma_buff argument, pass it through
1388 to collect_args.
1389 (enter_macro_context): Add result argument. Adjust
1390 funlike_invocation_p caller. Emit all deferred pragma tokens
1391 gathered during collect_args before the expansion, add a padding
1392 token. Return 2 instead of 1 if any pragma tokens were prepended.
1393 (cpp_get_token): If enter_macro_context returns 2, don't return
1394 a padding token, instead cycle to grab CPP_PRAGMA token.
1395 * directives.c (_cpp_handle_directive): If was_parsing_args
1396 in deferred pragma, leave parsing_args and prevent_expansion as is.
1397
ec46053b
TT
13982008-01-22 Tom Tromey <tromey@redhat.com>
1399
765d600a 1400 PR c++/34859
ec46053b
TT
1401 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
1402 __STDC_CONSTANT_MACROS.
1403
681c6ab0
FF
14042008-01-07 Fred Fish <fnf@specifix.com>
1405
765d600a 1406 PR preprocessor/30363
681c6ab0
FF
1407 * traditional.c (replace_args_and_push): Add local variable
1408 cxtquote, calculate the replacement text size assuming a
1409 worst case of every input character quoted with backslash,
1410 and properly handle output quoting of quote characters in
1411 actual arguments used in function-like macros.
1412
33ae4837
TT
14132008-01-03 Tom Tromey <tromey@redhat.com>
1414
765d600a 1415 PR preprocessor/34602
33ae4837
TT
1416 * directives.c (do_line): Don't try to spell EOF token.
1417 (do_linemarker): Add comment.
1418
675575f5
DD
14192007-12-11 DJ Delorie <dj@redhat.com>
1420
1421 * charset.c (convert_using_iconv): Close out any shift states,
1422 returning to the initial state.
1423
97f6bd40
TT
14242007-12-06 Tom Tromey <tromey@redhat.com>
1425
765d600a 1426 PR c/29172
97f6bd40
TT
1427 * internal.h (struct cpp_reader) <file_hash_entries>: Changed
1428 type.
1429 <file_hash_entries_allocated, file_hash_entries_used>: Removed.
1430 * files.c (FILE_HASH_POOL_SIZE): New macro.
1431 (struct file_hash_entry_pool): New.
1432 (destroy_all_cpp_files): New function.
1433 (allocate_file_hash_entries): Allocate a file_hash_entry_pool.
1434 (new_file_hash_entry): Update.
1435 (free_file_hash_entries): New function.
1436 (_cpp_cleanup_files): Call free_file_hash_entries and
1437 destroy_all_cpp_files.
1438 (cpp_clear_file_cache): New function.
1439 * include/cpplib.h (cpp_clear_file_cache): Declare.
1440
d56a25e1
TT
14412007-12-03 Tom Tromey <tromey@redhat.com>
1442
765d600a 1443 PR preprocessor/34288
d56a25e1
TT
1444 * configure.ac, config.in: Rebuilt.
1445 * configure.ac: Check for ssize_t.
1446
607f74e9
TT
14472007-11-30 Tom Tromey <tromey@redhat.com>
1448
765d600a 1449 PR preprocessor/32868
607f74e9
TT
1450 * macro.c (_cpp_create_definition): Special case
1451 __STDC_FORMAT_MACROS.
1452
b0f4807f
MM
14532007-11-16 Michael Matz <matz@suse.de>
1454
1455 * files.c (search_path_head): Fix check for absolute paths.
1456
f1e20710
TT
14572007-11-11 Tom Tromey <tromey@redhat.com>
1458
765d600a 1459 PR c++/17557
f1e20710
TT
1460 * include/cpplib.h (cpp_included_before): Declare.
1461 * files.c (struct file_hash_entry) <location>: New field.
1462 (_cpp_find_file): Initialize new field.
1463 (make_cpp_dir): Likewise.
1464 (cpp_included_before): New function.
1465
f373b44d
TT
14662007-11-01 Tom Tromey <tromey@redhat.com>
1467
765d600a 1468 PR preprocessor/30805
f373b44d
TT
1469 * macro.c (paste_tokens): Handle padding token.
1470 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
1471
5b9a40df
TT
14722007-10-31 Tom Tromey <tromey@redhat.com>
1473
765d600a 1474 PR preprocessor/30786
5b9a40df
TT
1475 * macro.c (builtin_macro): Return result of _cpp_do__Pragma.
1476 * directives.c (_cpp_do__Pragma): Return error status.
1477 * internal.h (_cpp_do__Pragma): Update.
1478 * directives.c (get__Pragma_string): Back up if EOF seen.
1479
5ffeb913
TT
14802007-09-06 Tom Tromey <tromey@redhat.com>
1481
1482 * internal.h (struct cpp_reader) <invocation_location>: New
1483 field.
1484 (struct cpp_reader) <set_invocation_location>: Likewise.
1485 * init.c (cpp_set_line_map): New function.
1486 * line-map.c (linemap_add): Use linemap's allocator.
1487 * include/line-map.h (GTY): Define.
1488 (line_map_realloc): New typedef.
1489 (struct line_map): Mark with GTY.
1490 (struct line_maps): Likewise.
1491 (struct line_maps) <maps>: Likewise.
1492 (struct line_maps) <reallocator>: New field.
1493 * include/symtab.h (GTY): Conditionally define.
1494 * include/cpplib.h (cpp_set_line_map): Declare.
1495 (cpp_get_token_with_location): Declare.
1496 * macro.c (cpp_get_token): Set invocation_location on the reader.
1497 (cpp_get_token_with_location): New function.
1498
ac6b1c67
CF
14992007-08-30 Chao-ying Fu <fu@mips.com>
1500
1501 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
1502 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
1503 (cpp_classify_number): Support decimal fixed-point constants without
1504 exponents.
1505 Warn about fixed-point constants when -pedantic.
1506 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
1507 comments to support fixed-point values.
1508 (CPP_N_FRACT, CPP_N_ACCUM): Define.
1509
cda5e672
TT
15102007-08-18 Tom Tromey <tromey@redhat.com>
1511
765d600a 1512 PR preprocessor/32974
cda5e672
TT
1513 * directives.c (parse_include): Don't check for EOL when
1514 processing #pragma dependency.
1515
ccfc4c91
OW
15162007-07-30 Ollie Wild <aaw@google.com>
1517
1518 * directives-only.c: New file.
1519 * internal.h (struct _cpp_dir_only_callbacks): New.
1520 (_cpp_preprocess_dir_only): New function.
1521 * directives.c (_cpp_handle_directive): Check directives_only before
1522 disabling execution of indented directives.
1523 * files.c (_cpp_stack_file): Add directives_only check.
1524 * include/cpplib.h (struct cpp_options): Add directives_only.
1525 (cpp_init_special_builtins): New function.
1526 * init.c (cpp_init_special_builtins): New function.
1527 (cpp_init_builtins): Move builtin_array initialization to
1528 cpp_init_special_builtins.
1529 (post_options): Check directives_only before setting
1530 pfile->state.prevent_expansion = 1.
1531 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
1532 is expanded inside a directive while -fdirectives-only is enabled.
1533 * Makefile.in (libcpp_a_OBJS): Add directives-only.o.
1534 (libcpp_a_SOURCES): Add directives-only.c.
1535
a206413a
UB
15362007-07-04 Uros Bizjak <ubizjak@gmail.com>
1537
1538 * traditional.c (_cpp_scan_out_logical_line): Initialize
1539 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
1540 fmacro.args to prevent 'may be used uninitialized' warning.
1541
c77cd3d1
UB
15422007-07-03 Uros Bizjak <ubizjak@gmail.com>
1543
1544 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
1545 Add new constants.
1546 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
1547 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
1548 for 'q' or 'Q' suffixes.
1549
66938a1d
DS
15502007-06-17 Danny Smith <dannysmith@users.sourceforge.net
1551
e1311401 1552 * files.c (open_file): Correct typo.
66938a1d 1553
71995ede
VP
15542007-06-16 Vladimir Prus <vladimir@codesourcery.com>
1555
e1311401 1556 * files.c (open_file): Prevent the call
71995ede
VP
1557 for stat from overwriting errno.
1558
84152c25
VP
15592007-06-09 Vladimir Prus <vladimir@codesourcery.com>
1560
e1311401 1561 * files.c (open_file): Account for the
84152c25
VP
1562 fact that on windows, opening a directory gives
1563 EACCES.
1564
f7fd775f
JW
15652007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
1566
1567 PR preprocessor/23479
1568 * expr.c (cpp_classify_number): Implement 0b-prefixed binary
1569 integer constants.
1570 (append_digit): Likewise.
1571 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
1572 binary integer constants.
1573
ed0e74e0
DK
15742007-05-31 Dave Korn <dave.korn@artimi.com>
1575
1576 PR preprocessor/14331
1577 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF.
1578
a702045a
OW
15792007-05-24 Ollie Wild <aaw@google.com>
1580
1581 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
1582 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
1583 (cpp_write_pch_state): Save __COUNTER__ state.
1584 (cpp_valid_state): Check valid __COUNTER__ state.
1585 (cpp_read_state): Read new __COUNTER__ state.
1586 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
1587 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
1588 * internal.h (struct cpp_reader): Add counter member.
1589
126e073b
SM
15902007-05-23 Simon Martin <simartin@users.sourceforge.net>
1591
1592 PR preprocessor/20077
1593 * macro.c (create_iso_definition): Fixed the method to determine
1594 whether the token-pasting operator appears at the beginning or the end
1595 of a macro.
1596
0b4cafec
ILT
15972007-05-21 Ian Lance Taylor <iant@google.com>
1598
1599 * internal.h (struct cpp_reader): Add new fields:
1600 nonexistent_file_hash and nonexistent_file_ob.
1601 * files.c: Include "obstack.h".
1602 (find_file_in_dir): Before trying to open the file, look up the
1603 path name in the hash table of nonexistent files. After failing
1604 to open the file, add the path name to the hash table.
1605 (_cpp_find_file): Cache the results of looking up the file name
1606 starting with the quote and bracket chain heads, if we can.
1607 (nonexistent_file_hash_eq): New static function.
1608 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and
1609 pfile->nonexistent_file_ob.
1610 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
1611 pfile->nonexistent_file_ob.
1612
30e04921
JJ
16132007-05-14 Janis Johnson <janis187@us.ibm.com>
1614
5a6bb57e
JJ
1615 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
1616
30e04921
JJ
1617 PR c/31924
1618 * expr.c (interpret_float_suffix): Check for invalid suffix.
1619
22a8a52d
EC
16202007-05-02 Eric Christopher <echristo@apple.com>
1621
1622 * expr.c (num_div_op): Don't overflow if the result is
1623 zero.
1624
fca35e1b
TT
16252007-05-02 Tom Tromey <tromey@redhat.com>
1626
765d600a 1627 PR preprocessor/28709
fca35e1b
TT
1628 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
1629
4cd97075
MM
16302007-03-30 Michael Meissner <michael.meissner@amd.com>
1631
1632 * directives.c (lex_macro_node_from_str): Fix alloca call to be
1633 type correct.
1634
121de39f
RH
16352007-03-30 Richard Henderson <rth@redhat.com>
1636
1637 * directives.c (lex_macro_node_from_str): New.
1638 (cpp_push_definition, cpp_pop_definition): New.
1639 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
1640
4fcb360b
BM
16412007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1642
1643 * Makefile.in: Add dummy install-pdf target.
1644
67e64439
TT
16452007-01-30 Tom Tromey <tromey@redhat.com>
1646
765d600a 1647 PR preprocessor/30468
67e64439
TT
1648 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
1649 './'.
1650
ee380365
TT
16512007-01-30 Tom Tromey <tromey@redhat.com>
1652
765d600a 1653 PR preprocessor/29966
ee380365
TT
1654 * macro.c (lex_expansion_token): Save and restore cpp_reader's
1655 cur_token.
1656 (_cpp_create_definition): Don't restore cur_token here.
1657 * lex.c (_cpp_lex_token): Added assertion.
1658
024abeb3
TT
16592007-01-27 Tom Tromey <tromey@redhat.com>
1660
1661 * configure: Rebuilt.
1662
ee1c2a10
TT
16632007-01-12 Tom Tromey <tromey@redhat.com>
1664
765d600a 1665 PR preprocessor/28227
ee1c2a10
TT
1666 * directives.c (lex_macro_node): Added 'is_def_or_undef'
1667 argument.
1668 (do_define): Update.
1669 (do_undef): Update.
1670 (do_ifdef): Update.
1671 (do_ifndef): Update.
1672
67214c16
PB
16732007-01-11 Paolo Bonzini <bonzini@gnu.org>
1674
1675 * configure: Regenerate.
1676
1aa6ca40
PB
16772007-01-11 Paolo Bonzini <bonzini@gnu.org>
1678
1679 * configure: Regenerate.
1680
705e2d28
TT
16812007-01-04 Tom Tromey <tromey@redhat.com>
1682
765d600a 1683 PR preprocessor/28165
705e2d28
TT
1684 * internal.h (cpp_in_primary_file): New function.
1685 * directives.c (do_include_next): Use cpp_in_primary_file.
1686 (do_pragma_once): Likewise.
1687 (do_pragma_system_header): Likewise.
1688
7af45bd4
ILT
16892006-12-29 Ian Lance Taylor <iant@google.com>
1690
1691 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
1692 look backward at the end of the line unless we saw a backslash.
1693
9d30f270
JJ
16942006-12-29 Jakub Jelinek <jakub@redhat.com>
1695
1696 PR preprocessor/29612
1697 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not
1698 only when new_sysp is non-zero.
1699
30b0edc0
TT
17002006-12-28 Tom Tromey <tromey@redhat.com>
1701
765d600a 1702 PR preprocessor/30001
30b0edc0
TT
1703 * charset.c (_cpp_convert_input): Check that to.len is greater
1704 than zero.
1705
85d9c13c
TS
17062006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1707
1708 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
83cc06b2 1709 * configure: Rebuilt.
85d9c13c 1710
dfafdaa6
DG
17112006-11-01 Douglas Gregor <doug.gregor@gmail.com>
1712
1713 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
1714 for experimental C++0x mode.
1715 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
1716 adopted the preprocessor changes introduced in C99.
1717
0f45f0f5
JM
17182006-10-29 Joseph Myers <joseph@codesourcery.com>
1719
1720 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
1721 depending on --enable-targets=all.
1722 * configure: Regenerate.
1723
de000d22
JJ
17242006-10-12 Jakub Jelinek <jakub@redhat.com>
1725
1726 PR preprocessor/28709
1727 * macro.c (paste_tokens): Do error reporting here, use BUF with the
1728 spelled LHS token as opposed to spelling it again.
1729 (paste_all_tokens): Don't report errors here, just break on failure.
1730
b5422ad7
BM
17312006-10-10 Brooks Moses <bmoses@stanford.edu>
1732
1733 * Makefile.in: Added empty "pdf" target.
1734
aaf50ff2
GK
17352006-09-22 Geoffrey Keating <geoffk@apple.com>
1736
1737 * configure.ac: Make need_64_bit_hwint case for x86-darwin
1738 match exactly the glob in gcc/config.gcc.
1739 * configure: Regenerate.
1740
c663e301
JM
17412006-09-13 Joseph S. Myers <joseph@codesourcery.com>
1742
1743 PR c/28768
1744 PR preprocessor/14634
1745 * lex.c (lex_string): Pedwarn for unterminated literals.
1746
f7288899
EC
17472006-09-08 Eric Christopher <echristo@apple.com>
1748
1749 * configure.ac: Add 64-bit HWI support for i?86-darwin.
1750
b52dbbf8
SE
17512006-08-14 Steve Ellcey <sje@cup.hp.com>
1752
1753 PR c++/28288
1754 PR c++/14556
1755 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
1756 (CPP_LAST_EQ): Change.
1757 (CPP_LAST_PUNCTUATOR): Change.
1758 * expr.c (cpp_operator): Remove MIN and MAX.
1759 (reduce): Remove CPP_MIN and CPP_MAX.
1760 (num_binary_op): Ditto.
1761 * lex.c (_cpp_lex_direct): Ditto.
1762 (cpp_avoid_paste): Remove ? as legal symbol after > or <.
1763
1c90c6f9
JJ
17642006-06-09 Jakub Jelinek <jakub@redhat.com>
1765
1766 PR preprocessor/27746
1767 * directives.c (do_pragma): Handle pragma with valid namespace
1768 and invalid name coming from macro expansion.
1769 * directives.c (destringize_and_run): Initialize next field in
1770 context.
1771
1772 PR c/27747
1773 PR c++/27748
1774 * directives.c (destringize_and_run): Set NO_EXPAND on the
1775 tokens.
1776
1777 * macro.c (_cpp_backup_tokens): Fix comment typo.
1778
5c3c3683
DJ
17792006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
1780
1781 * Makefile.in (CATALOGS): Add po/ prefix.
1782 * configure: Regenerated.
1783
b2bd74bc
CD
17842006-05-23 Carlos O'Donell <carlos@codesourcery.com>
1785
1786 * Makefile.in: Add install-html target. Add install-html to .PHONY
1787
be8ac3e2
GZ
17882006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
1789
1790 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
1791 * files.c (_cpp_get_file_stat): New function.
1792 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
1793 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
1794 * internal.h (_cpp_get_file_stat): Prototype.
1795 (struct cpp_buffer): Add timestamp.
1796
83900997
JJ
17972006-01-23 Jakub Jelinek <jakub@redhat.com>
1798
1799 PR preprocessor/25717
1800 * init.c (cpp_init_builtins): If __STDC__ will not change value
1801 between system headers and other sources, define it as a normal
1802 macro rather than a builtin.
1803 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check
1804 cpp_in_system_header condition.
1805
18062006-01-05 Paolo Bonzini <bonzini@gnu.org>
9220c30c
PB
1807
1808 * Makefile.in: Use -MMD instead of -MD.
1809
bc4071dd
RH
18102006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
1811 Richard Henderson <rth@redhat.com>
1812
1813 Merge from gomp branch:
1814 * directives.c (struct pragma_entry): Add is_deferred. Add ident
1815 entry to value union.
1816 (end_directive): Don't eat the line if in_deferred_pragma.
1817 (run_directive): Remove pragma hacks.
1818 (insert_pragma_entry): Remove.
1819 (new_pragma_entry): New.
1820 (register_pragma_1): Split out of register_pragma. Only handle
1821 the lookup tree and return the new entry.
1822 (cpp_register_pragma): Fill in the pragma entry here.
1823 (cpp_register_deferred_pragma): New.
1824 (register_pragma_internal): New.
1825 (_cpp_init_internal_pragmas): Use register_pragma_internal.
1826 (do_pragma): Allow pragma expansion after namespace. For deferred
1827 pragmas, don't slurp the line into a string.
1828 (destringize_and_run): Save tokens for deferred pragmas.
1829 (cpp_handle_deferred_pragma): Remove.
1830 * macro.c (builtin_macro): Remove pragma token hack.
1831 (_cpp_push_token_context): Rename from push_token_context and export.
1832 * internal.h (struct lexer_state): Add pragma_allow_expansion.
1833 (_cpp_push_token_context): Declare.
1834 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
1835 a token. Update the line number correctly if so.
1836 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
1837 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
1838 * include/cpplib.h (PRAGMA_EOL): New.
1839 (CPP_TOKEN_FLD_PRAGMA): New.
1840 (struct cpp_token): Add val.pragma.
1841 (struct cpp_options): Remove defer_pragmas.
1842 (cpp_handle_deferred_pragma): Remove.
1843 (cpp_register_deferred_pragma): Declare.
1844
d09e893f
JJ
18452006-01-01 Jakub Jelinek <jakub@redhat.com>
1846
1847 PR c++/25294
1848 * directives.c (do_pragma): If pragma line ends with multi-line
1849 block comment, end the saved deferred pragma string before that
1850 comment. Handle embedded '\0' chars on the pragma line.
1851
ab84748a
VR
18522005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1853
1854 PR c++/23333
1855 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure.
1856
ad6ed77e
JG
18572005-12-07 Jon Grimm <jgrimm2@us.ibm.com>
1858 Ben Elliston <bje@au.ibm.com>
1859
1860 * include/cpplib.h (CPP_N_DFLOAT): New.
1861 * expr.c (interpret_float_suffix): Identify df, dd, and dl
1862 suffixes as decimal floating point constants.
1863 (cpp_classify_number): Disallow hexadecimal DFP constants.
1864
ba096620 18652005-11-14 Gerald Pfeifer <gerald@pfeifer.com>
bc4071dd 1866 Ian Lance Taylor <ian@airs.com>
ba096620
GP
1867
1868 * include/cpplib.h (struct cpp_callbacks): Annotate error with
1869 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0).
1870
456b8ce5
UB
18712005-11-09 Per Bothner <per@bothner.com>
1872 Uros Bizjak <uros@kss-loka.si>
f7288899 1873
456b8ce5
UB
1874 PR c/24101
1875 * init.c (read_original_filename): Temporarily set
1876 state.in_directive before calling _cpp_lex_direct for
1877 CPP_HASH tokens.
1878
5571f74f
JW
18792005-11-03 James E Wilson <wilson@specifix.com>
1880
1881 PR preprocessor/24202
1882 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
1883
a63607ed
JM
18842005-11-04 Joseph S. Myers <joseph@codesourcery.com>
1885
1886 * include/cpplib.h (struct cpp_callbacks): Make error take
1887 va_list* parameter.
1888 * errors.c (cpp_error): Update call to callback.
1889
651ed942
AP
18902005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
1891
1892 PR preprocessor/22042
1893 * macro.c (_cpp_builtin_macro_text): Lower the needed max
1894 buffer size.
1895 (cpp_quote_string): Don't octalify non printable
1896 charactors.
1897
178b58b5
JM
18982005-11-03 Joseph S. Myers <joseph@codesourcery.com>
1899
1900 PR c++/17964
1901 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
1902 (struct cpp_callbacks): Add error.
1903 * errors.c (cpp_error): If client_diagnostic, use error callback.
1904 * charset.c (convert_escape): Don't use %03o in diagnostic.
1905
3ee5ed11 19062005-10-21 James E Wilson <wilson@specifix.com>
6568f34b
JW
1907
1908 PR preprocessor/15220
1909 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
1910 callers. Pass to open_file_failed.
1911 (open_file_failed): New parameter angle_brackets. Fix all callers.
1912 Use in print_dep assignment.
1913 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
1914 * internal.h (_cpp_find_file): Add new parm to declaration.
f7288899 1915
077fc835
KH
19162005-10-08 Kazu Hirata <kazu@codesourcery.com>
1917
1918 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
1919 * configure: Regenerate.
1920
cbc43ae0
ILT
19212005-10-04 Ian Lance Taylor <ian@airs.com>
1922
1923 PR preprocessor/13726
1924 * directives.c (check_eol_return_comments): New static function.
1925 (parse_include): Add buf parameter. Change all callers.
1926 (do_include_common): If not discard comments, turn on
1927 save_comments. Pass collected comments to include callback.
1928 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
1929 include callback: cpp_token list.
1930
af15a2fe
JM
19312005-09-20 Joseph S. Myers <joseph@codesourcery.com>
1932
1933 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
1934 * init.c (struct lang_flags, lang_defaults): Add
1935 extended_identifiers.
1936 (cpp_set_lang): Use it.
1937 * lex.c (forms_identifier_p): Check extended_identifiers.
1938
f5eab47e
JJ
19392005-08-30 Jakub Jelinek <jakub@redhat.com>
1940
1941 PR preprocessor/20348
1942 PR preprocessor/20356
1943 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
1944 2004-06-05 changes.
1945
467129e6
KG
19462005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1947
1948 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
1949 -Wmissing-format-attribute.
1950
1951 * configure: Regenerate.
1952
200031d1
KC
19532005-06-29 Kelley Cook <kcook@gcc.gnu.org>
1954
1955 * all files: Update FSF address in copyright headers.
1956 * makeucnid.c (write_copyright): Update outputted FSF address.
1957
f610dd5f
ZW
19582005-06-13 Zack Weinberg <zack@codesourcery.com>
1959
1960 * configure.ac: Invoke ZW_CREATE_DEPDIR and
1961 ZW_PROG_COMPILER_DEPENDENCIES.
1962 * aclocal.m4, configure: Regenerate.
1963 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
1964 New variables.
1965 (distclean): Clean up $(DEPDIR) and its contents.
1966 (.c.o): Use $(COMPILE).
1967 Include $(DEPDIR)/*.Po for most object->header dependencies.
1968
c3f829c1
GDR
19692005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1970
1971 * configure.ac: Check declarations for asprintf and vasprintf.
1972 * config.in: Regenerate.
1973 * configure: Likewise.
1974
1975 * charset.c (conversion_loop): Use XRESIZEVEC.
1976 (convert_no_conversion): Likewise.
1977 (convert_using_iconv): Likewise.
1978 (init_iconv_desc): Cast return value of alloca.
1979 (cpp_host_to_exec_charset): Use XNEWVEC.
1980 (emit_numeric_escape): Use XRESIZEVEC.
1981 (cpp_interpret_string): Use XNEWVEC.
1982 (cpp_interpret_string): Use XRESIZEVEC.
1983 (_cpp_interpret_identifier): Cast return value of alloca.
1984 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
1985 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
1986 (parse_include): Use XNEWVEC.
1987 (insert_pragma_entry): Rename local variable "new" to
f610dd5f 1988 "new_entry".
c3f829c1
GDR
1989 (save_registered_pragmas): Cast return value of xmemdup.
1990 (destringize_and_run): Same for alloca.
1991 (parse_assertion): Likewise.
1992 (do_assert): Cast allocated storage to proper type.
1993 (cpp_define): Likewise.
1994 (_cpp_define_builtin): Likewise.
1995 (cpp_undef): Likewise.
1996 (handle_assertion): Likewise.
1997 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
1998 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
1999 (CPP_UMINUS): Likewise.
2000 (struct cpp_operator): Rename from struct operator.
2001 (_cpp_expand_op_stack): Use XRESIZEVEC.
2002 * files.c (pch_open_file): Use XNEWVEC.
2003 (pch_open_file): Use XRESIZEVEC.
2004 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
2005 (dir_name_of_file): Use XNEWVEC.
2006 (make_cpp_file): Use XCNEW.
2007 (make_cpp_dir): Likewise.
2008 (allocate_file_hash_entries): USE XNEWVEC.
2009 (cpp_included): Cast return value of htab_find_with_hash.
2010 (append_file_to_dir): Use XNEWVEC.
2011 (read_filename_string): Likewise. Use XRESIZEVEC too.
2012 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
2013 (remap_filename): Use XNEWVEC.
2014 (struct pchf_entry): Move definition out of struct pchf_data.
2015 (_cpp_save_file_entries): Use XCNEWVAR.
2016 (_cpp_read_file_entries): Use XNEWVAR.
2017 * identifiers.c (alloc_node): Use XOBNEW.
2018 * init.c (cpp_create_reader): Use XCNEW.
2019 (cpp_init_builtins): Cast of b->value to enum builtin_type.
2020 (read_original_directory): Cast return value of alloca.
2021 * lex.c (add_line_note): Use XRESIZEVEC.
2022 (warn_about_normalization): Use XNEWVEC.
2023 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
2024 (new_buff): Use XNEWVEC.
2025 * line-map.c (linemap_add): Use XRESIZEVEC.
2026 * macro.c (builtin_macro): Cast return value of alloca.
2027 (paste_tokens): Likewise.
2028 (expand_arg): Use XNEWVEC and XRESIZEVEC.
2029 (_cpp_save_parameter): Use XRESIZEVEC.
2030 (create_iso_definition): Cast allocated storage to proper type.
2031 (_cpp_create_definition): Likewise.
2032 (cpp_macro_definition): Use XRESIZEVEC.
2033 * makedepend.c (add_clm): Use XNEW.
2034 (add_dir): Likewise.
2035 * mkdeps.c (munge): Use XNEWVEC.
2036 (deps_init): Use XCNEW.
2037 (deps_add_target): Use XRESIZEVEC.
2038 (deps_add_default_target): Cast return value of alloca.
2039 (deps_add_dep): Use XRESIZEVEC.
2040 (deps_add_vpath): Likewise. Use XNEWVEC too.
2041 (deps_restore): Likewise.
2042 * pch.c (save_idents): Use XNEW and XNEWVEC.
2043 (cpp_save_state): Use XNEW.
2044 (count_defs): Cast return value of htab_find.
2045 (write_defs): Likewise.
2046 (cpp_write_pch_deps): Use XNEWVEC.
2047 (collect_ht_nodes): Use XRESIZEVEC.
2048 (cpp_valid_state): Use XNEWVEC.
2049 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
2050 * symtab.c (ht_create): Use XCNEW.
2051 (ht_lookup_with_hash): Cast return value of obstack_copy0.
2052 (ht_expand): Use XCNEWVEC.
2053 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
2054 (bool): Do not define if __cplusplus.
2055
1ed17cd5
ZW
20562005-05-12 Zack Weinberg <zack@codesourcery.com>
2057
2058 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
2059 (do_sccs): Delete function definition, #define to do_ident.
2060 (do_ident): Don't hardwire directive name.
2061
5a8c20ce
RK
20622005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
2063
2064 PR bootstrap/21230
2065 * configure: Regenerate.
2066
473c5bc9
AP
20672005-04-27 Andris Pavenis <pavenis@latnet.lv>
2068
2069 * files.c: Include io.h for DJGPP to get prototype of setmode.
2070
c1fc5047
PB
20712005-04-19 Per Bothner <per@bothner.com>
2072
2073 PR preprocessor/20907
2074 * line-map.c (linemap_line_start): Fix bug when we need to increse
2075 column_bits but can re-use the current line_map.
2076
042630ad
KG
20772005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2078
2079 * system.h (fopen, fdopen, freopen): Define these to the unlocked
2080 libiberty functions.
2081
0d667716
KG
20822005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2083
2084 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
2085 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
2086 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
2087 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
2088 _unlocked function.
2089 (fwrite_unlocked): Fix prototype.
1ed17cd5 2090
0d667716
KG
2091 * configure, config.in: Regenerate.
2092
cae064e7
JJ
20932005-04-05 Jakub Jelinek <jakub@redhat.com>
2094
2095 PR preprocessor/19475
2096 * macro.c (create_iso_definition): For < ISO C99, don't
2097 pedwarn if there is no whitespace between macro name and its
2098 replacement, but the replacement starts with a basic character
2099 set character.
2100
cbada204
AJ
21012005-03-28 Andreas Jaeger <aj@suse.de>
2102
2103 * lex.c (warn_about_normalization): Cast field width to int to
2104 avoid warning.
2105
f42eccdb
JM
21062005-03-19 Joseph S. Myers <joseph@codesourcery.com>
2107
2108 * configure.ac: Consistently use solaris2.1[0-9]* instead of
2109 solaris2.1[0-9].
2110 * configure: Regenerate.
2111
c79e602b
GK
21122005-03-15 Geoffrey Keating <geoffk@apple.com>
2113
2114 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
2115 UCN rather than printing an error.
2116
50668cf6
GK
21172005-03-14 Geoffrey Keating <geoffk@apple.com>
2118
6baba9bb
GK
2119 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2120
21212005-03-14 Geoffrey Keating <geoffk@apple.com>
1ed17cd5 2122
50668cf6
GK
2123 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
2124 * charset.c: Update for new format of ucnid.h.
2125 (ucn_valid_in_identifier): Update for new format of ucnid.h.
2126 Add NST parameter, and update it; update callers.
2127 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
2128 with cpp_error.
2129 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
2130 * internal.h (struct normalize_state): New.
2131 (INITIAL_NORMALIZE_STATE): New.
2132 (NORMALIZE_STATE_RESULT): New.
2133 (NORMALIZE_STATE_UPDATE_IDNUM): New.
2134 (_cpp_valid_ucn): New.
2135 * lex.c (warn_about_normalization): New.
2136 (forms_identifier_p): Add normalize_state parameter, update callers.
2137 (lex_identifier): Add normalize_state parameter, update callers. Keep
2138 the state current.
2139 (lex_number): Likewise.
2140 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
2141 it with warn_about_normalization.
2142 * makeucnid.c: New.
2143 * ucnid.h: Replace.
2144 * ucnid.pl: Remove.
2145 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
2146 comments about obsolete version of C++.
2147 * include/cpplib.h (enum cpp_normalize_level): New.
2148 (struct cpp_options): Add warn_normalize field.
2149
47e20491
GK
21502005-03-11 Geoffrey Keating <geoffk@apple.com>
2151
2152 * directives.c (glue_header_name): Update call to cpp_spell_token.
2153 * internal.h (_cpp_interpret_identifier): New.
2154 * charset.c (_cpp_interpret_identifier): New.
2155 (_cpp_valid_ucn): Allow UCN version of '$'.
2156 * lex.c (lex_identifier): Add extra parameter to indicate if initial
2157 character was '$' or '\'. Support identifiers with UCNs.
2158 (forms_identifier_p): Allow UCNs.
2159 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
2160 (utf8_to_ucn): New.
2161 (cpp_spell_token): Add FORSTRING parameter. Use it.
2162 (cpp_token_as_text): Update call to cpp_spell_token.
2163 (cpp_output_token): Write UCNs back out.
2164 (stringify_arg): Update call to cpp_spell_token.
2165 (paste_tokens): Likewise.
2166 (cpp_macro_definition): Likewise.
2167 * macro.c (stringify_arg): Likewise.
2168 (paste_tokens): Likewise.
2169 (cpp_macro_definition): Likewise.
2170 * include/cpplib.h: Add parameter to cpp_spell_token.
2171
73096711
JJ
21722005-03-04 Jakub Jelinek <jakub@redhat.com>
2173
2174 PR bootstrap/20282
2175 PR bootstrap/20305
2176 * macro.c (replace_args, cpp_get_token): Copy whole
2177 cpp_token_u instead of just cpp_string field from it.
2178
2203a881
DP
21792005-02-28 Devang Patel <dpatel@apple.com>
2180
2181 * directives.c (do_line): Save sysp early before line table is
2182 realloc'ed.
1ed17cd5 2183
c5ff069d
ZW
21842005-02-20 Zack Weinberg <zack@codesourcery.com>
2185
2186 PR 18785
2187 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
2188 (cpp_host_to_exec_charset): New function.
2189 * include/cpplib.h: Declare cpp_host_to_exec_charset.
2190
04c90eea
DP
21912005-02-19 Devang Patel <dpatel@apple.com>
2192
2193 * charset.c (_cpp_convert_input): Check '\r' before inserting
2194 '\n' at the end.
c5ff069d 2195
6da55c00
EC
21962005-02-15 Eric Christopher <echristo@redhat.com>
2197
2198 PR preprocessor/19077
2199 * macro.c (cpp_macro_definition): Move handling of whitespace
2200 to PREV_WHITE conditional. Remove overloading of len
2201 variable.
2202
31c3e631
KH
22032005-02-14 Kazu Hirata <kazu@cs.umass.edu>
2204
2205 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
2206 traditional.c: Update copyright.
2207
be0f1e54
PB
22082005-02-14 Paolo Bonzini <bonzini@gnu.org>
2209
2210 PR bootstrap/19818
2211 * configure.ac: Check for declaration of basename and getopt.
2212 * config.in: Regenerate.
2213 * configure: Regenerate.
2214 * internal.h (ustrcspn): New.
2215 * macro.c (create_iso_definition): Fix allocation of memory.
2216 (padding_token): Add cast to remove const-ness.
2217 * pch.c (cpp_read_state): Use ustrcspn.
2218
ecddfb39
MS
22192005-02-08 Mike Stump <mrs@apple.com>
2220
2221 * files.c (pchf_adder): Remove.
2222 (struct pchf_adder_info): Likewise.
2223 (_cpp_save_file_entries): Write out all files so that #import works.
2224
9fcdd891
JM
22252005-01-23 Joseph S. Myers <joseph@codesourcery.com>
2226
2227 * configure: Regenerate.
2228
ecfd72e7
TS
22292005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2230
2231 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
2232
6c25a4f7 2233 * include/cpplib.h: Also update copyright years.
c5ff069d 2234
942926ad
GK
22352005-01-03 Geoffrey Keating <geoffk@apple.com>
2236
2237 * files.c (_cpp_find_file): Add files found by search_path_exhausted
2238 to the list of all files.
2239
a2566ae9
GDR
22402005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2241
2242 * internal.h: Update references to Cpp lib filenames.
2243 * directives.c: Likewise.
2244 * init.c: Likewise.
2245 * macro.c: Likewise.
2246 * traditional.c: Likewise.
2247
1b449375
EB
22482004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
2249
2250 PR preprocessor/15167
2251 * files.c (destroy_cpp_file): New function.
2252 (should_stack_file): Make a new file if the
2253 compared file is still stacked.
2254
28303828
NN
22552004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
2256
c5ff069d 2257 PR preprocessor/17610
28303828
NN
2258 * directives.c (do_include_common): Error out if an empty filename
2259 is given for #include (or #include_next or #import).
2260
c812785a
RS
22612004-11-27 Roger Sayle <roger@eyesopen.com>
2262 Zack Weinberg <zack@codesourcery.com>
2263
2264 * internal.h: Replace all uses of uchar with unsigned char.
2265 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
2266 with !IN_GCC, so uchar is only defined whilst building libcpp.
2267
f91eaa01
KC
22682004-11-24 Kelley Cook <kcook@gcc.gnu.org>
2269
2270 * aclocal.m4: Regenerate.
2271
f78ce0c2
RS
22722004-11-24 Roger Sayle <roger@eyesopen.com>
2273
2274 PR preprocessor/15824
2275 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
2276 directly, instead of the non-existant "system.h" and "ansidecl.h".
2277 * configure: Regenerate.
2278
b5b3e36a 22792004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 2280 Joseph Myers <joseph@codesourcery.com>
b5b3e36a
DJ
2281
2282 * internal.h (struct lexer_state): Add in_deferred_pragma.
2283 * directives.c (struct pragma_entry): Add allow_expansion.
2284 (insert_pragma_entry): Take allow_expansion flag.
2285 (register_pragma): Likewise.
2286 (cpp_register_pragma): Likewise.
2287 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
2288 (do_pragma): Honor allow_expansion.
2289 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
2290 * include/cpplib.h (cpp_register_pragma): Update prototype.
2291
a8e68029 22922004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
c5ff069d 2293 Mark Mitchell <mark@codesourcery.com>
a8e68029
DJ
2294
2295 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
2296 need_64bit_hwint=yes.
2297 * configure: Regenerate.
2298
50f47ee0
JM
22992004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2300
2301 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
2302 po/$(PACKAGE).pot.
2303 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
2304 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
2305 Remove local srcdir path from generated file.
2306
968e08d6 23072004-11-04 Zack Weinberg <zack@codesourcery.com>
c5ff069d 2308 Gerald Pfeifer <gerald@pfeifer.com>
968e08d6
ZW
2309
2310 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2311 as well.
2312
3da3d587
ZW
23132004-10-27 Zack Weinberg <zack@codesourcery.com>
2314
2315 PR 18075
2316 * directives.c (do_pragma): Do not defer pragmas which are unknown.
2317 (cpp_handle_deferred_pragma): Add cast to silence warning.
2318
ac24fc25
JM
23192004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
2320
2321 * errors.c (_cpp_begin_message): Print "error: " for errors.
2322
7731405b
AJ
23232004-10-10 Andreas Jaeger <aj@suse.de>
2324
2325 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
2326 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
2327
646544e3
AP
23282004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2329
2330 * pch.c (cpp_write_pch_state): Remove variable z as it is not
2331 used.
2332 (cpp_read_state): Remove unused variables, m, d and mac_count.
2333
67a74146
PB
23342004-09-29 Per Bothner <per@bothner.com>
2335
2336 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
2337 cb.line_change. Otherwise do_pragma will call the line_change
2338 call-back with a meaningless line number.
2339
018a4785
ZW
23402004-09-24 Zack Weinberg <zack@codesourcery.com>
2341
2342 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
2343 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
2344 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2345 * aclocal.m4, configure: Regenerate.
2346 * init.c: Include localedir.h.
2347 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
2348 (DEFS): Delete.
2349 (.c.o): Use $(ALL_CFLAGS).
2350 (localedir.h, localedir.hs): New rules.
2351 (clean): Use rm -rf to remove directories.
2352 (distclean): Also delete localedir.h and localedir.hs.
2353 (init.o): Update dependencies.
2354
88fa57d7
KC
23552004-09-22 Kelley Cook <kcook@gcc.gnu.org>
2356
2357 * Makefile.in (aclocal.m4): Update dependencies.
2358 * configure.ac (AC_CONFIG_MACRO_DIR): New.
2359 * aclocal.m4, configure: Regenerate.
2360
8f8e9aa5
ZW
23612004-09-17 Zack Weinberg <zack@codesourcery.com>
2362
a29f62d9
ZW
2363 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
2364 (_cpp_convert_input, _cpp_default_encoding): Add comments.
2365 Some other comments in this file also tweaked.
2366
8f8e9aa5
ZW
2367 * directives.c (do_pragma): Save current buffer position
2368 before lexing the pragma keywords; don't call
2369 _cpp_backup_tokens in the defer_pragmas case.
2370
a2981930
PB
23712004-09-15 Per Bothner <per@bothner.com>
2372
2373 * include/line-map.h (line_map_start): Add parameter names so
2374 preceding comment makes sense.
2375 (linemap_add): Remove from comment mention of non-existing parameter.
2376
21b11495
ZW
23772004-09-09 Matt Austern <austern@apple.com>
2378 Zack Weinberg <zack@codesourcery.com>
2379
2380 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
2381 prefixes throughout. Add entry for PRAGMA. Remove
2382 unnecessary "= 0" from EQ.
2383 (enum cpp_ttype): Adjust OP and TK definitions to restore
2384 prefixes, via token-paste.
2385 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
2386 Change from #defines to additional cpp_ttype enumerators.
2387 (struct cpp_options): Add defer_pragmas.
2388 (cpp_handle_deferred_pragma): Prototype new interface.
2389
2390 * internal.h (struct cpp_reader): Add directive_result.
2391 * directives.c (struct pragma_entry): Add is_internal field;
2392 give boolean fields type bool.
2393 (start_directive): Initialize pfile->directive_result.type.
2394 (_cpp_do__Pragma): Likewise.
2395 (run_directive): Do not crash if pfile->buffer->prev is NULL.
2396 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
2397 from it.
2398 (register_pragma): New static function, bulk of former
2399 cpp_register_pragma here; add 'internal' argument, pass along
2400 to insert_pragma_entry.
2401 (cpp_register_pragma): Now a wrapper around register_pragma which
2402 always passes false for 'internal' argument.
2403 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
2404 true for 'internal'.
2405 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
2406 an internal pragma, save text till the end of the line as a CPP_PRAGMA
2407 token instead of executing the pragma.
2408 (cpp_handle_deferred_pragma): New interface.
2409 * lex.c (token_spellings): Adjust OP and TK definitions to
2410 match changes to cpplib.h.
2411 (_cpp_lex_token): Check for a directive-result token and
2412 return it if present.
2413 (cpp_token_val_index): Handle CPP_PRAGMA.
2414 * macro.c (cpp_builtin_macro_text): Correct comment.
2415 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
2416
0fd9e8dd
SB
24172004-09-06 Serge Belyshev <belyshev@lubercy.com>
2418
2419 PR preprocessor/14699
2420 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
2421 from size_t to double.
2422
39b8ce7f
AS
24232004-08-28 Andreas Schwab <schwab@suse.de>
2424 Andreas Jaeger <aj@suse.de>
2425
2426 * configure.ac: Set PACKAGE correctly.
2427 * configure: Regenerated.
2428
5d1f4b27
PB
24292004-08-25 Paolo Bonzini <bonzini@gnu.org>
2430
2431 * Makefile.in: Add back top_builddir.
2432
078e3ffe
PB
24332004-08-25 Paolo Bonzini <bonzini@gnu.org>
2434
2435 * configure.ac: Replace Automake macro invocations
2436 with manual Autoconf checks and substitutions.
2437 * configure: Regenerate.
2438 * aclocal.m4: Regenerate.
2439 * config.in: Regenerate.
2440 * Makefile.am: Removed.
2441 * Makefile.in: Heavy simplification and reorganization.
2442
b3f8d95d
MM
24432004-08-09 Mark Mitchell <mark@codesourcery.com>
2444
2445 * configure.ac (arm*-*-eabi*): New target.
2446 (arm*-*-symbianelf*): Likewise.
2447 * configure: Regenerated.
2448
72bb2c39
BI
24492004-07-24 Bernardo Innocenti <bernie@develer.com>
2450
2451 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
2452 * directives.c: Use XNEW-family macros from libiberty.
2453 * lex.c: Likewise.
2454 * macro.c: Likewise.
2455 * cpplib.h (cpp_deps_style): Export enum with name.
2456
21b11495 24572004-07-23 Matthias Klose <doko@debian.org>
72bb2c39 2458
21b11495 2459 * init.c (init_library): Use PACKAGE for the text domain.
85eac2a0 2460
a23ee064
AP
24612004-07-16 Andris Pavenis <pavenis@latnet.lv>
2462
2463 PR preprocessor/16366
2464 * internal.h (struct cpp_reader): New field dir_hash.
2465 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
2466 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
2467
a09d4744
NB
24682004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
2469
2470 PR preprocessor/16192
2471 PR preprocessor/15913
2472 PR preprocessor/15572
2473 * expr.c (_cpp_parse_expr): Handle remaining cases where an
2474 expression is missing.
2475 * init.c (post_options): Traditional cpp doesn't do // comments.
2476
f58f7def
PB
24772004-06-30 Per Bothner <per@bothner.com>
2478
2479 * include/line-map.h (fileline): Remove old typedef.
2480 * internal.h (struct cpp_reader): Use source_location typedef instead.
2481
e83d8d43
ZW
24822004-06-26 Zack Weinberg <zack@codesourcery.com>
2483
2484 Partially revert patch of 2004-06-05.
2485 * files.c (search_cache): Remove pfile argument. Don't check
2486 for file that would be found by "" or <> search here...
2487 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
2488 Do not apply directory-of-current-file correction to files
2489 found by this check. Rearrange code slightly.
2490
c0d578e6
GK
24912004-06-21 Geoffrey Keating <geoffk@apple.com>
2492
2493 * files.c (should_stack_file): Correct swapped parameters to call
2494 to cb.read_pch.
2495 * pch.c (cpp_valid_state): Handle -fpreprocessed.
2496
159d5224
PB
24972004-06-15 Paolo Bonzini <bonzini@gnu.org>
2498
2499 * Makefile.in: Regenerate with automake 1.8.5.
2500 * aclocal.m4: Likewise.
2501 * configure: Regenerate.
2502
2fac9c01
ZW
25032004-06-11 Zack Weinberg <zack@codesourcery.com>
2504
2505 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
2506 * configure, config.in: Regenerate.
2507 * system.h: Unconditionally define bool as unsigned char,
2508 BOOL_BITFIELD as unsigned int.
2509 * .cvsignore: New file.
2510
d8044160
GK
25112004-06-09 Geoffrey Keating <geoffk@apple.com>
2512
2513 * traditional.c (push_replacement_text): Set macro->traditional.
2514 (save_replacement_text): Likewise.
2515 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
2516 (struct save_macro_item): Delete.
2517 (struct save_macro_data): Use a character array not the previous
2518 structured format.
2519 (save_macros): Save macro as text not as internal structures.
2520 (cpp_prepare_state): Update for changes to save_macro_data.
2521 (cpp_read_state): Don't read macros defined in PCH. Restore
2cf22451 2522 -D macros as text.
d8044160
GK
2523 * macro.c (create_iso_definition): Honour alloc_subobject.
2524 Clear traditional flag.
2525 (_cpp_create_definition): Honour alloc_subobject.
2526 * lex.c (cpp_token_val_index): New.
2527 * internal.h: Include cpp-id-data.h.
2528 (uchar): Move definition to cpp-id-data.h.
2529 (U): Likewise.
2530 (cpp_macro): Likewise.
2531 * directives.c (struct answer): Move to cpp-id-data.h.
2532 (do_assert): Honour alloc_subobject.
2cf22451
ZW
2533
2534 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
2535 * include/cpplib.h (struct cpp_string): Add GTY marker.
2536 (enum cpp_token_fld_kind): New.
2537 (struct cpp_token): Add GTY markers.
2538 (cpp_token_val_index): Prototype.
2539 (CPP_HASHNODE_VALUE_IDX): New.
2540 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
2541 * include/cpp-id-data.h: New file.
d8044160 2542
0ca8e815
PB
25432004-06-09 Paolo Bonzini <bonzini@gnu.org>
2544
2545 * Makefile.am (all-local): New.
2546 * Makefile.in: Regenerate.
2547
b51fa00f
RS
25482004-06-06 Roger Sayle <roger@eyesopen.com>
2549
2550 * Makefile.am (LIBICONV): Declare.
2551 (makedepend_LDADD): Use LIBICONV.
2552 * Makefile.in: Regenerate.
2553
5e2f3f39
AP
25542004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
2555
2556 * Makefile.am (LIBINTL): Declare
2557 (makedepend_LDADD): Use LIBINTL.
2558 * Makefile.in: Regenerate.
2559
c6e83800
ZW
25602004-06-05 Zack Weinberg <zack@codesourcery.com>
2561
2562 * Makefile.am: Add makedepend.
2563 * Makefile.in, aclocal.m4: Regenerate.
2564 * charset.c: Insert a space to avoid a warning.
2565 * directives.c: Include mkdeps.h.
2566 (_cpp_handle_directive): Reenable macro expander if appropriate.
2567 (undefine_macros): Inline body of _cpp_free_definition for speed.
2568 Do not call undef callback or _cpp_warn_if_unused_macro.
2569 (cpp_get_deps): New interface.
2570 * files.c (search_cache): Add pfile argument. Check for file
2571 that would be found by "" or <> search here...
2572 (_cpp_find_file): ...not here. Correct recorded start_dir of
2573 files found by directory-of-current-file search that would be
2574 found by "" or <> search.
2575 * init.c (cpp_add_dependency_target): Delete.
2576 * internal.h (struct lexer_state): Add discarding_output flag.
2577 * lex.c (lex_identifier): Compute hash function while scanning.
2578 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
2579 directives.
2580 * makedepend.c: New file.
2581 * mkdeps.c (struct deps): Add vpath vector.
2582 (apply_vpath, deps_add_vpath): New function.
2583 (deps_free): Free vpath vector.
2584 (deps_add_dep, deps_add_target): Use apply_vpath.
2585 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
2586 (ht_lookup_with_hash): New function.
2587 * cpplib.h, mkdeps.h: Update prototypes.
2588 * symtab.h: Update prototypes.
2589 (HT_HASHSTEP, HT_FINISH): New macros.
2590
b453c95f
GK
25912004-05-29 Geoffrey Keating <geoffk@apple.com>
2592
2593 * symtab.c (ht_create): Set entries_owned.
2594 (ht_destroy): Honour entries_owned.
2595 (ht_expand): Likewise.
2596 (ht_load): New.
2cf22451
ZW
2597 * include/symtab.h (struct ht): New field 'entries_owned'
2598 (ht_load): New prototype.
b453c95f 2599
963e23c5
PB
26002004-05-26 Paolo Bonzini <bonzini@gnu.org>
2601
2602 PR bootstrap/15651
2603 * configure.ac: Fix m4 quoting when picking
2604 the size of HOST_WIDE_INT.
2605 * configure: Regenerate.
2606
0429bc77
PB
26072004-05-25 Paolo Bonzini <bonzini@gnu.org>
2608
2609 * Makefile.am: the correct directory for
2610 gettext include files is given by @INCINTL@.
2611 * Makefile.in: Regenerate.
2612
c86dd7db
PB
26132004-05-24 Paolo Bonzini <bonzini@gnu.org>
2614
2615 * system.h [!ENABLE_NLS]: dgettext takes two
2616 parameters.
2617
4f4e53dd
PB
26182004-05-23 Paolo Bonzini <bonzini@gnu.org>
2619
2620 Moved libcpp from the gcc subdirectory to the toplevel.
2621 * Makefile.am: New file.
2622 * Makefile.in: Regenerate.
2623 * configure.ac: New file.
2624 * configure: Regenerate.
2625 * config.in: Regenerate.
2626 * charset.c: Moved from gcc/cppcharset.c. Add note about
2627 brokenness of input charset detection. Adjust for change
2628 in name of cppucnid.h.
2629 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
2630 * expr.c: Moved from gcc/cppexp.c.
2631 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
2632 Remove #define of O_BINARY, it is in system.h.
2633 * identifiers.c: Moved from gcc/cpphash.c.
2634 * internal.h: Moved from gcc/cpphash.h. Change header
2635 guard name. All other files adjusted to match name change.
2636 * init.c: Moved from gcc/cppinit.c.
2637 (init_library) [ENABLE_NLS]: Call bindtextdomain.
2638 * lex.c: Moved from gcc/cpplex.c.
2639 * directives.c: Moved from gcc/cpplib.c.
2640 * macro.c: Moved from gcc/cppmacro.c.
2641 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
2642 * traditional.c: Moved from gcc/cpptrad.c.
2643 * ucnid.h: Moved from gcc/cppucnid.h. Change header
2644 guard name.
2645 * ucnid.pl: Moved from gcc/cppucnid.pl.
2646 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
2647 guard name.
2648 * symtab.c: Moved from gcc/hashtable.c.
2649 * line-map.c: Moved from gcc. Do not include intl.h.
2650 * mkdeps.c: Moved from gcc.
2651 * system.h: New file.
2cf22451
ZW
2652 * include/cpplib.h: Moved from gcc. Change header guard name.
2653 * include/line-map.h: Moved from gcc. Change header guard name.
2654 * include/mkdeps.h: Moved from gcc. Change header guard name.
2655 * include/symtab.h: Moved from gcc/hashtable.h. Change header
2656 guard name.