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