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