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