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