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