]>
Commit | Line | Data |
---|---|---|
0f0f8087 | 1 | 2019-10-15 Nathan Sidwell <nathan@acm.org> |
2 | ||
3 | * include/line-map.h (struct maps_info_ordinary): Make cache | |
4 | mutable. | |
5 | (struct maps_info_macro): Likewise. | |
6 | (LINEMAPS_CACHE): Remove non-ref accessor. Constify ref accessor. | |
7 | (LINEMAPS_ORDINARY_CACHE, LINEMAPS_MACRO_CACHE): Likewise. | |
8 | (LINEMAPS_ORDINARY_MAP_AT, LINEMAPS_MACRO_MAP_AT): Use | |
9 | LINEMAPS_USED and LINEMAPS_MAP_AT. | |
10 | (linemap_lookup): Constify line_map arg. | |
11 | linemap.c (linemap_ordinary_map_lookup, linemap_macro_map_lookup): | |
12 | Constify line_map arg. | |
13 | ||
488ec13a | 14 | 2019-10-11 Joseph Myers <joseph@codesourcery.com> |
15 | ||
16 | * include/cpplib.h (struct cpp_options): Add dfp_constants and | |
17 | cpp_warn_c11_c2x_compat. | |
18 | (enum cpp_warning_reason): Add CPP_W_C11_C2X_COMPAT. | |
19 | * init.c (struct lang_flags): Add dfp_constants. | |
20 | (lang_defaults): Set dfp_constants to 1 for GNUC2X and STDC2X and | |
21 | 0 for other languages. | |
22 | (cpp_set_lang): Set dfp_constants from language. | |
23 | (cpp_create_reader): Set cpp_warn_c11_c2x_compat to -1. | |
24 | * expr.c (interpret_float_suffix): Mention DFP constants as C2X in | |
25 | comment. | |
26 | (cpp_classify_number): Do not diagnose DFP constants for languages | |
27 | setting dfp_constants, unless cpp_warn_c11_c2x_compat. | |
28 | ||
8f1b4ddc | 29 | 2019-10-04 Nathan Sidwell <nathan@acm.org> |
30 | ||
31 | PR preprocessor/91991 | |
32 | * line-map.c (linemap_line_start): Clear max_column_hint if we run | |
33 | out of locations. | |
34 | ||
73889195 | 35 | 2019-10-02 Richard Biener <rguenther@suse.de> |
36 | ||
37 | * internal.h (enum include_type): Remove trailing comma. | |
38 | ||
efb07a8a | 39 | 2019-10-02 Joseph Myers <joseph@codesourcery.com> |
40 | ||
41 | * include/cpplib.h (struct cpp_options): Add member scope. | |
42 | * init.c (struct lang_flags, lang_defaults): Likewise. | |
43 | (cpp_set_lang): Set scope member of pfile. | |
44 | * lex.c (_cpp_lex_direct): Test CPP_OPTION (pfile, scope) not | |
45 | CPP_OPTION (pfile, cplusplus) for creating CPP_SCOPE tokens. | |
46 | ||
211382da | 47 | 2019-09-26 Eric Botcazou <ebotcazou@adacore.com> |
48 | ||
49 | * charset.c (UCS_LIMIT): New macro. | |
50 | (ucn_valid_in_identifier): Use it instead of a hardcoded constant. | |
51 | (_cpp_valid_ucn): Issue a pedantic warning for UCNs larger than | |
52 | UCS_LIMIT outside of identifiers in C and in C++2a or later. | |
53 | ||
8af4dba5 | 54 | 2019-09-19 Lewis Hyatt <lhyatt@gmail.com> |
55 | ||
56 | PR c/67224 | |
57 | * charset.c (_cpp_valid_utf8): New function to help lex UTF-8 tokens. | |
58 | * internal.h (_cpp_valid_utf8): Declare. | |
59 | * lex.c (forms_identifier_p): Use it to recognize UTF-8 identifiers. | |
60 | (_cpp_lex_direct): Handle UTF-8 in identifiers and CPP_OTHER tokens. | |
61 | Do all work in "default" case to avoid slowing down typical code paths. | |
62 | Also handle $ and UCN in the default case for consistency. | |
63 | ||
79dd6fa7 | 64 | 2019-08-30 Nathan Sidwell <nathan@acm.org> |
65 | ||
66 | New # semantics for popping to "" name. | |
67 | libcpp/ | |
68 | * directives.c (do_linemarker): Popping to "" name means get the | |
69 | name from the include stack.. | |
70 | ||
8bc9c0bb | 71 | 2019-09-05 Nathan Sidwell <nathan@acm.org> |
72 | ||
73 | PR preprocessor/91639 | |
74 | * directives.c (do_include_common): Tell lexer we're a #include. | |
75 | * files.c (_cpp_stack_file): Lexer will have always incremented. | |
76 | * internal.h (struct cpp_context): Extend in_directive's | |
77 | semantics. | |
78 | * lex.c (_cpp_lex_direct): Increment line for final \n when lexing | |
79 | for an ISO #include. | |
80 | * line-map.c (linemap_line_start): Remember if we overflowed. | |
81 | ||
7ee1594e | 82 | 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com> |
83 | ||
84 | * directives.c: Remove references to spu from comments. | |
85 | * expr.c: Likewise. | |
86 | ||
b48b72c0 | 87 | 2019-08-29 Nathan Sidwell <nathan@acm.org> |
88 | ||
89 | * internal.h (enum include_type): Add IT_MAIN, IT_DIRECTIVE_HWM, | |
90 | IT_HEADER_HWM. | |
91 | (_cpp_stack_file): Take include_type, not a bool. | |
92 | * files.c (_cpp_find_file): Refactor to not hide an if inside a | |
93 | for conditional. | |
94 | (should_stack_file): Break apart to ... | |
95 | (is_known_idempotent_file, has_unique_contents): ... these. | |
96 | (_cpp_stack_file): Replace IMPORT boolean with include_type enum. | |
97 | Refactor to use new predicates. Do linemap compensation here ... | |
98 | (_cpp_stack_include): ... not here. | |
99 | * init.c (cpp_read_main_file): Pass IT_MAIN to _cpp_stack_file. | |
100 | ||
db85420c | 101 | 2019-08-28 Nathan Sidwell <nathan@acm.org> |
102 | ||
103 | * directives-only.c (_cpp_preprocess_dir_only): Use false, not | |
104 | zero for _cpp_handle_directive call. | |
105 | * directives.c (_cpp_handle_directive): Indented is bool. | |
106 | * files.c (struct _cpp_file): Make bools 1 bit bitfields. | |
107 | * internal.h (enum include_type): Reformat and comment. | |
108 | (struct cpp_buffer): Make flags 1 bit bitfields. | |
109 | (_cpp_handle_directive): Indented is bool. | |
110 | ||
251317e4 | 111 | 2019-07-09 Martin Sebor <msebor@redhat.com> |
112 | ||
113 | * include/line-map.h: Change class-key from class to struct and vice | |
114 | versa to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod. | |
115 | * mkdeps.c: Same. | |
116 | ||
d8ae7f77 | 117 | 2019-07-03 Martin Liska <mliska@suse.cz> |
118 | ||
119 | * line-map.c (linemap_get_expansion_filename): Remove | |
120 | dead assignemts. | |
121 | * mkdeps.c (make_write): Likewise. | |
122 | ||
6688c48b | 123 | 2019-07-02 qing zhao <qing.zhao@oracle.com> |
124 | ||
125 | PR preprocessor/90581 | |
126 | * directives.c (do_include_common): Replace CPP_STACK_MAX with | |
127 | CPP_OPTION (pfile, max_include_depth). | |
128 | * include/cpplib.h (struct cpp_options): Add new field | |
129 | max_include_depth. | |
130 | * init.c (cpp_create_reader): Initiate new field max_include_depth. | |
131 | * internal.h: Delete CPP_STACK_MAX. | |
132 | ||
cec91df1 | 133 | 2019-06-26 Nathan Sidwell <nathan@acm.org> |
134 | ||
135 | PR preprocessor/90927 | |
136 | * mkdeps.c (mkdeps::vec::operator[]): Add non-const variant. | |
137 | (deps_add_target): Deal with out of order unquoted targets. | |
138 | ||
db9c2a14 | 139 | 2019-05-19 Andrew Pinski <apinski@marvell.com> |
140 | ||
141 | PR pch/81721 | |
142 | * lex.c (cpp_token_val_index <case SPELL_OPERATOR>): If tok->flags | |
143 | has NAMED_OP set, then return CPP_TOKEN_FLD_NODE. | |
144 | ||
ae7da87a | 145 | 2019-05-14 Martin Liska <mliska@suse.cz> |
146 | ||
147 | PR preprocessor/90382 | |
148 | * line-map.c (first_map_in_common_1): Handle ADHOC | |
149 | locations. | |
150 | ||
59d76a83 | 151 | 2019-05-14 Martin Liska <mliska@suse.cz> |
152 | ||
153 | PR preprocessor/90382 | |
154 | * include/line-map.h (get_data_from_adhoc_loc): Add const to | |
155 | the first argument. | |
156 | (get_location_from_adhoc_loc): Likewise. | |
157 | * line-map.c(get_data_from_adhoc_loc): Add const to | |
158 | the first argument. | |
159 | (get_location_from_adhoc_loc): Likewise. | |
160 | (get_combined_adhoc_loc): Use get_location_from_adhoc_loc | |
161 | (or get_data_from_adhoc_loc). | |
162 | (get_range_from_adhoc_loc): Likewise. | |
163 | (get_pure_location): Likewise. | |
164 | (linemap_position_for_loc_and_offset): Likewise. | |
165 | (linemap_lookup): Likewise. | |
166 | (linemap_ordinary_map_lookup): Likewise. | |
167 | (linemap_macro_map_lookup): Likewise. | |
168 | (linemap_get_expansion_line): Likewise. | |
169 | (linemap_get_expansion_filename): Likewise. | |
170 | (linemap_location_in_system_header_p): Likewise. | |
171 | (linemap_location_from_macro_expansion_p): Likewise. | |
172 | (linemap_macro_loc_to_exp_point): Likewise. | |
173 | (linemap_resolve_location): Likewise. | |
174 | (linemap_unwind_toward_expansion): Likewise. | |
175 | (linemap_unwind_to_first_non_reserved_loc): Likewise. | |
176 | (linemap_expand_location): Likewise. | |
177 | (linemap_dump_location): Likewise. | |
178 | ||
285b544a | 179 | 2019-05-07 Nathan Sidwell <nathan@acm.org> |
180 | ||
01e74fa4 | 181 | * files.c (_cpp_stack_file): Empty filenames aren't dependencies. |
182 | * mkdeps.c (deps_add_dep): Assert not empty. | |
183 | ||
285b544a | 184 | * include/mkdeps.h (deps_write): Add PHONY arg. |
185 | (deps_phony_targets): Delete. | |
186 | * init.c (cpp_finish): Just call deps_write. | |
187 | * mkdeps.c (struct mkdeps): Add local vector class. Reimplement | |
188 | vector handling. | |
189 | (munge): Munge to static buffer. | |
190 | (apply_vpath): Adjust vector handling. | |
191 | (deps_init, deps_free): Use new, delete. | |
192 | (deps_add_target): Do not munge here. Record quoting low water mark. | |
193 | (deps_add_dep): Do not munge here. | |
194 | (deps_add_vpath): Adjust vector handling. | |
195 | (make_write_name): New. Munge on demand here. | |
196 | (make_write_vec): New. | |
197 | (deps_phony_targets): Delete. | |
198 | (make_write): New. | |
199 | (deps_write): Forward to deps_Write. | |
200 | (deps_save, deps_restore): Adjust vector handling. | |
201 | ||
3d7617fe | 202 | 2019-05-06 Nathan Sidwell <nathan@acm.org> |
203 | ||
204 | * include/mkdeps.h: Rename struct deps to struct mkdeps. | |
205 | * mkdeps.c: Likewise. | |
206 | * include/cpplib.h (cpp_get_deps): Rename return type.. | |
207 | * directives.c (cpp_get_deps): Likewise. | |
208 | * internal.h (struct cpp_reader): Rename deps field type. | |
209 | ||
5adb4def | 210 | 2019-04-03 Jonathan Wakely <jwakely@redhat.com> |
211 | ||
212 | * files.c (search_path_exhausted): Fix typo in comment. | |
213 | ||
d7cc3e1c | 214 | 2019-02-26 Martin Liska <mliska@suse.cz> |
215 | ||
216 | * symtab.c (ht_dump_statistics): Make | |
217 | horizontal alignment for statistics. | |
218 | ||
a268d555 | 219 | 2019-02-20 David Malcolm <dmalcolm@redhat.com> |
220 | ||
221 | PR c/89410 | |
222 | * include/line-map.h (linenum_arith_t): New typedef. | |
223 | (compare): Use it. | |
224 | ||
019260c8 | 225 | 2019-02-18 Martin Liska <mliska@suse.cz> |
226 | ||
227 | PR c++/89383 | |
228 | * line-map.c (linemap_line_start): Use 1UL in order | |
229 | to not overflow. | |
230 | ||
e7e0c93c | 231 | 2019-02-11 Martin Liska <mliska@suse.cz> |
232 | ||
233 | PR lto/88147 | |
234 | * line-map.c (linemap_line_start): Don't reuse the existing line | |
235 | map if the line offset is sufficiently large to cause overflow | |
236 | when computing location_t values. | |
237 | ||
e1b6ccb9 | 238 | 2019-01-26 Jakub Jelinek <jakub@redhat.com> |
239 | ||
240 | PR preprocessor/88974 | |
241 | * directives.c (SEEN_EOL): Move macro to ... | |
242 | * internal.h (SEEN_EOL): ... here. | |
243 | * expr.c (parse_has_include): Don't cpp_get_token if SEEN_EOL (). | |
244 | ||
fbd26352 | 245 | 2019-01-01 Jakub Jelinek <jakub@redhat.com> |
246 | ||
247 | Update copyright years. | |
248 | ||
934182c6 | 249 | 2018-11-27 Mike Gulick <mgulick@mathworks.com> |
250 | ||
251 | PR preprocessor/83173 | |
252 | * location-example.txt: Update example -fdump-internal-locations | |
253 | output. | |
254 | ||
c94fccdf | 255 | 2018-11-27 Mike Gulick <mgulick@mathworks.com> |
256 | ||
257 | PR preprocessor/83173 | |
258 | * files.c (_cpp_stack_include): Check if | |
259 | line_table->highest_location is past current line before | |
260 | decrementing. | |
261 | ||
be1e7283 | 262 | 2018-11-13 David Malcolm <dmalcolm@redhat.com> |
263 | ||
264 | * charset.c: Replace "source_location" with "location_t". | |
265 | * directives-only.c: Likewise. | |
266 | * directives.c: Likewise. | |
267 | * errors.c: Likewise. | |
268 | * expr.c: Likewise. | |
269 | * files.c: Likewise. | |
270 | * include/cpplib.h: Likewise. Rename MAX_SOURCE_LOCATION to | |
271 | MAX_LOCATION_T. | |
272 | * include/line-map.h: Likewise. | |
273 | * init.c: Likewise. | |
274 | * internal.h: Likewise. | |
275 | * lex.c: Likewise. | |
276 | * line-map.c: Likewise. | |
277 | * location-example.txt: Likewise. | |
278 | * macro.c: Likewise. | |
279 | * pch.c: Likewise. | |
280 | * traditional.c: Likewise. | |
281 | ||
e7b82989 | 282 | 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com> |
283 | ||
284 | * configure: Regenerated. | |
285 | ||
8818a520 | 286 | 2018-11-05 Martin Liska <mliska@suse.cz> |
287 | ||
288 | * symtab.c (ht_dump_statistics): Replace %zu with %lu format. | |
289 | ||
25f6b309 | 290 | 2018-11-05 Martin Liska <mliska@suse.cz> |
291 | ||
292 | * symtab.c (ht_dump_statistics): Fix format and | |
293 | pass missing argument. | |
294 | ||
7d05c217 | 295 | 2018-11-05 Martin Liska <mliska@suse.cz> |
296 | ||
297 | * symtab.c (ht_dump_statistics): Make dump conditional | |
298 | based on alloc_subobject. | |
299 | ||
f00f02a3 | 300 | 2018-10-31 Joseph Myers <joseph@codesourcery.com> |
301 | ||
302 | PR bootstrap/82856 | |
303 | * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. | |
304 | * aclocal.m4, config.in, configure: Regenerate. | |
305 | ||
bd4387c4 | 306 | 2018-10-31 Nathan Sidwell <nathan@acm.org> |
307 | ||
048062ed | 308 | * internal.h (struct cpp_reader): Rename forced_token_location_p |
309 | to forced_token_location and drop its pointerness. | |
310 | * include/cpplib.h (cpp_force_token_locations): Take location, not | |
311 | pointer to one. | |
312 | * init.c (cpp_create_reader): Adjust. | |
313 | * lex.c (cpp_read_main_file): | |
314 | ||
d7e34a50 | 315 | * directives.c (do_include_common): Commonize cleanup path. |
316 | (_cpp_pop_buffer): Fix leak. | |
317 | ||
431aa89f | 318 | * include/line-map.h (IS_ORDINARY_LOC, IS_MACRO_LOC): New |
319 | predicates. | |
320 | (IS_ADHOC_LOC): Move earlier. | |
321 | (MAP_ORDINARY_P): Use IS_ORDINARY_LOC. | |
322 | * line-map.c (linemap_location_from_macro_expansion_p): Use | |
323 | IS_MACRO_LOC. | |
324 | ||
ce541b6a | 325 | * include/cpplib.h (cpp_macro_definition_location): Make inline. |
326 | * macro.c (warn_of_redefinition): Fix comments, examine macro | |
327 | type, use C++ for. | |
328 | (cpp_macro_definition_location): Don't define here. | |
329 | ||
0f1cbe3c | 330 | * include/cpplib.h (HT_NODE): Don't cast NODE. |
331 | (NODE_LEN, NODE_NAME): Use HT_NODE. | |
332 | ||
bd4387c4 | 333 | * directives.c (DIRECTIVE_TABLE): Drop historical frequency |
334 | comments. | |
335 | * files.c (_cpp_stack_file): Fix indentation. | |
336 | ||
fcbe1d64 | 337 | 2018-10-17 Joseph Myers <joseph@codesourcery.com> |
338 | ||
339 | * include/cpplib.h (enum c_lang): Add CLK_GNUC2X and CLK_STDC2X. | |
340 | * init.c (lang_defaults): Add GNUC2X and STDC2X entries. | |
341 | (cpp_init_builtins): Define __STDC_VERSION__ to 202000L for C2X. | |
342 | ||
5a60b5b7 | 343 | 2018-10-11 David Malcolm <dmalcolm@redhat.com> |
344 | ||
345 | * macro.c (_cpp_arguments_ok): If the argument count is wrong, add | |
346 | a note showing the definition of the macro. | |
347 | ||
c630a81b | 348 | 2018-10-11 Nathan Sidwell <nathan@acm.org> |
349 | ||
350 | * include/line-map.h (LINEMAPS_MACRO_LOWEST_LOCATION): Fix | |
351 | off-by-one error. | |
352 | * line-map.c (linemap_enter_macro): Use RAII. Clear all of the | |
353 | macro_locations. | |
354 | ||
fb225cf1 | 355 | 2018-10-09 David Malcolm <dmalcolm@redhat.com> |
356 | ||
357 | * charset.c (noop_error_cb): Rename to... | |
358 | (noop_diagnostic_cb): ...this, converting params to enums. | |
359 | (cpp_interpret_string_ranges): Update for renaming and enums. | |
360 | * directives.c (check_eol_1): Convert reason to enum. | |
361 | (do_diagnostic): Convert code and reason to enum. | |
362 | (do_error): Use CPP_W_NONE rather than 0. | |
363 | (do_pragma_dependency): Likewise. | |
364 | * errors.c (cpp_diagnostic_at): Convert level and reason to enums. | |
365 | Update for renaming. | |
366 | (cpp_diagnostic): Convert level and reason to enums. | |
367 | (cpp_error): Convert level to enum. | |
368 | (cpp_warning): Convert reason to enums. | |
369 | (cpp_pedwarning): Likewise. | |
370 | (cpp_warning_syshdr): Likewise. | |
371 | (cpp_diagnostic_with_line): Convert level and reason to enums. | |
372 | Update for renaming. | |
373 | (cpp_error_with_line): Convert level to enum. | |
374 | (cpp_warning_with_line): Convert reason to enums. | |
375 | (cpp_pedwarning_with_line): Likewise. | |
376 | (cpp_warning_with_line_syshdr): Likewise. | |
377 | (cpp_error_at): Convert level to enum. | |
378 | (cpp_errno): Likewise. | |
379 | (cpp_errno_filename): Likewise. | |
380 | * include/cpplib.h (enum cpp_diagnostic_level): Name this enum, | |
381 | and move to before struct cpp_callbacks. | |
382 | (enum cpp_warning_reason): Likewise. | |
383 | (cpp_callbacks::diagnostic): Convert params from int to enums. | |
384 | (cpp_error): Convert int param to enum cpp_diagnostic_level. | |
385 | (cpp_warning): Convert int param to enum cpp_warning_reason. | |
386 | (cpp_pedwarning): Likewise. | |
387 | (cpp_warning_syshdr): Likewise. | |
388 | (cpp_errno): Convert int param to enum cpp_diagnostic_level. | |
389 | (cpp_errno_filename): Likewise. | |
390 | (cpp_error_with_line): Likewise. | |
391 | (cpp_warning_with_line): Convert int param to enum | |
392 | cpp_warning_reason. | |
393 | (cpp_pedwarning_with_line): Likewise. | |
394 | (cpp_warning_with_line_syshdr): Likewise. | |
395 | (cpp_error_at): Convert int param to enum cpp_diagnostic_level. | |
396 | * macro.c (create_iso_definition): Convert int to enum. | |
397 | (_cpp_create_definition): Likewise. | |
398 | ||
a2507e3d | 399 | 2018-09-17 David Malcolm <dmalcolm@redhat.com> |
400 | ||
401 | * include/line-map.h (range_label::get_text): Add param | |
402 | "range_idx". | |
403 | ||
8be6a6f3 | 404 | 2018-08-30 Nathan Sidwell <nathan@acm.org> |
405 | ||
406 | * include/line-map.h (enum lc_reason): Comment each member | |
407 | separately. | |
408 | (struct line_maps): Fix reallocator comment. | |
409 | ||
5fe20025 | 410 | 2018-08-27 David Malcolm <dmalcolm@redhat.com> |
411 | ||
412 | PR 87091 | |
413 | * include/line-map.h (enum range_display_kind): New enum. | |
414 | (struct location_range): Replace field "m_show_caret_p" with | |
415 | "m_range_display_kind", converting from bool to the new enum. | |
416 | (class rich_location): Add example of line insertion fix-it hint. | |
417 | (rich_location::add_range): Convert param "show_caret_p" from bool | |
418 | to enum range_display_kind and rename to "range_display_kind", | |
419 | giving it a default of SHOW_RANGE_WITHOUT_CARET. | |
420 | (rich_location::set_range): Likewise, albeit without a default. | |
421 | * line-map.c (rich_location::rich_location): Update for conversion | |
422 | of show_caret_p to tri-state enum. | |
423 | (rich_location::add_range): Likewise. | |
424 | (rich_location::set_range): Likewise. | |
425 | ||
9cd1de95 | 426 | 2018-08-24 H.J. Lu <hongjiu.lu@intel.com> |
427 | ||
428 | PR bootstrap/86872 | |
429 | * line-map.c (pure_location_p): Return true if linemap_lookup | |
430 | returns NULL. | |
431 | (linemap_add): Set start_location to 0 if we run out of line map | |
432 | space. | |
433 | ||
8a0afc11 | 434 | 2018-08-20 Nathan Sidwell <nathan@acm.org> |
435 | ||
3d0b2bf6 | 436 | * include/cpplib.h: Fixup some whitespace. |
437 | (cpp_hashnode): Reduce type to 2 bit & flags to 8. | |
438 | ||
33bb12b1 | 439 | * include/cpplib.h (NODE_BUILTIN, NODE_MACRO_ARG): Delete. |
440 | Renumber others. | |
441 | (enum node_type): Replace NT_MACRO with NT_USER_MACRO, | |
442 | NT_BUILTIN_MACRO, NT_MACRO_ARG. Delete NT_ASSERTION. | |
443 | (NTV_MACRO, NTV_ANSWER, NTV_BUILTIN, NTV_ARGUMENT, NTV_NONE): | |
444 | Delete. | |
445 | (CPP_HASHNODE_VALUE_IDX): Delete. | |
446 | (union _cpp_hashnode_value): GTY tag from enum node_type directly. | |
447 | (struct cpp_hashnode): Adjust GTY desc for value field. | |
448 | (cpp_user_macro_p, cpp_builtin_macro_p, cpp_macro_p): Adjust. | |
449 | * directives.c (undefine_macros): Clear value.anwers, adjust flag | |
450 | clearing. | |
451 | (_cpp_test_assertion): No need to check NT_ASSERTION. | |
452 | (do_assert, do_unassert): Likewise. | |
453 | * init.c (cpp_init_special_builtins): Set type not flags. | |
454 | * macro.c (struct macro_arg_saved_data): Add type field. | |
455 | (cpp_get_token_1): Check type not NT_VOID. | |
456 | (_cpp_free_definition): Adjust flag clearing. Nullify | |
457 | value.answers. | |
458 | (_cpp_save_parameter, _cpp_unsave_parameters): Save and restore | |
459 | type. | |
460 | (lex_expansion_token): Check type not flags. | |
461 | (_cpp_create_definition): Set type to NT_USER_MACRO. | |
462 | (_cpp_notify_macro_use): Adjust type checking. | |
463 | * pch.c (write_macdef, count_defs, write_defs, cpp_valid_state) | |
464 | (save_macros): Adjust node type/flag handling. | |
465 | * traditional.c (_cpp_scan_out_logical_line): Check type not flags. | |
466 | ||
faf7b1b0 | 467 | * directives.c (do_undef): Use cpp_macro_p & cpp_builtin_macro_p. |
468 | * include/cpplib.h (enum cpp_macro_kind): Remove trailing comma. | |
469 | (cpp_fun_like_macro_p): Make inline, define. | |
470 | * macro.c (cpp_define_lazily): Use UCHAR_MAX. | |
471 | (cpp_fun_like_macro_p): Delete. | |
472 | ||
d565b827 | 473 | * Makefile.in (TAGS_SOURCES): Remove cpp-id-data.h. |
474 | * include/cpp-id-data.h: Delete. | |
475 | * internal.h: Include cpplib.h not cpp-id-data.h. | |
476 | ||
8a0afc11 | 477 | * include/cpp-id-data.h (struct answer): Delete. |
478 | * include/cpplib.h (struct answer): Don't forward-declare. | |
479 | (enum cpp_macro_kind): Add cmk_assert. | |
480 | (struct cpp_macro): Union parms and next assert chain. | |
481 | (union _cpp_hashnode_value): 'answer' field is cpp_macro. | |
482 | * directives.c (parse_answer): Convert to use cpp_macro. Return | |
483 | true on success. | |
484 | (parse_assertion, find_answer, _cpp_test_assertion, cpp_do_assert) | |
485 | (cpp_do_unassert): Convert to use cpp_macro. | |
486 | * macro.c (warn_of_redefinition, _cpp_new_macro) | |
487 | (check_trad_stringification, cpp_macro_definition): Adjust macro | |
488 | parm access. | |
489 | * traditional.c (_cpp_replacement_text_len) | |
490 | (_cpp_copy_replacement_text, _cpp_create_trad_definition): Likewise. | |
491 | ||
373b37e4 | 492 | 2018-08-17 Nathan Sidwell <nathan@acm.org> |
493 | ||
6d6279f8 | 494 | * include/cpplib.h (struct cpp_callbacks): Replace |
495 | user_builtin_macro with user_lazy_macro. | |
496 | (struct cpp_macro): add lazy field. | |
497 | (enum cpp_builtin_type): Remove BT_FIRST_USER, BT_LAST_USER. | |
498 | (cpp_define_lazily): Declare. | |
499 | * macro.c (enter_macro_context) Use _cpp_maybe_notify_macro_use. | |
500 | (warn_of_redefinition): Use cpp_builtin_macro_p, directly call | |
501 | user_lazy_macro hook. | |
502 | (_cpp_new_macro): Clear lazy field. | |
503 | (cpp_define_lazily): Define. | |
504 | (_cpp_notify_macro_use): Adjust lazy definition code. | |
505 | (cpp_macro_definition): No need to do lazy definition here. | |
506 | * pch.c (write_macdef, save_macros): Likewise. | |
507 | ||
7496b881 | 508 | * include/cpplib.h (enum cpp_macro_kind): New. |
509 | (struct cpp_macro): Make body trailing array. Add kind field, | |
510 | delete traditional flag. | |
511 | * internal.h (_cpp_new_macro): Declare. | |
512 | (_cpp_reserve_room): New inline. | |
513 | (_cpp_commit_buf): Declare. | |
514 | (_cpp_create_trad_definition): Return new macro. | |
515 | * lex.c (_cpp_commit_buff): New. | |
516 | * macro.c (macro_real_token_count): Count backwards. | |
517 | (replace_args): Pointer equality not orderedness. | |
518 | (_cpp_save_parameter): Use _cpp_reserve_room. | |
519 | (alloc_expansion_token): Delete. | |
520 | (lex_expansion_token): Return macro pointer. Use _cpp_reserve_room. | |
521 | (create_iso_definition): Allocate macro itself. Adjust for | |
522 | different allocation ordering. | |
523 | (_cpp_new_macro): New. | |
524 | (_cpp_create_definition): Adjust for API changes. | |
525 | * traditional.c (push_replacement_text): Don't set traditional | |
526 | flag. | |
527 | (save_replacement_text): Likewise. | |
528 | (_cpp_create_trad_definition): Allocate macro itself, Adjust for | |
529 | different allocation ordering. | |
530 | ||
373b37e4 | 531 | * cpp-id-data.h (uchar, UC): Move to internal.h |
532 | (struct cpp_macro): Move to cpplib.h. | |
533 | * internal.h (uchar, UC): From cpp-id-data.h. | |
534 | * include/cpplib.h (struct cpp_macro): From cpp-id-data.h. | |
535 | ||
793b38da | 536 | 2018-08-16 Nathan Sidwell <nathan@acm.org> |
537 | ||
bef07148 | 538 | * internal.h (_cpp_save_parameter): Take parmno, not macro. |
539 | (_cpp_unsave_parameters): Declare. | |
540 | * macro.c (_cpp_save_parameter): Take parm number, not macro. | |
541 | Return true on success. | |
542 | (_cpp_unsave_parameters): New. | |
543 | (parse_params): Take parm_no and variadic pointers, not macro. | |
544 | Reimplement parsing logic. | |
545 | (create_iso_definition): Adjust parse_params changes. Call | |
546 | _cpp_unsave_parameters here. | |
547 | (_cpp_create_definition): Don't unsave params here. | |
548 | * traditional.c (scan_parameters): Take n_param pointer, adjust. | |
549 | (_cpp_create_trad_definition): Ajust scan_parameters change. Call | |
550 | _cpp_unsave_parameters. | |
551 | ||
793b38da | 552 | * include/cpplib.h (cpp_user_macro_p, cpp_builtin_macro_p) |
553 | (cpp_macro_p): New inlines. | |
554 | * directives.c (do_pragma_poison): Use cpp_macro_p. | |
555 | (do_ifdef, do_ifndef): Likewise. Use _cpp_maybe_notify_macro_use. | |
556 | (cpp_pop_definition): Use cpp_macro_p. Move _cpp_free_definition | |
557 | earlier. Don't zap node directly. | |
558 | * expr.c (parse_defined): Use _cpp_maybe_notify_macro_use & | |
559 | cpp_macro_p. | |
560 | * files.c (should_stack_file): Use cpp_macro_p. | |
561 | * identifiers.c (cpp_defined): Likewise. | |
562 | * internal.h (_cpp_mark_macro): Use cpp_user_macro_p. | |
563 | (_cpp_notify_macro_use): Declare. | |
564 | (_cpp_maybe_notify_macro_use): New inline. | |
565 | * lex.c (is_macro): Use cpp_macro_p. | |
566 | * macro.c (_cpp_warn_if_unused_macro): Use cpp_user_macro_p. | |
567 | (enter_macro_context): Likewise. | |
568 | (_cpp_create_definition): Use cpp_builtin_macro_p, | |
569 | cpp_user_macro_p. Move _cpp_free_definition earlier. | |
570 | (_cpp_notify_macro_use): New, broken out of multiple call sites. | |
571 | * traditional.c (fun_like_macro_p): Use cpp_builtin_macro_p. | |
572 | (maybe_start_funlike, _cpp_scan_out_logical_line) | |
573 | (push_replacement_text): Likewise. | |
574 | ||
b7bb5264 | 575 | 2018-08-15 David Malcolm <dmalcolm@redhat.com> |
576 | ||
577 | * include/line-map.h (struct location_range): Add "m_label" field. | |
578 | (class rich_location): Add description of labels to leading | |
579 | comment. | |
580 | (rich_location::rich_location): Add "label" param, defaulting to | |
581 | NULL. | |
582 | (rich_location::add_range): Likewise. | |
583 | (struct label_text): New struct. | |
584 | (class range_label): New abstract base class. | |
585 | * line-map.c (rich_location::rich_location): Add "label" param; | |
586 | use it. | |
587 | (rich_location::add_range): Likewise. | |
588 | ||
03410c5e | 589 | 2018-08-08 Nathan Sidwell <nathan@acm.org> |
590 | ||
591 | Make linemap::included_from a location | |
592 | libcpp/ | |
593 | * include/line-map.h (struct line_map_ordinary): Replace | |
594 | included_from map index with included_at source_location. | |
595 | (ORDINARY_MAP_INCLUDER_FILE_INDEX): Delete. | |
596 | (LAST_SOURCE_LINE_LOCATION): Delete. | |
597 | (LAST_SOURCE_LINE, LAST_SOURCE_COLUMN): Delete. | |
598 | (linemap_included_from): New. | |
599 | (linemap_included_from_linemap): Declare. | |
600 | (MAIN_FILE_P): Adjust. | |
601 | * line-map.c (linemap_included_from_linemap): New. | |
602 | (lonemap_check_files_exited): Use linemap_included_at. | |
603 | (linemap_add): Adjust inclusion setting. | |
604 | (linemap_dump, linemap_dump_location): Adjust. | |
605 | * directives.c (do_linemarker): Use linemap_included_at. | |
606 | ||
30814d37 | 607 | 2018-08-07 Nathan Sidwell <nathan@acm.org> |
608 | ||
609 | * line-map.c: (linemap_init): Set default allocator here. | |
610 | (new_linemap): Rather than here. Refactor allocation logic. | |
611 | ||
8d3ff470 | 612 | 2018-07-20 David Malcolm <dmalcolm@redhat.com> |
613 | ||
614 | * include/line-map.h (rich_location::set_range): Remove redundant | |
615 | line_maps * parameter. | |
616 | * line-map.c (rich_location::set_range): Likewise. | |
617 | ||
e3ff7e86 | 618 | 2018-07-18 Bernd Edlinger <bernd.edlinger@hotmail.de> |
619 | ||
620 | PR 69558 | |
621 | * macro.c (enter_macro_context): Change the location info for builtin | |
622 | macros and _Pragma from location of the closing parenthesis to location | |
623 | of the macro expansion point. | |
624 | ||
d6148817 | 625 | 2018-07-17 Jason Franklin <j_fra@fastmail.us> |
626 | Jakub Jelinek <jakub@redhat.com> | |
627 | ||
628 | * lex.c (_cpp_lex_direct): Use CPP_DL_NOTE instead of CPP_DL_PEDWARN, | |
629 | CPP_DL_WARNING or CPP_DL_ERROR for note that diagnostics for C++ style | |
630 | comments is reported only once per file and guard those calls on the | |
631 | preceding cpp_error returning true. | |
632 | ||
28e18c7e | 633 | 2018-07-03 Nathan Sidwell <nathan@acm.org> |
634 | ||
635 | Reorg line_map data structures for better packing. | |
636 | * include/line-map.h (enum lc_reason): Add LC_HWM. | |
637 | (LINE_MAP_MAX_LOCATION): Define here. | |
638 | (struct line_map): Move reason field to line_map_ordinary. Adjust | |
639 | GTY tagging. | |
640 | (struct line_map_ordinary): Reorder fields for less padding. | |
641 | (struct line_map_macro): Likewise. | |
642 | (MAP_ORDINARY_P): New. | |
643 | (linemap_check_ordinary, linemap_check_macro): Adjust. | |
644 | * line-map.c (LINE_MAP_MAX_SOURCE_LOCATION): Delete. | |
645 | (new_linemap): Take start_location, not reason. Adjust. | |
646 | (linemap_add, linemap_enter_macro): Adjust. | |
647 | (linemap_line_start): Likewise. | |
648 | (linemap_macro_expansion_map_p): Use MAP_ORDINARY_P. | |
649 | (linemap_macro_loc_to_spelling_point): Likewise. | |
650 | (linemap_macro_loc_to_def_point): Likewise. | |
651 | (linemap_dump): Likewise. | |
652 | ||
3d7ffd52 | 653 | 2018-05-23 Jason Merrill <jason@redhat.com> |
654 | ||
655 | * system.h: #include <new> earlier. | |
656 | ||
14bac6fe | 657 | 2018-05-17 Jason Merrill <jason@redhat.com> |
658 | ||
659 | * line-map.c (linemap_init): Use placement new. | |
660 | * system.h: #include <new>. | |
661 | ||
d73881b0 | 662 | 2018-03-14 David Malcolm <dmalcolm@redhat.com> |
663 | ||
664 | * include/line-map.h (compare): New function on linenum_type. | |
665 | ||
b2d780af | 666 | 2018-02-28 Jonathan Wakely <jwakely@redhat.com> |
667 | ||
668 | PR preprocessor/84517 | |
669 | * lex.c (is_macro_not_literal_suffix): New function. | |
670 | (lex_raw_string, lex_string): Use is_macro_not_literal_suffix to | |
671 | decide when to issue -Wliteral-suffix warnings. | |
672 | ||
15adae8b | 673 | 2018-02-16 Richard Biener <rguenther@suse.de> |
674 | ||
675 | PR bootstrap/82939 | |
676 | * line-map.c (linemap_init): Avoid broken value-init when compiling | |
677 | with GCC 4.2. | |
678 | ||
b78b81a8 | 679 | 2018-02-15 Jason Merrill <jason@redhat.com> |
680 | Jakub Jelinek <jakub@redhat.com> | |
681 | ||
682 | PR preprocessor/83063 - __VA_OPT__ and ## | |
683 | PR preprocessor/83708 | |
684 | * macro.c (vaopt_state): Reorder m_last_was_paste before m_state. | |
685 | (vaopt_state::vaopt_state): Adjust. | |
686 | (vaopt_state::update_flags): Add BEGIN and END. | |
687 | (vaopt_state::update): Return them. | |
688 | (copy_paste_flag): Factor out of replace_args. | |
689 | (last_token_is): New. | |
690 | (replace_args): Handle BEGIN and END. Avoid padding there. | |
691 | (tokens_buff_last_token_ptr): Return NULL if no tokens. | |
692 | ||
42dc1e14 | 693 | 2018-01-31 Jakub Jelinek <jakub@redhat.com> |
694 | ||
695 | PR preprocessor/69869 | |
696 | * traditional.c (skip_macro_block_comment): Return bool, true if | |
697 | the macro block comment is unterminated. | |
698 | (copy_comment): Use return value from skip_macro_block_comment instead | |
699 | of always false. | |
700 | ||
5462c8e9 | 701 | 2018-01-27 Jakub Jelinek <jakub@redhat.com> |
702 | ||
703 | * include/cpplib.h (enum cpp_builtin_type): Change BT_LAST_USER from | |
704 | BT_FIRST_USER + 31 to BT_FIRST_USER + 63. | |
705 | ||
859b51f8 | 706 | 2018-01-18 Boris Kolpackov <boris@codesynthesis.com> |
707 | ||
c9e63184 | 708 | PR other/70268 |
709 | * include/cpplib.h (cpp_callbacks::remap_filename): New callback. | |
710 | * macro.c (_cpp_builtin_macro_text): Call remap_filename for | |
711 | __FILE__ and __BASE_FILE__. | |
859b51f8 | 712 | |
8bd5cc84 | 713 | 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org> |
714 | ||
715 | * lex.c (search_line_fast): Remove illegal coercion of an | |
716 | unaligned pointer value to vector pointer type and replace with | |
717 | use of __builtin_vec_vsx_ld () built-in function, which operates | |
718 | on unaligned pointer values. | |
719 | ||
8e8f6434 | 720 | 2018-01-03 Jakub Jelinek <jakub@redhat.com> |
721 | ||
722 | Update copyright years. | |
723 | ||
e5c3036a | 724 | 2017-12-20 Michael Weiser <michael.weiser@gmx.de> |
725 | ||
726 | PR preprocessor/83492 | |
727 | * lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]: | |
728 | Fix selection of big-endian shift parameters by using | |
729 | __ARM_BIG_ENDIAN. | |
730 | ||
d76c514d | 731 | 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de> |
732 | ||
733 | * internal.h (maybe_print_line): Change signature. | |
859b51f8 | 734 | |
6b1c6ccd | 735 | 2017-12-05 Jakub Jelinek <jakub@redhat.com> |
736 | ||
737 | PR c++/79228 | |
738 | * expr.c (interpret_float_suffix): Avoid memcmp. | |
739 | (interpret_int_suffix): Likewise. Don't check for if. | |
740 | ||
b05da963 | 741 | 2017-12-01 Jason Merrill <jason@redhat.com> |
742 | ||
743 | PR c++/79228 - extensions hide C++14 complex literal operators | |
744 | * expr.c (interpret_float_suffix): Ignore 'i' in C++14 and up. | |
745 | (interpret_int_suffix): Likewise. | |
746 | ||
011f5d3e | 747 | 2017-11-28 David Malcolm <dmalcolm@redhat.com> |
748 | ||
749 | PR c/82050 | |
750 | * include/line-map.h (LINE_MAP_MAX_COLUMN_NUMBER): Move here. | |
751 | * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): ...from here. | |
752 | (rich_location::maybe_add_fixit): Reject fix-it hints in which | |
753 | the start column exceeds the next column. | |
754 | ||
c8a6be18 | 755 | 2017-11-20 Eric Gallager <egall@gwmail.gwu.edu> |
756 | ||
757 | PR preprocessor/81794 | |
758 | * macro.c (check_trad_stringification): Have warning be controlled | |
759 | by -Wtraditional. | |
760 | ||
dbfb2c43 | 761 | 2017-11-20 David Malcolm <dmalcolm@redhat.com> |
762 | ||
763 | PR c++/72786 | |
764 | * include/cpplib.h (cpp_macro_definition_location): New decl. | |
765 | * macro.c (cpp_macro_definition): New function. | |
766 | ||
86136db8 | 767 | 2017-11-13 Tom Tromey <tom@tromey.com> |
768 | ||
769 | * pch.c (cpp_read_state): Set n__VA_OPT__. | |
770 | * macro.c (vaopt_state): New class. | |
771 | (_cpp_arguments_ok): Check va_opt flag. | |
772 | (replace_args, create_iso_definition): Use vaopt_state. | |
773 | * lex.c (lex_identifier_intern): Possibly issue errors for | |
774 | __VA_OPT__. | |
775 | (lex_identifier): Likewise. | |
776 | (maybe_va_opt_error): New function. | |
777 | * internal.h (struct lexer_state) <va_args_ok>: Update comment. | |
778 | (struct spec_nodes) <n__VA_OPT__>: New field. | |
779 | * init.c (struct lang_flags) <va_opt>: New field. | |
780 | (lang_defaults): Add entries for C++2A. Update all entries for | |
781 | va_opt. | |
782 | (cpp_set_lang): Initialize va_opt. | |
783 | * include/cpplib.h (struct cpp_options) <va_opt>: New field. | |
784 | * identifiers.c (_cpp_init_hashtable): Initialize n__VA_OPT__. | |
785 | ||
e80defd5 | 786 | 2017-11-13 David Malcolm <dmalcolm@redhat.com> |
787 | ||
788 | * include/line-map.h (linenum_type): Move this typedef and the | |
789 | comment describing column numbering to near the top of the file. | |
790 | ||
3f6f41de | 791 | 2017-11-06 Mukesh Kapoor <mukesh.kapoor@oracle.com> |
792 | ||
793 | PR c++/80955 | |
794 | * lex.c (lex_string): When checking for a valid macro for the | |
795 | warning related to -Wliteral-suffix (CPP_W_LITERAL_SUFFIX), | |
796 | check that the macro name does not start with an underscore | |
797 | before calling is_macro(). | |
798 | ||
0882c4f5 | 799 | 2017-11-05 Tom de Vries <tom@codesourcery.com> |
800 | ||
801 | PR other/82784 | |
802 | * lex.c (BUF_APPEND): Remove semicolon after | |
803 | "do {} while (0)". | |
804 | ||
3b6578b3 | 805 | 2017-10-31 David Malcolm <dmalcolm@redhat.com> |
806 | ||
807 | * directives.c (_cpp_handle_directive): Update for renaming of | |
808 | cpp_error_at_richloc to cpp_error_at. | |
809 | * errors.c (cpp_diagnostic_at_richloc): Rename to... | |
810 | (cpp_diagnostic_at): ...this, dropping the location_t-based | |
811 | implementation. | |
812 | (cpp_diagnostic): Update for removal of location_t-based | |
813 | cpp_diagnostic_at. | |
814 | (cpp_error_at): Likewise. | |
815 | (cpp_error_at_richloc): Rename to... | |
816 | (cpp_error_at): ...this, and update for renaming of | |
817 | cpp_diagnostic_at_richloc. | |
818 | * include/cpplib.h (cpp_error_at_richloc): Rename to... | |
819 | (cpp_error_at): ...this. | |
820 | ||
a0f44249 | 821 | 2017-10-30 Joseph Myers <joseph@codesourcery.com> |
822 | ||
823 | * include/cpplib.h (enum c_lang): Add CLK_GNUC17 and CLK_STDC17. | |
824 | * init.c (lang_defaults): Add GNUC17 and STDC17 data. | |
825 | (cpp_init_builtins): Handle C17 value of __STDC_VERSION__. | |
826 | ||
de382e64 | 827 | 2017-10-10 Nathan Sidwell <nathan@acm.org> |
828 | ||
829 | PR preprocessor/82506 | |
830 | * macro.c (cpp_quote_string): Escape raw LFs. | |
831 | ||
96bf2948 | 832 | 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com> |
833 | Jakub Jelinek <jakub@redhat.com> | |
834 | ||
835 | Add support for -std=c++2a. | |
836 | * include/cpplib.h (c_lang): Add CXX2A and GNUCXX2A. | |
837 | * init.c (lang_defaults): Add rows for CXX2A and GNUCXX2A. | |
838 | (cpp_init_builtins): Set __cplusplus to 201709L for C++2a. | |
839 | ||
40e2decb | 840 | 2017-09-15 Jakub Jelinek <jakub@redhat.com> |
841 | ||
842 | * include/cpplib.h (enum c_lang): Rename CLK_GNUCXX1Z | |
843 | to CLK_GNUCXX17 and CLK_CXX1Z to CLK_CXX17. | |
844 | * init.c (lang_defaults, cpp_init_builtins): Likewise. | |
845 | * expr.c (cpp_classify_number): Use C++17 instead of C++1z | |
846 | in diagnostics. | |
847 | ||
2beb7fe7 | 848 | 2017-07-07 David Malcolm <dmalcolm@redhat.com> |
849 | ||
850 | PR c++/79300 | |
851 | * line-map.c (linemap_macro_loc_to_def_point): Preserve range | |
852 | information for macro expansions by delaying resolving ad-hoc | |
853 | locations until within the loop. | |
854 | ||
56df12ff | 855 | 2017-07-06 David Malcolm <dmalcolm@redhat.com> |
856 | ||
857 | PR c++/79300 | |
858 | * include/line-map.h (enum location_aspect): New enum. | |
859 | (linemap_client_expand_location_to_spelling_point): Add | |
860 | enum location_aspect param. | |
861 | * line-map.c (rich_location::get_expanded_location): Update for | |
862 | new param of linemap_client_expand_location_to_spelling_point. | |
863 | (rich_location::maybe_add_fixit): Likewise. | |
864 | (fixit_hint::affects_line_p): Likewise. | |
865 | ||
c0de8f19 | 866 | 2017-06-21 Jakub Jelinek <jakub@redhat.com> |
867 | ||
868 | * line-map.c (location_adhoc_data_update): Perform addition in | |
869 | uintptr_t type rather than char * type. Read *data using | |
870 | ptrdiff_t type instead of int64_t. | |
871 | (get_combined_adhoc_loc): Change offset type to ptrdiff_t from | |
872 | int64_t. | |
873 | ||
c2403f36 | 874 | 2017-06-20 David Malcolm <dmalcolm@redhat.com> |
875 | ||
876 | * include/line-map.h (class rich_location): Document that attempts | |
877 | to delete or replace a range *affecting* multiple lines will fail. | |
878 | * line-map.c (rich_location::maybe_add_fixit): Implement this | |
879 | restriction. | |
880 | ||
112ca2a8 | 881 | 2017-06-09 David Malcolm <dmalcolm@redhat.com> |
882 | ||
883 | * include/line-map.h | |
884 | (rich_location::fixits_cannot_be_auto_applied): New method. | |
885 | (rich_location::fixits_can_be_auto_applied_p): New accessor. | |
886 | (rich_location::m_fixits_cannot_be_auto_applied): New field. | |
887 | * line-map.c (rich_location::rich_location): Initialize new field. | |
888 | ||
7b921e0b | 889 | 2017-06-05 David Malcolm <dmalcolm@redhat.com> |
890 | ||
891 | * include/cpplib.h (struct cpp_callbacks): Add "comment" | |
892 | callback. | |
893 | * lex.c (_cpp_lex_direct): Call the comment callback if non-NULL. | |
894 | ||
896d130e | 895 | 2017-05-02 David Malcolm <dmalcolm@redhat.com> |
896 | ||
897 | * include/line-map.h (class rich_location): Update description of | |
898 | newline handling. | |
899 | (class fixit_hint): Likewise. | |
900 | (fixit_hint::ends_with_newline_p): New decl. | |
901 | * line-map.c (rich_location::maybe_add_fixit): Support newlines | |
902 | in fix-it hints that are insertions of single lines at the start | |
903 | of a line. Don't consolidate into such fix-it hints. | |
904 | (fixit_hint::ends_with_newline_p): New method. | |
905 | ||
be45049f | 906 | 2017-05-01 David Malcolm <dmalcolm@redhat.com> |
907 | ||
908 | * include/line-map.h (source_range::intersects_line_p): Delete. | |
909 | (rich_location::add_fixit): Delete. | |
910 | (rich_location::maybe_add_fixit): New method. | |
911 | (class fixit_hint): Reimplement in terms of... | |
912 | (class fixit_replace): ...this. | |
913 | (class fixit_insert): Delete. | |
914 | * line-map.c (linemap_position_for_loc_and_offset): Drop overzealous | |
915 | linemap_assert_fails. | |
916 | (source_range::intersects_line_p): Rename to... | |
917 | (fixit_hint::affects_line_p): New function. | |
918 | (rich_location::add_fixit_insert_before): Reimplement in terms of | |
919 | maybe_add_fixit, moving validation there. | |
920 | (rich_location::add_fixit_insert_after): Likewise. | |
921 | (column_before_p): Delete. | |
922 | (rich_location::add_fixit_replace): Reimplement in terms of | |
923 | maybe_add_fixit, moving validation there. Convert closed input range | |
924 | to half-open range. | |
925 | (rich_location::add_fixit): Delete. | |
926 | (rich_location::maybe_add_fixit): New function. | |
927 | (fixit_insert::fixit_insert): Delete. | |
928 | (fixit_insert::~fixit_insert): Delete. | |
929 | (fixit_insert::affects_line_p): Delete. | |
930 | (fixit_insert::maybe_append_replace): Delete. | |
931 | (fixit_replace::fixit_replace): Rename to... | |
932 | (fixit_hint::fixit_hint): ...this, rewriting as necessary. | |
933 | (fixit_replace::~fixit_replace): Delete. | |
934 | (fixit_replace::affects_line_p): Delete. | |
935 | (fixit_replace::maybe_append_replace): Rename to... | |
936 | (fixit_hint::maybe_append): ...this, rewriting as necessary. | |
937 | ||
2fbe7a32 | 938 | 2017-04-03 Jonathan Wakely <jwakely@redhat.com> |
939 | ||
940 | * include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment. | |
941 | * lex.c (search_line_fast): Likewise. | |
942 | * pch.h (cpp_valid_state): Likewise. | |
943 | ||
6a3153a3 | 944 | 2017-03-21 Andreas Schwab <schwab@suse.de> |
945 | ||
946 | * lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]: | |
947 | Convert 64-bit value to boolean before passing to | |
948 | __builtin_expect. | |
949 | ||
67234c37 | 950 | 2017-03-16 Jason Merrill <jason@redhat.com> |
951 | ||
952 | * init.c (cpp_init_builtins): Update __cplusplus for C++17. | |
953 | ||
df8e99c9 | 954 | 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com> |
955 | ||
956 | * Makefile.in (po/$(PACKAGE).pot): Adjust bug reporting URL. | |
957 | ||
9348467c | 958 | 2017-01-10 David Malcolm <dmalcolm@redhat.com> |
959 | ||
960 | PR c++/77949 | |
961 | * line-map.c (linemap_position_for_column): When calling | |
962 | linemap_start_line, detect if a new linemap was created with | |
963 | 0 column bits, and bail out early if this is the case. | |
964 | (linemap_position_for_loc_and_offset): Replace overzealous | |
965 | linemap_assert_fails with a simple conditional; use correct | |
966 | bit count. | |
967 | ||
732cf036 | 968 | 2017-01-07 David Malcolm <dmalcolm@redhat.com> |
969 | ||
970 | PR c++/72803 | |
971 | * line-map.c (linemap_line_start): When determining if the highest | |
972 | column given out so far will fit into a proposed change to the | |
973 | current map, use the effective number of column bits, rather than | |
974 | the total number of column + range bits. | |
975 | ||
aad93da1 | 976 | 2017-01-01 Jakub Jelinek <jakub@redhat.com> |
977 | ||
978 | Update copyright years. | |
979 | ||
0ccd6e7a | 980 | 2016-12-15 David Malcolm <dmalcolm@redhat.com> |
981 | ||
982 | PR preprocessor/78680 | |
983 | PR preprocessor/78811 | |
984 | * lex.c (_cpp_lex_direct): Only determine the end-location of | |
985 | the token and build a range for non-reserved start locations. | |
986 | Do not do it for EOF tokens. | |
987 | ||
48abd101 | 988 | 2016-12-12 David Malcolm <dmalcolm@redhat.com> |
989 | ||
990 | PR preprocessor/78680 | |
991 | * lex.c (_cpp_lex_direct): Ensure line notes are processed before | |
992 | computing the end-point of the token. | |
993 | ||
6e47b422 | 994 | 2016-11-23 Paolo Bonzini <bonzini@gnu.org> |
995 | ||
996 | * include/cpplib.h (struct cpp_options): Add new member | |
997 | warn_expansion_to_defined. | |
998 | (CPP_W_EXPANSION_TO_DEFINED): New enum member. | |
999 | * expr.c (parse_defined): Warn for all uses of "defined" | |
1000 | in macros, and tie warning to CPP_W_EXPANSION_TO_DEFINED. | |
1001 | Make it a pedwarning instead of a warning. | |
1002 | * system.h (HAVE_DESIGNATED_INITIALIZERS): Do not use | |
1003 | "defined" in macros. | |
1004 | ||
f9f26759 | 1005 | 2016-11-17 David Malcolm <dmalcolm@redhat.com> |
1006 | ||
1007 | * charset.c (cpp_interpret_string_1): Skip locations from | |
1008 | loc_reader when advancing 'p' when handling raw strings. | |
1009 | ||
089d09f7 | 1010 | 2016-11-16 Jakub Jelinek <jakub@redhat.com> |
1011 | ||
1012 | PR bootstrap/72823 | |
1013 | * configure.ac (ENABLE_ASSERT_CHECKING): Define if gcc configure | |
1014 | would define that macro. | |
1015 | * configure: Regenerated. | |
1016 | * config.in: Regenerated. | |
1017 | ||
fe7d7069 | 1018 | 2016-11-08 Richard Earnshaw <rearnsha@arm.com> |
1019 | ||
1020 | * lex.c (search_line_fast): New implementation for AArch64. | |
1021 | ||
c6a7d9e9 | 1022 | 2016-10-25 David Malcolm <dmalcolm@redhat.com> |
1023 | ||
1024 | * files.c (destroy_cpp_file): Free file->path. | |
1025 | ||
5f2a1168 | 1026 | 2016-10-25 David Malcolm <dmalcolm@redhat.com> |
1027 | ||
1028 | * include/line-map.h (line_maps::~line_maps): New dtor. | |
1029 | (location_adhoc_data_fini): Delete decl. | |
1030 | * line-map.c (line_maps::~line_maps): New dtor. | |
1031 | (location_adhoc_data_fini): Delete. | |
1032 | ||
d8e3fcc2 | 1033 | 2016-10-21 Andris Pavenis <andris.pavenis@iki.fi> |
1034 | ||
1035 | PR preprocessor/71681 | |
1036 | * files.c (remap_filename): Fix handling -remap in subdirectories. | |
1037 | ||
12663602 | 1038 | 2016-10-12 Jakub Jelinek <jakub@redhat.com> |
1039 | ||
1040 | * include/cpplib.h (struct cpp_options): Add | |
1041 | cpp_warn_implicit_fallthrough. | |
1042 | * init.c (cpp_create_reader): Initialize it to 0. | |
1043 | * lex.c (fallthrough_comment_p): Handle different | |
1044 | cpp_warn_implicit_fallthrough levels. Whitespace fixes. | |
1045 | ||
ad0c1dec | 1046 | 2016-10-08 Jakub Jelinek <jakub@redhat.com> |
1047 | ||
4582d852 | 1048 | * lex.c (fallthrough_comment_p): Accept Else, fallthrough. |
1049 | ||
ae691a10 | 1050 | * lex.c (fallthrough_comment_p): Extend to handle more common FALLTHRU |
1051 | comment styles. | |
1052 | ||
ad0c1dec | 1053 | * lex.c (fallthrough_comment_p): Fix off-by-one size comparison |
1054 | errors, cleanup. | |
1055 | (_cpp_lex_direct): Allow arbitrary comments in between | |
1056 | fallthrough_comment_p comment and following token. | |
1057 | ||
c375ef08 | 1058 | 2016-10-04 Kelvin Nilsen <kelvin@gcc.gnu.org> |
1059 | ||
1060 | PR target/77847 | |
1061 | * lex.c (search_line_fast): Add a FALLTHROUGH comment to correct | |
1062 | compiler error in the version of this function that is | |
1063 | conditionally compiled when GCC_VERSION >= 4005 and both | |
1064 | __ALTIVEC__ and __BIG_ENDIAN__ symbols are defined. | |
1065 | ||
3c77f69c | 1066 | 2016-09-26 Marek Polacek <polacek@redhat.com> |
1067 | Jakub Jelinek <jakub@redhat.com> | |
1068 | ||
1069 | PR c/7652 | |
1070 | * include/cpplib.h (PREV_FALLTHROUGH): Define. | |
1071 | * internal.h (CPP_FALLTHRU): Define. | |
1072 | * lex.c (fallthrough_comment_p): New function. | |
1073 | (_cpp_lex_direct): Set PREV_FALLTHROUGH on tokens succeeding a falls | |
1074 | through comment. | |
1075 | ||
7413e757 | 1076 | 2016-09-23 David Malcolm <dmalcolm@redhat.com> |
1077 | ||
1078 | PR preprocessor/77672 | |
1079 | * charset.c (cpp_interpret_string_1): Add a source_range for the | |
1080 | NUL-terminator, using the location of the trailing quote of the | |
1081 | final string. | |
1082 | ||
e496fd6f | 1083 | 2016-09-21 Jason Merrill <jason@redhat.com> |
1084 | ||
1085 | * line-map.c (linemap_location_from_macro_definition_p): New. | |
1086 | * line-map.h: Declare it. | |
1087 | ||
d9020fe6 | 1088 | 2016-09-15 David Malcolm <dmalcolm@redhat.com> |
1089 | ||
1090 | * include/line-map.h (class rich_location): Note that newlines | |
1091 | aren't supported in fix-it text. | |
1092 | * line-map.c (rich_location::add_fixit_insert_before): Reject | |
1093 | attempts to add fix-its containing newlines. | |
1094 | (rich_location::add_fixit_replace): Likewise. | |
1095 | ||
68ef907c | 1096 | 2016-09-13 David Malcolm <dmalcolm@redhat.com> |
1097 | ||
1098 | * include/line-map.h (class rich_location): Add description of | |
1099 | fix-it hints to leading comment. | |
1100 | (rich_location::add_fixit_insert): Rename both overloaded methods | |
1101 | to.. | |
1102 | (rich_location::add_fixit_insert_before): ...this, updating their | |
1103 | comments. | |
1104 | (rich_location::add_fixit_insert_after): Two new overloaded | |
1105 | methods. | |
1106 | (rich_location::stop_supporting_fixits): New method. | |
1107 | * line-map.c (rich_location::add_fixit_insert): Rename both | |
1108 | overloaded methods to.. | |
1109 | (rich_location::add_fixit_insert_before): ...this, updating their | |
1110 | comments. | |
1111 | (rich_location::add_fixit_insert_after): Two new methods. | |
1112 | (rich_location::reject_impossible_fixit): Split out | |
1113 | failure-handling into... | |
1114 | (rich_location::stop_supporting_fixits): New method. | |
1115 | ||
fe066ce3 | 1116 | 2016-09-02 David Malcolm <dmalcolm@redhat.com> |
1117 | ||
1118 | * include/line-map.h (rich_location::seen_impossible_fixit_p): New | |
1119 | accessor. | |
1120 | ||
70017c99 | 1121 | 2016-08-31 David Malcolm <dmalcolm@redhat.com> |
1122 | ||
1123 | * include/line-map.h (class fixit_remove): Remove stray decl. | |
1124 | (fixit_hint::affects_line_p): Make const. | |
1125 | (fixit_insert::affects_line_p): Likewise. | |
1126 | (fixit_replace::affects_line_p): Likewise. | |
1127 | * line-map.c (fixit_insert::affects_line_p): Likewise. | |
1128 | (fixit_replace::affects_line_p): Likewise. | |
1129 | ||
d6dd1b60 | 1130 | 2016-08-30 David Malcolm <dmalcolm@redhat.com> |
1131 | ||
1132 | * include/line-map.h (class semi_embedded_vec): New class. | |
1133 | (semi_embedded_vec<T, NUM_EMBEDDED>::semi_embedded_vec): New ctor. | |
1134 | (semi_embedded_vec<T, NUM_EMBEDDED>::~semi_embedded_vec): New | |
1135 | dtor. | |
1136 | (semi_embedded_vec<T, NUM_EMBEDDED>::operator[]): New methods. | |
1137 | (semi_embedded_vec<T, NUM_EMBEDDED>::push): New method. | |
1138 | (semi_embedded_vec<T, NUM_EMBEDDED>::truncate): New method. | |
1139 | (rich_location::get_num_locations): Reimplement in terms of | |
1140 | m_ranges. | |
1141 | (rich_location::get_range): Make non-inline. | |
1142 | (rich_location::get_num_fixit_hints): Reimplement in terms of | |
1143 | m_fixit_hints. | |
1144 | (rich_location::add_fixit): New function. | |
1145 | (rich_location::MAX_RANGES): Rename to... | |
1146 | (rich_location::STATICALLY_ALLOCATED_RANGES): ...this. | |
1147 | (rich_location::MAX_FIXIT_HINTS): Rename to... | |
1148 | (rich_location::STATICALLY_ALLOCATED_RANGES): ...this, and make | |
1149 | private. | |
1150 | (rich_location::m_num_ranges): Eliminate in favor of... | |
1151 | (rich_location::m_ranges): ...this, converting from a fixed-size | |
1152 | array to a semi_embedded_vec. | |
1153 | (rich_location::m_num_fixit_hints): Eliminate in favor of... | |
1154 | (rich_location::m_fixit_hints): ...this, converting from a | |
1155 | fixed-size array to a semi_embedded_vec. | |
1156 | * line-map.c (rich_location::rich_location): Update for above | |
1157 | changes. | |
1158 | (rich_location::~rich_location): Likewise. | |
1159 | (rich_location::get_loc): Likewise. | |
1160 | (rich_location::get_range): New methods. | |
1161 | (rich_location::add_range): Update for above changes. | |
1162 | (rich_location::set_range): Likewise. | |
1163 | (rich_location::add_fixit_insert): Likewise. | |
1164 | (rich_location::add_fixit_replace): Likewise. | |
1165 | (rich_location::get_last_fixit_hint): Likewise. | |
1166 | (rich_location::reject_impossible_fixit): Likewise. | |
1167 | (rich_location::add_fixit): New method. | |
1168 | ||
850c2009 | 1169 | 2016-08-30 David Malcolm <dmalcolm@redhat.com> |
1170 | ||
1171 | * include/line-map.h (rich_location::add_fixit_insert): Add | |
1172 | comments. Add overload omitting the source_location param. | |
1173 | (rich_location::add_fixit_remove): Add comments. Add overloads | |
1174 | omitting the range, and accepting a source_location. | |
1175 | (rich_location::add_fixit_replace): Likewise. | |
1176 | * line-map.c (rich_location::add_fixit_insert): Add comments. Add | |
1177 | overload omitting the source_location param. | |
1178 | (rich_location::add_fixit_remove): Add comments. Add overloads | |
1179 | omitting the range, and accepting a source_location. | |
1180 | (rich_location::add_fixit_replace): Likewise. | |
1181 | ||
a02b4eae | 1182 | 2016-08-26 David Malcolm <dmalcolm@redhat.com> |
1183 | ||
1184 | * include/line-map.h (get_pure_location): New decl. | |
1185 | * line-map.c (get_pure_location): Move here, from gcc/input.c, adding | |
1186 | a line_maps * param. | |
1187 | (rich_location::add_fixit_insert): Call get_pure_location on "where". | |
1188 | (rich_location::add_fixit_replace): Call get_pure_location on the | |
1189 | end-points. | |
1190 | ||
367964fa | 1191 | 2016-08-26 David Malcolm <dmalcolm@redhat.com> |
1192 | ||
1193 | * include/line-map.h (rich_location): Eliminate unimplemented | |
1194 | constructor based on source_range. | |
1195 | (rich_location::get_last_fixit_hint): New method. | |
1196 | (rich_location::reject_impossible_fixit): New method. | |
1197 | (rich_location): Add fields m_line_table and | |
1198 | m_seen_impossible_fixit. | |
1199 | (fixit_hint::maybe_append_replace): New pure virtual function. | |
1200 | (fixit_insert::maybe_append_replace): New function. | |
1201 | (fixit_replace::maybe_append_replace): New function. | |
1202 | * line-map.c (rich_location::rich_location): Initialize | |
1203 | m_line_table and m_seen_impossible_fixit. | |
1204 | (rich_location::add_fixit_insert): Call | |
1205 | reject_impossible_fixit and bail out if true. | |
1206 | (column_before_p): New function. | |
1207 | (rich_location::add_fixit_replace): Call reject_impossible_fixit | |
1208 | and bail out if true. Attempt to consolidate with neighboring | |
1209 | fixits. | |
1210 | (rich_location::get_last_fixit_hint): New method. | |
1211 | (rich_location::reject_impossible_fixit): New method. | |
1212 | (fixit_insert::maybe_append_replace): New method. | |
1213 | (fixit_replace::maybe_append_replace): New method. | |
1214 | ||
a59dbf08 | 1215 | 2016-08-23 David Malcolm <dmalcolm@redhat.com> |
1216 | ||
1217 | * include/line-map.h (source_range::from_locations): New method. | |
1218 | ||
73ffb7be | 1219 | 2016-08-19 David Malcolm <dmalcolm@redhat.com> |
1220 | ||
1221 | * include/line-map.h (fixit_hint::kind): Delete REPLACE. | |
1222 | (class fixit_remove): Delete. | |
1223 | * line-map.c (rich_location::add_fixit_remove): Reimplement | |
1224 | by calling add_fixit_replace with an empty string. | |
1225 | (fixit_remove::fixit_remove): Delete. | |
1226 | (fixit_remove::affects_line_p): Delete. | |
1227 | ||
82c85aba | 1228 | 2016-08-19 Joseph Myers <joseph@codesourcery.com> |
1229 | ||
1230 | PR c/32187 | |
1231 | * include/cpplib.h (CPP_N_FLOATN, CPP_N_FLOATNX) | |
1232 | (CPP_N_WIDTH_FLOATN_NX, CPP_FLOATN_SHIFT, CPP_FLOATN_MAX): New | |
1233 | macros. | |
1234 | * expr.c (interpret_float_suffix): Handle fN, fNx, FN and FNx | |
1235 | suffixes. | |
1236 | ||
6d7de609 | 1237 | 2016-08-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> |
1238 | ||
1239 | * expr.c (eval_token): Append "evaluates to 0" to Wundef diagnostic. | |
1240 | ||
5c8151fa | 1241 | 2016-08-18 David Malcolm <dmalcolm@redhat.com> |
1242 | ||
1243 | * directives.c (directive_names): New array. | |
1244 | (_cpp_handle_directive): Offer spelling suggestions for misspelled | |
1245 | directives. | |
1246 | * errors.c (cpp_diagnostic_at_richloc): New function. | |
1247 | (cpp_error_at_richloc): New function. | |
1248 | * include/cpplib.h (struct cpp_callbacks): Add field | |
1249 | "get_suggestion". | |
1250 | (cpp_error_at_richloc): New decl. | |
1251 | ||
fa5f704b | 1252 | 2016-08-18 Marek Polacek <polacek@redhat.com> |
1253 | ||
1254 | PR c/7652 | |
1255 | * pch.c (write_macdef): Add CPP_FALLTHRU. | |
1256 | ||
e3533433 | 1257 | 2016-08-12 Marek Polacek <polacek@redhat.com> |
1258 | ||
1259 | PR c/7652 | |
1260 | * lex.c (search_line_fast): Add FALLTHRU. | |
1261 | (_cpp_lex_direct): Likewise. | |
1262 | (cpp_token_val_index): Adjust fall through comment. | |
1263 | * macro.c (parse_params): Add FALLTHRU. | |
1264 | * pch.c (count_defs): Adjust fall through comment. | |
1265 | (write_defs): Likewise. | |
1266 | ||
67376ed1 | 1267 | 2016-08-06 David Malcolm <dmalcolm@redhat.com> |
1268 | ||
1269 | PR bootstrap/72823 | |
1270 | * charset.c (_cpp_valid_ucn): Replace overzealous assert with one | |
1271 | that allows for char_range to be non-NULL when loc_reader is NULL. | |
1272 | ||
d4166bdc | 1273 | 2016-08-05 David Malcolm <dmalcolm@redhat.com> |
1274 | ||
1275 | * charset.c (cpp_substring_ranges::cpp_substring_ranges): New | |
1276 | constructor. | |
1277 | (cpp_substring_ranges::~cpp_substring_ranges): New destructor. | |
1278 | (cpp_substring_ranges::add_range): New method. | |
1279 | (cpp_substring_ranges::add_n_ranges): New method. | |
1280 | (_cpp_valid_ucn): Add "char_range" and "loc_reader" params; if | |
1281 | they are non-NULL, read position information from *loc_reader | |
1282 | and update char_range->m_finish accordingly. | |
1283 | (convert_ucn): Add "char_range", "loc_reader", and "ranges" | |
1284 | params. If loc_reader is non-NULL, read location information from | |
1285 | it, and update *ranges accordingly, using char_range. | |
1286 | Conditionalize the conversion into tbuf on tbuf being non-NULL. | |
1287 | (convert_hex): Likewise, conditionalizing the call to | |
1288 | emit_numeric_escape on tbuf. | |
1289 | (convert_oct): Likewise. | |
1290 | (convert_escape): Add params "loc_reader" and "ranges". If | |
1291 | loc_reader is non-NULL, read location information from it, and | |
1292 | update *ranges accordingly. Conditionalize the conversion into | |
1293 | tbuf on tbuf being non-NULL. | |
1294 | (cpp_interpret_string): Rename to... | |
1295 | (cpp_interpret_string_1): ...this, adding params "loc_readers" and | |
1296 | "out". Use "to" to conditionalize the initialization and usage of | |
1297 | "tbuf", such as running the converter. If "loc_readers" is | |
1298 | non-NULL, use the instances within it, reading location | |
1299 | information from them, and passing them to convert_escape; likewise | |
1300 | write to "out" if loc_readers is non-NULL. Check for leading | |
1301 | quote and issue an error if it is not present. Update boundary | |
1302 | check from "== limit" to ">= limit" to protect against erroneous | |
1303 | location values to calls that are not parsing string literals. | |
1304 | (cpp_interpret_string): Reimplement in terms to | |
1305 | cpp_interpret_string_1. | |
1306 | (noop_error_cb): New function. | |
1307 | (cpp_interpret_string_ranges): New function. | |
1308 | (cpp_string_location_reader::cpp_string_location_reader): New | |
1309 | constructor. | |
1310 | (cpp_string_location_reader::get_next): New method. | |
1311 | * include/cpplib.h (class cpp_string_location_reader): New class. | |
1312 | (class cpp_substring_ranges): New class. | |
1313 | (cpp_interpret_string_ranges): New prototype. | |
1314 | * internal.h (_cpp_valid_ucn): Add params "char_range" and | |
1315 | "loc_reader". | |
1316 | * lex.c (forms_identifier_p): Pass NULL for new params to | |
1317 | _cpp_valid_ucn. | |
1318 | ||
5a29175d | 1319 | 2016-08-01 Andreas Schwab <schwab@suse.de> |
1320 | ||
1321 | * include/cpplib.h: Fix comment typo. | |
1322 | ||
f17776ff | 1323 | 2016-07-27 David Malcolm <dmalcolm@redhat.com> |
1324 | ||
1325 | * include/line-map.h (source_location): Fix line numbers in | |
1326 | comment. | |
1327 | ||
b73690a4 | 1328 | 2016-07-11 David Malcolm <dmalcolm@redhat.com> |
1329 | ||
1330 | * include/line-map.h (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES): | |
1331 | Move here from line-map.c. | |
1332 | (LINE_MAP_MAX_LOCATION_WITH_COLS): Likewise. | |
1333 | * line-map.c (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES): Move from | |
1334 | here to line-map.h. | |
1335 | (LINE_MAP_MAX_LOCATION_WITH_COLS): Likewise. | |
1336 | ||
e557fc7f | 1337 | 2016-06-22 David Malcolm <dmalcolm@redhat.com> |
1338 | ||
1339 | * directives.c (do_include_common): Pass on "location" to | |
1340 | _cpp_stack_include. | |
1341 | * errors.c (cpp_diagnostic): Reimplement in terms of... | |
1342 | (cpp_diagnostic_at): New function. | |
1343 | (cpp_error_at): New function. | |
1344 | (cpp_errno_filename): Add "loc" param and use it by using | |
1345 | cpp_error_at rather than cpp_error. | |
1346 | * files.c (find_file_in_dir): Add "loc" param and pass it to | |
1347 | open_file_failed. | |
1348 | (_cpp_find_file): Add "loc" param. Use it to convert calls to | |
1349 | cpp_error to cpp_error_at, and pass it to find_file_in_dir and | |
1350 | open_file_failed. | |
1351 | (read_file_guts): Add "loc" param. Use it to convert calls to | |
1352 | cpp_error to cpp_error_at. Pass it to cpp_errno_filename. | |
1353 | (read_file): Add "loc" param. Pass it to open_file_failed and | |
1354 | read_file_guts. | |
1355 | (should_stack_file): Add "loc" param. Pass it to read_file. | |
1356 | (_cpp_stack_file): Add "loc" param. Pass it to should_stack_file. | |
1357 | (_cpp_stack_include): Add "loc" param. Pass it to | |
1358 | _cpp_find_file and _cpp_stack_file. | |
1359 | (open_file_failed): Add "loc" param. Pass it to | |
1360 | cpp_errno_filename. | |
1361 | (_cpp_fake_include): Add 0 as a source_location in call to | |
1362 | _cpp_find_file. | |
1363 | (_cpp_compare_file_date): Likewise. | |
1364 | (cpp_push_include): Likewise for call to _cpp_stack_include. | |
1365 | (cpp_push_default_include): Likewise. | |
1366 | (_cpp_save_file_entries): Likewise for call to open_file_failed. | |
1367 | (_cpp_has_header): Likewise for call to _cpp_find_file. | |
1368 | * include/cpplib.h (cpp_errno_filename): Add source_location | |
1369 | param. | |
1370 | (cpp_error_at): New declaration. | |
1371 | * init.c (cpp_read_main_file): Add 0 as a source_location in calls | |
1372 | to _cpp_find_file and _cpp_stack_file. | |
1373 | * internal.h (_cpp_find_file): Add source_location param. | |
1374 | (_cpp_stack_file): Likewise. | |
1375 | (_cpp_stack_include): Likewise. | |
1376 | ||
6628b04d | 1377 | 2016-06-22 David Malcolm <dmalcolm@redhat.com> |
1378 | ||
1379 | * include/line-map.h (fixit_hint::get_start_loc): New pure virtual | |
1380 | function. | |
1381 | (fixit_hint::maybe_get_end_loc): Likewise. | |
1382 | (fixit_insert::get_start_loc): New function, implementing | |
1383 | fixit_hint::get_start_loc. | |
1384 | (fixit_insert::maybe_get_end_loc): New function, implementing | |
1385 | fixit_hint::maybe_get_end_loc. | |
1386 | (fixit_remove::get_start_loc): New function, implementing | |
1387 | fixit_hint::get_start_loc. | |
1388 | (fixit_remove::maybe_get_end_loc): New function, implementing | |
1389 | fixit_hint::maybe_get_end_loc. | |
1390 | (fixit_replace::get_start_loc): New function, implementing | |
1391 | fixit_hint::get_start_loc. | |
1392 | (fixit_replace::maybe_get_end_loc): New function, implementing | |
1393 | fixit_hint::maybe_get_end_loc. | |
1394 | ||
bd08c370 | 1395 | 2016-06-21 John David Anglin <danglin@gcc.gnu.org> |
1396 | ||
1397 | * line-map.c (location_adhoc_data_update): Use int64_t instead of | |
1398 | long long. | |
1399 | (get_combined_adhoc_loc): Likewise. | |
1400 | ||
dfa5c0d3 | 1401 | 2016-06-01 Eduard Sanou <dhole@openmailbox.org> |
1402 | ||
1403 | * include/cpplib.h (cpp_callbacks): Add get_source_date_epoch | |
1404 | callback. | |
1405 | * include/cpplib.h (cpp_init_source_date_epoch): Remove prototype. | |
1406 | * init.c (cpp_init_source_date_epoch): Remove function. | |
1407 | * init.c (cpp_create_reader): Initialize pfile->source_date_epoch. | |
1408 | * internal.h (cpp_reader): Extend comment about source_date_epoch. | |
1409 | * macro.c (_cpp_builtin_macro_text): Use get_source_date_epoch | |
1410 | callback only once, read pfile->source_date_epoch on future passes. | |
1411 | Check that get_source_date_epoch callback is not NULL. | |
1412 | ||
f0f7510b | 1413 | 2016-05-20 Martin Liska <mliska@suse.cz> |
1414 | ||
1415 | * config.in: Regenerated. | |
1416 | * configure: Likewise. | |
1417 | * configure.ac: Handle --enable-valgrind-annotations. | |
1418 | * lex.c (new_buff): Use ENABLE_VALGRIND_ANNOTATIONS instead | |
1419 | of ENABLE_VALGRIND_CHECKING. | |
1420 | (_cpp_free_buff): Likewise. | |
1421 | ||
e3e8c48c | 1422 | 2016-04-28 Eduard Sanou <dhole@openmailbox.org> |
1423 | Matthias Klose <doko@debian.org> | |
1424 | ||
1425 | * include/cpplib.h (cpp_init_source_date_epoch): Prototype. | |
1426 | * init.c (cpp_init_source_date_epoch): New function. | |
1427 | * internal.h: Added source_date_epoch variable to struct | |
1428 | cpp_reader to store a reproducible date. | |
859b51f8 | 1429 | * macro.c (_cpp_builtin_macro_text): Set pfile->date timestamp from |
1430 | pfile->source_date_epoch instead of localtime if source_date_epoch is | |
1431 | set, to be used for __DATE__ and __TIME__ macros to help reproducible | |
e3e8c48c | 1432 | builds. |
1433 | ||
09321e85 | 1434 | 2016-04-13 Bernd Schmidt <bschmidt@redhat.com> |
1435 | ||
1436 | Patch from Roger Orr <rogero@howzatt.demon.co.uk> | |
1437 | PR preprocessor/69650 | |
1438 | * directives.c (do_linemarker): Reread map after calling | |
1439 | cpp_get_token. | |
1440 | ||
382ece2d | 1441 | 2016-04-06 Richard Henderson <rth@redhat.com> |
1442 | ||
1443 | PR preprocessor/61817 | |
1444 | PR preprocessor/69391 | |
1445 | * internal.h (_cpp_builtin_macro_text): Update decl. | |
1446 | * macro.c (_cpp_builtin_macro_text): Accept location for __LINE__. | |
1447 | (builtin_macro): Accept a second location for __LINE__. | |
1448 | (enter_macro_context): Compute both virtual and real expansion | |
1449 | locations for the macro. | |
1450 | ||
f175ba0f | 1451 | 2016-03-25 Bernd Schmidt <bschmidt@redhat.com> |
1452 | ||
1453 | PR lto/69650 | |
1454 | * directives.c (do_linemarker): Test for file left but not entered | |
1455 | here. | |
1456 | * line-map.c (linemap_add): Not here. | |
1457 | ||
afdde20c | 1458 | 2016-03-21 Jakub Jelinek <jakub@redhat.com> |
1459 | ||
1460 | PR target/70296 | |
1461 | * include/cpplib.h (cpp_fun_like_macro_p): New prototype. | |
1462 | * macro.c (cpp_fun_like_macro_p): New function. | |
1463 | ||
523f8924 | 1464 | 2016-03-15 Richard Henderson <rth@redhat.com> |
1465 | ||
1466 | * line-map.c (new_linemap): Make alloc_size a size_t. | |
1467 | ||
14c36b14 | 1468 | 2016-03-14 Jason Merrill <jason@redhat.com> |
1469 | ||
1470 | * expr.c (cpp_classify_number): Hex floats are new in C++1z. | |
1471 | * init.c (lang_defaults): Likewise. | |
1472 | ||
c24757cf | 1473 | 2016-03-09 David Malcolm <dmalcolm@redhat.com> |
1474 | ||
1475 | PR c/68473 | |
1476 | PR c++/70105 | |
1477 | * line-map.c (linemap_macro_map_loc_unwind_toward_spelling): Move | |
1478 | decl... | |
1479 | * include/line-map.h | |
1480 | (linemap_macro_map_loc_unwind_toward_spelling): ...here, | |
1481 | converting from static to extern. | |
1482 | ||
83108969 | 1483 | 2016-03-09 David Malcolm <dmalcolm@redhat.com> |
1484 | ||
1485 | PR c/68473 | |
1486 | PR c++/70105 | |
1487 | * include/line-map.h (source_range::debug): Delete. | |
1488 | (struct location_range): Update comment. Replace | |
1489 | expanded_location fields "m_start", "m_finish", and "m_caret" with | |
1490 | a source_location field: "m_loc". | |
1491 | (class rich_location): Reword comment. | |
1492 | (rich_location::get_loc): Reimplement in terms of a new overloaded | |
1493 | variant which takes an unsigned int. | |
1494 | (rich_location::get_loc_addr): Delete. | |
1495 | (rich_location::add_range): Drop params "start" and "finish" in | |
1496 | favor of param "loc". Drop overloaded variants taking a | |
1497 | source_range or location_range *. | |
1498 | (rich_location::lazily_expand_location): Delete in favor of... | |
1499 | (rich_location::get_expanded_location): New decl. | |
1500 | (rich_location::m_loc): Delete field. | |
1501 | (rich_location::m_column_override): New field. | |
1502 | * line-map.c (rich_location::rich_location): Drop name of | |
1503 | line_maps * param. Update initializations for deletion of field | |
1504 | "m_loc" and addition of field "m_column_override". Reimplement | |
1505 | body as a call to add_range. Delete overloaded variant taking a | |
1506 | source_range. | |
1507 | (rich_location::get_loc): New function. | |
1508 | (rich_location::lazily_expand_location): Delete in favor of... | |
1509 | (rich_location::get_expanded_location): New function. | |
1510 | (rich_location::override_column): Reimplement. | |
1511 | (rich_location::add_range): Drop params "start" and "finish" in | |
1512 | favor of param "loc". Eliminate location expansion in favor of | |
1513 | simply storing loc. Drop overloaded variants taking a | |
1514 | source_range or location_range *. | |
1515 | (rich_location::set_range): Eliminate location expansion. | |
1516 | ||
1ed1f69a | 1517 | 2016-02-29 David Malcolm <dmalcolm@redhat.com> |
1518 | ||
1519 | PR preprocessor/69985 | |
1520 | (linemap_position_for_loc_and_offset): Rename param from "offset" | |
1521 | to "column_offset". Right-shift the column_offset by m_range_bits | |
1522 | of the pertinent ordinary map whenever offsetting a | |
1523 | source_location. For clarity, offset the column by the column | |
1524 | offset, rather than the other way around. | |
1525 | ||
52609ec3 | 1526 | 2016-02-23 David Malcolm <dmalcolm@redhat.com> |
1527 | ||
1528 | PR preprocessor/69126 | |
1529 | PR preprocessor/69543 | |
1530 | * line-map.c (linemap_compare_locations): At the function top, | |
1531 | replace inlined bodies of get_location_from_adhoc_loc with calls | |
1532 | to get_location_from_adhoc_loc. Add a pair of calls to | |
1533 | get_location_from_adhoc_loc at the bottom of the function, to | |
1534 | avoid meaningless comparisons of ad-hoc and non-ad-hoc locations. | |
1535 | ||
86e0b129 | 1536 | 2016-02-08 David Malcolm <dmalcolm@redhat.com> |
1537 | ||
1538 | PR preprocessor/69664 | |
1539 | * errors.c (cpp_diagnostic_with_line): Only call | |
1540 | rich_location::override_column if the column is non-zero. | |
1541 | * line-map.c (rich_location::override_column): Update columns | |
1542 | within m_ranges[0]. Add assertions to verify that doing so is | |
1543 | sane. | |
1544 | ||
1e302465 | 1545 | 2016-02-05 Jakub Jelinek <jakub@redhat.com> |
1546 | ||
1547 | PR c++/69628 | |
1548 | * charset.c (cpp_interpret_charconst): Clear *PCHARS_SEEN | |
1549 | and *UNSIGNEDP if bailing out early due to errors. | |
1550 | ||
1e6115dd | 1551 | 2016-01-28 Jakub Jelinek <jakub@redhat.com> |
1552 | ||
9cd9799e | 1553 | PR pch/68176 |
1554 | * files.c (_cpp_find_file): Set file->implicit_preinclude even if | |
1555 | included from file->implicit_preinclude header. | |
1556 | ||
1e6115dd | 1557 | * directives.c (destringize_and_run): Adjust prototype. |
1558 | ||
eec96426 | 1559 | 2016-01-27 David Malcolm <dmalcolm@redhat.com> |
1560 | ||
1561 | PR preprocessor/69126 | |
1562 | * directives.c (destringize_and_run): Add expansion_loc param; use | |
1563 | it when handling unexpanded pragmas to fixup the locations of the | |
1564 | synthesized tokens. | |
1565 | (_cpp_do__Pragma): Add expansion_loc param and use it when calling | |
1566 | destringize_and_run. | |
1567 | * internal.h (_cpp_do__Pragma): Add expansion_loc param. | |
1568 | * macro.c (builtin_macro): Pass expansion location of _Pragma to | |
1569 | _cpp_do__Pragma. | |
1570 | ||
a7ed4583 | 1571 | 2016-01-14 David Malcolm <dmalcolm@redhat.com> |
1572 | ||
1573 | PR preprocessor/69177 | |
1574 | * line-map.c (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES): New | |
1575 | constant. | |
1576 | (LINE_MAP_MAX_LOCATION_WITH_COLS): Add note about unit tests | |
1577 | to comment. | |
1578 | (can_be_stored_compactly_p): Reduce threshold from | |
1579 | LINE_MAP_MAX_LOCATION_WITH_COLS to | |
1580 | LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES. | |
1581 | (get_combined_adhoc_loc): Likewise. | |
1582 | (get_range_from_loc): Likewise. | |
1583 | (linemap_line_start): Ensure that a new ordinary map is created | |
1584 | when transitioning from range-packing being enabled to disabled, | |
1585 | at the LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES threshold. Set | |
1586 | range_bits to 0 for new ordinary maps when beyond this limit. | |
1587 | Prevent the "increase the column bits of a freshly created map" | |
1588 | optimization if the range bits has reduced. | |
1589 | ||
5d034e37 | 1590 | 2016-01-08 Jakub Jelinek <jakub@redhat.com> |
1591 | ||
1592 | PR c++/69145 | |
1593 | * files.c (cpp_included_before): If IS_ADHOC_LOC (location), lookup | |
1594 | real location from the line_table. | |
1595 | ||
f1717362 | 1596 | 2016-01-04 Jakub Jelinek <jakub@redhat.com> |
1597 | ||
1598 | Update copyright years. | |
1599 | ||
7b4b11d3 | 1600 | 2015-12-22 David Malcolm <dmalcolm@redhat.com> |
1601 | ||
1602 | * line-map.c (get_combined_adhoc_loc): Remove condition | |
1603 | on locus < RESERVED_LOCATION_COUNT when considering | |
1604 | whether a caret == start == finish location can be | |
1605 | simply stored as the caret location. | |
1606 | ||
d0f713f4 | 1607 | 2015-12-07 David Malcolm <dmalcolm@redhat.com> |
1608 | ||
1609 | * include/line-map.h (rich_location::set_range): Add line_maps * | |
1610 | param; convert param from source_range to source_location. Drop | |
1611 | "overwrite_loc_p" param. | |
1612 | * line-map.c (rich_location::set_range): Likewise, acting as if | |
1613 | "overwrite_loc_p" were true, and getting range from the location. | |
1614 | ||
734caf84 | 1615 | 2015-11-20 David Malcolm <dmalcolm@redhat.com> |
1616 | ||
1617 | PR 62314 | |
1618 | * include/line-map.h (source_range::intersects_line_p): New | |
1619 | method. | |
1620 | (rich_location::~rich_location): New. | |
1621 | (rich_location::add_fixit_insert): New method. | |
1622 | (rich_location::add_fixit_remove): New method. | |
1623 | (rich_location::add_fixit_replace): New method. | |
1624 | (rich_location::get_num_fixit_hints): New accessor. | |
1625 | (rich_location::get_fixit_hint): New accessor. | |
1626 | (rich_location::MAX_FIXIT_HINTS): New constant. | |
1627 | (rich_location::m_num_fixit_hints): New field. | |
1628 | (rich_location::m_fixit_hints): New field. | |
1629 | (class fixit_hint): New class. | |
1630 | (class fixit_insert): New class. | |
1631 | (class fixit_remove): New class. | |
1632 | (class fixit_replace): New class. | |
1633 | * line-map.c (source_range::intersects_line_p): New method. | |
1634 | (rich_location::rich_location): Add initialization of | |
1635 | m_num_fixit_hints to both ctors. | |
1636 | (rich_location::~rich_location): New. | |
1637 | (rich_location::add_fixit_insert): New method. | |
1638 | (rich_location::add_fixit_remove): New method. | |
1639 | (rich_location::add_fixit_replace): New method. | |
1640 | (fixit_insert::fixit_insert): New. | |
1641 | (fixit_insert::~fixit_insert): New. | |
1642 | (fixit_insert::affects_line_p): New. | |
1643 | (fixit_remove::fixit_remove): New. | |
1644 | (fixit_remove::affects_line_p): New. | |
1645 | (fixit_replace::fixit_replace): New. | |
1646 | (fixit_replace::~fixit_replace): New. | |
1647 | (fixit_replace::affects_line_p): New. | |
1648 | ||
55d11fae | 1649 | 2015-11-19 Jakub Jelinek <jakub@redhat.com> |
1650 | ||
1651 | PR preprocessor/60736 | |
1652 | * include/cpplib.h (cpp_errno_filename): New prototype. | |
1653 | * errors.c (cpp_errno): Don't handle msgid "" specially, use | |
1654 | _(msgid) instead of msgid as argument to cpp_error. | |
1655 | (cpp_errno_filename): New function. | |
1656 | * files.c (read_file_guts): Use cpp_errno_filename instead of | |
1657 | cpp_errno. | |
1658 | (open_file_failed): Likewise. Use file->name if file->path is NULL | |
1659 | in diagnostics. | |
1660 | ||
a96cefb2 | 1661 | 2015-11-13 David Malcolm <dmalcolm@redhat.com> |
1662 | ||
1663 | * errors.c (cpp_diagnostic): Pass pfile->line_table to | |
1664 | rich_location ctor. | |
1665 | (cpp_diagnostic_with_line): Likewise. | |
1666 | * include/cpplib.h (struct cpp_token): Update comment for src_loc | |
1667 | to indicate that the range of the token is "baked into" the | |
1668 | source_location. | |
1669 | * include/line-map.h (source_location): Update the descriptive | |
1670 | comment to reflect the packing scheme for short ranges, adding | |
1671 | worked examples of location encoding. | |
1672 | (struct line_map_ordinary): Drop field "column_bits" in favor | |
1673 | of field "m_column_and_range_bits"; add field "m_range_bits". | |
1674 | (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete. | |
1675 | (location_adhoc_data): Add source_range field. | |
1676 | (struct line_maps): Add fields "default_range_bits", | |
1677 | "num_optimized_ranges" and "num_unoptimized_ranges". | |
1678 | (get_combined_adhoc_loc): Add source_range param. | |
1679 | (get_range_from_loc): New declaration. | |
1680 | (pure_location_p): New prototype. | |
1681 | (COMBINE_LOCATION_DATA): Add source_range param. | |
1682 | (SOURCE_LINE): Update for renaming of column_bits. | |
1683 | (SOURCE_COLUMN): Likewise. Shift the column right by the map's | |
1684 | range_bits. | |
1685 | (LAST_SOURCE_LINE_LOCATION): Update for renaming of column_bits. | |
1686 | (linemap_position_for_line_and_column): Add line_maps * params. | |
1687 | (rich_location::rich_location): Likewise. | |
1688 | * lex.c (_cpp_lex_direct): Capture the range of the token, baking | |
1689 | it into token->src_loc via a call to COMBINE_LOCATION_DATA. | |
1690 | * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): Reduce from 1U << 17 to | |
1691 | 1U << 12. | |
1692 | (location_adhoc_data_hash): Add the src_range into | |
1693 | the hash value. | |
1694 | (location_adhoc_data_eq): Require equality of the src_range | |
1695 | values. | |
1696 | (can_be_stored_compactly_p): New function. | |
1697 | (get_combined_adhoc_loc): Add src_range param, and store it, | |
1698 | via a bit-packing scheme for short ranges, otherwise within the | |
1699 | lookaside table. Remove the requirement that data is non-NULL. | |
1700 | (get_range_from_adhoc_loc): New function. | |
1701 | (get_range_from_loc): New function. | |
1702 | (pure_location_p): New function. | |
1703 | (linemap_add): Ensure that start_location has zero for the | |
1704 | range_bits, unless we're past LINE_MAP_MAX_LOCATION_WITH_COLS. | |
1705 | Initialize range_bits to zero. Assert that the start_location | |
1706 | is "pure". | |
1707 | (linemap_line_start): Assert that the | |
1708 | column_and_range_bits >= range_bits. | |
1709 | Update determinination of whether we need to start a new map | |
1710 | using the effective column bits, without the range bits. | |
1711 | Use the set's default_range_bits in new maps, apart from | |
1712 | those with column_bits == 0, which should also have 0 range_bits. | |
1713 | Increase the column bits for new maps by the range bits. | |
1714 | When adding lines to an existing map, use set->highest_line | |
1715 | directly rather than offsetting highest by SOURCE_COLUMN. | |
1716 | Add assertions to sanity-check the return value. | |
1717 | (linemap_position_for_column): Offset to_column by range_bits. | |
1718 | Update set->highest_location if necessary. | |
1719 | (linemap_position_for_line_and_column): Add line_maps * param. | |
1720 | Update the calculation to offset the column by range_bits, and | |
1721 | conditionalize it on being <= LINE_MAP_MAX_LOCATION_WITH_COLS. | |
1722 | Bound it by LINEMAPS_MACRO_LOWEST_LOCATION. Update | |
1723 | set->highest_location if necessary. | |
1724 | (linemap_position_for_loc_and_offset): Handle ad-hoc locations; | |
1725 | pass "set" to linemap_position_for_line_and_column. | |
1726 | (linemap_macro_map_loc_unwind_toward_spelling): Add line_maps | |
1727 | param. Handle ad-hoc locations. | |
1728 | (linemap_location_in_system_header_p): Pass on "set" to call to | |
1729 | linemap_macro_map_loc_unwind_toward_spelling. | |
1730 | (linemap_macro_loc_to_spelling_point): Retain ad-hoc locations. | |
1731 | Pass on "set" to call to | |
1732 | linemap_macro_map_loc_unwind_toward_spelling. | |
1733 | (linemap_resolve_location): Retain ad-hoc locations. Pass on | |
1734 | "set" to call to linemap_macro_map_loc_unwind_toward_spelling. | |
1735 | (linemap_unwind_toward_expansion): Pass on "set" to call to | |
1736 | linemap_macro_map_loc_unwind_toward_spelling. | |
1737 | (linemap_expand_location): Extract the data pointer before | |
1738 | extracting the location. | |
1739 | (rich_location::rich_location): Add line_maps param; use it to | |
1740 | extract the range from the source_location. | |
1741 | * location-example.txt: Regenerate, showing new representation. | |
1742 | ||
f0479000 | 1743 | 2015-11-06 David Malcolm <dmalcolm@redhat.com> |
1744 | ||
1745 | * errors.c (cpp_diagnostic): Update for change in signature | |
1746 | of "error" callback. | |
1747 | (cpp_diagnostic_with_line): Likewise, calling override_column | |
1748 | on the rich_location. | |
1749 | * include/cpplib.h (struct cpp_callbacks): Within "error" | |
1750 | callback, convert param from source_location to rich_location *, | |
1751 | and drop column_override param. | |
1752 | * include/line-map.h (struct source_range): New struct. | |
1753 | (struct location_range): New struct. | |
1754 | (class rich_location): New class. | |
1755 | (linemap_client_expand_location_to_spelling_point): New declaration. | |
1756 | * line-map.c (rich_location::rich_location): New ctors. | |
1757 | (rich_location::lazily_expand_location): New method. | |
1758 | (rich_location::override_column): New method. | |
1759 | (rich_location::add_range): New methods. | |
1760 | (rich_location::set_range): New method. | |
1761 | ||
0ffb4474 | 1762 | 2015-11-06 David Malcolm <dmalcolm@redhat.com> |
1763 | ||
1764 | * include/line-map.h (struct linemap_stats): Add fields | |
1765 | "adhoc_table_size" and "adhoc_table_entries_used". | |
1766 | * line-map.c (linemap_get_statistics): Populate above fields. | |
1767 | ||
29134d13 | 1768 | 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com> |
1769 | ||
1770 | * config.in: Regenerate. | |
1771 | * configure: Regenerate. | |
1772 | * configure.ac: Remove ENABLE_CHECKING. | |
1773 | ||
71e4c29d | 1774 | 2015-11-03 Uros Bizjak <ubizjak@gmail.com> |
1775 | ||
1776 | * lex.c (search_line_sse42): Correctly advance the pointer to an | |
1777 | aligned address. | |
1778 | ||
988403a9 | 1779 | 2015-11-02 David Malcolm <dmalcolm@redhat.com> |
1780 | ||
1781 | * include/line-map.h (source_location): In the table in the | |
1782 | descriptive comment, show UNKNOWN_LOCATION, BUILTINS_LOCATION, | |
1783 | LINE_MAP_MAX_LOCATION_WITH_COLS, LINE_MAP_MAX_SOURCE_LOCATION. | |
1784 | Add notes about ad-hoc values. | |
1785 | ||
92a110bb | 1786 | 2015-10-21 Mikhail Maltsev <maltsevm@gmail.com> |
1787 | ||
cfec10de | 1788 | * include/line-map.h: Use CHECKING_P instead of ENABLE_CHECKING. |
1789 | * init.c: Likewise. | |
1790 | * macro.c (struct macro_arg_token_iter, set_arg_token, | |
1791 | macro_arg_token_iter_init, macro_arg_token_iter_forward, | |
1792 | macro_arg_token_iter_get_token, macro_arg_token_iter_get_location, | |
1793 | alloc_expanded_arg_mem, _cpp_backup_tokens): Likewise. | |
1794 | ||
92a110bb | 1795 | * config.in: Regenerate. |
1796 | * configure: Regenerate. | |
1797 | * configure.ac (CHECKING_P): Define. | |
1798 | * system.h (fancy_abort): Declare. | |
1799 | (abort): Define. | |
1800 | (gcc_assert): Define. Use CHECKING_P. | |
1801 | ||
4fb48515 | 1802 | 2015-10-13 Mikhail Maltsev <maltsevm@gmail.com> |
1803 | ||
1804 | * system.h (CHECKING_P, gcc_checking_assert): Define. | |
1805 | ||
3cff347a | 1806 | 2015-09-21 Manuel López-Ibáñez <manu@gcc.gnu.org> |
1807 | ||
1808 | PR c/66415 | |
1809 | * line-map.c (linemap_position_for_loc_and_offset): Handle the | |
1810 | case of long lines encoded in multiple maps. | |
1811 | ||
8df4088d | 1812 | 2015-09-07 Marek Polacek <polacek@redhat.com> |
1813 | ||
1814 | * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning. | |
1815 | ||
29890f2e | 1816 | 2015-08-06 Yaakov Selkowitz <yselkowi@redhat.com> |
1817 | ||
1818 | * configure: Regenerate. | |
1819 | ||
a5ea4da3 | 1820 | 2015-07-08 Thomas Schwinge <thomas@codesourcery.com> |
1821 | ||
1822 | * include/line-map.h (RESERVED_LOCATION_COUNT): Change type to | |
1823 | source_location. | |
1824 | ||
880e4baa | 1825 | 2015-07-02 Paolo Carlini <paolo.carlini@oracle.com> |
1826 | ||
7c35064e | 1827 | PR preprocessor/53690 |
880e4baa | 1828 | * charset.c (_cpp_valid_ucn): Add cppchar_t * parameter and change |
1829 | return type to bool. Fix encoding of \u0000 and \U00000000 in C++. | |
1830 | (convert_ucn): Adjust call. | |
1831 | * lex.c (forms_identifier_p): Likewise. | |
1832 | * internal.h (_cpp_valid_ucn): Adjust declaration. | |
1833 | ||
30b1ba42 | 1834 | 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> |
1835 | ||
1836 | Implement N4197 - Adding u8 character literals | |
1837 | * include/cpplib.h (UTF8CHAR, UTF8CHAR_USERDEF): New cpp tokens; | |
1838 | (struct cpp_options): Add utf8_char_literals. | |
1839 | * init.c (struct lang_flags): Add utf8_char_literals; | |
1840 | (struct lang_flags lang_defaults): Add column for utf8_char_literals. | |
880e4baa | 1841 | * macro.c (stringify_arg()): Treat CPP_UTF8CHAR token; |
30b1ba42 | 1842 | * expr.c (cpp_userdef_char_remove_type(), cpp_userdef_char_add_type()): |
1843 | Treat CPP_UTF8CHAR_USERDEF, CPP_UTF8CHAR tokens; | |
1844 | (cpp_userdef_char_p()): Treat CPP_UTF8CHAR_USERDEF token; | |
1845 | (eval_token(), _cpp_parse_expr()): Treat CPP_UTF8CHAR token. | |
1846 | * lex.c (lex_string(), _cpp_lex_direct()): Include CPP_UTF8CHAR tokens. | |
1847 | * charset.c (converter_for_type(), cpp_interpret_charconst()): | |
1848 | Treat CPP_UTF8CHAR token. | |
1849 | ||
5ac78bd3 | 1850 | 2015-06-30 Uros Bizjak <ubizjak@gmail.com> |
1851 | ||
1852 | * lex.c (search_line_sse42) [__GCC_ASM_FLAG_OUTPUTS__]: New main | |
1853 | loop using asm flag outputs. | |
1854 | ||
6e84ccad | 1855 | 2015-06-08 Marek Polacek <polacek@redhat.com> |
1856 | ||
1857 | PR c/66415 | |
1858 | * line-map.c (linemap_position_for_loc_and_offset): Remove | |
1859 | linemap_assert_fails; reverse conditions. | |
1860 | ||
0d344d27 | 1861 | 2015-05-26 Manuel López-Ibáñez <manu@gcc.gnu.org> |
1862 | ||
1863 | * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER | |
1864 | LINE_MAP_MAX_LOCATION_WITH_COLS,LINE_MAP_MAX_SOURCE_LOCATION): | |
1865 | New constants. | |
1866 | (linemap_line_start): Use them. | |
1867 | (linemap_position_for_column): Use them. | |
1868 | ||
3ce1a212 | 1869 | 2015-05-20 David Malcolm <dmalcolm@redhat.com> |
1870 | ||
1871 | * include/line-map.h (MAP_START_LOCATION): Eliminate the non-const | |
1872 | variant, and tweak comment for the const variant. | |
1873 | (ORDINARY_MAP_STARTING_LINE_NUMBER): Drop the non-const variant. | |
1874 | (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise. | |
1875 | (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise. | |
1876 | (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete. | |
1877 | (ORDINARY_MAP_FILE_NAME): Drop the non-const variant. | |
1878 | (MACRO_MAP_MACRO): Likewise. | |
1879 | (MACRO_MAP_NUM_MACRO_TOKENS): Likewise. | |
1880 | (MACRO_MAP_LOCATIONS): Likewise. | |
1881 | (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise. | |
1882 | * line-map.c (linemap_add): Replace writes through macros with | |
1883 | direct field accesses. | |
1884 | (linemap_enter_macro): Likewise. | |
1885 | (linemap_line_start): Likewise. | |
1886 | ||
551e34da | 1887 | 2015-05-19 David Malcolm <dmalcolm@redhat.com> |
1888 | ||
1889 | * directives.c (do_line): Strengthen local "map" from | |
1890 | const line_map * to const line_map_ordinary *. | |
1891 | (do_linemarker): Likewise. | |
1892 | (_cpp_do_file_change): Assert that we're not dealing with | |
1893 | a macro map. Introduce local "ord_map" via a call to | |
1894 | linemap_check_ordinary, guarded within the check for | |
1895 | non-NULL. Use it for typesafety. | |
1896 | * files.c (cpp_make_system_header): Strengthen local "map" from | |
1897 | const line_map * to const line_map_ordinary *. | |
1898 | * include/cpplib.h (struct cpp_callbacks): Likewise for second | |
1899 | parameter of "file_change" callback. | |
1900 | * include/line-map.h (struct line_map): Convert from a struct | |
1901 | containing a union to a base class. | |
1902 | (struct line_map_ordinary): Convert to a subclass of line_map. | |
1903 | (struct line_map_macro): Likewise. | |
1904 | (linemap_check_ordinary): Strengthen return type from line_map * | |
1905 | to line_map_ordinary *, and add a const-variant. | |
1906 | (linemap_check_macro): New pair of functions. | |
1907 | (ORDINARY_MAP_STARTING_LINE_NUMBER): Strengthen param from | |
1908 | const line_map * to const line_map_ordinary *, eliminating call | |
1909 | to linemap_check_ordinary. Likewise for the non-const variant. | |
1910 | (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise. | |
1911 | (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise. | |
1912 | (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Likewise. | |
1913 | (ORDINARY_MAP_FILE_NAME): Likewise. | |
1914 | (MACRO_MAP_MACRO): Strengthen param from const line_map * to | |
1915 | const line_map_macro *. Likewise for the non-const variant. | |
1916 | (MACRO_MAP_NUM_MACRO_TOKENS): Likewise. | |
1917 | (MACRO_MAP_LOCATIONS): Likewise. | |
1918 | (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise. | |
1919 | (struct maps_info): Replace with... | |
1920 | (struct maps_info_ordinary):...this and... | |
1921 | (struct maps_info_macro): ...this. | |
1922 | (struct line_maps): Convert fields "info_ordinary" and | |
1923 | "info_macro" to the above new structs. | |
1924 | (LINEMAPS_MAP_INFO): Delete both functions. | |
1925 | (LINEMAPS_MAPS): Likewise. | |
1926 | (LINEMAPS_ALLOCATED): Rewrite both variants to avoid using | |
1927 | LINEMAPS_MAP_INFO. | |
1928 | (LINEMAPS_USED): Likewise. | |
1929 | (LINEMAPS_CACHE): Likewise. | |
1930 | (LINEMAPS_MAP_AT): Likewise. | |
1931 | (LINEMAPS_ORDINARY_MAPS): Strengthen return type from line_map * | |
1932 | to line_map_ordinary *. | |
1933 | (LINEMAPS_ORDINARY_MAP_AT): Likewise. | |
1934 | (LINEMAPS_LAST_ORDINARY_MAP): Likewise. | |
1935 | (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise. | |
1936 | (LINEMAPS_MACRO_MAPS): Strengthen return type from line_map * to | |
1937 | line_map_macro *. | |
1938 | (LINEMAPS_MACRO_MAP_AT): Likewise. | |
1939 | (LINEMAPS_LAST_MACRO_MAP): Likewise. | |
1940 | (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise. | |
1941 | (linemap_map_get_macro_name): Strengthen param from | |
1942 | const line_map * to const line_map_macro *. | |
1943 | (SOURCE_LINE): Strengthen first param from const line_map * to | |
1944 | const line_map_ordinary *, removing call to | |
1945 | linemap_check_ordinary. | |
1946 | (SOURCE_COLUMN): Likewise. | |
1947 | (LAST_SOURCE_LINE_LOCATION): Likewise. | |
1948 | (LAST_SOURCE_LINE): Strengthen first param from const line_map * | |
1949 | to const line_map_ordinary *. | |
1950 | (LAST_SOURCE_COLUMN): Likewise. | |
1951 | (INCLUDED_FROM): Strengthen return type from line_map * to | |
1952 | line_map_ordinary *., and second param from const line_map * | |
1953 | to const line_map_ordinary *, removing call to | |
1954 | linemap_check_ordinary. | |
1955 | (MAIN_FILE_P): Strengthen param from const line_map * to | |
1956 | const line_map_ordinary *, removing call to | |
1957 | linemap_check_ordinary. | |
1958 | (linemap_position_for_line_and_column): Strengthen param from | |
1959 | const line_map * to const line_map_ordinary *. | |
1960 | (LINEMAP_FILE): Strengthen param from const line_map * to | |
1961 | const line_map_ordinary *, removing call to | |
1962 | linemap_check_ordinary. | |
1963 | (LINEMAP_LINE): Likewise. | |
1964 | (LINEMAP_SYSP): Likewise. | |
1965 | (linemap_resolve_location): Strengthen final param from | |
1966 | const line_map ** to const line_map_ordinary **. | |
1967 | * internal.h (CPP_INCREMENT_LINE): Likewise for local "map". | |
1968 | (linemap_enter_macro): Strengthen return type from | |
1969 | const line_map * to const line_map_macro *. | |
1970 | (linemap_add_macro_token): Likewise for first param. | |
1971 | * line-map.c (linemap_check_files_exited): Strengthen local "map" | |
1972 | from const line_map * to const line_map_ordinary *. | |
1973 | (new_linemap): Introduce local "map_size" and use it when | |
1974 | calculating how large the buffer should be. Rewrite based | |
1975 | on change of info_macro and info_ordinary into distinct types. | |
1976 | (linemap_add): Strengthen locals "map" and "from" from line_map * | |
1977 | to line_map_ordinary *. | |
1978 | (linemap_enter_macro): Strengthen return type from | |
1979 | const line_map * to const line_map_macro *, and local "map" from | |
1980 | line_map * to line_map_macro *. | |
1981 | (linemap_add_macro_token): Strengthen param "map" from | |
1982 | const line_map * to const line_map_macro *. | |
1983 | (linemap_line_start): Strengthen local "map" from line_map * to | |
1984 | line_map_ordinary *. | |
1985 | (linemap_position_for_column): Likewise. | |
1986 | (linemap_position_for_line_and_column): Strengthen first param | |
1987 | from const line_map * to const line_map_ordinary *. | |
1988 | (linemap_position_for_loc_and_offset): Strengthen local "map" from | |
1989 | const line_map * to const line_map_ordinary *. | |
1990 | (linemap_ordinary_map_lookup): Likewise for return type and locals | |
1991 | "cached" and "result". | |
1992 | (linemap_macro_map_lookup): Strengthen return type and locals | |
1993 | "cached" and "result" from const line_map * to | |
1994 | const line_map_macro *. | |
1995 | (linemap_macro_map_loc_to_exp_point): Likewise for param "map". | |
1996 | (linemap_macro_map_loc_to_def_point): Likewise. | |
1997 | (linemap_macro_map_loc_unwind_toward_spelling): Likewise. | |
1998 | (linemap_get_expansion_line): Strengthen local "map" from | |
1999 | const line_map * to const line_map_ordinary *. | |
2000 | (linemap_get_expansion_filename): Likewise. | |
2001 | (linemap_map_get_macro_name): Strengthen param from | |
2002 | const line_map * to const line_map_macro *. | |
2003 | (linemap_location_in_system_header_p): Add call to | |
2004 | linemap_check_ordinary in region guarded by | |
2005 | !linemap_macro_expansion_map_p. Introduce local "macro_map" via | |
2006 | linemap_check_macro in other region, using it in place of "map" | |
2007 | for typesafety. | |
2008 | (first_map_in_common_1): Add calls to linemap_check_macro. | |
2009 | (trace_include): Strengthen param "map" from const line_map * to | |
2010 | const line_map_ordinary *. | |
2011 | (linemap_macro_loc_to_spelling_point): Strengthen final param from | |
2012 | const line_map ** to const line_map_ordinary **. Replace a | |
2013 | C-style cast with a const_cast, and add calls to | |
2014 | linemap_check_macro and linemap_check_ordinary. | |
2015 | (linemap_macro_loc_to_def_point): Likewise. | |
2016 | (linemap_macro_loc_to_exp_point): Likewise. | |
2017 | (linemap_resolve_location): Strengthen final param from | |
2018 | const line_map ** to const line_map_ordinary **. | |
2019 | (linemap_unwind_toward_expansion): Introduce local "macro_map" via | |
2020 | a checked cast and use it in place of *map. | |
2021 | (linemap_unwind_to_first_non_reserved_loc): Strengthen local | |
2022 | "map1" from const line_map * to const line_map_ordinary *. | |
2023 | (linemap_expand_location): Introduce local "ord_map" via a checked | |
2024 | cast and use it in place of map. | |
2025 | (linemap_dump): Make local "map" const. Strengthen local | |
2026 | "includer_map" from line_map * to const line_map_ordinary *. | |
2027 | Introduce locals "ord_map" and "macro_map" via checked casts and | |
2028 | use them in place of "map" for typesafety. | |
2029 | (linemap_dump_location): Strengthen local "map" from | |
2030 | const line_map * to const line_map_ordinary *. | |
2031 | (linemap_get_file_highest_location): Update for elimination of | |
2032 | union. | |
2033 | (linemap_get_statistics): Strengthen local "cur_map" from | |
2034 | line_map * to const line_map_macro *. Update uses of sizeof to | |
2035 | use the appropriate line_map subclasses. | |
2036 | * macro.c (_cpp_warn_if_unused_macro): Add call to | |
2037 | linemap_check_ordinary. | |
2038 | (builtin_macro): Strengthen local "map" from const line_map * to | |
2039 | const line_map_macro *. | |
2040 | (enter_macro_context): Likewise. | |
2041 | (replace_args): Likewise. | |
2042 | (tokens_buff_put_token_to): Likewise for param "map". | |
2043 | (tokens_buff_add_token): Likewise. | |
2044 | ||
28f17529 | 2045 | 2015-05-13 David Malcolm <dmalcolm@redhat.com> |
2046 | ||
2047 | * include/line-map.h (source_location): Add a reference to | |
2048 | location-example.txt to the descriptive comment. | |
2049 | * location-example.txt: New file. | |
2050 | ||
aa041196 | 2051 | 2015-05-13 David Malcolm <dmalcolm@redhat.com> |
2052 | ||
2053 | * include/line-map.h (MAX_SOURCE_LOCATION): Convert from a macro | |
2054 | to a const source_location. | |
2055 | (RESERVED_LOCATION_COUNT): Likewise. | |
2056 | (linemap_check_ordinary): Convert from a macro to a pair of inline | |
2057 | functions, for const/non-const arguments. | |
2058 | (MAP_START_LOCATION): Likewise. | |
2059 | (ORDINARY_MAP_STARTING_LINE_NUMBER): Likewise. | |
2060 | (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise. | |
2061 | (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise. | |
2062 | (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Convert from a macro to a | |
2063 | pair of inline functions, for const/non-const arguments, where the | |
2064 | latter is named... | |
2065 | (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): New function. | |
2066 | (ORDINARY_MAP_FILE_NAME): Convert from a macro to a pair of inline | |
2067 | functions, for const/non-const arguments. | |
2068 | (MACRO_MAP_MACRO): Likewise. | |
2069 | (MACRO_MAP_NUM_MACRO_TOKENS): Likewise. | |
2070 | (MACRO_MAP_LOCATIONS): Likewise. | |
2071 | (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise. | |
2072 | (LINEMAPS_MAP_INFO): Likewise. | |
2073 | (LINEMAPS_MAPS): Likewise. | |
2074 | (LINEMAPS_ALLOCATED): Likewise. | |
2075 | (LINEMAPS_USED): Likewise. | |
2076 | (LINEMAPS_CACHE): Likewise. | |
2077 | (LINEMAPS_ORDINARY_CACHE): Likewise. | |
2078 | (LINEMAPS_MACRO_CACHE): Likewise. | |
2079 | (LINEMAPS_MAP_AT): Convert from a macro to an inline function. | |
2080 | (LINEMAPS_LAST_MAP): Likewise. | |
2081 | (LINEMAPS_LAST_ALLOCATED_MAP): Likewise. | |
2082 | (LINEMAPS_ORDINARY_MAPS): Likewise. | |
2083 | (LINEMAPS_ORDINARY_MAP_AT): Likewise. | |
2084 | (LINEMAPS_ORDINARY_ALLOCATED): Likewise. | |
2085 | (LINEMAPS_ORDINARY_USED): Likewise. | |
2086 | (LINEMAPS_LAST_ORDINARY_MAP): Likewise. | |
2087 | (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise. | |
2088 | (LINEMAPS_MACRO_MAPS): Likewise. | |
2089 | (LINEMAPS_MACRO_MAP_AT): Likewise. | |
2090 | (LINEMAPS_MACRO_ALLOCATED): Likewise. | |
2091 | (LINEMAPS_MACRO_USED): Likewise. | |
2092 | (LINEMAPS_MACRO_LOWEST_LOCATION): Likewise. | |
2093 | (LINEMAPS_LAST_MACRO_MAP): Likewise. | |
2094 | (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise. | |
2095 | (IS_ADHOC_LOC): Likewise. | |
2096 | (COMBINE_LOCATION_DATA): Likewise. | |
2097 | (SOURCE_LINE): Likewise. | |
2098 | (SOURCE_COLUMN): Likewise. | |
2099 | (LAST_SOURCE_LINE_LOCATION): Likewise. | |
2100 | (LAST_SOURCE_LINE): Likewise. | |
2101 | (LAST_SOURCE_COLUMN): Likewise. | |
2102 | (LAST_SOURCE_LINE_LOCATION) | |
2103 | (INCLUDED_FROM): Likewise. | |
2104 | (MAIN_FILE_P): Likewise. | |
2105 | (LINEMAP_FILE): Likewise. | |
2106 | (LINEMAP_LINE): Likewise. | |
2107 | (LINEMAP_SYSP): Likewise. | |
2108 | (linemap_location_before_p): Likewise. | |
2109 | * line-map.c (linemap_check_files_exited): Make local "map" const. | |
2110 | (linemap_add): Use SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS. | |
2111 | (linemap_line_start): Likewise. | |
2112 | ||
1a20ca67 | 2113 | 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> |
2114 | ||
2115 | * aclocal.m4: Regenerated with automake-1.11.6. | |
2116 | ||
c43181ff | 2117 | 2015-05-13 David Malcolm <dmalcolm@redhat.com> |
2118 | ||
2119 | * include/line-map.h (linemap_assert): Move up within the file to | |
2120 | before all of the map accessor macros. | |
2121 | (linemap_assert_fails): Likewise. | |
2122 | (linemap_check_ordinary): Likewise. | |
2123 | (linemap_macro_expansion_map_p): Likewise. | |
2124 | ||
e5f01cba | 2125 | 2015-05-12 David Malcolm <dmalcolm@redhat.com> |
2126 | ||
2127 | * directives.c (do_line): Set seen_line_directive on line_table. | |
2128 | (do_linemarker): Likewise. | |
2129 | * include/line-map.h (struct line_maps): Add new field | |
2130 | "seen_line_directive". | |
2131 | ||
1b03cc89 | 2132 | 2015-05-08 Jason Merrill <jason@redhat.com> |
2133 | ||
2134 | * include/cpplib.h: Add CPP_W_CXX11_COMPAT. | |
2135 | (struct cpp_options): Add cpp_warn_cxx11_compat. | |
2136 | * init.c (cpp_create_reader): Initialize it. | |
2137 | * lex.c (lex_string): Add -Wc++11-compat warning. | |
2138 | ||
5c6f6a61 | 2139 | 2015-05-05 David Malcolm <dmalcolm@redhat.com> |
2140 | ||
2141 | * pch.c (cpp_valid_state): Fix indentation so that it reflects the | |
2142 | block structure. | |
2143 | ||
78536ab7 | 2144 | 2015-05-05 David Malcolm <dmalcolm@redhat.com> |
2145 | ||
2146 | * include/line-map.h: Fix comment at the top of the file. | |
2147 | (source_location): Rewrite and expand the comment for this | |
2148 | typedef, adding an ascii-art table to clarify how source_location | |
2149 | values are allocated. | |
2150 | * line-map.c: Fix comment at the top of the file. | |
2151 | ||
2c8df1f3 | 2152 | 2015-04-09 Richard Biener <rguenther@suse.de> |
2153 | ||
2154 | PR pch/65550 | |
2155 | * files.c (pch_open_file): Allow main and pre-included files | |
2156 | when trying to open a PCH. | |
2157 | ||
a0b98841 | 2158 | 2015-04-06 Jakub Jelinek <jakub@redhat.com> |
2159 | ||
2160 | PR preprocessor/61977 | |
2161 | * lex.c (cpp_peek_token): If peektok is CPP_EOF, back it up | |
2162 | with all tokens peeked by the current function. | |
2163 | ||
2b130ae8 | 2164 | 2015-04-02 Jakub Jelinek <jakub@redhat.com> |
2165 | ||
2166 | PR preprocessor/61977 | |
2167 | * lex.c (cpp_peek_token): Temporarily clear pfile->cb.line_change. | |
2168 | ||
640a5806 | 2169 | 2015-03-23 Jakub Jelinek <jakub@redhat.com> |
2170 | ||
2171 | PR preprocessor/65238 | |
2172 | * internal.h (_cpp_scan_out_logical_line): Add third argument. | |
2173 | * directives.c (prepare_directive_trad): Pass false to it. | |
2174 | * traditional.c (_cpp_read_logical_line_trad, | |
2175 | _cpp_create_trad_definition): Likewise. | |
2176 | (struct fun_macro): Add paramc field. | |
2177 | (fun_like_macro): New function. | |
2178 | (maybe_start_funlike): Handle NODE_BUILTIN macros. Initialize | |
2179 | macro->paramc field. | |
2180 | (save_argument): Use macro->paramc instead of | |
2181 | macro->node->value.macro->paramc. | |
2182 | (push_replacement_text): Formatting fix. | |
2183 | (recursive_macro): Use fun_like_macro helper. | |
2184 | (_cpp_scan_out_logical_line): Likewise. Add BUILTIN_MACRO_ARG | |
2185 | argument. Initialize fmacro.paramc field. Handle builtin | |
2186 | function-like macros. | |
2187 | ||
fc753aa0 | 2188 | 2015-03-16 Edward Smith-Rowland <3dw4rd@verizon.net> |
2189 | ||
2190 | PR c++/64626 | |
2191 | * lex.c (lex_number): If a number ends with digit-seps (') skip back | |
2192 | and let lex_string take them. | |
2193 | ||
45e87ca9 | 2194 | 2015-03-02 Markus Trippelsdorf <markus@trippelsdorf.de> |
2195 | ||
2196 | PR target/65261 | |
2197 | * lex.c (search_line_fast): Silence ubsan errors. | |
2198 | ||
825751e2 | 2199 | 2015-02-03 <dodji@redhat.com> |
2200 | ||
2201 | PR preprocessor/64803 | |
2202 | * internal.h (cpp_reader::top_most_macro_node): New data member. | |
2203 | * macro.c (enter_macro_context): Pass the location of the end of | |
2204 | the top-most invocation of the function-like macro, or the | |
2205 | location of the expansion point of the top-most object-like macro. | |
2206 | (cpp_get_token_1): Store the top-most macro node in the new | |
2207 | pfile->top_most_macro_node data member. | |
2208 | (_cpp_pop_context): Clear the new cpp_reader::top_most_macro_node | |
2209 | data member. | |
2210 | ||
c1a66267 | 2211 | 2015-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com> |
2212 | ||
2213 | * lex.c (search_line_fast): Change __ARM_NEON__ to __ARM_NEON. | |
2214 | ||
6ca4fe46 | 2215 | 2015-01-23 Marek Polacek <polacek@redhat.com> |
2216 | ||
2217 | DR#412 | |
2218 | PR preprocessor/60570 | |
2219 | * directives.c (do_elif): Don't evaluate #elif conditionals | |
2220 | when they don't need to be. | |
2221 | ||
e2de5ff7 | 2222 | 2015-01-16 Jakub Jelinek <jakub@redhat.com> |
2223 | ||
2224 | * expr.c (cpp_classify_number): Add N_() around ?: string | |
2225 | literals used in cpp_error_with_line call as format string. | |
2226 | ||
d353bf18 | 2227 | 2015-01-05 Jakub Jelinek <jakub@redhat.com> |
2228 | ||
2229 | Update copyright years. | |
2230 | ||
33058239 | 2231 | 2014-12-19 Jakub Jelinek <jakub@redhat.com> |
2232 | ||
2233 | PR preprocessor/63831 | |
2234 | * directives.c (lex_macro_node): Remove __has_attribute__ handling. | |
2235 | * internal.h (struct spec_node): Remove n__has_attribute__ field. | |
2236 | (struct lexer_state): Remove in__has_attribute__ field. | |
2237 | * macro.c (_cpp_builtin_macro_text): Handle BT_HAS_ATTRIBUTE. | |
2238 | * identifiers.c (_cpp_init_hashtable): Remove __has_attribute__ | |
2239 | handling. | |
2240 | * init.c (builtin_array): Add __has_attribute and __has_cpp_attribute. | |
2241 | (cpp_init_special_builtins): Don't initialize __has_attribute | |
2242 | or __has_cpp_attribute if CLK_ASM or pfile->cb.has_attribute is NULL. | |
2243 | * traditional.c (enum ls): Remove ls_has_attribute, | |
2244 | ls_has_attribute_close. | |
2245 | (_cpp_scan_out_logical_line): Remove __has_attribute__ handling. | |
2246 | * include/cpplib.h (enum cpp_builtin_type): Add BT_HAS_ATTRIBUTE. | |
2247 | * pch.c (cpp_read_state): Remove __has_attribute__ handling. | |
2248 | * expr.c (eval_token): Likewise. | |
2249 | (parse_has_attribute): Removed. | |
2250 | ||
5d95297a | 2251 | 2014-12-11 Uros Bizjak <ubizjak@gmail.com> |
2252 | ||
2253 | * directives.c (cpp_define_formatted): Use xvasprintf. | |
2254 | ||
6d6bdc28 | 2255 | 2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2256 | ||
2257 | * line-map.c (linemap_position_for_loc_and_offset): Add new | |
2258 | linemap_assert_fails. | |
2259 | ||
324da92d | 2260 | 2014-12-02 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2261 | ||
2262 | * include/line-map.h (linemap_assert_fails): Declare. | |
2263 | * line-map.c (linemap_position_for_loc_and_offset): Use it. | |
2264 | ||
351855a5 | 2265 | 2014-12-02 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2266 | ||
71e4c29d | 2267 | * line-map.c (linemap_add): Fix typo. |
2268 | (linemap_line_start): Fix whitespace. | |
351855a5 | 2269 | |
e6260d89 | 2270 | 2014-11-29 John Schmerge <jbschmerge@gmail.com> |
2271 | ||
2272 | PR preprocessor/41698 | |
2273 | * charset.c (one_utf8_to_utf16): Do not produce surrogate pairs | |
2274 | for 0xffff. | |
2275 | ||
1feb1b2d | 2276 | 2014-11-25 Jakub Jelinek <jakub@redhat.com> |
2277 | ||
2278 | PR preprocessor/60436 | |
2279 | * line-map.c (linemap_line_start): If highest is above 0x60000000 | |
2280 | and we are still tracking columns or highest is above 0x70000000, | |
2281 | force add_map. | |
2282 | ||
024db613 | 2283 | 2014-11-20 Uros Bizjak <ubizjak@gmail.com> |
2284 | ||
2285 | PR target/63966 | |
c3e56f20 | 2286 | * lex.c [__i386__ || __x86_64__]: Compile special SSE functions |
2287 | only for (__GNUC__ >= 5 || !defined(__PIC__)). | |
024db613 | 2288 | |
36a4e8f0 | 2289 | 2014-11-13 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2290 | ||
2291 | * include/line-map.h: Include EXPR, so that unused variable warnings | |
2292 | do not occur. | |
2293 | ||
766928aa | 2294 | 2014-11-11 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2295 | ||
2296 | PR fortran/44054 | |
2297 | * include/line-map.h (linemap_position_for_loc_and_offset): | |
2298 | Declare. | |
2299 | * line-map.c (linemap_position_for_loc_and_offset): New. | |
2300 | ||
863e76f9 | 2301 | 2014-11-11 David Malcolm <dmalcolm@redhat.com> |
2302 | ||
2303 | * ChangeLog.jit: New. | |
2304 | ||
3aa2fa44 | 2305 | 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net> |
2306 | ||
2307 | * include/cpplib.h (cpp_callbacks): Add has_attribute. | |
2308 | * internal.h (lexer_state): Add in__has_attribute__. | |
2309 | * directives.c (lex_macro_node): Prevent use of __has_attribute__ | |
2310 | as a macro. | |
2311 | * expr.c (parse_has_attribute): New function; (eval_token): Look for | |
2312 | __has_attribute__ and route to parse_has_attribute. | |
2313 | * identifiers.c (_cpp_init_hashtable): Initialize n__has_attribute__. | |
2314 | * pch.c (cpp_read_state): Initialize n__has_attribute__. | |
2315 | * traditional.c (enum ls): Add ls_has_attribute, ls_has_attribute_close; | |
2316 | (_cpp_scan_out_logical_line): Attend to __has_attribute__. | |
2317 | ||
109ca87a | 2318 | 2014-11-06 Joseph Myers <joseph@codesourcery.com> |
2319 | ||
2320 | * include/cpp-id-data.h (struct cpp_macro): Update comment | |
2321 | regarding parameters. | |
2322 | * include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier): | |
2323 | Add spelling fields. | |
2324 | (struct cpp_token): Update comment on macro_arg. | |
2325 | * internal.h (_cpp_save_parameter): Add extra argument. | |
2326 | (_cpp_spell_ident_ucns): New declaration. | |
2327 | * lex.c (lex_identifier): Add SPELLING argument. Set *SPELLING to | |
2328 | original spelling of identifier. | |
2329 | (_cpp_lex_direct): Update calls to lex_identifier. | |
2330 | (_cpp_spell_ident_ucns): New function, factored out of | |
2331 | cpp_spell_token. | |
2332 | (cpp_spell_token): Adjust FORSTRING argument semantics to return | |
2333 | original spelling of identifiers. Use _cpp_spell_ident_ucns in | |
2334 | !FORSTRING case. | |
2335 | (_cpp_equiv_tokens): Check spellings of identifiers and macro | |
2336 | arguments are identical. | |
2337 | * macro.c (macro_arg_saved_data): New structure. | |
2338 | (paste_tokens): Use original spellings of identifiers from | |
2339 | cpp_spell_token. | |
2340 | (_cpp_save_parameter): Add argument SPELLING. Save both canonical | |
2341 | node and its value. | |
2342 | (parse_params): Update calls to _cpp_save_parameter. | |
2343 | (lex_expansion_token): Save spelling of macro argument tokens. | |
2344 | (_cpp_create_definition): Extract canonical node from saved data. | |
2345 | (cpp_macro_definition): Use UCNs in spelling of macro name. Use | |
2346 | original spellings of macro argument tokens and identifiers. | |
2347 | * traditional.c (scan_parameters): Update call to | |
2348 | _cpp_save_parameter. | |
2349 | ||
95795723 | 2350 | 2014-11-05 Joseph Myers <joseph@codesourcery.com> |
2351 | ||
2352 | PR preprocessor/9449 | |
2353 | * init.c (lang_defaults): Enable extended identifiers for C++ and | |
2354 | C99-based standards. | |
2355 | ||
cc0a8c77 | 2356 | 2014-10-22 Alan Modra <amodra@gmail.com> |
2357 | ||
2358 | * symtab.c (ht_create): Use obstack_specify_allocation in place of | |
2359 | _obstack_begin. | |
2360 | * files.c (_cpp_init_files): Likewise. | |
2361 | * init.c (cpp_create_reader): Likewise. | |
2362 | * identifiers.c (_cpp_init_hashtable): Likewise. | |
2363 | ||
1fcf9669 | 2364 | 2014-10-14 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2365 | ||
2366 | * include/line-map.h (linemap_location_from_macro_expansion_p): | |
2367 | const struct line_maps * argument. | |
2368 | (linemap_position_for_line_and_column): const struct line_map * | |
2369 | argument. | |
2370 | * line-map.c (linemap_add_macro_token): Use correct argument name | |
2371 | in comment. | |
2372 | (linemap_position_for_line_and_column): const struct line_map * | |
2373 | argument. | |
2374 | (linemap_macro_map_loc_to_def_point): Fix comment. Make static. | |
2375 | (linemap_location_from_macro_expansion_p): const struct line_maps * | |
2376 | argument. | |
2377 | (linemap_resolve_location): Fix argument names in comment. | |
2378 | ||
e347736d | 2379 | 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com> |
2380 | ||
2381 | * lex.c (search_line_fast): Add new version to be used for Power8 | |
2382 | and later targets when Altivec is enabled. Restrict the existing | |
2383 | Altivec version to big-endian systems so that lvsr is not used on | |
2384 | little endian, where it is deprecated. Remove LE-specific code | |
2385 | from the now-BE-only version. | |
2386 | ||
3f21cd58 | 2387 | 2014-10-02 Bernd Edlinger <bernd.edlinger@hotmail.de> |
2388 | Jeff Law <law@redhat.com> | |
2389 | ||
2390 | * charset.c (convert_no_conversion): Reallocate memory with 25% | |
2391 | headroom. | |
2392 | ||
f6751ff2 | 2393 | 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net> |
2394 | ||
2395 | Implement SD-6: SG10 Feature Test Recommendations | |
2396 | * internal.h (lexer_state, spec_nodes): Add in__has_include__. | |
2397 | * directives.c: Support __has_include__ builtin. | |
2398 | * expr.c (parse_has_include): New function to parse __has_include__ | |
2399 | builtin; (eval_token()): Use it. | |
2400 | * files.c (_cpp_has_header()): New funtion to look for header; | |
2401 | (open_file_failed()): Not an error to not find a header file for | |
2402 | __has_include__. | |
2403 | * identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__. | |
2404 | * pch.c (cpp_read_state): Lookup __has_include__. | |
2405 | * traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through | |
2406 | __has_include__ statements. | |
2407 | ||
2cb897aa | 2408 | 2014-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de> |
2409 | ||
2410 | PR preprocessor/58893 | |
2411 | * errors.c (cpp_diagnostic): Fix possible out of bounds access. | |
2412 | * files.c (_cpp_stack_include): Initialize src_loc for IT_CMDLINE. | |
2413 | ||
5213d6c9 | 2414 | 2014-09-24 Marek Polacek <polacek@redhat.com> |
2415 | ||
2416 | PR c/61405 | |
2417 | PR c/53874 | |
2418 | * include/cpplib.h (enum cpp_ttype): Define CPP_KEYWORD. | |
2419 | ||
47d6df07 | 2420 | 2014-09-17 Jan Hubicka <hubicka@ucw.cz> |
2421 | ||
2422 | * charset.c (conversion): Rename to ... | |
2423 | (cpp_conversion): ... this one; update. | |
2424 | * files.c (file_hash_entry): Rename to ... | |
2425 | (cpp_file_hash_entry): ... this one ; update. | |
2426 | ||
118b2dc7 | 2427 | 2014-09-17 Marek Polacek <polacek@redhat.com> |
2428 | ||
2429 | PR c/61854 | |
2430 | * init.c (struct lang_flags): Remove cplusplus_comments. | |
2431 | (cpp_set_lang): Likewise. | |
2432 | (post_options): Likewise. | |
2433 | * lex.c (_cpp_lex_direct): Disallow C++ style comments in C90/C94. | |
2434 | ||
bcc1f37e | 2435 | 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2436 | ||
2437 | * include/cpplib.h (struct cpp_options): Declare warn_normalize as | |
2438 | int instead of enum. | |
2439 | ||
04afd878 | 2440 | 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2441 | ||
2442 | * macro.c (replace_args): Use cpp_pedwarning, cpp_warning and | |
2443 | CPP_W flags. | |
2444 | * include/cpplib.h: Add CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC. | |
2445 | * init.c (cpp_create_reader): Do not init to -1 here. | |
2446 | * expr.c (num_binary_op): Use cpp_pedwarning. | |
2447 | ||
f0fbe519 | 2448 | 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2449 | ||
2450 | * directives.c (check_eol_1): New. | |
2451 | (check_eol_endif_labels): New. | |
2452 | (check_eol): Call check_eol_1. | |
2453 | (do_else,do_endif): Call check_eol_endif_labels. | |
2454 | ||
a7d2e480 | 2455 | 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org> |
2456 | ||
2457 | * macro.c (warn_of_redefinition): Suppress warnings for builtins | |
2458 | that lack the NODE_WARN flag, unless Wbuiltin-macro-redefined. | |
2459 | (_cpp_create_definition): Use Wbuiltin-macro-redefined for | |
2460 | builtins that lack the NODE_WARN flag. | |
2461 | * directives.c (do_undef): Likewise. | |
2462 | * init.c (cpp_init_special_builtins): Do not change flags | |
2463 | depending on Wbuiltin-macro-redefined. | |
2464 | ||
2ab4e475 | 2465 | 2014-08-28 Edward Smith-Rowland <3dw4rd@verizon.net> |
2466 | ||
2467 | PR cpp/23827 - standard C++ should not have hex float preprocessor | |
2468 | tokens | |
2469 | * libcpp/init.c (lang_flags): Change CXX98 flag for extended numbers | |
2470 | from 1 to 0. | |
2471 | * libcpp/expr.c (cpp_classify_number): Weite error message for improper | |
2472 | use of hex floating literal. | |
2473 | ||
4e454776 | 2474 | 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net> |
2475 | ||
2476 | * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z; | |
2477 | Rename CLK_GNUCXX1Y, CLK_CXX1Y to CLK_GNUCXX14, CLK_CXX14; | |
2478 | * init.c (struct lang_flags lang_defaults): Add column for trigraphs; | |
2479 | Add rows for CLK_GNUCXX1Z, CLK_CXX1Z; (cpp_set_lang): Set trigraphs; | |
2480 | (cpp_init_builtins): Set __cplusplus to 201402L for C++14; | |
2481 | Set __cplusplus to 201500L for C++17. | |
2482 | * expr.c (cpp_classify_number): Change C++1y to C++14 in binary | |
2483 | constants error message. | |
2484 | ||
4c860a45 | 2485 | 2014-08-20 Marek Polacek <polacek@redhat.com> |
2486 | ||
2487 | * include/cpplib.h (cpp_options): Use signed char. | |
2488 | * lex.c (_cpp_lex_direct): Don't warn in C++ mode. | |
2489 | ||
d87a26d9 | 2490 | 2014-08-19 Marek Polacek <polacek@redhat.com> |
2491 | ||
2492 | * lex.c (_cpp_lex_direct): Fix a typo. | |
2493 | ||
806fe15e | 2494 | 2014-08-19 Marek Polacek <polacek@redhat.com> |
2495 | ||
2496 | * charset.c (_cpp_valid_ucn): Warn only if -Wc90-c99-compat. | |
2497 | * lex.c (_cpp_lex_direct): Likewise. | |
2498 | * macro.c (replace_args): Likewise. | |
2499 | (parse_params): Likewise. | |
2500 | * include/cpplib.h (cpp_options): Change cpp_warn_c90_c99_compat | |
2501 | to char. | |
2502 | ||
890c2e2f | 2503 | 2014-08-10 Marek Polacek <polacek@redhat.com> |
2504 | ||
2505 | PR c/51849 | |
2506 | * lex.c (_cpp_lex_direct): Warn when -Wc90-c99-compat is in effect. | |
2507 | * charset.c (_cpp_valid_ucn): Likewise. | |
2508 | * include/cpplib.h (cpp_options): Add cpp_warn_c90_c99_compat. | |
2509 | * macro.c (replace_args): Warn when -Wc90-c99-compat is in effect. | |
2510 | (parse_params): Likewise. | |
2511 | ||
2e82cf2c | 2512 | 2014-07-27 Marek Polacek <polacek@redhat.com> |
2513 | ||
2514 | PR c/61861 | |
2515 | * macro.c (builtin_macro): Add location parameter. Set | |
2516 | location of builtin macro to the expansion point. | |
2517 | (enter_macro_context): Pass location to builtin_macro. | |
2518 | ||
a4cfdfed | 2519 | 2014-07-16 Dodji Seketeli <dodji@redhat.com> |
2520 | ||
2521 | Support location tracking for built-in macro tokens | |
2522 | * include/line-map.h (line_maps::builtin_location): New data | |
2523 | member. | |
2524 | (line_map_init): Add a new parameter to initialize the new | |
2525 | line_maps::builtin_location data member. | |
2526 | * line-map.c (linemap_init): Initialize the | |
2527 | line_maps::builtin_location data member. | |
2528 | * macro.c (builtin_macro): Create a macro map and track the token | |
2529 | resulting from the expansion of a built-in macro. | |
2530 | ||
49f161b6 | 2531 | 2014-07-10 Edward Smith-Rowland <3dw4rd@verizon.net> |
2532 | Jonathan Wakely <jwakely@redhat.com> | |
2533 | ||
b5905560 | 2534 | PR preprocessor/61389 |
49f161b6 | 2535 | * macro.c (_cpp_arguments_ok, parse_params, create_iso_definition): |
2536 | Warning messages mention C++11 in c++ mode and C99 in c mode. | |
2537 | * lex.c (lex_identifier_intern, lex_identifier): Ditto | |
2538 | ||
8947e5dc | 2539 | 2014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net> |
2540 | ||
2541 | PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped | |
2542 | by preprocessor | |
2543 | * lex.c (lex_raw_string ()): Do not warn about invalid suffix | |
2544 | if skipping. (lex_string ()): Ditto. | |
2545 | ||
649bbfc4 | 2546 | 2014-06-04 Edward Smith-Rowland <3dw4rd@verizon.net> |
2547 | ||
2548 | PR c++/61038 | |
2549 | * macro.c (stringify_arg (cpp_reader *, macro_arg *)): | |
2550 | Combine user-defined escape logic with the other string and char logic. | |
2551 | ||
1c8ad86a | 2552 | 2014-05-26 Richard Biener <rguenther@suse.de> |
2553 | ||
2554 | * configure.ac: Remove long long and __int64 type checks, | |
2555 | add check for uint64_t and fail if that wasn't found. | |
2556 | * include/cpplib.h (cpp_num_part): Use uint64_t. | |
2557 | * config.in: Regenerate. | |
2558 | * configure: Likewise. | |
2559 | ||
0ac81b0e | 2560 | 2014-05-21 Marek Polacek <polacek@redhat.com> |
2561 | ||
2562 | PR c/61212 | |
2563 | * files.c (find_file_in_dir): Add parens around &&. | |
2564 | ||
df271348 | 2565 | 2014-05-20 Edward Smith-Rowland <3dw4rd@verizon.net> |
2566 | ||
0ac81b0e | 2567 | PR c++/61038 |
df271348 | 2568 | * macro.c (stringify_arg (cpp_reader *, macro_arg *)): |
2569 | Check for user-defined literal strings and user-defined literal chars | |
2570 | to escape necessary characters. | |
2571 | ||
a3034794 | 2572 | 2014-05-20 Richard Biener <rguenther@suse.de> |
2573 | ||
2574 | * configure.ac: Copy gcc logic of detecting a 64bit type. | |
2575 | Remove HOST_WIDE_INT define. | |
2576 | * include/cpplib.h: typedef cpp_num_part to a 64bit type, | |
2577 | similar to how hwint.h does it. | |
2578 | * config.in: Regenerate. | |
2579 | * configure: Likewise. | |
2580 | ||
1c9b820a | 2581 | 2014-05-09 Joey Ye <joey.ye@arm.com> |
2582 | ||
2583 | * files.c (find_file_in_dir): Always try to shorten for DOS | |
2584 | non-system headers. | |
2585 | * init.c (ENABLE_CANONICAL_SYSTEM_HEADERS): Default enabled for DOS. | |
2586 | ||
da3c842e | 2587 | 2014-05-07 Richard Biener <rguenther@suse.de> |
2588 | ||
2589 | * configure.ac: Always set need_64bit_hwint to yes. | |
2590 | * configure: Regenerated. | |
2591 | ||
3efb5d22 | 2592 | 2014-04-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
2593 | ||
2594 | * lex.c: Remove Solaris 9 reference. | |
2595 | ||
2da35515 | 2596 | 2014-02-24 Walter Lee <walt@tilera.com> |
2597 | ||
2598 | * configure.ac: Change "tilepro" triplet to "tilepro*". | |
2599 | * configure: Regenerate. | |
2600 | ||
9b48364f | 2601 | 2014-02-19 Jakub Jelinek <jakub@redhat.com> |
2602 | ||
2603 | PR preprocessor/58844 | |
2604 | * macro.c (enter_macro_context): Only push | |
2605 | macro_real_token_count (macro) tokens rather than | |
2606 | macro->count tokens, regardless of | |
2607 | CPP_OPTION (pfile, track-macro-expansion). | |
2608 | ||
6e5a7913 | 2609 | 2014-02-07 Jakub Jelinek <jakub@redhat.com> |
2610 | ||
2611 | PR preprocessor/56824 | |
2612 | * line-map.c (get_combined_adhoc_loc, linemap_get_expansion_line, | |
2613 | linemap_get_expansion_filename, linemap_location_in_system_header_p, | |
2614 | linemap_location_from_macro_expansion_p, | |
2615 | linemap_macro_loc_to_spelling_point, linemap_macro_loc_to_def_point, | |
2616 | linemap_macro_loc_to_exp_point, linemap_expand_location): Fix | |
2617 | formatting. | |
2618 | (linemap_compare_locations): Look through adhoc locations for both | |
2619 | l0 and l1. | |
2620 | ||
ffc2c526 | 2621 | 2014-01-23 Dodji Seketeli <dodji@redhat.com> |
2622 | ||
2623 | PR PR preprocessor/58580 | |
2624 | * include/line-map.h (linemap_get_file_highest_location): Declare | |
2625 | new function. | |
2626 | * line-map.c (linemap_get_file_highest_location): Define it. | |
2627 | ||
806a3d45 | 2628 | 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com> |
2629 | ||
2630 | Update copyright years | |
2631 | ||
e7d8908f | 2632 | 2013-12-09 Joseph Myers <joseph@codesourcery.com> |
2633 | ||
2634 | PR preprocessor/55715 | |
2635 | * expr.c (num_binary_op): Implement subtraction directly rather | |
2636 | than with negation and falling through into addition case. | |
2637 | ||
eb992054 | 2638 | 2013-11-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com> |
2639 | ||
2640 | * lex.c (search_line_fast): Correct for little endian. | |
2641 | ||
460f52aa | 2642 | 2013-11-15 Joseph Myers <joseph@codesourcery.com> |
2643 | ||
2644 | * ucnid.tab: Add C11 and C11NOSTART data. | |
2645 | * makeucnid.c (digit): Rename enum value to N99. | |
2646 | (C11, N11, all_languages): New enum values. | |
2647 | (NUM_CODE_POINTS, MAX_CODE_POINT): New macros. | |
2648 | (flags, decomp, combining_value): Use NUM_CODE_POINTS as array | |
2649 | size. | |
2650 | (decomp): Use unsigned int as element type. | |
2651 | (all_decomp): New array. | |
2652 | (read_ucnid): Handle C11 and C11NOSTART. Use MAX_CODE_POINT. | |
2653 | (read_table): Use MAX_CODE_POINT. Store all decompositions in | |
2654 | all_decomp. | |
2655 | (read_derived): Use MAX_CODE_POINT. | |
2656 | (write_table): Use NUM_CODE_POINTS. Print N99, C11 and N11 | |
2657 | flags. Print whole array variable declaration rather than just | |
2658 | array contents. | |
2659 | (char_id_valid, write_context_switch): New functions. | |
2660 | (main): Call write_context_switch. | |
2661 | * ucnid.h: Regenerate. | |
2662 | * include/cpplib.h (struct cpp_options): Add c11_identifiers. | |
2663 | * init.c (struct lang_flags): Add c11_identifiers. | |
2664 | (cpp_set_lang): Set c11_identifiers option from selected language. | |
2665 | * internal.h (struct normalize_state): Document "previous" as | |
2666 | previous starter character. | |
2667 | (NORMALIZE_STATE_UPDATE_IDNUM): Take character as argument. | |
2668 | * charset.c (DIG): Rename enum value to N99. | |
2669 | (C11, N11): New enum values. | |
2670 | (struct ucnrange): Give name to struct. Use short for flags and | |
2671 | unsigned int for end of range. Include ucnid.h for whole variable | |
2672 | declaration. | |
2673 | (ucn_valid_in_identifier): Allow for characters up to 0x10FFFF. | |
2674 | Allow for C11 in determining valid characters and valid start | |
2675 | characters. Use check_nfc for non-Hangul context-dependent | |
2676 | checks. Only store starter characters in nst->previous. | |
2677 | (_cpp_valid_ucn): Pass new argument to | |
2678 | NORMALIZE_STATE_UPDATE_IDNUM. | |
2679 | * lex.c (lex_identifier): Pass new argument to | |
2680 | NORMALIZE_STATE_UPDATE_IDNUM. Call NORMALIZE_STATE_UPDATE_IDNUM | |
2681 | after initial non-UCN part of identifier. | |
2682 | (lex_number): Pass new argument to NORMALIZE_STATE_UPDATE_IDNUM. | |
2683 | ||
ceaeebbe | 2684 | 2013-11-15 Joseph Myers <joseph@codesourcery.com> |
2685 | ||
2686 | * ucnid.tab: Mark C99 digits as [C99DIG]. | |
2687 | * makeucnid.c (read_ucnid): Handle [C99DIG]. | |
2688 | (read_table): Don't check for digit characters. | |
2689 | * ucnid.h: Regenerate. | |
2690 | ||
5b1a0622 | 2691 | 2013-11-06 Tobias Burnus <burnus@net-b.de> |
2692 | ||
2693 | * macro.c (_cpp_builtin_macro_text): Correct | |
2694 | wording of two warnings. | |
2695 | ||
9148bda3 | 2696 | 2013-11-05 Tobias Burnus <burnus@net-b.de> |
2697 | ||
2698 | * include/cpplib.h (CPP_W_DATE_TIME): Added. | |
2699 | (cpp_options): Add warn_date_time. | |
2700 | * init.c (cpp_create_reader): Init it. | |
2701 | * macro.c (_cpp_builtin_macro_text): Warn when | |
2702 | __DATE__/__TIME__/__TIMESTAMP__ is used. | |
2703 | ||
4d6f7dd4 | 2704 | 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net> |
2705 | ||
9148bda3 | 2706 | Implement C++14 digit separators. |
4d6f7dd4 | 2707 | * include/cpplib.h (cpp_options): Add digit_separators flag. |
2708 | * internal.h (DIGIT_SEP(c)): New macro. | |
2709 | * expr.c (cpp_classify_number): Check improper placement of digit sep; | |
2710 | (cpp_interpret_integer): Skip over digit separators. | |
2711 | * init.c (lang_flags): Add digit_separators flag; (lang_defaults): Add | |
2712 | digit separator flags per language; (cpp_set_lang): Set | |
2713 | digit_separators | |
2714 | * lex.c (lex_number): Add digits separator to allowable characters for | |
2715 | C++14. | |
2716 | ||
2bd17377 | 2717 | 2013-10-15 David Malcolm <dmalcolm@redhat.com> |
2718 | ||
2719 | * Makefile.in (PICFLAG): New. | |
2720 | (ALL_CFLAGS): Add PICFLAG. | |
2721 | (ALL_CXXFLAGS): Likewise. | |
2722 | * configure.ac: Add --enable-host-shared, setting up new | |
2723 | PICFLAG variable. | |
2724 | * configure: Regenerate. | |
2725 | ||
97d17efa | 2726 | 2013-08-07 Richard Earnshaw <rearnsha@arm.com> |
2727 | ||
2728 | * configure.ac: Set need_64bit_hwint for all arm targets. | |
2729 | * configure: Regenerated. | |
2730 | ||
ffb840b4 | 2731 | 2013-07-20 Jakub Jelinek <jakub@redhat.com> |
2732 | ||
2733 | PR preprocessor/57620 | |
2734 | * lex.c (lex_raw_string): Undo phase1 and phase2 transformations | |
2735 | between R" and final " rather than only in between R"del( and )del". | |
2736 | ||
bd285415 | 2737 | 2013-07-10 Jakub Jelinek <jakub@redhat.com> |
2738 | ||
c7691e08 | 2739 | PR preprocessor/57824 |
2740 | * lex.c (lex_raw_string): Allow reading new-lines if | |
2741 | in_deferred_pragma or if parsing_args and there is still | |
2742 | data in the current buffer. | |
2743 | ||
da31536d | 2744 | * include/cpplib.h (cpp_token_val_index): Change parameter type to |
2745 | const cpp_token *. | |
2746 | * lex.c (cpp_token_val_index): Likewise. | |
2747 | ||
bd285415 | 2748 | PR preprocessor/57757 |
2749 | * lex.c (cpp_avoid_paste): Avoid pasting CPP_{,W,UTF8}STRING | |
2750 | or CPP_STRING{16,32} with CPP_NAME or SPELL_LITERAL token that | |
2751 | starts if a-zA-Z_. | |
2752 | ||
4e8832f3 | 2753 | 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net> |
2754 | ||
2755 | * lex.c (lex_raw_string(), lex_string()): Constrain suffixes treated | |
2756 | as concatenated literal and macro to just the patterns found in | |
2757 | inttypes.h; (is_macro()): New. | |
2758 | ||
5bd48b2e | 2759 | 2013-06-24 Dehao Chen <dehao@google.com> |
2760 | ||
2761 | * files.c (_cpp_stack_include): Fix the highest_location when header | |
2762 | file is guarded by #ifndef and is included twice. | |
2763 | ||
d8c8614f | 2764 | 2013-04-28 Jakub Jelinek <jakub@redhat.com> |
2765 | ||
2766 | N3472 binary constants | |
2767 | * include/cpplib.h (struct cpp_options): Fix a typo in user_literals | |
2768 | field comment. Add binary_constants field. | |
2769 | * init.c (struct lang_flags): Add binary_constants field. | |
2770 | (lang_defaults): Add bin_cst column to the table. | |
2771 | (cpp_set_lang): Initialize CPP_OPTION (pfile, binary_constants). | |
2772 | * expr.c (cpp_classify_number): Talk about C++11 instead of C++0x | |
2773 | in diagnostics. Accept binary constants if | |
2774 | CPP_OPTION (pfile, binary_constants) even when pedantic. Adjust | |
2775 | pedwarn message. | |
2776 | ||
1638c736 | 2777 | 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> |
2778 | ||
2779 | * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Y and CLK_CXX1Y. | |
2780 | * init.c (lang_defaults): Add defaults for the latter. | |
2781 | (cpp_init_builtins): Define __cplusplus as 201300L for the latter. | |
2782 | * lex.c (_cpp_lex_direct): Update. | |
2783 | ||
0ca702f2 | 2784 | 2013-04-03 Sebastian Huber <sebastian.huber@embedded-brains.de> |
2785 | ||
2786 | PR target/56771 | |
2787 | * configure.ac: Require 64-bit int for arm*-*-rtems*. | |
2788 | * configure: Regenerate. | |
2789 | ||
914db4b7 | 2790 | 2013-03-06 Jakub Jelinek <jakub@redhat.com> |
2791 | ||
2792 | PR middle-end/56461 | |
2793 | * internal.h (struct cpp_buffer): Add to_free field. | |
2794 | (_cpp_pop_file_buffer): Add third argument. | |
2795 | * files.c (_cpp_stack_file): Set buffer->to_free. | |
2796 | (_cpp_pop_file_buffer): Add to_free argument. Free to_free | |
2797 | if non-NULL, and if equal to file->buffer_start, also clear | |
2798 | file->buffer{,_start,_valid}. | |
2799 | * directives.c (_cpp_pop_buffer): Pass buffer->to_free | |
2800 | to _cpp_pop_file_buffer. | |
2801 | ||
39bcf299 | 2802 | 2013-03-01 Jakub Jelinek <jakub@redhat.com> |
2803 | ||
2804 | PR middle-end/56461 | |
2805 | * files.c (_cpp_save_file_entries): Free result at the end. | |
2806 | * pch.c (cpp_string_free): New function. | |
2807 | (cpp_save_state): Use it in htab_create call. | |
2808 | (cpp_write_pch_deps): Free ss->defs. Destroy ss->definedhash. | |
2809 | ||
61ed1f10 | 2810 | 2013-02-28 Jakub Jelinek <jakub@redhat.com> |
2811 | ||
cde9343a | 2812 | * files.c (_cpp_find_file): If returning early, before storing |
2813 | something to *hash_slot and *hash_slot is NULL, call htab_clear_slot | |
2814 | on it. Access *hash_slot using void * type rather than | |
2815 | struct file_hash_entry * to avoid aliasing issues. | |
2816 | ||
61ed1f10 | 2817 | * configure.ac: Don't define ENABLE_CHECKING whenever |
2818 | --enable-checking is seen, instead use similar --enable-checking=yes | |
2819 | vs. --enable-checking=release default as gcc/ subdir has and | |
2820 | define ENABLE_CHECKING if ENABLE_CHECKING is defined in gcc/. | |
2821 | Define ENABLE_VALGRIND_CHECKING if requested. | |
2822 | * lex.c (new_buff): If ENABLE_VALGRIND_CHECKING, put _cpp_buff | |
2823 | struct first in the allocated buffer and result->base after it. | |
2824 | (_cpp_free_buff): If ENABLE_VALGRIND_CHECKING, free buff itself | |
2825 | instead of buff->base. | |
2826 | * config.in: Regenerated. | |
2827 | * configure: Regenerated. | |
2828 | ||
911b08c6 | 2829 | 2013-02-13 Ed Smith-Rowland <3dw4rd@verizon.net> |
2830 | ||
2831 | PR c++/55582 | |
1638c736 | 2832 | * lex.c (lex_raw_string): Allow string literal with suffix |
911b08c6 | 2833 | beginning with 's' to be parsed as a C++11 user-defined literal. |
2834 | ||
cec7bb47 | 2835 | 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com> |
2836 | ||
2837 | Update copyright years. | |
2838 | ||
1aa79d39 | 2839 | 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com> |
2840 | ||
2841 | PR c++/54526 (again) | |
2842 | * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2. | |
2843 | ||
de2e6b8a | 2844 | 2013-01-03 Marc Glisse <marc.glisse@inria.fr> |
2845 | ||
2846 | PR bootstrap/50177 | |
2847 | * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type. | |
2848 | (new_linemap): Likewise. | |
2849 | (linemap_enter_macro): Likewise. | |
2850 | ||
8e1d1b0c | 2851 | 2012-12-03 Jakub Jelinek <jakub@redhat.com> |
2852 | ||
2853 | PR bootstrap/55380 | |
2854 | PR other/54691 | |
2855 | * files.c (read_file_guts): Allocate extra 16 bytes instead of | |
2856 | 1 byte at the end of buf. Pass size + 16 instead of size | |
2857 | to _cpp_convert_input. | |
2858 | * charset.c (_cpp_convert_input): Reallocate if there aren't | |
2859 | at least 16 bytes beyond to.len in the buffer. Clear 16 bytes | |
2860 | at to.text + to.len. | |
2861 | ||
8ad1eb94 | 2862 | 2012-11-21 Steve Ellcey <sellcey@mips.com> |
2863 | ||
2864 | PR pch/55399 | |
2865 | * files.c (pch_open_file): Fix check for implicit_preinclude. | |
2866 | ||
52bc861d | 2867 | 2012-11-16 Simon Baldwin <simonb@google.com> |
2868 | ||
2869 | * include/cpplib.h (struct cpp_options): Add canonical_system_headers. | |
2870 | * files.c (find_file_in_dir): Call maybe_shorter_path() only if | |
2871 | canonical_system_headers is set. | |
2872 | * init.c (cpp_create_reader): Initialize canonical_system_headers. | |
2873 | * configure.ac: Add new --enable-canonical-system-headers. | |
2874 | * configure: Regenerate. | |
2875 | * config.in: Regenerate. | |
2876 | ||
2dd00636 | 2877 | 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net> |
2878 | ||
2879 | PR c++/54413 | |
2880 | * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg. | |
2881 | (cpp_interpret_int_suffix): Add cpp_reader* arg. | |
2882 | * init.c (cpp_create_reader): Iitialize new flags. | |
2883 | * expr.c (interpret_float_suffix): Use new flags. | |
2884 | (cpp_interpret_float_suffix): Add cpp_reader* arg. | |
2885 | (interpret_int_suffix): Use new flags. | |
2886 | (cpp_interpret_int_suffix): Add cpp_reader* arg. | |
2887 | (cpp_classify_number): Adjust calls to interpret_x_suffix. | |
2888 | ||
5b1d5fe6 | 2889 | 2012-10-23 Ian Bolton <ian.bolton@arm.com> |
2890 | Jim MacArthur <jim.macarthur@arm.com> | |
2891 | Marcus Shawcroft <marcus.shawcroft@arm.com> | |
2892 | Nigel Stephens <nigel.stephens@arm.com> | |
2893 | Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> | |
2894 | Richard Earnshaw <rearnsha@arm.com> | |
2895 | Sofiane Naci <sofiane.naci@arm.com> | |
2896 | Stephen Thomas <stephen.thomas@arm.com> | |
2897 | Tejas Belagod <tejas.belagod@arm.com> | |
2898 | Yufeng Zhang <yufeng.zhang@arm.com> | |
2899 | ||
2900 | * configure.ac: Enable AArch64. | |
2901 | * configure: Regenerate. | |
2902 | ||
6adc88f8 | 2903 | 2012-10-23 Joseph Myers <joseph@codesourcery.com> |
2904 | ||
2905 | * files.c (struct _cpp_file): Add implicit_preinclude. | |
2906 | (pch_open_file): Allow a previously opened implicitly included | |
2907 | file. | |
2908 | (_cpp_find_file): Add implicit_preinclude argument. Free file and | |
2909 | do not call open_file_failed if implicit_preinclude. Store | |
2910 | implicit_preinclude value. | |
2911 | (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date): | |
2912 | Update calls to _cpp_find_file. | |
2913 | (_cpp_stack_include): Handle IT_DEFAULT. | |
2914 | (cpp_push_default_include): New. | |
2915 | * include/cpplib.h (cpp_push_default_include): Declare. | |
2916 | * init.c (cpp_read_main_file): Update call to _cpp_find_file. | |
2917 | * internal.h (enum include_type): Add IT_DEFAULT. | |
2918 | (_cpp_find_file): Update prototype. | |
2919 | ||
15fc692a | 2920 | 2012-10-15 Tobias Burnus <burnus@net-b.de> |
2921 | ||
2922 | * files.c (read_file_guts, _cpp_save_file_entries): Free memory | |
2923 | before returning. | |
2924 | * lex.c (warn_about_normalization): Ditto. | |
2925 | * mkdeps.c (deps_save): Ditto. | |
2926 | * pch.c (cpp_valid_state): Ditto. | |
2927 | ||
a1f1781a | 2928 | 2012-10-04 Florian Weimer <fweimer@redhat.com> |
2929 | ||
2930 | * directives.c (do_pragma_warning_or_error): New. | |
2931 | (do_pragma_warning): New. | |
2932 | (do_pragma_error): New. | |
2933 | (_cpp_init_internal_pragmas): Register new pragmas. | |
2934 | ||
bda16c7c | 2935 | 2012-09-25 Dehao Chen <dehao@google.com> |
2936 | ||
2937 | PR middle-end/54704 | |
2938 | * line-map.c (location_adhoc_data_hash): Fix the hash function. | |
2939 | ||
5c1946c8 | 2940 | 2012-09-25 Dehao Chen <dehao@google.com> |
2941 | ||
2942 | PR middle-end/54645 | |
2943 | * include/line-map.h (location_adhoc_data): Move location_adhoc_data | |
2944 | into GC. | |
2945 | (location_adhoc_data_map): Likewise. | |
2946 | (line_maps): Likewise. | |
2947 | (rebuild_location_adhoc_htab): New Function. | |
2948 | * line-map.c (+rebuild_location_adhoc_htab): new Funcion. | |
2949 | (get_combined_adhoc_loc): Move location_adhoc_data into GC. | |
2950 | (location_adhoc_data_fini): Likewise. | |
2951 | (linemap_init): Likewise. | |
2952 | (location_adhoc_data_init): Remove Function. | |
2953 | ||
5169661d | 2954 | 2012-09-19 Dehao Chen <dehao@google.com> |
2955 | ||
2956 | * include/line-map.h (MAX_SOURCE_LOCATION): New value. | |
2957 | (location_adhoc_data_fini): New. | |
2958 | (get_combined_adhoc_loc): New. | |
2959 | (get_data_from_adhoc_loc): New. | |
2960 | (get_location_from_adhoc_loc): New. | |
2961 | (location_adhoc_data_map): New. | |
2962 | (COMBINE_LOCATION_DATA): New. | |
2963 | (IS_ADHOC_LOC): New. | |
2964 | (expanded_location): New field. | |
2965 | (line_maps): New field. | |
2966 | * line-map.c (location_adhoc_data): New. | |
2967 | (location_adhoc_data_hash): New. | |
2968 | (location_adhoc_data_eq): New. | |
2969 | (location_adhoc_data_update): New. | |
2970 | (get_combined_adhoc_loc): New. | |
2971 | (get_data_from_adhoc_loc): New. | |
2972 | (get_location_from_adhoc_loc): New. | |
2973 | (location_adhoc_data_init): New. | |
2974 | (location_adhoc_data_fini): New. | |
2975 | (linemap_init): Initialize location_adhoc_data. | |
2976 | (linemap_lookup): Change to use new location. | |
2977 | (linemap_ordinary_map_lookup): Likewise. | |
2978 | (linemap_macro_map_lookup): Likewise. | |
2979 | (linemap_macro_map_loc_to_def_point): Likewise. | |
2980 | (linemap_macro_map_loc_unwind_toward_spel): Likewise. | |
2981 | (linemap_get_expansion_line): Likewise. | |
2982 | (linemap_get_expansion_filename): Likewise. | |
2983 | (linemap_location_in_system_header_p): Likewise. | |
2984 | (linemap_location_from_macro_expansion_p): Likewise. | |
2985 | (linemap_macro_loc_to_spelling_point): Likewise. | |
2986 | (linemap_macro_loc_to_def_point): Likewise. | |
2987 | (linemap_macro_loc_to_exp_point): Likewise. | |
2988 | (linemap_resolve_location): Likewise. | |
2989 | (linemap_unwind_toward_expansion): Likewise. | |
2990 | (linemap_unwind_to_first_non_reserved_loc): Likewise. | |
2991 | (linemap_expand_location): Likewise. | |
2992 | (linemap_dump_location): Likewise. | |
2993 | (linemap_line_start): Likewise. | |
2994 | ||
307df3d0 | 2995 | 2012-05-25 Dodji Seketeli <dodji@redhat.com> |
2996 | ||
2997 | PR preprocessor/53469 | |
2998 | * directives.c (do_pragma): Use the virtual location for the | |
2999 | pragma token, instead of its spelling location. | |
3000 | ||
2b15d2ba | 3001 | 2012-08-14 Diego Novillo <dnovillo@google.com> |
3002 | ||
3003 | Merge from cxx-conversion branch. Configury. | |
3004 | ||
3005 | * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX. | |
3006 | * configure.ac: Likewise. | |
3007 | * configure: Regenerate. | |
3008 | ||
3009 | 2012-08-14 Lawrence Crowl <crowl@google.com> | |
3010 | ||
3011 | Merge from cxx-conversion branch. New C++ hash table. | |
3012 | ||
3013 | * include/symtab.h (typedef struct ht hash_table): Change the typedef | |
3014 | name to cpp_hash_table. Update all users of the typedef. | |
3015 | ||
65f4cf9c | 3016 | 2012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com> |
3017 | ||
3018 | * include/line-map.h (line_map_macro): Use the "atomic" GTY option | |
3019 | for the macro_locations field. | |
3020 | ||
112f073c | 3021 | 2011-06-19 Uros Bizjak <ubizjak@gmail.com> |
3022 | ||
3023 | * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and | |
3024 | __builtin_ia32_pcmpestri128 instead of asm. | |
3025 | ||
c8dda42f | 3026 | 2012-06-04 Dimitrios Apostolou <jimis@gmx.net> |
3027 | ||
3028 | * line-map.c (linemap_enter_macro): Don't zero max_column_hint in | |
3029 | every macro. This improves performance by reducing the number of | |
3030 | reallocations when track-macro-expansion is on. | |
3031 | ||
0aa42a53 | 3032 | 2012-06-04 Dodji Seketeli <dodji@redhat.com> |
3033 | ||
3034 | PR preprocessor/53463 | |
3035 | * line-map.c (linemap_location_in_system_header_p): For built-in | |
3036 | macro tokens, check the first expansion point location that is not | |
3037 | for a token coming from a built-in macro. | |
3038 | ||
e8aa7eaf | 3039 | 2012-05-29 Joseph Myers <joseph@codesourcery.com> |
3040 | ||
3041 | * directives.c: Fix typos. | |
3042 | * include/line-map.h: Fix typos. | |
3043 | * line-map.c: Fix typos. | |
3044 | * macro.c: Fix typos. | |
3045 | ||
5fe44548 | 3046 | 2012-05-25 Dodji Seketeli <dodji@redhat.com> |
3047 | ||
3048 | PR bootstrap/53459 | |
3049 | * lex.c (search_line_fast): Avoid unused local typedefs to simulate | |
3050 | a static assertion. | |
3051 | ||
8c6425eb | 3052 | 2012-05-29 Dodji Seketeli <dodji@redhat.com> |
3053 | ||
3054 | PR preprocessor/53229 | |
3055 | * internal.h (cpp_reader::set_invocation_location): Remove. | |
3056 | (cpp_reader::about_to_expand_macro_p): New member flag. | |
3057 | * directives.c (do_pragma): Remove Kludge as | |
3058 | pfile->set_invocation_location is no more. | |
3059 | * macro.c (cpp_get_token_1): Do away with the use of | |
3060 | cpp_reader::set_invocation_location. Just collect the macro | |
3061 | expansion point when we are about to expand the top-most macro. | |
3062 | Do not override cpp_reader::about_to_expand_macro_p. | |
3063 | This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding | |
3064 | properly handle locations of expansion points. | |
3065 | (cpp_get_token_with_location): Adjust, as | |
3066 | cpp_reader::set_invocation_location is no more. | |
3067 | (paste_tokens): Take a virtual location parameter for | |
3068 | the LHS of the pasting operator. Use it in diagnostics. Update | |
3069 | comments. | |
3070 | (paste_all_tokens): Tighten the assert. Propagate the location of | |
3071 | the expansion point when no virtual locations are available. | |
3072 | Pass the virtual location to paste_tokens. | |
3073 | (in_macro_expansion_p): New static function. | |
3074 | (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p | |
3075 | flag until we really start expanding the macro. | |
3076 | ||
a60f3e81 | 3077 | 2012-05-16 Dodji Seketeli <dodji@redhat.com> |
3078 | ||
3079 | PR preprocessor/7263 | |
3080 | * include/cpplib.h (cpp_classify_number): Take a location | |
3081 | parameter. | |
3082 | * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic | |
3083 | macros that take a location parameter. | |
3084 | (cpp_classify_number): Take a (virtual) location parameter. Use | |
3085 | it for diagnostics. Adjust comments. | |
3086 | (eval_token): Take a location parameter. Pass it to | |
3087 | cpp_classify_number and to diagnostic routines. | |
3088 | (_cpp_parse_expr): Use virtual locations of tokens when parsing | |
3089 | expressions. Pass a virtual location to eval_token and to | |
3090 | diagnostic routines. | |
3091 | ||
3069d7f8 | 3092 | 2012-05-10 Tristan Gingold <gingold@adacore.com> |
3093 | ||
3094 | * expr.c (interpret_float_suffix): Add a guard. | |
3095 | ||
6cfa7465 | 3096 | 2012-05-02 Dodji Seketeli <dodji@redhat.com> |
3097 | ||
3098 | Properly initialize cpp_context in destringize_and_run | |
3099 | * directives.c (destringize_and_run): Properly initialize the new | |
3100 | context. | |
3101 | * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop | |
3102 | the initial base context, which has the same life time as the | |
3103 | current instance of cpp_file. | |
3104 | ||
47b6a3fe | 3105 | 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org> |
3106 | Dodji Seketeli <dodji@seketeli.org> | |
3107 | ||
ffca20e9 | 3108 | PR c++/52974 |
47b6a3fe | 3109 | * libcpp/files.c (maybe_shorter_path): New. |
3110 | (find_file_in_dir): Use it. | |
3111 | ||
d16f4f47 | 3112 | 2012-04-30 Dodji Seketeli <dodji@redhat.com> |
3113 | ||
611f1003 | 3114 | Switch -ftrack-macro-expansion=2 on by default. |
3115 | * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on | |
3116 | by default. Add comments. | |
3117 | ||
bd172d61 | 3118 | Strip "<built-in>" loc from displayed expansion context |
3119 | * include/line-map.h (linemap_unwind_toward_expansion): Fix typo | |
3120 | in comment. | |
3121 | (linemap_unwind_to_first_non_reserved_loc): Declare new function. | |
3122 | * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define | |
3123 | new function. | |
3124 | ||
00abfdc0 | 3125 | Fix expansion point loc for macro-like tokens |
3126 | * macro.c (macro_of_context): New static function. | |
3127 | (_cpp_push_token_context, push_extended_tokens_context): If the | |
3128 | macro argument is NULL, it means we are continuing the expansion | |
3129 | of the current macro, if any. Update comments. | |
3130 | (_cpp_pop_context): Re-enable expansion of the macro only when we | |
3131 | are really out of the context of the current expansion. | |
3132 | ||
c55700de | 3133 | Fix token pasting with -ftrack-macro-expansion |
3134 | * macro.c (paste_all_tokens): Put the token resulting from pasting | |
3135 | into an extended token context with -ftrack-macro-location is in | |
3136 | effect. | |
3137 | ||
d16f4f47 | 3138 | Fix cpp_sys_macro_p with -ftrack-macro-expansion |
3139 | * macro.c (cpp_sys_macro_p): Support -ftrack-macro-expansion. | |
3140 | ||
86c82b61 | 3141 | 2012-04-29 Dodji Seketeli <dodji@redhat.com> |
3142 | ||
3143 | * lex.c (lex_raw_string): Change C++ style comments into C style | |
3144 | comments. | |
cc0a8c77 | 3145 | (lex_string): Likewise. |
86c82b61 | 3146 | |
76d340ac | 3147 | 2012-04-27 Ollie Wild <aaw@google.com> |
3148 | ||
3149 | * include/cpplib.h (struct cpp_options): Add new field, | |
3150 | warn_literal_suffix. | |
3151 | (CPP_W_LITERAL_SUFFIX): New enum. | |
3152 | * init.c (cpp_create_reader): Default initialization of | |
3153 | warn_literal_suffix. | |
3154 | * lex.c (lex_raw_string): Treat user-defined literals which don't | |
3155 | begin with '_' as separate tokens and produce a warning. | |
3156 | (lex_string): Ditto. | |
3157 | ||
3f898bd2 | 3158 | 2012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org> |
3159 | ||
3160 | * line-map.c (linemap_resolve_location): Synchronize comments with | |
3161 | those in line-map.h. | |
3162 | * include/line-map.h (linemap_resolve_location): Fix spelling in | |
3163 | comment. | |
3164 | ||
c434932e | 3165 | 2012-03-22 Richard Earnshaw <rearnsha@arm.com> |
3166 | ||
3167 | * lex.c (search_line_fast): Provide Neon-optimized version for ARM. | |
3168 | ||
264a5d11 | 3169 | 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
3170 | ||
3171 | * lex.c: Remove Solaris 8 reference. | |
3172 | ||
7ce78e23 | 3173 | 2012-02-14 Walter Lee <walt@tilera.com> |
3174 | ||
3175 | * configure.ac: Require 64-bit hwint for tilegx and tilepro. | |
3176 | * configure: Regenerate. | |
3177 | ||
d6fb6576 | 3178 | 2012-01-09 Richard Guenther <rguenther@suse.de> |
3179 | ||
3180 | * macro.c (_cpp_builtin_macro_text): Remove unused variable map. | |
3181 | ||
5e791406 | 3182 | 2012-01-09 Gary Funck <gary@intrepid.com> |
3183 | ||
3184 | PR preprocessor/33919 | |
3185 | * files.c (_cpp_get_file_name): New. Implement file name | |
3186 | access function. | |
3187 | * internal.h (_cpp_get_file_name): New prototype. | |
3188 | * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name() | |
3189 | to use pfile->main_file in lieu of traversing INCLUDED_FROM chain. | |
3190 | ||
131e69c7 | 3191 | 2012-01-03 Olivier Hainque <hainque@adacore.com> |
3192 | ||
3193 | * system.h: Prior to #define, #undef fopen and freopen unconditionally. | |
3194 | ||
32074525 | 3195 | 2011-12-20 Joseph Myers <joseph@codesourcery.com> |
3196 | ||
3197 | * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11. | |
3198 | (CLK_STDC1X): Change to CLK_STDC11. | |
3199 | * init.c (lang_defaults): Update comments. | |
3200 | (cpp_init_builtins): Update language tests. Use 201112L for C11 | |
3201 | __STDC_VERSION__. | |
3202 | ||
80cfebdb | 3203 | 2011-12-20 Andreas Schwab <schwab@linux-m68k.org> |
3204 | ||
3205 | * configure: Regenerate. | |
3206 | ||
705de1ef | 3207 | 2011-12-19 Andreas Schwab <schwab@linux-m68k.org> |
3208 | ||
3209 | * configure: Regenerate. | |
3210 | ||
b735cc56 | 3211 | 2011-12-07 Jakub Jelinek <jakub@redhat.com> |
3212 | ||
3213 | PR bootstrap/50237 | |
3214 | * internal.h (_cpp_init_lexer): New prototype. | |
3215 | * init.c (init_library): Call it. | |
3216 | * lex.c (init_vectorized_lexer): Remove constructor attribute, | |
3217 | add inline keyword. | |
3218 | (HAVE_init_vectorized_lexer): Define. | |
3219 | (_cpp_init_lexer): New function. | |
3220 | ||
80e34234 | 3221 | 2011-12-03 Dodji Seketeli <dodji@redhat.com> |
3222 | ||
3223 | * macro.c (tokens_buff_remove_last_token) | |
3224 | (tokens_buff_put_token_to): Add an 'inline' function specifier to | |
3225 | the prototype. | |
3226 | ||
b082215e | 3227 | 2011-11-22 Diego Novillo <dnovillo@google.com> |
3228 | ||
3229 | * include/line-map.h (linemap_dump): Declare. | |
3230 | (line_table_dump): Declare. | |
3231 | * line-map.c (linemap_dump): New. | |
3232 | (line_table_dump): New. | |
3233 | ||
b06c89b6 | 3234 | 2011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net> |
3235 | ||
3236 | PR c++/50958 | |
3237 | * expr.c (cpp_userdef_char_remove_type): Fix typo. | |
3238 | ||
7c801b60 | 3239 | 2011-11-03 Michael Matz <matz@suse.de> |
3240 | ||
3241 | PR bootstrap/50857 | |
3242 | * configure.ac: Check for -fno-exceptions -fno-rtti. | |
3243 | * configure: Regenerate. | |
3244 | * Makefile.in (NOEXCEPTION_FLAGS): New flag. | |
3245 | (ALL_CXXFLAGS): Use it. | |
3246 | ||
d8954404 | 3247 | 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com> |
3248 | ||
3249 | * internal.h (uxstrdup, ustrchr): Return const unsigned char *. | |
3250 | ||
7e783eb3 | 3251 | 2011-11-02 Jason Merrill <jason@redhat.com> |
3252 | ||
3253 | PR c++/50810 | |
3254 | * configure.ac: Add -Wno-narrowing to warning options. | |
3255 | ||
0d84dc2d | 3256 | 2011-10-31 Jason Merrill <jason@redhat.com> |
3257 | ||
de803ff2 | 3258 | PR libstdc++/1773 |
3259 | * init.c (cpp_init_builtins): Set __cplusplus for C++11. | |
3260 | ||
0d84dc2d | 3261 | PR c++/50920 |
3262 | * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11, | |
3263 | CLK_GNUCXX0X to CLK_GNUCXX11. | |
3264 | ||
244db24d | 3265 | 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net> |
3266 | ||
3267 | Implement C++11 user-defined literals. | |
3268 | * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix, | |
3269 | cpp_userdef_string_remove_type, cpp_userdef_string_add_type, | |
3270 | cpp_userdef_char_remove_type, cpp_userdef_char_add_type, | |
3271 | cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New. | |
3272 | (cpp_classify_number): Classify unrecognized tokens as user-defined | |
3273 | literals. | |
3274 | * include/cpplib.h: Add new tokens for user-defined literals. | |
3275 | * init.c: Add new preprocessor flag (cxx11). | |
3276 | * lex.c: (lex_string, lex_raw_string): Handle user-defined literals | |
3277 | including concatenation and promotion with suffixes. | |
3278 | ||
68928989 | 3279 | 2011-10-24 Dodji Seketeli <dodji@redhat.com> |
3280 | ||
3281 | * line-map.c (linemap_macro_map_lookup): Fix logic. | |
3282 | ||
5ebe2143 | 3283 | 2011-10-24 Dodji Seketeli <dodji@redhat.com> |
3284 | ||
3285 | * include/line-map.h (linemap_expand_location): Take a line table | |
3286 | parameter. Update comment. | |
3287 | (linemap_resolve_location): Update comment. | |
3288 | (linemap_expand_location_full): Remove. | |
3289 | * line-map.c (linemap_resolve_location): Handle reserved | |
3290 | locations; return a NULL map in those cases. | |
3291 | (linemap_expand_location): If location is reserved, return a | |
3292 | zeroed expanded location. Update comment. Take a line table to | |
3293 | assert that the function takes non-virtual locations only. | |
3294 | (linemap_expand_location_full): remove. | |
3295 | (linemap_dump_location): Handle the fact that | |
3296 | linemap_resolve_location can return NULL line maps when the | |
3297 | location resolves to a reserved location. | |
3298 | ||
3299 | * line-map.c (linemap_macro_map_lookup): Fix logic. | |
3300 | ||
a2eb22f0 | 3301 | 2011-10-22 Dodji Seketeli <dodji@redhat.com> |
3302 | ||
3303 | PR bootstrap/50778 | |
3304 | * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the | |
3305 | context to act upon. | |
3306 | * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update | |
3307 | comment. | |
3308 | (cpp_token_from_context_at): Likewise. | |
3309 | (cpp_peek_token): Use the context to peek tokens from. | |
3310 | ||
ac6130e2 | 3311 | 2011-10-20 Dodji Seketeli <dodji@redhat.com> |
3312 | ||
3313 | PR bootstrap/50801 | |
3314 | * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of | |
3315 | number of tokens. | |
3316 | ||
2a688977 | 3317 | 2011-10-18 Dodji Seketeli <dodji@redhat.com> |
3318 | ||
3319 | PR bootstrap/50760 | |
3320 | * include/line-map.h (struct linemap_stats): Change the type of | |
cc0a8c77 | 3321 | the members from size_t to long. |
2a688977 | 3322 | * macro.c (macro_arg_token_iter_init): Unconditionally initialize |
cc0a8c77 | 3323 | iter->location_ptr. |
2a688977 | 3324 | |
a67520a9 | 3325 | 2011-10-17 Dodji Seketeli <dodji@redhat.com> |
3326 | ||
3327 | * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a | |
cc0a8c77 | 3328 | variable without using it if ENABLE_CHECKING is not defined. Mark |
3329 | the LOCATION parameter as being unused. | |
a67520a9 | 3330 | |
1ae3520e | 3331 | 2011-10-15 Tom Tromey <tromey@redhat.com> |
3332 | Dodji Seketeli <dodji@redhat.com> | |
3333 | ||
3334 | * include/line-map.h (struct line_maps::alloced_size_for_request): | |
3335 | New member. | |
3336 | * line-map.c (new_linemap): Use set->alloced_size_for_request to | |
3337 | get the actual allocated size of line maps. | |
3338 | ||
e77b8253 | 3339 | 2011-10-15 Tom Tromey <tromey@redhat.com> |
3340 | Dodji Seketeli <dodji@redhat.com> | |
3341 | ||
3342 | * line-map.h (struct linemap_stats): Declare new struct. | |
3343 | (linemap_get_statistics): Declare ... | |
3344 | * line-map.c (linemap_get_statistics): ... new function. | |
3345 | * macro.c (num_expanded_macros_counter, num_macro_tokens_counter): | |
3346 | Declare new counters. | |
3347 | (enter_macro_context, replace_args): Update | |
3348 | num_macro_tokens_counter. | |
3349 | (cpp_get_token_1): Update num_expanded_macros_counter. | |
3350 | ||
62db153a | 3351 | 2011-10-15 Tom Tromey <tromey@redhat.com> |
3352 | Dodji Seketeli <dodji@redhat.com> | |
3353 | ||
3354 | * include/cpplib.h (struct cpp_options)<debug>: New struct member. | |
3355 | * include/line-map.h (linemap_dump_location): Declare ... | |
3356 | * line-map.c (linemap_dump_location): ... new function. | |
3357 | ||
ce70f433 | 3358 | 2011-10-15 Tom Tromey <tromey@redhat.com> |
3359 | Dodji Seketeli <dodji@redhat.com> | |
3360 | ||
3361 | * include/cpplib.h (struct cpp_options)<track_macro_expansion>: | |
3362 | New option. | |
3363 | * internal.h (struct macro_context): New struct. | |
3364 | (enum context_tokens_kind): New enum. | |
3365 | (struct cpp_context)<tokens_kind>: New member of type enum | |
3366 | context_tokens_kind. | |
3367 | (struct cpp_context)<macro>: Remove this. Replace it with an enum | |
3368 | of macro and macro_context. | |
3369 | (struct cpp_context)<direct_p>: Remove. | |
3370 | (_cpp_remaining_tokens_num_in_context): Declare new function. | |
3371 | * directives.c (destringize_and_run): Adjust. | |
3372 | * lex.c (_cpp_remaining_tokens_num_in_context) | |
3373 | (_cpp_token_from_context_at): Define new functions | |
3374 | (cpp_peek_token): Use them. | |
3375 | * init.c (cpp_create_reader): Initialize the base context to zero. | |
3376 | (_cpp_token_from_context_at): Define new static function. | |
3377 | (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and | |
3378 | _cpp_token_from_context_at. | |
3379 | * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New | |
3380 | members. | |
3381 | (enum macro_arg_token_kind): New enum. | |
3382 | (struct macro_arg_token_iter): New struct. | |
3383 | (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context) | |
3384 | (alloc_expanded_arg_mem, ensure_expanded_arg_room) | |
3385 | (delete_macro_args, set_arg_token, get_arg_token_location) | |
3386 | (arg_token_ptr_at, macro_arg_token_iter_init) | |
3387 | (macro_arg_token_iter_get_token) | |
3388 | (macro_arg_token_iter_get_location, macro_arg_token_iter_forward) | |
3389 | (expanded_token_index, tokens_buff_new, tokens_buff_count) | |
3390 | (tokens_buff_last_token_ptr, tokens_buff_put_token_to) | |
3391 | (tokens_buff_add_token, tokens_buff_remove_last_token) | |
3392 | (reached_end_of_context, consume_next_token_from_context): New | |
3393 | static functions. | |
3394 | (cpp_get_token_1): New static function. Split and extended from | |
3395 | cpp_get_token. Use reached_end_of_context and | |
3396 | consume_next_token_from_context. Unify its return point. Move | |
3397 | the location tweaking from cpp_get_token_with_location in here. | |
3398 | (cpp_get_token): Use cpp_get_token_1 | |
3399 | (stringify_arg): Use the new arg_token_at. | |
3400 | (paste_all_tokens): Support tokens coming from extended tokens | |
3401 | contexts. | |
3402 | (collect_args): Return the number of collected arguments, by | |
3403 | parameter. Store virtual locations of tokens that constitute the | |
3404 | collected args. | |
3405 | (funlike_invocation_p): Return the number of collected arguments, | |
3406 | by parameter. | |
3407 | (enter_macro_context): Add a parameter for macro expansion point. | |
3408 | Pass it to replace_args and to the "used" cpp callback. Get the | |
3409 | number of function-like macro arguments from funlike_invocation_p, | |
3410 | pass it to the new delete_macro_args to free the memory used by | |
3411 | macro args. When -ftrack-macro-expansion is in effect, for macros | |
3412 | that have no arguments, create a macro map for the macro expansion | |
3413 | and use it to allocate proper virtual locations for tokens | |
3414 | resulting from the expansion. Push an extended tokens context | |
3415 | containing the tokens resulting from macro expansion and their | |
3416 | virtual locations. | |
3417 | (replace_args): Rename the different variables named 'count' into | |
3418 | variables with more meaningful names. Create a macro map; | |
3419 | allocate virtual locations of tokens resulting from this | |
3420 | expansion. Use macro_arg_token_iter to iterate over tokens of a | |
3421 | given macro. Handle the case of the argument of | |
3422 | -ftrack-macro-expansion being < 2. Don't free macro arguments | |
3423 | memory resulting from expand_arg here, as these are freed by the | |
3424 | caller of replace_arg using delete_macro_args now. Push extended | |
3425 | token context. | |
3426 | (next_context, push_ptoken_context, _cpp_push_token_context) | |
3427 | (_cpp_push_text_context): Properly initialize the context. | |
3428 | (expand_arg): Use the new alloc_expanded_arg_mem, | |
3429 | push_extended_tokens_context, cpp_get_token_1, and set_arg_token. | |
3430 | (_cpp_pop_context): Really free the memory held by the context. | |
3431 | Handle freeing memory used by extended tokens contexts. | |
3432 | (cpp_get_token_with_location): Use cpp_get_token_1. | |
3433 | (cpp_sys_macro_p): Adjust. | |
3434 | (_cpp_backup_tokens): Support the new kinds of token contexts. | |
3435 | * traditional.c (recursive_macro): Adjust. | |
3436 | ||
97bfb9ef | 3437 | 2011-10-15 Tom Tromey <tromey@redhat> |
3438 | Dodji Seketeli <dodji@redhat.com> | |
3439 | ||
3440 | * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum | |
3441 | member. | |
3442 | (MAX_SOURCE_LOCATION): New constant. | |
3443 | (struct line_map_ordinary, struct line_map_macro): New structs. | |
cc0a8c77 | 3444 | (struct line_map): Turn this into a union of the two above. Add |
97bfb9ef | 3445 | comments. |
3446 | (struct maps_info): New struct. | |
3447 | (struct line_maps)<info_ordinary, info_macro>: Two new fields. | |
3448 | These now carry the map information that was previously scattered | |
3449 | in struct line_maps. | |
3450 | (struct map_info::allocated): Fix comment. | |
3451 | (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME) | |
3452 | (ORDINARY_MAP_STARTING_LINE_NUMBER) | |
3453 | (ORDINARY_MAP_INCLUDER_FILE_INDEX) | |
3454 | (ORDINARY_MAP_IN_SYSTEM_HEADER_P) | |
3455 | (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO) | |
3456 | (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS) | |
3457 | (MACRO_MAP_EXPANSION_POINT_LOCATION) | |
3458 | (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO) | |
3459 | (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE) | |
3460 | (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP) | |
3461 | (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED) | |
3462 | (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE) | |
3463 | (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP) | |
3464 | (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED) | |
3465 | (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE) | |
3466 | (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP) | |
3467 | (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT) | |
3468 | (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map | |
3469 | information. | |
3470 | (linemap_check_ordinary, linemap_assert) | |
3471 | (linemap_location_before_p): New macros. | |
3472 | (linemap_position_for_line_and_column) | |
3473 | (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token) | |
3474 | (linemap_macro_expansion_map_p) | |
3475 | (linemap_macro_map_loc_to_def_point) | |
3476 | (linemap_macro_map_loc_unwind_once) | |
3477 | (linemap_macro_map_loc_to_exp_point, linemap_step_out_once) | |
3478 | (linemap_get_source_line linemap_get_source_column) | |
3479 | (linemap_map_get_macro_name, linemap_get_file_path) | |
3480 | (linemap_location_in_system_header_p) | |
3481 | (linemap_location_from_macro_expansion_p): Declare new functions. | |
3482 | (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION) | |
3483 | (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this | |
3484 | accessors act on ordinary maps only. | |
3485 | (INCLUDED_FROM): Return NULL for main files; use the new | |
3486 | accessors. | |
3487 | (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors. | |
3488 | (struct expanded_location): Move here from gcc/input.h | |
3489 | (linemap_resolve_location, linemap_expand_location) | |
3490 | (linemap_expand_location_full): Declare new functions. | |
3491 | * line-map.c: Include cpplib.h, internal.h | |
3492 | (linemap_enter_macro, linemap_add_macro_token) | |
3493 | (linemap_get_expansion_line, linemap_get_expansion_filename): New | |
3494 | functions that are private to libcpp. | |
3495 | (linemap_assert): New macro. | |
3496 | (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point) | |
3497 | (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point) | |
3498 | (linemap_macro_map_loc_unwind_toward_spelling) | |
3499 | (linemap_macro_map_loc_to_exp_point) | |
3500 | (first_map_in_common_1, first_map_in_common): New static | |
3501 | functions. | |
3502 | (new_linemap): Define new static functions. Extracted and | |
3503 | enhanced from ... | |
3504 | (linemap_add): ... here. Use linemap_assert in lieu of abort | |
3505 | previously. | |
3506 | (linemap_tracks_macro_expansion_locs_p) | |
3507 | (linemap_add_macro_token, linemap_macro_expansion_map_p) | |
3508 | (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point) | |
3509 | (linemap_macro_map_loc_to_def_point) | |
3510 | (linemap_macro_map_loc_unwind_once) | |
3511 | (linemap_step_out_once, linemap_map_get_index) | |
3512 | (linemap_get_source_line,linemap_get_source_column) | |
3513 | (linemap_get_file_path, linemap_map_get_macro_name) | |
3514 | (linemap_location_in_system_header_p) | |
3515 | (linemap_location_originated_from_system_header_p) | |
3516 | (linemap_location_from_macro_expansion_p) | |
3517 | (linemap_tracks_macro_expansion_locs_p) | |
3518 | (linemap_resolve_location, linemap_expand_location) | |
3519 | (linemap_expand_location_full) | |
3520 | (linemap_tracks_macro_expansion_locs_p) | |
3521 | (linemap_position_for_line_and_column, linemap_compare_locations): | |
3522 | Define new public functions. | |
3523 | (linemap_init): Initialize ordinary and macro maps information in | |
3524 | the map set. | |
3525 | (linemap_check_files_exited): Use the new accessors. | |
3526 | (linemap_free): Remove this dead code. | |
3527 | (linemap_line_start): Assert this uses an ordinary map. Adjust to | |
3528 | use the new ordinary map accessors and data structures. Don't | |
3529 | overflow past the lowest possible macro token's location. | |
3530 | (linemap_position_for_column): Assert the ordinary maps of the map | |
3531 | set are really ordinary. Use ordinary map accessors. | |
3532 | (linemap_lookup): Keep the same logic but generalize to allow | |
3533 | lookup of both ordinary and macro maps. Do not crash when called | |
3534 | with an empty line table. | |
3535 | * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the | |
3536 | new API of line-map.h. | |
3537 | * directives.c (start_directive, do_line, do_linemarker) | |
3538 | (do_linemarker): Likewise. | |
3539 | * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed) | |
3540 | (make_cpp_dir, cpp_make_system_header): Likewise. | |
3541 | * init.c (cpp_read_main_file): Likewise. | |
3542 | * internal.h (CPP_INCREMENT_LINE): Likewise. | |
3543 | (linemap_enter_macro, linemap_add_macro_token) | |
3544 | (linemap_get_expansion_line, linemap_get_expansion_filename): New | |
3545 | functions private to libcpp. | |
3546 | * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment) | |
3547 | (skip_line_comment, skip_whitespace, lex_raw_string) | |
3548 | (_cpp_lex_direct): Likewise. | |
3549 | * macro.c (_cpp_builtin_macro_text): Likewise. | |
3550 | (_cpp_aligned_alloc): Initialize the new name member of the macro. | |
3551 | * traditional.c (copy_comment, _cpp_scan_out_logical_line): | |
3552 | Likewise. | |
3553 | * errors.c (cpp_diagnostic): Adjust to new linemap API. | |
3554 | ||
1dc92c59 | 3555 | 2011-08-28 Dodji Seketeli <dodji@redhat.com> |
3556 | ||
3557 | * line-map.c (linemap_add): Assert that reason must not be | |
3558 | LC_RENAME when called for the first time on a "main input file". | |
3559 | ||
6ea2c7a3 | 3560 | 2011-08-22 Gabriel Charette <gchare@google.com> |
3561 | ||
3562 | * init.c (cpp_create_reader): Inititalize forced_token_location_p. | |
3563 | * internal.h (struct cpp_reader): Add field forced_token_location_p. | |
3564 | * lex.c (_cpp_lex_direct): Use forced_token_location_p. | |
3565 | (cpp_force_token_locations): New. | |
3566 | (cpp_stop_forcing_token_locations): New. | |
3567 | ||
985e7f10 | 3568 | 2011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
3569 | ||
3570 | PR libstdc++/1773 | |
3571 | * init.c (cpp_init_builtins): Define __cplusplus 19971L. | |
3572 | ||
094a55ba | 3573 | 2011-08-18 Joseph Myers <joseph@codesourcery.com> |
3574 | ||
3575 | * include/cpplib.h (struct cpp_options): Fix typo. | |
3576 | ||
6f6f3dd7 | 3577 | 2011-08-18 Joseph Myers <joseph@codesourcery.com> |
3578 | ||
3579 | * include/cpplib.h (struct cpp_options): Add rliterals. | |
3580 | * init.c (struct lang_flags, lang_defaults): Add rliterals. | |
3581 | (cpp_set_lang): Set rliterals option. | |
3582 | (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__. | |
3583 | * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals. | |
3584 | ||
80ea6373 | 3585 | 2011-08-15 Gabriel Charette <gchare@google.com> |
3586 | ||
3587 | * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove. | |
3588 | Update all users to use linemap_position_for_column instead. | |
3589 | ||
d44dc666 | 3590 | 2011-07-28 Gabriel Charette <gchare@google.com> |
3591 | ||
3592 | * include/line-map.h (struct line_maps): | |
3593 | Remove unused field last_listed. Update all users. | |
3594 | ||
6b4db1bd | 3595 | 2011-07-28 H.J. Lu <hongjiu.lu@intel.com> |
3596 | ||
3597 | * configure.ac: Set need_64bit_hwint to yes for x86 targets. | |
3598 | * configure: Regenerated. | |
3599 | ||
80e4662c | 3600 | 2011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
3601 | ||
3602 | * system.h [__cplusplus]: Wrap C function declarations in extern "C". | |
3603 | ||
6678cb4e | 3604 | 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
3605 | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | |
3606 | ||
3607 | PR bootstrap/49794 | |
3608 | * configure.ac: Test AM_ICONV with CXX. | |
3609 | * configure: Regenerate. | |
3610 | * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++. | |
3611 | ||
c219ee5c | 3612 | 2011-07-15 Dodji Seketeli <dodji@redhat.com> |
3613 | ||
3614 | * directives.c (struct if_stack): Use source_location as type | |
3615 | here. | |
3616 | * include/cpplib.h (struct cpp_callbacks)<include, define, undef, | |
3617 | indent, def_pragma, used_define, used_undef>: Properly use | |
3618 | source_location as parameter type, rather than unsigned int. | |
3619 | ||
14f27bc6 | 3620 | 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
3621 | ||
3622 | PR target/39150 | |
3623 | * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9] | |
3624 | like i[34567]86-*-solaris2.1[0-9]*. | |
3625 | * configure: Regenerate. | |
3626 | ||
414663ef | 3627 | 2011-06-16 Jason Merrill <jason@redhat.com> |
3628 | ||
3629 | PR c++/45399 | |
3630 | * lex.c (lex_raw_string): Don't check for embedded NUL. | |
3631 | ||
2c694d44 | 3632 | 2011-06-06 Dodji Seketeli <dodji@redhat.com> |
3633 | ||
3634 | PR preprocessor/48532 | |
3635 | * directives.c (do_pragma): Don't forget the invocation location | |
3636 | when parsing the pragma name of a namespaced pragma directive. | |
3637 | ||
9793dd8e | 3638 | 2011-05-29 John Tytgat <John.Tytgat@aaug.net> |
3639 | ||
3640 | * files.c (read_file_guts): Add test on non-zero value of S_ISREG. | |
3641 | ||
cef70b8a | 3642 | 2011-05-22 Uros Bizjak <ubizjak@gmail.com> |
3643 | ||
3644 | PR target/49104 | |
3645 | * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__ | |
3646 | is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx. | |
3647 | ||
cdd0bb4b | 3648 | 2011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com> |
3649 | ||
3650 | * system.h (ENUM_BITFIELD): Remove. | |
3651 | ||
0ff0cd04 | 3652 | 2011-04-24 Jakub Jelinek <jakub@redhat.com> |
3653 | ||
3654 | PR preprocessor/48740 | |
3655 | * lex.c (lex_raw_string): When raw string ends with | |
3656 | ??) followed by raw prefix and ", ensure it is preprocessed | |
3657 | with ??) rather than ??]. | |
3658 | ||
dd045aee | 3659 | 2011-04-20 Jim Meyering <meyering@redhat.com> |
3660 | ||
3661 | * files.c (destroy_cpp_file): Remove useless if-before-free. | |
3662 | * init.c (cpp_destroy): Likewise. | |
3663 | * macro.c (replace_args): Likewise. | |
3664 | * pch.c (cpp_valid_state): Likewise. | |
3665 | ||
bb7824b5 | 3666 | 2011-03-25 Kai Tietz <ktietz@redhat.com> |
3667 | ||
3668 | * files.c (file_hash_eq): Use filename_cmp | |
3669 | instead of strcmp. | |
3670 | (nonexistent_file_hash_eq): Likewise. | |
3671 | (remap_filename): Likewise. | |
3672 | Handle absolute DOS-path, | |
3673 | (append_file_to_dir): Check for IS_DIR_SEPARATOR | |
3674 | instead of slash. | |
3675 | (read_name_map): Likewise. | |
3676 | * linemap.c (linemap_add): Use filename_cmp | |
3677 | instead of strcmp. | |
3678 | * mkdeps.c (apply_vpath): Use filename_ncmp | |
3679 | instead of strncmp. | |
3680 | (deps_restore): Use filename_cmp instead of | |
3681 | strcmp. | |
3682 | * init.c (read_original_directory): Use | |
3683 | IS_DIR_SEPARATOR instead of checking for slash. | |
3684 | ||
00e59df9 | 3685 | 2011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com> |
3686 | ||
3687 | PR preprocessor/48192 | |
3688 | * directives.c (do_ifdef): Do not consider conditional macros as | |
3689 | being defined. | |
3690 | (do_ifndef): Ditto. | |
3691 | * expr.c (parse_defined): Ditto. | |
3692 | ||
70ebee13 | 3693 | 2011-03-18 Richard Henderson <rth@redhat.com> |
3694 | ||
3695 | PR bootstrap/45381 | |
3696 | * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5. | |
3697 | ||
65861c3e | 3698 | 2011-11-04 Eric Botcazou <ebotcazou@adacore.com> |
cc0a8c77 | 3699 | Jakub Jelinek <jakub@redhat.com> |
65861c3e | 3700 | |
3701 | PR preprocessor/39213 | |
3702 | * directives.c (end_directive): Call _cpp_remove_overlay for deferred | |
3703 | pragmas as well in traditional mode. | |
3704 | ||
be04fdf9 | 3705 | 2010-11-17 Ian Lance Taylor <iant@google.com> |
3706 | ||
3707 | PR bootstrap/45538 | |
3708 | * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of | |
3709 | AC_LANG based on ENABLE_BUILD_WITH_CXX. | |
3710 | ||
560ab0b2 | 3711 | 2010-11-16 Kai Tietz <kai.tietz@onevision.com> |
3712 | ||
3713 | PR preprocessor/17349 | |
3714 | * lex.c (save_comment): Handle in argument passing c++ | |
3715 | comments special. | |
3716 | ||
075f1161 | 3717 | 2010-11-02 Ian Lance Taylor <iant@google.com> |
3718 | ||
3719 | * configure.ac: Use AC_SYS_LARGEFILE. | |
3720 | * configure: Rebuild. | |
3721 | * config.in: Rebuild. | |
3722 | ||
bc3d3e89 | 3723 | 2010-10-19 Basile Starynkevitch <basile@starynkevitch.net> |
075f1161 | 3724 | |
bc3d3e89 | 3725 | * line-map.h (source_location): Remove obsolete comment |
3726 | mentioning location_s. | |
3727 | ||
0d601ff4 | 3728 | 2010-09-29 Kai Tietz <kai.tietz@onevision.com> |
3729 | ||
3730 | PR preprocessor/45362 | |
3731 | * directives.c (cpp_pop_definition): Make static. | |
3732 | (do_pragma_push_macro): Reworked to store text | |
3733 | definition. | |
3734 | (do_pragma_pop_macro): Add free text definition. | |
3735 | (cpp_push_definition): Removed. | |
3736 | * include/cpplib.h (cpp_push_definition): Removed. | |
3737 | (cpp_pop_definition): Likewise. | |
3738 | * internal.h (def_pragma_macro): Remove member 'value' | |
3739 | and add new members 'definition', 'line', | |
3740 | 'syshdr', 'sued' and 'is_undef'. | |
3741 | * pch.c (_cpp_restore_pushed_macros): Rework to work | |
3742 | on text definition and store additional macro flags. | |
3743 | (_cpp_save_pushed_macros): Likewise. | |
3744 | ||
5ae82d58 | 3745 | 2010-09-29 Joseph Myers <joseph@codesourcery.com> |
3746 | ||
3747 | * include/cpplib.h (cpp_options): Rename warn_deprecated, | |
3748 | warn_traditional, warn_long_long and pedantic. | |
3749 | * directives.c (directive_diagnostics, _cpp_handle_directive): | |
3750 | Update names of cpp_options members. | |
3751 | * expr.c (cpp_classify_number, eval_token): Update names of | |
3752 | cpp_options members. | |
3753 | * init.c (cpp_create_reader, post_options): Update names of | |
3754 | cpp_options members. | |
3755 | * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of | |
3756 | cpp_options members. | |
3757 | * macro.c (parse_params): Update names of cpp_options members. | |
3758 | ||
ced52ffd | 3759 | 2010-09-15 Ian Lance Taylor <iant@google.com> |
3760 | ||
3761 | * init.c: Fix type name in comment. | |
3762 | ||
df863d33 | 3763 | 2010-08-31 Jakub Jelinek <jakub@redhat.com> |
3764 | ||
3765 | PR preprocessor/45457 | |
3766 | * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if | |
3767 | needed. | |
3768 | * directives.c (do_ifdef, do_ifndef): Likewise. | |
3769 | ||
9e76b586 | 3770 | 2010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
3771 | ||
3772 | * system.h [HAVE_INTTYPES_H]: Include inttypes.h. | |
3773 | ||
b315ae35 | 3774 | 2010-08-24 Richard Henderson <rth@redhat.com> |
3775 | ||
3776 | PR bootstrap/45376 | |
3777 | * configure.ac (HAVE_SSE4): New check. | |
3778 | * configure, config.in: Rebuild. | |
3779 | * lex.c (search_line_sse42): Omit if !HAVE_SSE4. | |
3780 | ||
8ab29ece | 3781 | 2010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
3782 | ||
3783 | * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer | |
3784 | etc. on Solaris 2/x86. | |
3785 | ||
2431e8ba | 3786 | 2010-08-21 Richard Henderson <rth@redhat.com> |
3787 | Andi Kleen <ak@linux.intel.com> | |
3788 | David S. Miller <davem@davemloft.net> | |
3789 | ||
3790 | * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests. | |
3791 | (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE. | |
3792 | (ptrdiff_t): Check via AC_CHECK_TYPE. | |
3793 | * config.in, configure: Rebuild. | |
3794 | * system.h: Include stdint.h, if available. | |
3795 | * lex.c (WORDS_BIGENDIAN): Provide default. | |
3796 | (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp, | |
3797 | acc_char_index, search_line_acc_char, repl_chars, search_line_mmx, | |
3798 | search_line_sse2, search_line_sse42, init_vectorized_lexer, | |
3799 | search_line_fast): New. | |
3800 | (_cpp_clean_line): Use search_line_fast. Restructure the fast | |
3801 | loop to make it clear when we're leaving the loop. Stay in the | |
3802 | fast loop for non-trigraph '?'. | |
3803 | ||
25692381 | 3804 | 2010-06-11 Jakub Jelinek <jakub@redhat.com> |
3805 | ||
3806 | * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro | |
3807 | callback. | |
3808 | (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER. | |
3809 | (cpp_macro_definition): Remove const qual from second argument. | |
3810 | * macro.c (enter_macro_context): Call user_builtin_macro callback for | |
3811 | NODE_BUILTIN !NODE_USED macros. | |
3812 | (warn_of_redefinition): Likewise. Remove const qual from second | |
3813 | argument. | |
3814 | (cpp_macro_definition): Likewise. | |
3815 | * pch.c (write_macdef, save_macros): Call user_builtin_macro callback | |
3816 | for NODE_BUILTIN !NODE_USED macros. | |
3817 | ||
abf6a617 | 3818 | 2010-06-10 Joseph Myers <joseph@codesourcery.com> |
3819 | ||
3820 | * include/cpplib.h (struct cpp_options): Remove show_column. | |
3821 | * init.c (cpp_create_reader, post_options): Don't set show_column. | |
3822 | ||
9d135bb6 | 3823 | 2010-06-09 Joern Rennecke <joern.rennecke@embecosm.com> |
3824 | ||
3825 | PR bootstrap/44432 | |
3826 | * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++, | |
3827 | check that C++ compiler works. | |
3828 | * configure: Regenerate. | |
3829 | ||
ba72912a | 3830 | 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> |
3831 | ||
3832 | * include/symtab.h (ht_identifier_ptr): New. | |
3833 | ||
050318d9 | 3834 | 2010-06-03 Joern Rennecke <joern.rennecke@embecosm.com> |
3835 | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | |
3836 | ||
3837 | PR bootstrap/42798 | |
3838 | * configure.ac: Check for declaration of 'basename(char *)'. | |
3839 | * configure: Regenerate. | |
3840 | * config.in: Regenerate. | |
3841 | ||
39012afb | 3842 | 2010-04-25 Joseph Myers <joseph@codesourcery.com> |
3843 | ||
3844 | * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X. | |
3845 | * init.c (lang_defaults): Add entries for new language variants. | |
3846 | (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X | |
3847 | variants. | |
3848 | ||
721e9705 | 3849 | 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org> |
3850 | ||
3851 | PR cpp/43195 | |
3852 | * files.c (report_missing_guard): Test for #pragma once. | |
3853 | ||
3a79f5da | 3854 | 2010-04-07 Simon Baldwin <simonb@google.com> |
3855 | ||
3856 | * directives.c (do_diagnostic): Add warning reason argument, | |
3857 | call appropriate error reporting function for code. | |
3858 | (directive_diagnostics): Call specific warning functions with | |
3859 | warning reason where appropriate. | |
3860 | (do_error, do_warning, do_pragma_dependency): Add warning reason | |
3861 | argument to do_diagnostic calls. | |
3862 | * macro.c (_cpp_warn_if_unused_macro, enter_macro_context, | |
3863 | _cpp_create_definition): Call specific warning functions with | |
3864 | warning reason where appropriate. | |
3865 | * Makefile.in: Add new diagnostic functions to gettext translations. | |
3866 | * include/cpplib.h (struct cpp_callbacks): Add warning reason code | |
3867 | to error callback. | |
3868 | (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR, | |
3869 | CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums. | |
3870 | (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS, | |
3871 | CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR, | |
3872 | CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS, | |
3873 | CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS, | |
3874 | CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF, | |
3875 | CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE, | |
3876 | CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp | |
3877 | warning reason codes. | |
3878 | (cpp_warning, cpp_pedwarning, cpp_warning_syshdr, | |
3879 | cpp_warning_with_line, cpp_pedwarning_with_line, | |
3880 | cpp_warning_with_line_syshdr): New specific error reporting functions. | |
3881 | * pch.c (cpp_valid_state): Call specific warning functions with | |
3882 | warning reason where appropriate. | |
3883 | * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central | |
3884 | diagnostic handlers. | |
3885 | (cpp_warning, cpp_pedwarning, cpp_warning_syshdr, | |
3886 | cpp_warning_with_line, cpp_pedwarning_with_line, | |
3887 | cpp_warning_with_line_syshdr): New specific error reporting functions. | |
3888 | * expr.c (cpp_classify_number, eval_token, num_unary_op): Call | |
3889 | specific warning functions with warning reason where appropriate. | |
3890 | * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment, | |
3891 | warn_about_normalization, lex_identifier_intern, lex_identifier, | |
3892 | _cpp_lex_direct): Ditto. | |
3893 | * charset.c (_cpp_valid_ucn, convert_hex, convert_escape, | |
3894 | narrow_str_to_charconst): Ditto. | |
3895 | ||
56e2ce2d | 3896 | 2010-04-06 Jakub Jelinek <jakub@redhat.com> |
3897 | ||
3898 | PR preprocessor/43642 | |
3899 | * lex.c (lex_raw_string): Change type of TYPE variable to | |
3900 | unsigned char. | |
3901 | ||
e0934084 | 3902 | 2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> |
3903 | ||
3904 | * aclocal.m4: Regenerate. | |
3905 | ||
7fe0ef3a | 3906 | 2010-03-29 Jason Merrill <jason@redhat.com> |
3907 | ||
3a45011c | 3908 | More N3077 raw string changes |
3909 | * charset.c (cpp_interpret_string): Don't transform UCNs in raw | |
3910 | strings. | |
3911 | * lex.c (bufring_append): Split out from... | |
3912 | (lex_raw_string): ...here. Undo trigraph and line splicing | |
3913 | transformations. Do process line notes in multi-line literals. | |
3914 | (_cpp_process_line_notes): Ignore notes that were already handled. | |
3915 | ||
7fe0ef3a | 3916 | Some raw string changes from N3077 |
3917 | * charset.c (cpp_interpret_string): Change inner delimiters to (). | |
3918 | * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter. | |
3919 | ||
65f40615 | 3920 | 2010-02-11 Jakub Jelinek <jakub@redhat.com> |
3921 | ||
3922 | * init.c (read_original_filename): Don't call read_original_directory | |
3923 | if _cpp_handle_directive returns 0. | |
3924 | ||
0074cd57 | 3925 | 2010-01-01 Joseph Myers <joseph@codesourcery.com> |
3926 | ||
3927 | PR preprocessor/41947 | |
3928 | * expr.c (cpp_classify_number): Give error for hexadecimal | |
3929 | floating-point constant with no digits before or after point. | |
3930 | ||
116f0a5f | 3931 | 2009-11-20 Arnaud Charlet <charlet@adacore.com> |
3932 | ||
3933 | * macro.c (enter_macro_context): Call cb.used callback if defined. | |
3934 | * directives.c (do_idef, do_ifndef): Ditto. | |
3935 | * include/cpplib.h (struct cpp_callbacks): Add used callback. | |
3936 | ||
038c21f1 | 3937 | 2009-11-11 Kai Tietz <kai.tietz@onevision.com> |
3938 | ||
3939 | * directives.c (do_pragma_push_macro): New pragma handler. | |
3940 | (do_pragma_pop_macro): Likewise. | |
3941 | (_cpp_init_internal_pragmas): Add push_macro and | |
3942 | pop_macro handler to internal pragmas. | |
3943 | (lex_macro_node_from_str): Removed. | |
3944 | (cpp_push_definition): Replace lex_macro_node_from_str | |
3945 | by _cpp_lex_identifier. | |
3946 | (cpp_pop_definition): Likewise. | |
3947 | * internal.h (_cpp_lex_identifier): New prototype. | |
3948 | (def_pragma_macro): New structure. | |
3949 | (cpp_reader): New member pushed_macros. | |
3950 | * lex.c (_cpp_lex_identifier): New function. | |
3951 | (lex_identifier_intern): New function. | |
3952 | * init.c (cpp_create_reader): Initialize pushed_macros | |
3953 | member. | |
3954 | (cpp_destroy): Free elements in pushed_macros member. | |
3955 | * pch.c (_cpp_save_pushed_macros): New function. | |
3956 | (_cpp_restore_pushed_macros): Likewise. | |
3957 | (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros. | |
3958 | (cpp_read_state): Use _cpp_restore_pushed_macros. | |
3959 | ||
538ba11a | 3960 | 2009-10-19 Jakub Jelinek <jakub@redhat.com> |
3961 | ||
3962 | * charset.c (cpp_init_iconv): Initialize utf8_cset_desc. | |
3963 | (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc | |
3964 | and char32_cset_desc. | |
3965 | (converter_for_type): Handle CPP_UTF8STRING. | |
3966 | (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings. | |
3967 | * directives.c (get__Pragma_string): Handle CPP_UTF8STRING. | |
3968 | (parse_include): Reject raw strings. | |
3969 | * include/cpplib.h (CPP_UTF8STRING): New token type. | |
3970 | * internal.h (struct cpp_reader): Add utf8_cset_desc field. | |
3971 | * lex.c (lex_raw_string): New function. | |
3972 | (lex_string): Handle u8 string literals, call lex_raw_string | |
3973 | for raw string literals. | |
3974 | (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R" | |
3975 | sequences. | |
3976 | * macro.c (stringify_arg): Handle CPP_UTF8STRING. | |
3977 | ||
af4d2883 | 3978 | 2009-10-14 Jakub Jelinek <jakub@redhat.com> |
3979 | ||
3980 | PR preprocessor/41543 | |
3981 | * include/line-map.h (RESERVED_LOCATION_COUNT): Define. | |
3982 | * line-map.c (linemap_init): Initialize highest_location and | |
3983 | highest_line to RESERVED_LOCATION_COUNT-1 instead of 0. | |
3984 | ||
8e83a065 | 3985 | 2009-10-09 Jason Merrill <jason@redhat.com> |
3986 | ||
3987 | * charset.c (_cpp_valid_ucn): Update C++0x restrictions. | |
3988 | ||
8f2ff12e | 3989 | 2009-10-09 Neil Vachharajani <nvachhar@google.com> |
3990 | ||
3991 | * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and | |
3992 | sccs. | |
3993 | ||
fc25a827 | 3994 | 2009-09-23 Loren J. Rittle <ljrittle@acm.org> |
3995 | ||
3996 | * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h. | |
3997 | * configure: Rebuilt. | |
3998 | ||
fa12a6a5 | 3999 | 2009-09-22 Richard Guenther <rguenther@suse.de> |
4000 | ||
4001 | PR pch/38987 | |
4002 | * files.c (pch_open_file): Disallow non-toplevel PCH inclusion. | |
4003 | ||
c25f2689 | 4004 | 2009-09-18 Chris Demetriou <cgd@google.com> |
4005 | ||
4006 | PR preprocessor/28435: | |
4007 | * include/cpplib.h (struct cpp_options): Add new member | |
4008 | deps.need_preprocessor_output. | |
4009 | * files.c (open_file_failed): If preprocessor output is needed | |
4010 | always report an error. | |
4011 | ||
a4f7c8f7 | 4012 | 2009-09-13 Kai Tietz <kai.tietz@onevision.com> |
4013 | ||
4014 | * configure.ac: Set for i?86-w64-mingw* | |
4015 | need_64bit_hwint to yes. | |
4016 | * configure: Regenerated. | |
4017 | ||
3f24af9b | 4018 | 2009-09-10 Jason Merrill <jason@redhat.com> |
4019 | ||
4020 | * directives.c (cpp_define): constify. | |
4021 | ||
2a50bfcf | 4022 | 2009-09-02 Ian Lance Taylor <iant@google.com> |
4023 | ||
4024 | * macro.c (stringify_arg): Escape CPP_WCHAR tokens. | |
4025 | ||
81a71e2b | 4026 | 2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> |
4027 | ||
4028 | * configure.ac (AC_PREREQ): Bump to 2.64. | |
4029 | ||
cd9a469c | 4030 | 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> |
4031 | ||
4032 | * aclocal.m4: Regenerate. | |
4033 | * config.in: Regenerate. | |
4034 | * configure: Regenerate. | |
4035 | ||
ed184982 | 4036 | 2009-08-17 Tom Tromey <tromey@redhat.com> |
4037 | ||
4038 | PR preprocessor/41067: | |
4039 | * charset.c (convert_escape): Add missing ":" to error text. | |
4040 | ||
7ad75c55 | 4041 | 2009-07-27 Douglas B Rupp <rupp@gnat.com> |
4042 | ||
4043 | * include/cpplib.h (INO_T_CPP): New macro. | |
4044 | (struct cpp_dir): Use it. | |
4045 | ||
80b97ef3 | 4046 | 2009-07-20 Jerry Quinn <jlquinn@optonline.net> |
4047 | ||
4048 | PR regression/40800 | |
4049 | * configure.ac: Use = instead of == for testing | |
4050 | ENABLE_BUILD_WITH_CXX. | |
4051 | * configure: Rebuild. | |
4052 | ||
723ebaea | 4053 | 2009-07-17 Jerry Quinn <jlquinn@optonline.net> |
4054 | ||
4055 | * directives.c (do_linemarker, do_line): Use CPP_STRING for | |
4056 | ignored enum value. | |
4057 | * files.c (find_file_in_dir): Add cast from void* to char*. | |
4058 | * symtab.c (ht_lookup_with_hash): Add cast from void* to char*. | |
4059 | * Makefile.in: (WARN_CFLAGS): Use general and C-specific | |
4060 | warnings. | |
4061 | (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS, | |
4062 | ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER, | |
4063 | COMPILER_FLAGS): New. | |
4064 | (DEPMODE): Set from CCDEPMODE or CXXDEPMODE. | |
4065 | (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS | |
4066 | instead of ALL_CFLAGS. | |
4067 | * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings | |
4068 | from other warnings. Add -Wc++-compat to C-specific warnings. | |
4069 | Check for --enable-build-with-cxx. Set and substitute | |
4070 | ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES | |
4071 | according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before | |
4072 | AC_CHECK_HEADERS. | |
4073 | * configure: Rebuild. | |
4074 | * include/cpp-id-data.h: Remove extern "C". | |
4075 | * include/line-map.h: Likewise. | |
4076 | * include/mkdeps.h: Likewise. | |
4077 | * include/symtab.h: Likewise. | |
4078 | * internal.h: Likewise. | |
4079 | ||
78ed8e3d | 4080 | 2009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org> |
4081 | ||
4082 | * directives.c (parse_include): Add location argument. Update all | |
4083 | calls. | |
4084 | (parse_answer): Likewise. | |
4085 | (do_include_common): Error with exact location. | |
4086 | (parse_assertion): Likewise. | |
4087 | ||
46821594 | 4088 | 2009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org> |
4089 | ||
4090 | * expr.c (num_div_op): Take explicit location. | |
4091 | ||
52b290f1 | 4092 | 2009-06-17 Ian Lance Taylor <iant@google.com> |
4093 | ||
4094 | * include/cpplib.h (progname): Don't declare. | |
4095 | ||
2a6a6991 | 4096 | 2009-06-12 Ian Lance Taylor <iant@google.com> |
4097 | ||
4098 | * include/cpplib.h (struct cpp_options): Add | |
4099 | warn_cxx_operator_names field. | |
4100 | (NODE_WARN_OPERATOR): Define. | |
4101 | (struct cpp_hashnode): Increase flags field to 10 bits, decrease | |
4102 | type to 6 bits. | |
4103 | * init.c (mark_named_operators): Add flags parameter. | |
4104 | (cpp_post_options): Pick flags value to pass to | |
4105 | mark_named_operators. | |
4106 | * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that | |
4107 | identifier is an operator name in C++. | |
4108 | ||
b559b9e2 | 4109 | 2009-06-01 Aldy Hernandez <aldyh@redhat.com> |
4110 | ||
4111 | * include/line-map.h (LAST_SOURCE_COLUMN): New. | |
4112 | ||
e61157d7 | 4113 | 2009-06-01 Ian Lance Taylor <iant@google.com> |
4114 | ||
4115 | * include/cpp-id-data.h: Add extern "C". | |
4116 | * include/line-map.h: Likewise. | |
4117 | * include/mkdeps.h: Likewise. | |
4118 | * include/symtab.h: Likewise. | |
4119 | * internal.h: Likewise. | |
4120 | ||
26dbec0a | 4121 | 2009-05-15 Ian Lance Taylor <iant@google.com> |
4122 | ||
4123 | * include/cpplib.h (enum cpp_builtin_type): Rename from enum | |
4124 | builtin_type. Change all uses. | |
4125 | ||
5b500807 | 4126 | 2009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org> |
4127 | ||
4128 | PR cpp/36674 | |
4129 | * directives (do_linemarker): Compensate for the increment in | |
4130 | location that occurs when we reach the end of line. | |
4131 | * files (_cpp_stack_include): Mention _cpp_find_file in the | |
4132 | comment. | |
4133 | ||
2ee04baa | 4134 | 2009-05-10 Joseph Myers <joseph@codesourcery.com> |
4135 | ||
4136 | * include/cpplib.h (enum cpp_token_fld_kind): Add | |
4137 | CPP_TOKEN_FLD_TOKEN_NO. | |
4138 | (struct cpp_macro_arg, struct cpp_identifier): Define. | |
4139 | (union cpp_token_u): Use struct cpp_identifier for identifiers. | |
4140 | Use struct cpp_macro_arg for macro arguments. Add token_no for | |
4141 | CPP_PASTE token numbers. | |
4142 | * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma, | |
4143 | do_pragma_poison, parse_assertion): Use val.node.node in place of | |
4144 | val.node. | |
4145 | * expr.c (parse_defined, eval_token): Use val.node.node in place | |
4146 | of val.node. | |
4147 | * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len, | |
4148 | cpp_spell_token, cpp_output_token, _cpp_equiv_tokens, | |
4149 | cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in | |
4150 | place of val.arg_no. Use val.node.node in place of val.node. | |
4151 | * macro.c (replace_args, cpp_get_token, parse_params, | |
4152 | lex_expansion_token, create_iso_definition, cpp_macro_definition): | |
4153 | Use val.macro_arg.arg_no or val.token_no in place of val.arg_no. | |
4154 | Use val.node.node in place of val.node. | |
4155 | ||
49a657d9 | 4156 | 2009-05-03 Joseph Myers <joseph@codesourcery.com> |
4157 | ||
4158 | * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte | |
4159 | UTF-8 sequences. | |
4160 | ||
9c6183dd | 4161 | 2009-04-25 Joseph Myers <joseph@codesourcery.com> |
4162 | ||
4163 | PR preprocessor/39559 | |
4164 | * expr.c (cpp_interpret_integer): Use a pedwarn for decimal | |
4165 | constants larger than intmax_t in C99 mode. | |
4166 | ||
fb1e4f4a | 4167 | 2009-04-21 Taras Glek <tglek@mozilla.com> |
4168 | ||
4169 | * include/cpp-id-data.h: Update GTY annotations to new syntax. | |
4170 | * include/cpplib.h: Likewise. | |
4171 | * include/line-map.h: Likewise. | |
4172 | * include/symtab.h: Likewise. | |
4173 | ||
ba99525e | 4174 | 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> |
4175 | ||
4176 | PR c++/14875 | |
4177 | * lex.c (cpp_type2name): Take a flags parameter. Call | |
4178 | cpp_named_operator2name for named operators and cpp_digraph2name | |
4179 | for digraphs. | |
4180 | (cpp_digraph2name): New. | |
4181 | (cpp_spell_token): Use it. | |
4182 | (cpp_output_token): Likewise. | |
4183 | * include/cpplib.h (cpp_type2name): Update declaration. | |
4184 | * init.c (cpp_named_operator2name): New. | |
4185 | * internal.h (cpp_named_operator2name): Declare. | |
4186 | ||
9ab71c6b | 4187 | 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org> |
4188 | ||
4189 | PR c++/13358 | |
4190 | * init.c (cpp_create_reader): Wlong_long is disabled by default. | |
4191 | * expr.c (cpp_classify_number): Give different messages for C and | |
4192 | C++ front-ends. | |
4193 | ||
941f2388 | 4194 | 2009-04-19 Joseph Myers <joseph@codesourcery.com> |
4195 | ||
4196 | PR preprocessor/20078 | |
4197 | * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens | |
4198 | field. | |
4199 | * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define. | |
4200 | (struct cpp_token): Change flags to unsigned short. | |
4201 | * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens. | |
4202 | (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens. | |
4203 | (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE | |
4204 | tokens. | |
4205 | * macro.c (macro_real_token_count): New. | |
4206 | (enter_macro_context, replace_args): Use macro_real_token_count. | |
4207 | (create_iso_definition): Record whitespace surrounding and digraph | |
4208 | spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH. | |
4209 | Set extra_tokens and save CPP_PASTE tokens with arg_no set for | |
4210 | multiple consecutive ## tokens. | |
4211 | (_cpp_create_definition): Initialize extra_tokens. | |
4212 | (cpp_macro_definition): Use macro_real_token_count. | |
4213 | ||
3e52c418 | 4214 | 2009-04-18 Joseph Myers <joseph@codesourcery.com> |
4215 | ||
4216 | * directives.c (parse_include): Pass true to check_eol. | |
4217 | ||
1eecdb28 | 4218 | 2009-04-18 Joseph Myers <joseph@codesourcery.com> |
4219 | ||
4220 | PR preprocessor/39646 | |
4221 | * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM. | |
4222 | * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM. | |
4223 | * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in | |
4224 | place of LC_RENAME. | |
4225 | ||
6cda323a | 4226 | 2009-04-18 Joseph Myers <joseph@codesourcery.com> |
4227 | ||
4228 | PR preprocessor/39647 | |
4229 | * directives.c (check_eol): Add parameter expand. | |
4230 | (do_undef, parse_include, do_line, do_linemarker, do_ident, | |
4231 | do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef, | |
4232 | do_else, do_endif, do_assert, do_unassert): All callers changed. | |
4233 | Pass true from do_line, false elsewhere. | |
4234 | ||
e21164ef | 4235 | 2009-04-12 Joseph Myers <joseph@codesourcery.com> |
4236 | ||
4237 | PR preprocessor/31869 | |
4238 | * macro.c (stringify_arg): Handle NULL source token in padding | |
4239 | token where previous padding token did not have source token with | |
4240 | preceding whitespace. | |
4241 | ||
6bc9506f | 4242 | 2009-04-09 Jakub Jelinek <jakub@redhat.com> |
4243 | ||
4244 | * Makefile.in: Change copyright header to refer to version | |
4245 | 3 of the GNU General Public License and to point readers at the | |
4246 | COPYING3 file and the FSF's license web page. | |
4247 | * charset.c: Likewise. | |
4248 | * directives-only.c: Likewise. | |
4249 | * directives.c: Likewise. | |
4250 | * errors.c: Likewise. | |
4251 | * expr.c: Likewise. | |
4252 | * files.c: Likewise. | |
4253 | * identifiers.c: Likewise. | |
4254 | * include/cpp-id-data.h: Likewise. | |
4255 | * include/cpplib.h: Likewise. | |
4256 | * include/line-map.h: Likewise. | |
4257 | * include/mkdeps.h: Likewise. | |
4258 | * include/symtab.h: Likewise. | |
4259 | * init.c: Likewise. | |
4260 | * internal.h: Likewise. | |
4261 | * lex.c: Likewise. | |
4262 | * line-map.c: Likewise. | |
4263 | * macro.c: Likewise. | |
4264 | * makeucnid.c: Likewise. | |
4265 | * mkdeps.c: Likewise. | |
4266 | * pch.c: Likewise. | |
4267 | * symtab.c: Likewise. | |
4268 | * system.h: Likewise. | |
4269 | * traditional.c: Likewise. | |
4270 | * ucnid.tab: Likewise. | |
4271 | * ucnid.h: Regenerate. | |
4272 | ||
5840fdcf | 4273 | 2009-04-01 Janis Johnson <janis187@us.ibm.com> |
4274 | ||
f8ed6d41 | 4275 | PR c/39027 |
4276 | * include/cpplib.h (CPP_N_DEFAULT): Define. | |
4277 | * expr.c (interpret_float_suffix): Recognize d or D for double, | |
4278 | return new value for default. | |
4279 | (cpp_classify_number): Issue pedwarn for use of d or D in suffix. | |
4280 | ||
5840fdcf | 4281 | PR c/33466 |
4282 | * expr.c (interpret_float_suffix): Reject invalid suffix that uses | |
4283 | letters from decimal float and fixed-point suffixes. | |
4284 | ||
ff903809 | 4285 | 2009-03-31 Joseph Myers <joseph@codesourcery.com> |
4286 | ||
4287 | PR preprocessor/15638 | |
4288 | * files.c (_cpp_find_file): Call open_file_failed after diagnosing | |
4289 | invalid PCH. | |
4290 | (open_file_failed): Make error for missing file fatal. | |
4291 | * include/cpplib.h (CPP_DL_FATAL): Define. | |
4292 | ||
bfba65a4 | 4293 | 2009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net> |
4294 | ||
4295 | PR preprocessor/31932: | |
4296 | * internal.h: Don't mention HAVE_ICONV_H. | |
4297 | * configure, config.in: Rebuild. | |
4298 | * configure.ac: Don't check for iconv.h. | |
4299 | ||
102a7306 | 4300 | 2009-03-30 Tom Tromey <tromey@redhat.com> |
4301 | ||
4302 | PR preprocessor/39512: | |
4303 | * line-map.c (linemap_init): Initialize 'reallocator' field. | |
4304 | ||
4514949a | 4305 | 2009-03-30 Jakub Jelinek <jakub@redhat.com> |
4306 | ||
4307 | PR target/39558 | |
4308 | * macro.c (cpp_get_token): If macro_to_expand returns NULL | |
4309 | and used some tokens, add CPP_PADDING before next token. | |
4310 | ||
7f5f3953 | 4311 | 2009-03-29 Joseph Myers <joseph@codesourcery.com> |
4312 | ||
4313 | PR preprocessor/34695 | |
4314 | * makedepend.c: Remove. | |
4315 | * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove. | |
4316 | (all, clean, TAGS_SOURCES, include): Remove makedepend handling. | |
4317 | * directives.c (cpp_errors): Remove. | |
4318 | * errors.c (print_location, _cpp_begin_message, v_message): | |
4319 | Remove. | |
4320 | (cpp_error, cpp_error_with_line): Always use error callback. | |
4321 | (cpp_error, cpp_error_with_line, cpp_errno): Return bool. | |
4322 | * include/cpplib.h (cpp_options): Remove pedantic_errors, | |
4323 | inhibit_warnings, warn_system_headers, inhibit_errors, | |
4324 | warnings_are_errors, client_diagnostic. | |
4325 | (cpp_callbacks): Add extra arguments to error callback; make it | |
4326 | return bool. | |
4327 | (cpp_finish): Return void. | |
4328 | (cpp_destroy): Remove inaccurate comment about return value. | |
4329 | (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove. | |
4330 | (CPP_DL_NOTE): Define. | |
4331 | * include/line-map.h (linemap_print_containing_files): Remove. | |
4332 | * init.c (cpp_finish): Do not check for or return number of | |
4333 | errors. | |
4334 | * internal.h (cpp_reader): Remove errors field. | |
4335 | * line-map.c (linemap_print_containing_files): Remove. | |
4336 | * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message | |
4337 | about previous definition. Only emit it if previous diagnostic | |
4338 | was emitted. | |
4339 | ||
d5a78dd0 | 4340 | 2009-03-28 Joseph Myers <joseph@codesourcery.com> |
4341 | ||
4342 | * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not | |
4343 | mkinstalldirs. | |
4344 | ||
0ac758f7 | 4345 | 2009-03-18 Jakub Jelinek <jakub@redhat.com> |
4346 | ||
4347 | * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts. | |
4348 | ||
7811eab5 | 4349 | 2009-02-21 Joseph Myers <joseph@codesourcery.com> |
4350 | ||
4351 | * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a | |
4352 | header name. | |
4353 | (_cpp_lex_direct): Handle this. | |
4354 | ||
b5c49426 | 4355 | 2009-02-15 Richard Guenther <rguenther@suse.de> |
4356 | ||
4357 | Revert last change. | |
4358 | ||
76549266 | 4359 | 2009-02-13 Richard Guenther <rguenther@suse.de> |
4360 | ||
4361 | * configure.ac: Enable LFS. | |
4362 | * configure: Re-generate. | |
4363 | * config.in: Likewise. | |
4364 | ||
e7ae053d | 4365 | 2009-01-05 Ben Elliston <bje@au.ibm.com> |
4366 | ||
4367 | * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir. | |
4368 | (.po.pox): Likewise. | |
4369 | (po/$(PACKAGE).pot): Likewise. | |
4370 | ||
c1203b1c | 4371 | 2008-12-10 Alexandre Oliva <aoliva@redhat.com> |
4372 | ||
4373 | PR target/37033 | |
4374 | * pch.c (cpp_valid_state): Improve message for poisoned symbols. | |
4375 | Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM. | |
4376 | ||
cd740bd5 | 4377 | 2008-11-29 Joseph Myers <joseph@codesourcery.com> |
4378 | ||
4379 | * lex.c (cpp_token_len): Use 6 as default length. | |
4380 | ||
ae5c166d | 4381 | 2008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org> |
4382 | ||
4383 | * expr.c (struct op): Add location. | |
4384 | (_cpp_parse_expr): Propagate locations throught the stack | |
4385 | of expressions. | |
4386 | (reduce): Likewise. | |
4387 | (check_promotion): Use explicit location in errors. | |
4388 | ||
956c6108 | 4389 | 2008-10-05 Matthew Gingell <gingell@adacore.com> |
4390 | Arnaud Charlet <charlet@adacore.com> | |
4391 | ||
4392 | * include/cpplib.h (cpp_comments, cpp_comment_table): New structs. | |
4393 | (cpp_get_comments): New function. | |
4394 | * internal.h (struct cpp_reader): Add comments field. | |
4395 | * init.c (cpp_destroy): Free comments. | |
4396 | * lex.c (store_comment, cpp_get_comments): New functions. | |
4397 | (comments): New struct. | |
4398 | (save_comment): Store comments in comments struct. | |
4399 | ||
2ad0b097 | 4400 | 2008-09-18 Simon Baldwin <simonb@google.com> |
4401 | ||
4402 | * include/cpplib.h (struct cpp_options): Add new boolean flag | |
4403 | warn_builtin_macro_redefined. | |
4404 | * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined. | |
4405 | * (struct builtin_operator): Split out from previous struct builtin, | |
4406 | enhance extra const correctness. | |
4407 | * (struct builtin_macro): Split out from previous struct builtin, add | |
4408 | new always_warn_if_redefined flag, enhance const correctness. | |
4409 | * (mark_named_operators): Use struct builtin_operator. | |
4410 | * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN | |
4411 | to builtins selectively. | |
4412 | * macro.c (warn_of_redefinition): Return false if a builtin macro | |
4413 | is not flagged with NODE_WARN. | |
4414 | ||
408c2285 | 4415 | 2008-07-31 Jakub Jelinek <jakub@redhat.com> |
4416 | ||
4417 | PR preprocessor/36649 | |
4418 | * files.c (struct report_missing_guard_data): New type. | |
4419 | (report_missing_guard): Put paths into an array instead of printing | |
4420 | them right away. Return 1 rather than 0. | |
4421 | (report_missing_guard_cmp): New function. | |
4422 | (_cpp_report_missing_guards): Sort and print paths gathered by | |
4423 | report_missing_guard callback. | |
4424 | ||
98e29890 | 4425 | 2008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> |
4426 | ||
4427 | PR 28079 | |
4428 | * directives.c (strtolinenum): Handle overflow. | |
4429 | (do_line): Give a warning if line number overflowed. | |
4430 | (do_linemarker): Update call to strtolinenum. | |
4431 | ||
4999c35b | 4432 | 2008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org> |
4433 | ||
4434 | * include/line-map.h (linenum_type): New typedef. | |
4435 | (struct line_map): Use it. | |
4436 | (SOURCE_LINE): Second arguments is a LOCATION not a LINE. | |
4437 | (SOURCE_COLUMN): Likewise. | |
4438 | * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store | |
4439 | source_location values in a variable of type linenum_type. | |
4440 | * directives.c (struct if_stack): Use linenum_type. | |
4441 | (strtoul_for_line): Rename as strtolinenum. | |
4442 | (do_line): Use linenum_type. | |
4443 | (do_linemarker): Use linenum_type and strtolinenum. | |
4444 | (_cpp_do_file_change): Use linenum_t. | |
4445 | * line-map.c (linemap_add): Likewise. | |
4446 | (linemap_line_start): Likewise. | |
4447 | * traditional.c (struct fun_macro): 'line' is a source_location. | |
4448 | * errors.c (print_location): Use linenum_type. | |
4449 | * directives-only.c (_cpp_preprocess_dir_only): Likewise. | |
4450 | * internal.h (CPP_INCREMENT_LINE): Likewise. | |
4451 | * lex.c (_cpp_skip_block_comment): Use source_location. | |
cc0a8c77 | 4452 | |
89768577 | 4453 | 2008-07-14 Ben Elliston <bje@au.ibm.com> |
4454 | ||
4455 | * include/cpplib.h (NODE_CONDITIONAL): New. | |
4456 | (struct cpp_callbacks): New macro_to_expand field. | |
4457 | (struct cpp_hashnode): Adjust size of flags and type fields. | |
4458 | (cpp_peek_token): Prototype. | |
4459 | * lex.c (cpp_peek_token): New function. | |
4460 | (_cpp_temp_token): Protect pre-existing lookaheads. | |
4461 | * macro.c (cpp_get_token): Expand any conditional macros. | |
4462 | (_cpp_backup_tokens_direct): New. | |
4463 | (_cpp_backup_tokens): Call _cpp_backup_tokens_direct. | |
4464 | (warn_of_redefinition): Silently allow redefined conditional | |
4465 | macros. | |
4466 | (_cpp_create_definition): Remove the conditional flag when a user | |
4467 | defines one of the conditional macros. | |
4468 | * internal.h (_cpp_backup_tokens_direct): New prototype. | |
4469 | ||
403c2b12 | 4470 | 2008-06-13 Andrew Haley <aph@redhat.com> |
4471 | ||
4472 | PR preprocessor/33305 | |
4473 | * macro.c (replace_args): Print a warning for empty macro | |
4474 | arguments in C89 and C++. | |
4475 | ||
5b2c7553 | 4476 | 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> |
4477 | ||
4478 | * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies. | |
4479 | * configure: Regenerate. | |
4480 | ||
b9de6413 | 4481 | 2008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> |
4482 | ||
4483 | * Makefile.in (datarootdir): New variable. | |
4484 | ||
bfa57d81 | 4485 | 2008-06-12 H.J. Lu <hongjiu.lu@intel.com> |
4486 | ||
4487 | PR preprocessor/36479 | |
4488 | * charset.c (cpp_interpret_string_notranslate): Also set | |
4489 | narrow_cset_desc.width. | |
4490 | ||
6af9f7ea | 4491 | 2008-06-07 Joseph Myers <joseph@codesourcery.com> |
4492 | ||
4493 | * configure.ac (parisc*64*-*-*): Remove. | |
4494 | * configure: Regenerate. | |
4495 | ||
536a48ee | 4496 | 2008-05-30 Tom Tromey <tromey@redhat.com> |
4497 | ||
4498 | PR preprocessor/36320: | |
4499 | * internal.h (_cpp_parse_expr): Update. | |
4500 | * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error | |
4501 | messages. | |
4502 | * directives.c (do_if): Update. | |
4503 | (do_elif): Require expression if processing group. | |
4504 | ||
f4d02485 | 4505 | 2008-05-30 Danny Smith <dannysmith@users.sourceforge.net> |
4506 | ||
4507 | * include/cpplib.h (struct cpp_dir): Add new field, canonical_name. | |
4508 | ||
c0770282 | 4509 | 2008-05-21 Tom Tromey <tromey@redhat.com> |
4510 | ||
4511 | PR preprocessor/27777: | |
4512 | * lex.c (cpp_output_line_to_string): New function. | |
4513 | * internal.h (_cpp_begin_message): Don't declare. | |
4514 | * errors.c (_cpp_begin_message): Now static. | |
4515 | * include/cpplib.h (cpp_output_line_to_string): Declare. | |
4516 | * directives.c (do_diagnostic): Rewrote. Use | |
4517 | cpp_output_line_to_string. Don't use _cpp_begin_message. | |
4518 | ||
dfecde36 | 4519 | 2008-05-21 Tom Tromey <tromey@redhat.com> |
4520 | ||
4521 | * include/symtab.h (HT_ALLOCED): Remove. | |
4522 | (ht_purge): Declare. | |
4523 | * symtab.c (DELETED): New define. | |
4524 | (ht_lookup): Update comment. | |
4525 | (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED | |
4526 | code. Use subobject allocator for strings, if it exists. | |
4527 | (ht_expand): Handle deleted entries. | |
4528 | (ht_forall): Likewise. | |
4529 | (ht_purge): New function. | |
4530 | (ht_dump_statistics): Print deletion statistics. | |
4531 | ||
fb9753dc | 4532 | 2008-05-13 Tom Tromey <tromey@redhat.com> |
4533 | ||
4534 | PR preprocessor/22168: | |
4535 | * include/cpplib.h (struct cpp_options) <objc>: Update | |
4536 | documentation. | |
4537 | * expr.c (eval_token): Warn for use of assertions. | |
4538 | * directives.c (directive_diagnostics): Warn about extensions. | |
4539 | (DEPRECATED): New define. | |
4540 | (DIRECTIVE_TABLE): Use it. | |
4541 | ||
151e90cc | 4542 | 2008-05-06 Tom Tromey <tromey@redhat.com> |
4543 | ||
4544 | PR preprocessor/35313, PR preprocessor/36088: | |
4545 | * expr.c (optab) <QUERY, COMMA>: Set precedence to 4. | |
4546 | (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON. | |
4547 | ||
2cd62354 | 4548 | 2008-05-04 David S. Miller <davem@davemloft.net> |
4549 | ||
4550 | * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes. | |
4551 | * configure: Regenerate. | |
4552 | ||
85e51d59 | 4553 | 2008-04-22 Daniel Franke <franke.daniel@gmail.com> |
4554 | ||
4555 | * include/cpplib.h (cpp_define_formatted): New. | |
4556 | * directives.c (cpp_define_formatted): New. | |
4557 | ||
d656d07a | 4558 | 2008-04-21 Tom Tromey <tromey@redhat.com> |
4559 | ||
4560 | PR libcpp/33415: | |
4561 | * charset.c (_cpp_convert_input): Add buffer_start argument. | |
4562 | Ignore UTF-8 BOM if seen. | |
4563 | * internal.h (_cpp_convert_input): Add argument. | |
4564 | * files.c (struct _cpp_file) <buffer_start>: New field. | |
4565 | (destroy_cpp_file): Free buffer_start, not buffer. | |
4566 | (_cpp_pop_file_buffer): Likewise. | |
4567 | (read_file_guts): Update. | |
4568 | ||
924bbf02 | 4569 | 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com> |
4570 | ||
4571 | * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal. | |
4572 | * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens. | |
4573 | (struct cpp_options): Added uliterals. | |
4574 | (cpp_interpret_string): Update prototype. | |
4575 | (cpp_interpret_string_notranslate): Idem. | |
4576 | * charset.c (init_iconv_desc): New width member in cset_converter. | |
4577 | (cpp_init_iconv): Add support for char{16,32}_cset_desc. | |
4578 | (convert_ucn): Idem. | |
4579 | (emit_numeric_escape): Idem. | |
4580 | (convert_hex): Idem. | |
4581 | (convert_oct): Idem. | |
4582 | (convert_escape): Idem. | |
4583 | (converter_for_type): New function. | |
4584 | (cpp_interpret_string): Use converter_for_type, support u and U prefix. | |
4585 | (cpp_interpret_string_notranslate): Match changed prototype. | |
4586 | (wide_str_to_charconst): Use converter_for_type. | |
4587 | (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}. | |
4588 | * directives.c (linemarker_dir): Macro U changed to UC. | |
4589 | (parse_include): Idem. | |
4590 | (register_pragma_1): Idem. | |
4591 | (restore_registered_pragmas): Idem. | |
4592 | (get__Pragma_string): Support CPP_STRING{16,32}. | |
4593 | * expr.c (eval_token): Support CPP_CHAR{16,32}. | |
4594 | * init.c (struct lang_flags): Added uliterals. | |
4595 | (lang_defaults): Idem. | |
4596 | * internal.h (struct cset_converter) <width>: New field. | |
4597 | (struct cpp_reader) <char16_cset_desc>: Idem. | |
4598 | (struct cpp_reader) <char32_cset_desc>: Idem. | |
4599 | * lex.c (digraph_spellings): Macro U changed to UC. | |
4600 | (OP, TK): Idem. | |
4601 | (lex_string): Add support for u'...', U'...', u"..." and U"...". | |
4602 | (_cpp_lex_direct): Idem. | |
4603 | * macro.c (_cpp_builtin_macro_text): Macro U changed to UC. | |
4604 | (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}. | |
4605 | ||
6a88da51 | 4606 | 2008-04-18 Paolo Bonzini <bonzini@gnu.org> |
4607 | ||
4608 | PR bootstrap/35457 | |
4609 | * aclocal.m4: Regenerate. | |
4610 | * configure: Regenerate. | |
4611 | ||
6e6d82ef | 4612 | 2008-04-17 Tom Tromey <tromey@redhat.com> |
4613 | ||
4614 | PR libcpp/34866: | |
4615 | * errors.c (cpp_error): Don't reference a token before the start | |
4616 | of the current run. | |
4617 | ||
f521616b | 4618 | 2008-04-16 Tom Tromey <tromey@redhat.com> |
4619 | ||
4620 | * Makefile.in (TAGS_SOURCES): New variable. | |
4621 | (TAGS): New target. | |
4622 | ||
fc7383ad | 4623 | 2008-04-11 Kaz Kojima <kkojima@gcc.gnu.org> |
4624 | ||
4625 | * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-* | |
4626 | and shbe-*-*. | |
4627 | * configure: Rebuilt. | |
4628 | ||
34c3de48 | 4629 | 2008-04-02 Joseph Myers <joseph@codesourcery.com> |
4630 | ||
4631 | * include/cpplib.h (struct cpp_callbacks): Add used_define, | |
4632 | used_undef and before_define. | |
4633 | (NODE_USED): Define. | |
4634 | * directives.c (do_define, do_undef, undefine_macros, do_ifdef, | |
4635 | do_ifndef, cpp_pop_definition): Handle new flag and use new | |
4636 | callbacks. | |
4637 | * expr.c (parse_defined): Handle new flag and use new callbacks. | |
4638 | * macro.c (enter_macro_context, _cpp_free_definition): Handle new | |
4639 | flag and use new callbacks. | |
4640 | ||
f2225b1a | 4641 | 2008-04-01 Jakub Jelinek <jakub@redhat.com> |
4642 | ||
4643 | PR pch/13675 | |
4644 | * files.c (struct _cpp_file): Remove pch field. | |
4645 | (pch_open_file): Don't set file->pch, just file->pchname. | |
4646 | (should_stack_file): After pfile->cb.read_pch call | |
4647 | free pchname and clear pchname, don't close file->fd. | |
4648 | Test file->pchname instead of file->pch. Don't close fd after cb. | |
4649 | (_cpp_stack_include): Test file->pchname instead of file->pch. | |
4650 | ||
5a959782 | 4651 | 2008-03-28 Tom Tromey <tromey@redhat.com> |
4652 | ||
4653 | * Makefile.in (POSTCOMPILE): New variable. | |
4654 | (.c.o): Use it. | |
4655 | ||
8302ff7f | 4656 | 2008-03-13 Tom Tromey <tromey@redhat.com> |
4657 | ||
4658 | PR libcpp/35322: | |
4659 | * directives.c (destringize_and_run): Set pfile->directive. | |
4660 | ||
8bd452d9 | 4661 | 2008-03-06 Markus Milleder <markus.milleder@generali.at> |
4662 | ||
4663 | PR preprocessor/35458 | |
4664 | * mkdeps.c (munge): Quote '#' with a '\'. | |
4665 | ||
0c62b06e | 4666 | 2008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> |
4667 | ||
4668 | PR preprocessor/35379 | |
4669 | * mkdeps.c (deps_write): Ensure the first target always appears | |
4670 | in the first column, without leading backslash newline. Avoid | |
4671 | some more extra whitespace. | |
4672 | ||
6b0c1373 | 4673 | 2008-02-25 Thiemo Seufer <ths@mips.com> |
4674 | ||
0c62b06e | 4675 | * Makefile.in ($(srcdir)/config.in): Depend on configure.ac. |
6b0c1373 | 4676 | |
e297899b | 4677 | 2008-02-19 Tom Tromey <tromey@redhat.com> |
4678 | ||
4679 | * traditional.c (lex_identifier): Use CPP_HASHNODE. | |
4680 | * lex.c (lex_identifier): Use CPP_HASHNODE. | |
4681 | * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in | |
4682 | do-while. | |
4683 | * identifiers.c (alloc_node): Change return type. | |
4684 | (_cpp_init_hashtable): Don't cast 'alloc_node'. | |
4685 | (proxy_assertion_broken): New declaration. | |
4686 | (cpp_forall_identifiers): Move comment. | |
4687 | * line-map.c (linemap_add): Comment fix. | |
4688 | (linemap_line_start): Indentation fix. | |
4689 | ||
45f9f140 | 4690 | 2008-01-25 Jakub Jelinek <jakub@redhat.com> |
4691 | ||
4692 | PR preprocessor/34692 | |
4693 | * macro.c (collect_args): Add pragma_buff argument. Push | |
4694 | CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather | |
4695 | than into arguments. Reset prevent_expansion and parsing_args | |
4696 | state at CPP_PRAGMA_EOL/CPP_EOF. | |
4697 | (funlike_invocation_p): Add pragma_buff argument, pass it through | |
4698 | to collect_args. | |
4699 | (enter_macro_context): Add result argument. Adjust | |
4700 | funlike_invocation_p caller. Emit all deferred pragma tokens | |
4701 | gathered during collect_args before the expansion, add a padding | |
4702 | token. Return 2 instead of 1 if any pragma tokens were prepended. | |
4703 | (cpp_get_token): If enter_macro_context returns 2, don't return | |
4704 | a padding token, instead cycle to grab CPP_PRAGMA token. | |
4705 | * directives.c (_cpp_handle_directive): If was_parsing_args | |
4706 | in deferred pragma, leave parsing_args and prevent_expansion as is. | |
4707 | ||
a56d0856 | 4708 | 2008-01-22 Tom Tromey <tromey@redhat.com> |
4709 | ||
45f9f140 | 4710 | PR c++/34859 |
a56d0856 | 4711 | * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and |
4712 | __STDC_CONSTANT_MACROS. | |
4713 | ||
7a1a608c | 4714 | 2008-01-07 Fred Fish <fnf@specifix.com> |
4715 | ||
45f9f140 | 4716 | PR preprocessor/30363 |
7a1a608c | 4717 | * traditional.c (replace_args_and_push): Add local variable |
cc0a8c77 | 4718 | cxtquote, calculate the replacement text size assuming a |
7a1a608c | 4719 | worst case of every input character quoted with backslash, |
4720 | and properly handle output quoting of quote characters in | |
4721 | actual arguments used in function-like macros. | |
4722 | ||
cde59b72 | 4723 | 2008-01-03 Tom Tromey <tromey@redhat.com> |
4724 | ||
45f9f140 | 4725 | PR preprocessor/34602 |
cde59b72 | 4726 | * directives.c (do_line): Don't try to spell EOF token. |
4727 | (do_linemarker): Add comment. | |
4728 | ||
2d1f9589 | 4729 | 2007-12-11 DJ Delorie <dj@redhat.com> |
4730 | ||
4731 | * charset.c (convert_using_iconv): Close out any shift states, | |
4732 | returning to the initial state. | |
4733 | ||
64cb8c90 | 4734 | 2007-12-06 Tom Tromey <tromey@redhat.com> |
4735 | ||
45f9f140 | 4736 | PR c/29172 |
64cb8c90 | 4737 | * internal.h (struct cpp_reader) <file_hash_entries>: Changed |
4738 | type. | |
4739 | <file_hash_entries_allocated, file_hash_entries_used>: Removed. | |
4740 | * files.c (FILE_HASH_POOL_SIZE): New macro. | |
4741 | (struct file_hash_entry_pool): New. | |
4742 | (destroy_all_cpp_files): New function. | |
4743 | (allocate_file_hash_entries): Allocate a file_hash_entry_pool. | |
4744 | (new_file_hash_entry): Update. | |
4745 | (free_file_hash_entries): New function. | |
4746 | (_cpp_cleanup_files): Call free_file_hash_entries and | |
4747 | destroy_all_cpp_files. | |
4748 | (cpp_clear_file_cache): New function. | |
4749 | * include/cpplib.h (cpp_clear_file_cache): Declare. | |
4750 | ||
d08a0ab3 | 4751 | 2007-12-03 Tom Tromey <tromey@redhat.com> |
4752 | ||
45f9f140 | 4753 | PR preprocessor/34288 |
d08a0ab3 | 4754 | * configure.ac, config.in: Rebuilt. |
4755 | * configure.ac: Check for ssize_t. | |
4756 | ||
5eb3761c | 4757 | 2007-11-30 Tom Tromey <tromey@redhat.com> |
4758 | ||
45f9f140 | 4759 | PR preprocessor/32868 |
5eb3761c | 4760 | * macro.c (_cpp_create_definition): Special case |
4761 | __STDC_FORMAT_MACROS. | |
4762 | ||
bce619a6 | 4763 | 2007-11-16 Michael Matz <matz@suse.de> |
4764 | ||
4765 | * files.c (search_path_head): Fix check for absolute paths. | |
4766 | ||
67015c73 | 4767 | 2007-11-11 Tom Tromey <tromey@redhat.com> |
4768 | ||
45f9f140 | 4769 | PR c++/17557 |
67015c73 | 4770 | * include/cpplib.h (cpp_included_before): Declare. |
4771 | * files.c (struct file_hash_entry) <location>: New field. | |
4772 | (_cpp_find_file): Initialize new field. | |
4773 | (make_cpp_dir): Likewise. | |
4774 | (cpp_included_before): New function. | |
4775 | ||
1991d8eb | 4776 | 2007-11-01 Tom Tromey <tromey@redhat.com> |
4777 | ||
45f9f140 | 4778 | PR preprocessor/30805 |
1991d8eb | 4779 | * macro.c (paste_tokens): Handle padding token. |
4780 | (paste_tokens): Don't abort unless padding has PASTE_LEFT flag. | |
4781 | ||
2d507e67 | 4782 | 2007-10-31 Tom Tromey <tromey@redhat.com> |
4783 | ||
45f9f140 | 4784 | PR preprocessor/30786 |
2d507e67 | 4785 | * macro.c (builtin_macro): Return result of _cpp_do__Pragma. |
4786 | * directives.c (_cpp_do__Pragma): Return error status. | |
4787 | * internal.h (_cpp_do__Pragma): Update. | |
4788 | * directives.c (get__Pragma_string): Back up if EOF seen. | |
4789 | ||
931b0a0f | 4790 | 2007-09-06 Tom Tromey <tromey@redhat.com> |
4791 | ||
4792 | * internal.h (struct cpp_reader) <invocation_location>: New | |
4793 | field. | |
4794 | (struct cpp_reader) <set_invocation_location>: Likewise. | |
4795 | * init.c (cpp_set_line_map): New function. | |
4796 | * line-map.c (linemap_add): Use linemap's allocator. | |
4797 | * include/line-map.h (GTY): Define. | |
4798 | (line_map_realloc): New typedef. | |
4799 | (struct line_map): Mark with GTY. | |
4800 | (struct line_maps): Likewise. | |
4801 | (struct line_maps) <maps>: Likewise. | |
4802 | (struct line_maps) <reallocator>: New field. | |
4803 | * include/symtab.h (GTY): Conditionally define. | |
4804 | * include/cpplib.h (cpp_set_line_map): Declare. | |
4805 | (cpp_get_token_with_location): Declare. | |
4806 | * macro.c (cpp_get_token): Set invocation_location on the reader. | |
4807 | (cpp_get_token_with_location): New function. | |
4808 | ||
84373723 | 4809 | 2007-08-30 Chao-ying Fu <fu@mips.com> |
4810 | ||
4811 | * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur, | |
4812 | ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk. | |
4813 | (cpp_classify_number): Support decimal fixed-point constants without | |
4814 | exponents. | |
4815 | Warn about fixed-point constants when -pedantic. | |
4816 | * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change | |
4817 | comments to support fixed-point values. | |
4818 | (CPP_N_FRACT, CPP_N_ACCUM): Define. | |
4819 | ||
36ec4203 | 4820 | 2007-08-18 Tom Tromey <tromey@redhat.com> |
4821 | ||
45f9f140 | 4822 | PR preprocessor/32974 |
36ec4203 | 4823 | * directives.c (parse_include): Don't check for EOL when |
4824 | processing #pragma dependency. | |
4825 | ||
fcde64dc | 4826 | 2007-07-30 Ollie Wild <aaw@google.com> |
4827 | ||
4828 | * directives-only.c: New file. | |
4829 | * internal.h (struct _cpp_dir_only_callbacks): New. | |
4830 | (_cpp_preprocess_dir_only): New function. | |
4831 | * directives.c (_cpp_handle_directive): Check directives_only before | |
4832 | disabling execution of indented directives. | |
4833 | * files.c (_cpp_stack_file): Add directives_only check. | |
4834 | * include/cpplib.h (struct cpp_options): Add directives_only. | |
4835 | (cpp_init_special_builtins): New function. | |
4836 | * init.c (cpp_init_special_builtins): New function. | |
4837 | (cpp_init_builtins): Move builtin_array initialization to | |
4838 | cpp_init_special_builtins. | |
4839 | (post_options): Check directives_only before setting | |
4840 | pfile->state.prevent_expansion = 1. | |
4841 | * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__ | |
4842 | is expanded inside a directive while -fdirectives-only is enabled. | |
4843 | * Makefile.in (libcpp_a_OBJS): Add directives-only.o. | |
4844 | (libcpp_a_SOURCES): Add directives-only.c. | |
4845 | ||
ddedd1e1 | 4846 | 2007-07-04 Uros Bizjak <ubizjak@gmail.com> |
4847 | ||
4848 | * traditional.c (_cpp_scan_out_logical_line): Initialize | |
4849 | fmacro.args, fmacro.node, fmacro.offset, fmacro.line and | |
4850 | fmacro.args to prevent 'may be used uninitialized' warning. | |
4851 | ||
430be8e2 | 4852 | 2007-07-03 Uros Bizjak <ubizjak@gmail.com> |
4853 | ||
4854 | * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q): | |
4855 | Add new constants. | |
4856 | * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q' | |
4857 | suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q | |
4858 | for 'q' or 'Q' suffixes. | |
4859 | ||
909dc303 | 4860 | 2007-06-17 Danny Smith <dannysmith@users.sourceforge.net |
4861 | ||
857d7d5e | 4862 | * files.c (open_file): Correct typo. |
909dc303 | 4863 | |
7d6f49d6 | 4864 | 2007-06-16 Vladimir Prus <vladimir@codesourcery.com> |
4865 | ||
857d7d5e | 4866 | * files.c (open_file): Prevent the call |
7d6f49d6 | 4867 | for stat from overwriting errno. |
4868 | ||
be21d64c | 4869 | 2007-06-09 Vladimir Prus <vladimir@codesourcery.com> |
4870 | ||
857d7d5e | 4871 | * files.c (open_file): Account for the |
cc0a8c77 | 4872 | fact that on windows, opening a directory gives |
4873 | EACCES. | |
be21d64c | 4874 | |
d7282a2b | 4875 | 2007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de> |
4876 | ||
4877 | PR preprocessor/23479 | |
4878 | * expr.c (cpp_classify_number): Implement 0b-prefixed binary | |
4879 | integer constants. | |
4880 | (append_digit): Likewise. | |
4881 | * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed | |
4882 | binary integer constants. | |
4883 | ||
0448520c | 4884 | 2007-05-31 Dave Korn <dave.korn@artimi.com> |
4885 | ||
4886 | PR preprocessor/14331 | |
4887 | * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. | |
4888 | ||
ce079f70 | 4889 | 2007-05-24 Ollie Wild <aaw@google.com> |
4890 | ||
4891 | * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER. | |
4892 | * pch.c (cpp_write_pch_deps): Save __COUNTER__ state. | |
4893 | (cpp_write_pch_state): Save __COUNTER__ state. | |
4894 | (cpp_valid_state): Check valid __COUNTER__ state. | |
4895 | (cpp_read_state): Read new __COUNTER__ state. | |
4896 | * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator. | |
4897 | * init.c (builtin_array): Add __COUNTER__/BT_COUNTER. | |
4898 | * internal.h (struct cpp_reader): Add counter member. | |
4899 | ||
3b6c638e | 4900 | 2007-05-23 Simon Martin <simartin@users.sourceforge.net> |
4901 | ||
4902 | PR preprocessor/20077 | |
4903 | * macro.c (create_iso_definition): Fixed the method to determine | |
4904 | whether the token-pasting operator appears at the beginning or the end | |
4905 | of a macro. | |
4906 | ||
248dfc42 | 4907 | 2007-05-21 Ian Lance Taylor <iant@google.com> |
4908 | ||
4909 | * internal.h (struct cpp_reader): Add new fields: | |
4910 | nonexistent_file_hash and nonexistent_file_ob. | |
4911 | * files.c: Include "obstack.h". | |
4912 | (find_file_in_dir): Before trying to open the file, look up the | |
4913 | path name in the hash table of nonexistent files. After failing | |
4914 | to open the file, add the path name to the hash table. | |
4915 | (_cpp_find_file): Cache the results of looking up the file name | |
4916 | starting with the quote and bracket chain heads, if we can. | |
4917 | (nonexistent_file_hash_eq): New static function. | |
4918 | (_cpp_init_files): Initialize pfile->nonexistent_file_hash and | |
4919 | pfile->nonexistent_file_ob. | |
4920 | (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and | |
4921 | pfile->nonexistent_file_ob. | |
4922 | ||
c55e2f1b | 4923 | 2007-05-14 Janis Johnson <janis187@us.ibm.com> |
4924 | ||
cc0a8c77 | 4925 | * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic. |
5c00409a | 4926 | |
c55e2f1b | 4927 | PR c/31924 |
4928 | * expr.c (interpret_float_suffix): Check for invalid suffix. | |
4929 | ||
dd97b5e4 | 4930 | 2007-05-02 Eric Christopher <echristo@apple.com> |
4931 | ||
4932 | * expr.c (num_div_op): Don't overflow if the result is | |
4933 | zero. | |
4934 | ||
3127c357 | 4935 | 2007-05-02 Tom Tromey <tromey@redhat.com> |
4936 | ||
45f9f140 | 4937 | PR preprocessor/28709 |
3127c357 | 4938 | * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. |
4939 | ||
f23c2abe | 4940 | 2007-03-30 Michael Meissner <michael.meissner@amd.com> |
4941 | ||
4942 | * directives.c (lex_macro_node_from_str): Fix alloca call to be | |
4943 | type correct. | |
4944 | ||
3fa3949d | 4945 | 2007-03-30 Richard Henderson <rth@redhat.com> |
4946 | ||
4947 | * directives.c (lex_macro_node_from_str): New. | |
4948 | (cpp_push_definition, cpp_pop_definition): New. | |
4949 | * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare. | |
4950 | ||
7262ccd6 | 4951 | 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com> |
4952 | ||
4953 | * Makefile.in: Add dummy install-pdf target. | |
4954 | ||
09edb0e9 | 4955 | 2007-01-30 Tom Tromey <tromey@redhat.com> |
4956 | ||
45f9f140 | 4957 | PR preprocessor/30468 |
09edb0e9 | 4958 | * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped |
4959 | './'. | |
4960 | ||
e0ff7935 | 4961 | 2007-01-30 Tom Tromey <tromey@redhat.com> |
4962 | ||
45f9f140 | 4963 | PR preprocessor/29966 |
e0ff7935 | 4964 | * macro.c (lex_expansion_token): Save and restore cpp_reader's |
4965 | cur_token. | |
4966 | (_cpp_create_definition): Don't restore cur_token here. | |
4967 | * lex.c (_cpp_lex_token): Added assertion. | |
4968 | ||
87d210c3 | 4969 | 2007-01-27 Tom Tromey <tromey@redhat.com> |
4970 | ||
4971 | * configure: Rebuilt. | |
4972 | ||
3e2a04b5 | 4973 | 2007-01-12 Tom Tromey <tromey@redhat.com> |
4974 | ||
45f9f140 | 4975 | PR preprocessor/28227 |
3e2a04b5 | 4976 | * directives.c (lex_macro_node): Added 'is_def_or_undef' |
4977 | argument. | |
4978 | (do_define): Update. | |
4979 | (do_undef): Update. | |
4980 | (do_ifdef): Update. | |
4981 | (do_ifndef): Update. | |
4982 | ||
6a6e7e2f | 4983 | 2007-01-11 Paolo Bonzini <bonzini@gnu.org> |
4984 | ||
4985 | * configure: Regenerate. | |
4986 | ||
77258a2e | 4987 | 2007-01-11 Paolo Bonzini <bonzini@gnu.org> |
4988 | ||
4989 | * configure: Regenerate. | |
4990 | ||
927b511f | 4991 | 2007-01-04 Tom Tromey <tromey@redhat.com> |
4992 | ||
45f9f140 | 4993 | PR preprocessor/28165 |
927b511f | 4994 | * internal.h (cpp_in_primary_file): New function. |
4995 | * directives.c (do_include_next): Use cpp_in_primary_file. | |
4996 | (do_pragma_once): Likewise. | |
4997 | (do_pragma_system_header): Likewise. | |
4998 | ||
5008f5c5 | 4999 | 2006-12-29 Ian Lance Taylor <iant@google.com> |
5000 | ||
5001 | * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't | |
5002 | look backward at the end of the line unless we saw a backslash. | |
5003 | ||
5d70627e | 5004 | 2006-12-29 Jakub Jelinek <jakub@redhat.com> |
5005 | ||
5006 | PR preprocessor/29612 | |
5007 | * directives.c (do_linemarker): Set pfile->buffer->sysp always, not | |
5008 | only when new_sysp is non-zero. | |
5009 | ||
854f075e | 5010 | 2006-12-28 Tom Tromey <tromey@redhat.com> |
5011 | ||
45f9f140 | 5012 | PR preprocessor/30001 |
854f075e | 5013 | * charset.c (_cpp_convert_input): Check that to.len is greater |
5014 | than zero. | |
5015 | ||
644459d0 | 5016 | 2006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com> |
5017 | ||
5018 | * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU. | |
db375b8e | 5019 | * configure: Rebuilt. |
644459d0 | 5020 | |
093aec7c | 5021 | 2006-11-01 Douglas Gregor <doug.gregor@gmail.com> |
5022 | ||
5023 | * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X | |
5024 | for experimental C++0x mode. | |
5025 | * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has | |
5026 | adopted the preprocessor changes introduced in C99. | |
5027 | ||
54bb64fb | 5028 | 2006-10-29 Joseph Myers <joseph@codesourcery.com> |
5029 | ||
5030 | * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux* | |
5031 | depending on --enable-targets=all. | |
5032 | * configure: Regenerate. | |
5033 | ||
46139d3f | 5034 | 2006-10-12 Jakub Jelinek <jakub@redhat.com> |
5035 | ||
5036 | PR preprocessor/28709 | |
5037 | * macro.c (paste_tokens): Do error reporting here, use BUF with the | |
5038 | spelled LHS token as opposed to spelling it again. | |
5039 | (paste_all_tokens): Don't report errors here, just break on failure. | |
5040 | ||
51f93521 | 5041 | 2006-10-10 Brooks Moses <bmoses@stanford.edu> |
5042 | ||
5043 | * Makefile.in: Added empty "pdf" target. | |
5044 | ||
32bca58b | 5045 | 2006-09-22 Geoffrey Keating <geoffk@apple.com> |
5046 | ||
5047 | * configure.ac: Make need_64_bit_hwint case for x86-darwin | |
5048 | match exactly the glob in gcc/config.gcc. | |
5049 | * configure: Regenerate. | |
5050 | ||
0b67f687 | 5051 | 2006-09-13 Joseph S. Myers <joseph@codesourcery.com> |
5052 | ||
5053 | PR c/28768 | |
5054 | PR preprocessor/14634 | |
5055 | * lex.c (lex_string): Pedwarn for unterminated literals. | |
5056 | ||
3ebc7dec | 5057 | 2006-09-08 Eric Christopher <echristo@apple.com> |
5058 | ||
5059 | * configure.ac: Add 64-bit HWI support for i?86-darwin. | |
5060 | ||
e58c07f7 | 5061 | 2006-08-14 Steve Ellcey <sje@cup.hp.com> |
5062 | ||
5063 | PR c++/28288 | |
5064 | PR c++/14556 | |
5065 | * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens. | |
5066 | (CPP_LAST_EQ): Change. | |
5067 | (CPP_LAST_PUNCTUATOR): Change. | |
5068 | * expr.c (cpp_operator): Remove MIN and MAX. | |
5069 | (reduce): Remove CPP_MIN and CPP_MAX. | |
5070 | (num_binary_op): Ditto. | |
5071 | * lex.c (_cpp_lex_direct): Ditto. | |
5072 | (cpp_avoid_paste): Remove ? as legal symbol after > or <. | |
5073 | ||
add258d7 | 5074 | 2006-06-09 Jakub Jelinek <jakub@redhat.com> |
5075 | ||
5076 | PR preprocessor/27746 | |
5077 | * directives.c (do_pragma): Handle pragma with valid namespace | |
5078 | and invalid name coming from macro expansion. | |
5079 | * directives.c (destringize_and_run): Initialize next field in | |
5080 | context. | |
5081 | ||
5082 | PR c/27747 | |
5083 | PR c++/27748 | |
5084 | * directives.c (destringize_and_run): Set NO_EXPAND on the | |
5085 | tokens. | |
5086 | ||
5087 | * macro.c (_cpp_backup_tokens): Fix comment typo. | |
5088 | ||
49688a56 | 5089 | 2006-05-31 Daniel Jacobowitz <dan@codesourcery.com> |
5090 | ||
5091 | * Makefile.in (CATALOGS): Add po/ prefix. | |
5092 | * configure: Regenerated. | |
5093 | ||
8f597c12 | 5094 | 2006-05-23 Carlos O'Donell <carlos@codesourcery.com> |
5095 | ||
5096 | * Makefile.in: Add install-html target. Add install-html to .PHONY | |
5097 | ||
cca5dddc | 5098 | 2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com> |
5099 | ||
5100 | * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP. | |
5101 | * files.c (_cpp_get_file_stat): New function. | |
5102 | * include/cpplib.h (builtin_type): Add BT_TIMESTAMP. | |
5103 | * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP. | |
5104 | * internal.h (_cpp_get_file_stat): Prototype. | |
5105 | (struct cpp_buffer): Add timestamp. | |
5106 | ||
31614f7c | 5107 | 2006-01-23 Jakub Jelinek <jakub@redhat.com> |
5108 | ||
5109 | PR preprocessor/25717 | |
5110 | * init.c (cpp_init_builtins): If __STDC__ will not change value | |
5111 | between system headers and other sources, define it as a normal | |
5112 | macro rather than a builtin. | |
5113 | * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check | |
5114 | cpp_in_system_header condition. | |
5115 | ||
5116 | 2006-01-05 Paolo Bonzini <bonzini@gnu.org> | |
3c77e017 | 5117 | |
5118 | * Makefile.in: Use -MMD instead of -MD. | |
5119 | ||
b75b98aa | 5120 | 2006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com> |
5121 | Richard Henderson <rth@redhat.com> | |
5122 | ||
5123 | Merge from gomp branch: | |
5124 | * directives.c (struct pragma_entry): Add is_deferred. Add ident | |
5125 | entry to value union. | |
5126 | (end_directive): Don't eat the line if in_deferred_pragma. | |
5127 | (run_directive): Remove pragma hacks. | |
5128 | (insert_pragma_entry): Remove. | |
5129 | (new_pragma_entry): New. | |
5130 | (register_pragma_1): Split out of register_pragma. Only handle | |
5131 | the lookup tree and return the new entry. | |
5132 | (cpp_register_pragma): Fill in the pragma entry here. | |
5133 | (cpp_register_deferred_pragma): New. | |
5134 | (register_pragma_internal): New. | |
5135 | (_cpp_init_internal_pragmas): Use register_pragma_internal. | |
5136 | (do_pragma): Allow pragma expansion after namespace. For deferred | |
5137 | pragmas, don't slurp the line into a string. | |
5138 | (destringize_and_run): Save tokens for deferred pragmas. | |
5139 | (cpp_handle_deferred_pragma): Remove. | |
5140 | * macro.c (builtin_macro): Remove pragma token hack. | |
5141 | (_cpp_push_token_context): Rename from push_token_context and export. | |
5142 | * internal.h (struct lexer_state): Add pragma_allow_expansion. | |
5143 | (_cpp_push_token_context): Declare. | |
5144 | * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return | |
5145 | a token. Update the line number correctly if so. | |
5146 | (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens. | |
5147 | (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas. | |
5148 | * include/cpplib.h (PRAGMA_EOL): New. | |
5149 | (CPP_TOKEN_FLD_PRAGMA): New. | |
5150 | (struct cpp_token): Add val.pragma. | |
5151 | (struct cpp_options): Remove defer_pragmas. | |
5152 | (cpp_handle_deferred_pragma): Remove. | |
5153 | (cpp_register_deferred_pragma): Declare. | |
5154 | ||
986ca356 | 5155 | 2006-01-01 Jakub Jelinek <jakub@redhat.com> |
5156 | ||
5157 | PR c++/25294 | |
5158 | * directives.c (do_pragma): If pragma line ends with multi-line | |
5159 | block comment, end the saved deferred pragma string before that | |
5160 | comment. Handle embedded '\0' chars on the pragma line. | |
5161 | ||
8dba02f7 | 5162 | 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> |
5163 | ||
5164 | PR c++/23333 | |
5165 | * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure. | |
5166 | ||
6db045b0 | 5167 | 2005-12-07 Jon Grimm <jgrimm2@us.ibm.com> |
5168 | Ben Elliston <bje@au.ibm.com> | |
5169 | ||
5170 | * include/cpplib.h (CPP_N_DFLOAT): New. | |
5171 | * expr.c (interpret_float_suffix): Identify df, dd, and dl | |
5172 | suffixes as decimal floating point constants. | |
5173 | (cpp_classify_number): Disallow hexadecimal DFP constants. | |
5174 | ||
9a7c76f9 | 5175 | 2005-11-14 Gerald Pfeifer <gerald@pfeifer.com> |
b75b98aa | 5176 | Ian Lance Taylor <ian@airs.com> |
9a7c76f9 | 5177 | |
5178 | * include/cpplib.h (struct cpp_callbacks): Annotate error with | |
5179 | ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0). | |
5180 | ||
0c5e3a3d | 5181 | 2005-11-09 Per Bothner <per@bothner.com> |
5182 | Uros Bizjak <uros@kss-loka.si> | |
3ebc7dec | 5183 | |
0c5e3a3d | 5184 | PR c/24101 |
5185 | * init.c (read_original_filename): Temporarily set | |
5186 | state.in_directive before calling _cpp_lex_direct for | |
5187 | CPP_HASH tokens. | |
5188 | ||
3c2359db | 5189 | 2005-11-03 James E Wilson <wilson@specifix.com> |
5190 | ||
5191 | PR preprocessor/24202 | |
5192 | * files.c (_cpp_pop_file_buffer): Set buffer_valid to false. | |
5193 | ||
d65b3a40 | 5194 | 2005-11-04 Joseph S. Myers <joseph@codesourcery.com> |
5195 | ||
5196 | * include/cpplib.h (struct cpp_callbacks): Make error take | |
5197 | va_list* parameter. | |
5198 | * errors.c (cpp_error): Update call to callback. | |
5199 | ||
cc9012f7 | 5200 | 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu> |
5201 | ||
5202 | PR preprocessor/22042 | |
5203 | * macro.c (_cpp_builtin_macro_text): Lower the needed max | |
5204 | buffer size. | |
5205 | (cpp_quote_string): Don't octalify non printable | |
5206 | charactors. | |
5207 | ||
eb0d20b7 | 5208 | 2005-11-03 Joseph S. Myers <joseph@codesourcery.com> |
5209 | ||
5210 | PR c++/17964 | |
5211 | * include/cpplib.h (struct cpp_options): Add client_diagnostic. | |
5212 | (struct cpp_callbacks): Add error. | |
5213 | * errors.c (cpp_error): If client_diagnostic, use error callback. | |
5214 | * charset.c (convert_escape): Don't use %03o in diagnostic. | |
5215 | ||
de4aacc0 | 5216 | 2005-10-21 James E Wilson <wilson@specifix.com> |
04c0bfd0 | 5217 | |
5218 | PR preprocessor/15220 | |
5219 | * files.c (_cpp_find_file): New parameter angle_brackets. Fix all | |
5220 | callers. Pass to open_file_failed. | |
5221 | (open_file_failed): New parameter angle_brackets. Fix all callers. | |
5222 | Use in print_dep assignment. | |
5223 | * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file. | |
5224 | * internal.h (_cpp_find_file): Add new parm to declaration. | |
3ebc7dec | 5225 | |
6783d878 | 5226 | 2005-10-08 Kazu Hirata <kazu@codesourcery.com> |
5227 | ||
5228 | * configure.ac: Require 64-bit int for arm*-*-*eabi*. | |
5229 | * configure: Regenerate. | |
5230 | ||
f789fe3e | 5231 | 2005-10-04 Ian Lance Taylor <ian@airs.com> |
5232 | ||
5233 | PR preprocessor/13726 | |
5234 | * directives.c (check_eol_return_comments): New static function. | |
5235 | (parse_include): Add buf parameter. Change all callers. | |
5236 | (do_include_common): If not discard comments, turn on | |
5237 | save_comments. Pass collected comments to include callback. | |
5238 | * include/cpplib.h (struct cpp_callbacks): Add new parameter to | |
5239 | include callback: cpp_token list. | |
5240 | ||
865c4e44 | 5241 | 2005-09-20 Joseph S. Myers <joseph@codesourcery.com> |
5242 | ||
5243 | * include/cpplib.h (struct cpp_options): Add extended_identifiers. | |
5244 | * init.c (struct lang_flags, lang_defaults): Add | |
5245 | extended_identifiers. | |
5246 | (cpp_set_lang): Use it. | |
5247 | * lex.c (forms_identifier_p): Check extended_identifiers. | |
5248 | ||
56845aa6 | 5249 | 2005-08-30 Jakub Jelinek <jakub@redhat.com> |
5250 | ||
5251 | PR preprocessor/20348 | |
5252 | PR preprocessor/20356 | |
5253 | * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and | |
5254 | 2004-06-05 changes. | |
5255 | ||
72ee8ff9 | 5256 | 2005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
5257 | ||
5258 | * configure.ac (ACX_PROG_CC_WARNING_OPTS): add | |
5259 | -Wmissing-format-attribute. | |
5260 | ||
5261 | * configure: Regenerate. | |
5262 | ||
2656917a | 5263 | 2005-06-29 Kelley Cook <kcook@gcc.gnu.org> |
5264 | ||
5265 | * all files: Update FSF address in copyright headers. | |
5266 | * makeucnid.c (write_copyright): Update outputted FSF address. | |
5267 | ||
cbaa9876 | 5268 | 2005-06-13 Zack Weinberg <zack@codesourcery.com> |
5269 | ||
5270 | * configure.ac: Invoke ZW_CREATE_DEPDIR and | |
5271 | ZW_PROG_COMPILER_DEPENDENCIES. | |
5272 | * aclocal.m4, configure: Regenerate. | |
5273 | * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE): | |
5274 | New variables. | |
5275 | (distclean): Clean up $(DEPDIR) and its contents. | |
5276 | (.c.o): Use $(COMPILE). | |
5277 | Include $(DEPDIR)/*.Po for most object->header dependencies. | |
5278 | ||
720aca92 | 5279 | 2005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net> |
5280 | ||
5281 | * configure.ac: Check declarations for asprintf and vasprintf. | |
5282 | * config.in: Regenerate. | |
5283 | * configure: Likewise. | |
5284 | ||
5285 | * charset.c (conversion_loop): Use XRESIZEVEC. | |
5286 | (convert_no_conversion): Likewise. | |
5287 | (convert_using_iconv): Likewise. | |
5288 | (init_iconv_desc): Cast return value of alloca. | |
5289 | (cpp_host_to_exec_charset): Use XNEWVEC. | |
5290 | (emit_numeric_escape): Use XRESIZEVEC. | |
5291 | (cpp_interpret_string): Use XNEWVEC. | |
5292 | (cpp_interpret_string): Use XRESIZEVEC. | |
5293 | (_cpp_interpret_identifier): Cast return value of alloca. | |
5294 | (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC. | |
5295 | * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC. | |
5296 | (parse_include): Use XNEWVEC. | |
5297 | (insert_pragma_entry): Rename local variable "new" to | |
cbaa9876 | 5298 | "new_entry". |
720aca92 | 5299 | (save_registered_pragmas): Cast return value of xmemdup. |
5300 | (destringize_and_run): Same for alloca. | |
5301 | (parse_assertion): Likewise. | |
5302 | (do_assert): Cast allocated storage to proper type. | |
5303 | (cpp_define): Likewise. | |
5304 | (_cpp_define_builtin): Likewise. | |
5305 | (cpp_undef): Likewise. | |
5306 | (handle_assertion): Likewise. | |
5307 | (cpp_push_buffer): Rename local variable "new" to "new_buffer". | |
5308 | * expr.c (CPP_UPLUS): Cast value to type cpp_ttype. | |
5309 | (CPP_UMINUS): Likewise. | |
5310 | (struct cpp_operator): Rename from struct operator. | |
5311 | (_cpp_expand_op_stack): Use XRESIZEVEC. | |
5312 | * files.c (pch_open_file): Use XNEWVEC. | |
5313 | (pch_open_file): Use XRESIZEVEC. | |
5314 | (read_file_guts): Use XNEWVEC and XRESIZEVEC. | |
5315 | (dir_name_of_file): Use XNEWVEC. | |
5316 | (make_cpp_file): Use XCNEW. | |
5317 | (make_cpp_dir): Likewise. | |
5318 | (allocate_file_hash_entries): USE XNEWVEC. | |
5319 | (cpp_included): Cast return value of htab_find_with_hash. | |
5320 | (append_file_to_dir): Use XNEWVEC. | |
5321 | (read_filename_string): Likewise. Use XRESIZEVEC too. | |
5322 | (read_name_map): Cast return value of alloca. Use XRESIZEVEC. | |
5323 | (remap_filename): Use XNEWVEC. | |
5324 | (struct pchf_entry): Move definition out of struct pchf_data. | |
5325 | (_cpp_save_file_entries): Use XCNEWVAR. | |
5326 | (_cpp_read_file_entries): Use XNEWVAR. | |
5327 | * identifiers.c (alloc_node): Use XOBNEW. | |
5328 | * init.c (cpp_create_reader): Use XCNEW. | |
5329 | (cpp_init_builtins): Cast of b->value to enum builtin_type. | |
5330 | (read_original_directory): Cast return value of alloca. | |
5331 | * lex.c (add_line_note): Use XRESIZEVEC. | |
5332 | (warn_about_normalization): Use XNEWVEC. | |
5333 | (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype). | |
5334 | (new_buff): Use XNEWVEC. | |
5335 | * line-map.c (linemap_add): Use XRESIZEVEC. | |
5336 | * macro.c (builtin_macro): Cast return value of alloca. | |
5337 | (paste_tokens): Likewise. | |
5338 | (expand_arg): Use XNEWVEC and XRESIZEVEC. | |
5339 | (_cpp_save_parameter): Use XRESIZEVEC. | |
5340 | (create_iso_definition): Cast allocated storage to proper type. | |
5341 | (_cpp_create_definition): Likewise. | |
5342 | (cpp_macro_definition): Use XRESIZEVEC. | |
5343 | * makedepend.c (add_clm): Use XNEW. | |
5344 | (add_dir): Likewise. | |
5345 | * mkdeps.c (munge): Use XNEWVEC. | |
5346 | (deps_init): Use XCNEW. | |
5347 | (deps_add_target): Use XRESIZEVEC. | |
5348 | (deps_add_default_target): Cast return value of alloca. | |
5349 | (deps_add_dep): Use XRESIZEVEC. | |
5350 | (deps_add_vpath): Likewise. Use XNEWVEC too. | |
5351 | (deps_restore): Likewise. | |
5352 | * pch.c (save_idents): Use XNEW and XNEWVEC. | |
5353 | (cpp_save_state): Use XNEW. | |
5354 | (count_defs): Cast return value of htab_find. | |
5355 | (write_defs): Likewise. | |
5356 | (cpp_write_pch_deps): Use XNEWVEC. | |
5357 | (collect_ht_nodes): Use XRESIZEVEC. | |
5358 | (cpp_valid_state): Use XNEWVEC. | |
5359 | (save_macros): Use XRESIZEVEC. Cast return value of xmemdup. | |
5360 | * symtab.c (ht_create): Use XCNEW. | |
5361 | (ht_lookup_with_hash): Cast return value of obstack_copy0. | |
5362 | (ht_expand): Use XCNEWVEC. | |
5363 | * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus. | |
5364 | (bool): Do not define if __cplusplus. | |
5365 | ||
81e19b31 | 5366 | 2005-05-12 Zack Weinberg <zack@codesourcery.com> |
5367 | ||
5368 | * directives.c (#sccs table entry): Mark IN_I, consistent with #ident. | |
5369 | (do_sccs): Delete function definition, #define to do_ident. | |
5370 | (do_ident): Don't hardwire directive name. | |
5371 | ||
18f11b84 | 5372 | 2005-05-12 Ryota Kunisawa <kunisawa@access.co.jp> |
5373 | ||
5374 | PR bootstrap/21230 | |
5375 | * configure: Regenerate. | |
5376 | ||
2dc04f36 | 5377 | 2005-04-27 Andris Pavenis <pavenis@latnet.lv> |
5378 | ||
5379 | * files.c: Include io.h for DJGPP to get prototype of setmode. | |
5380 | ||
0b7f838f | 5381 | 2005-04-19 Per Bothner <per@bothner.com> |
5382 | ||
5383 | PR preprocessor/20907 | |
5384 | * line-map.c (linemap_line_start): Fix bug when we need to increse | |
5385 | column_bits but can re-use the current line_map. | |
5386 | ||
2224c90b | 5387 | 2005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
5388 | ||
5389 | * system.h (fopen, fdopen, freopen): Define these to the unlocked | |
5390 | libiberty functions. | |
5391 | ||
077a3c99 | 5392 | 2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
5393 | ||
5394 | * configure.ac (libcpp_UNLOCKED_FUNCS): New. | |
5395 | (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS. | |
5396 | * system.h (putchar, getc, getchar, clearerr, feof, fileno, | |
5397 | fflush, fgetc, fgets, ferror, fread): Redefine to the associated | |
5398 | _unlocked function. | |
5399 | (fwrite_unlocked): Fix prototype. | |
81e19b31 | 5400 | |
077a3c99 | 5401 | * configure, config.in: Regenerate. |
5402 | ||
99617355 | 5403 | 2005-04-05 Jakub Jelinek <jakub@redhat.com> |
5404 | ||
5405 | PR preprocessor/19475 | |
5406 | * macro.c (create_iso_definition): For < ISO C99, don't | |
5407 | pedwarn if there is no whitespace between macro name and its | |
5408 | replacement, but the replacement starts with a basic character | |
5409 | set character. | |
5410 | ||
3827dee5 | 5411 | 2005-03-28 Andreas Jaeger <aj@suse.de> |
5412 | ||
5413 | * lex.c (warn_about_normalization): Cast field width to int to | |
5414 | avoid warning. | |
5415 | ||
b8273627 | 5416 | 2005-03-19 Joseph S. Myers <joseph@codesourcery.com> |
5417 | ||
5418 | * configure.ac: Consistently use solaris2.1[0-9]* instead of | |
5419 | solaris2.1[0-9]. | |
5420 | * configure: Regenerate. | |
5421 | ||
bc65f24f | 5422 | 2005-03-15 Geoffrey Keating <geoffk@apple.com> |
5423 | ||
5424 | * charset.c (_cpp_valid_ucn): In identifiers, reject a partial | |
5425 | UCN rather than printing an error. | |
5426 | ||
bce47149 | 5427 | 2005-03-14 Geoffrey Keating <geoffk@apple.com> |
5428 | ||
4e9d1e6d | 5429 | * lex.c (forms_identifier_p): Disable UCNs in C89 mode. |
5430 | ||
5431 | 2005-03-14 Geoffrey Keating <geoffk@apple.com> | |
81e19b31 | 5432 | |
bce47149 | 5433 | * init.c (cpp_create_reader): Default warn_normalize to normalized_C. |
5434 | * charset.c: Update for new format of ucnid.h. | |
5435 | (ucn_valid_in_identifier): Update for new format of ucnid.h. | |
5436 | Add NST parameter, and update it; update callers. | |
5437 | (cpp_valid_ucn): Add NST parameter, update callers. Replace abort | |
5438 | with cpp_error. | |
5439 | (convert_ucn): Pass normalize_state to cpp_valid_ucn. | |
5440 | * internal.h (struct normalize_state): New. | |
5441 | (INITIAL_NORMALIZE_STATE): New. | |
5442 | (NORMALIZE_STATE_RESULT): New. | |
5443 | (NORMALIZE_STATE_UPDATE_IDNUM): New. | |
5444 | (_cpp_valid_ucn): New. | |
5445 | * lex.c (warn_about_normalization): New. | |
5446 | (forms_identifier_p): Add normalize_state parameter, update callers. | |
5447 | (lex_identifier): Add normalize_state parameter, update callers. Keep | |
5448 | the state current. | |
5449 | (lex_number): Likewise. | |
5450 | (_cpp_lex_direct): Pass normalize_state to subroutines. Check | |
5451 | it with warn_about_normalization. | |
5452 | * makeucnid.c: New. | |
5453 | * ucnid.h: Replace. | |
5454 | * ucnid.pl: Remove. | |
5455 | * ucnid.tab: Make appropriate for input to makeucnid.c. Remove | |
5456 | comments about obsolete version of C++. | |
5457 | * include/cpplib.h (enum cpp_normalize_level): New. | |
5458 | (struct cpp_options): Add warn_normalize field. | |
5459 | ||
bb1fa6bb | 5460 | 2005-03-11 Geoffrey Keating <geoffk@apple.com> |
5461 | ||
5462 | * directives.c (glue_header_name): Update call to cpp_spell_token. | |
5463 | * internal.h (_cpp_interpret_identifier): New. | |
5464 | * charset.c (_cpp_interpret_identifier): New. | |
5465 | (_cpp_valid_ucn): Allow UCN version of '$'. | |
5466 | * lex.c (lex_identifier): Add extra parameter to indicate if initial | |
5467 | character was '$' or '\'. Support identifiers with UCNs. | |
5468 | (forms_identifier_p): Allow UCNs. | |
5469 | (_cpp_lex_direct): Pass extra parameter to lex_identifier. | |
5470 | (utf8_to_ucn): New. | |
5471 | (cpp_spell_token): Add FORSTRING parameter. Use it. | |
5472 | (cpp_token_as_text): Update call to cpp_spell_token. | |
5473 | (cpp_output_token): Write UCNs back out. | |
5474 | (stringify_arg): Update call to cpp_spell_token. | |
5475 | (paste_tokens): Likewise. | |
5476 | (cpp_macro_definition): Likewise. | |
5477 | * macro.c (stringify_arg): Likewise. | |
5478 | (paste_tokens): Likewise. | |
5479 | (cpp_macro_definition): Likewise. | |
5480 | * include/cpplib.h: Add parameter to cpp_spell_token. | |
5481 | ||
960391da | 5482 | 2005-03-04 Jakub Jelinek <jakub@redhat.com> |
5483 | ||
5484 | PR bootstrap/20282 | |
5485 | PR bootstrap/20305 | |
5486 | * macro.c (replace_args, cpp_get_token): Copy whole | |
5487 | cpp_token_u instead of just cpp_string field from it. | |
5488 | ||
b0d0794d | 5489 | 2005-02-28 Devang Patel <dpatel@apple.com> |
5490 | ||
5491 | * directives.c (do_line): Save sysp early before line table is | |
5492 | realloc'ed. | |
81e19b31 | 5493 | |
624d37a6 | 5494 | 2005-02-20 Zack Weinberg <zack@codesourcery.com> |
5495 | ||
5496 | PR 18785 | |
5497 | * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro. | |
5498 | (cpp_host_to_exec_charset): New function. | |
5499 | * include/cpplib.h: Declare cpp_host_to_exec_charset. | |
5500 | ||
f86986bc | 5501 | 2005-02-19 Devang Patel <dpatel@apple.com> |
5502 | ||
5503 | * charset.c (_cpp_convert_input): Check '\r' before inserting | |
5504 | '\n' at the end. | |
624d37a6 | 5505 | |
9936e07d | 5506 | 2005-02-15 Eric Christopher <echristo@redhat.com> |
5507 | ||
5508 | PR preprocessor/19077 | |
5509 | * macro.c (cpp_macro_definition): Move handling of whitespace | |
5510 | to PREV_WHITE conditional. Remove overloading of len | |
5511 | variable. | |
5512 | ||
129a1540 | 5513 | 2005-02-14 Kazu Hirata <kazu@cs.umass.edu> |
5514 | ||
5515 | * directives.c, files.c, init.c, internal.h, macro.c, pch.c, | |
5516 | traditional.c: Update copyright. | |
5517 | ||
bb30d1f4 | 5518 | 2005-02-14 Paolo Bonzini <bonzini@gnu.org> |
5519 | ||
5520 | PR bootstrap/19818 | |
5521 | * configure.ac: Check for declaration of basename and getopt. | |
5522 | * config.in: Regenerate. | |
5523 | * configure: Regenerate. | |
5524 | * internal.h (ustrcspn): New. | |
5525 | * macro.c (create_iso_definition): Fix allocation of memory. | |
5526 | (padding_token): Add cast to remove const-ness. | |
5527 | * pch.c (cpp_read_state): Use ustrcspn. | |
5528 | ||
26ec4f15 | 5529 | 2005-02-08 Mike Stump <mrs@apple.com> |
5530 | ||
5531 | * files.c (pchf_adder): Remove. | |
5532 | (struct pchf_adder_info): Likewise. | |
5533 | (_cpp_save_file_entries): Write out all files so that #import works. | |
5534 | ||
0cb78cbd | 5535 | 2005-01-23 Joseph S. Myers <joseph@codesourcery.com> |
5536 | ||
5537 | * configure: Regenerate. | |
5538 | ||
d862067c | 5539 | 2005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> |
5540 | ||
5541 | * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader. | |
5542 | ||
457e71e4 | 5543 | * include/cpplib.h: Also update copyright years. |
624d37a6 | 5544 | |
ba841ef8 | 5545 | 2005-01-03 Geoffrey Keating <geoffk@apple.com> |
5546 | ||
5547 | * files.c (_cpp_find_file): Add files found by search_path_exhausted | |
5548 | to the list of all files. | |
5549 | ||
f03668bd | 5550 | 2005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net> |
5551 | ||
5552 | * internal.h: Update references to Cpp lib filenames. | |
5553 | * directives.c: Likewise. | |
5554 | * init.c: Likewise. | |
5555 | * macro.c: Likewise. | |
5556 | * traditional.c: Likewise. | |
5557 | ||
461ea98d | 5558 | 2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr> |
5559 | ||
5560 | PR preprocessor/15167 | |
5561 | * files.c (destroy_cpp_file): New function. | |
5562 | (should_stack_file): Make a new file if the | |
5563 | compared file is still stacked. | |
5564 | ||
bd9e37a6 | 5565 | 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org> |
5566 | ||
624d37a6 | 5567 | PR preprocessor/17610 |
bd9e37a6 | 5568 | * directives.c (do_include_common): Error out if an empty filename |
5569 | is given for #include (or #include_next or #import). | |
5570 | ||
fe4dcd90 | 5571 | 2004-11-27 Roger Sayle <roger@eyesopen.com> |
5572 | Zack Weinberg <zack@codesourcery.com> | |
5573 | ||
5574 | * internal.h: Replace all uses of uchar with unsigned char. | |
5575 | * include/cpp-id-data.h: Likewise. Guard typedef of uchar | |
5576 | with !IN_GCC, so uchar is only defined whilst building libcpp. | |
5577 | ||
ac7cc2f4 | 5578 | 2004-11-24 Kelley Cook <kcook@gcc.gnu.org> |
5579 | ||
5580 | * aclocal.m4: Regenerate. | |
5581 | ||
6e11b263 | 5582 | 2004-11-24 Roger Sayle <roger@eyesopen.com> |
5583 | ||
5584 | PR preprocessor/15824 | |
5585 | * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h> | |
5586 | directly, instead of the non-existant "system.h" and "ansidecl.h". | |
5587 | * configure: Regenerate. | |
5588 | ||
68bf2ad9 | 5589 | 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com> |
624d37a6 | 5590 | Joseph Myers <joseph@codesourcery.com> |
68bf2ad9 | 5591 | |
5592 | * internal.h (struct lexer_state): Add in_deferred_pragma. | |
5593 | * directives.c (struct pragma_entry): Add allow_expansion. | |
5594 | (insert_pragma_entry): Take allow_expansion flag. | |
5595 | (register_pragma): Likewise. | |
5596 | (cpp_register_pragma): Likewise. | |
5597 | (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma. | |
5598 | (do_pragma): Honor allow_expansion. | |
5599 | (cpp_handle_deferred_pragma): Set in_deferred_pragma. | |
5600 | * include/cpplib.h (cpp_register_pragma): Update prototype. | |
5601 | ||
27559c4e | 5602 | 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com> |
624d37a6 | 5603 | Mark Mitchell <mark@codesourcery.com> |
27559c4e | 5604 | |
5605 | * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set | |
5606 | need_64bit_hwint=yes. | |
5607 | * configure: Regenerate. | |
5608 | ||
34ae664d | 5609 | 2004-11-09 Joseph S. Myers <joseph@codesourcery.com> |
5610 | ||
5611 | * Makefile.in ($(PACKAGE).pot): New rule. Depend on | |
5612 | po/$(PACKAGE).pot. | |
5613 | (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword | |
5614 | arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2. | |
5615 | Remove local srcdir path from generated file. | |
5616 | ||
39b83bdb | 5617 | 2004-11-04 Zack Weinberg <zack@codesourcery.com> |
624d37a6 | 5618 | Gerald Pfeifer <gerald@pfeifer.com> |
39b83bdb | 5619 | |
5620 | * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H | |
5621 | as well. | |
5622 | ||
a095c1b5 | 5623 | 2004-10-27 Zack Weinberg <zack@codesourcery.com> |
5624 | ||
5625 | PR 18075 | |
5626 | * directives.c (do_pragma): Do not defer pragmas which are unknown. | |
5627 | (cpp_handle_deferred_pragma): Add cast to silence warning. | |
5628 | ||
700b0d81 | 5629 | 2004-10-14 Joseph S. Myers <jsm@polyomino.org.uk> |
5630 | ||
5631 | * errors.c (_cpp_begin_message): Print "error: " for errors. | |
5632 | ||
fbe83ac1 | 5633 | 2004-10-10 Andreas Jaeger <aj@suse.de> |
5634 | ||
5635 | * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath. | |
5636 | * Makefile.in (makedepend.o): Add dependency on mkdeps.h. | |
5637 | ||
09f10c94 | 5638 | 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu> |
5639 | ||
5640 | * pch.c (cpp_write_pch_state): Remove variable z as it is not | |
5641 | used. | |
5642 | (cpp_read_state): Remove unused variables, m, d and mac_count. | |
5643 | ||
a8b2a8d5 | 5644 | 2004-09-29 Per Bothner <per@bothner.com> |
5645 | ||
5646 | * directives.c (cpp_handle_deferred_pragma): Save, clear and restore | |
5647 | cb.line_change. Otherwise do_pragma will call the line_change | |
5648 | call-back with a meaningless line number. | |
5649 | ||
21164c01 | 5650 | 2004-09-24 Zack Weinberg <zack@codesourcery.com> |
5651 | ||
5652 | * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to | |
5653 | programs cluster. Use ACX_PROG_CC_WARNING_OPTS, | |
5654 | ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS. | |
5655 | * aclocal.m4, configure: Regenerate. | |
5656 | * init.c: Include localedir.h. | |
5657 | * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables. | |
5658 | (DEFS): Delete. | |
5659 | (.c.o): Use $(ALL_CFLAGS). | |
5660 | (localedir.h, localedir.hs): New rules. | |
5661 | (clean): Use rm -rf to remove directories. | |
5662 | (distclean): Also delete localedir.h and localedir.hs. | |
5663 | (init.o): Update dependencies. | |
5664 | ||
986086aa | 5665 | 2004-09-22 Kelley Cook <kcook@gcc.gnu.org> |
5666 | ||
5667 | * Makefile.in (aclocal.m4): Update dependencies. | |
5668 | * configure.ac (AC_CONFIG_MACRO_DIR): New. | |
5669 | * aclocal.m4, configure: Regenerate. | |
5670 | ||
e9cc3617 | 5671 | 2004-09-17 Zack Weinberg <zack@codesourcery.com> |
5672 | ||
0097f6a2 | 5673 | * charset.c (_cpp_destroy_iconv, emit_numeric_escape) |
5674 | (_cpp_convert_input, _cpp_default_encoding): Add comments. | |
5675 | Some other comments in this file also tweaked. | |
5676 | ||
e9cc3617 | 5677 | * directives.c (do_pragma): Save current buffer position |
5678 | before lexing the pragma keywords; don't call | |
5679 | _cpp_backup_tokens in the defer_pragmas case. | |
5680 | ||
9832c977 | 5681 | 2004-09-15 Per Bothner <per@bothner.com> |
5682 | ||
5683 | * include/line-map.h (line_map_start): Add parameter names so | |
5684 | preceding comment makes sense. | |
5685 | (linemap_add): Remove from comment mention of non-existing parameter. | |
5686 | ||
d6d3c909 | 5687 | 2004-09-09 Matt Austern <austern@apple.com> |
5688 | Zack Weinberg <zack@codesourcery.com> | |
5689 | ||
5690 | * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_ | |
5691 | prefixes throughout. Add entry for PRAGMA. Remove | |
5692 | unnecessary "= 0" from EQ. | |
5693 | (enum cpp_ttype): Adjust OP and TK definitions to restore | |
5694 | prefixes, via token-paste. | |
5695 | (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP): | |
5696 | Change from #defines to additional cpp_ttype enumerators. | |
5697 | (struct cpp_options): Add defer_pragmas. | |
5698 | (cpp_handle_deferred_pragma): Prototype new interface. | |
5699 | ||
5700 | * internal.h (struct cpp_reader): Add directive_result. | |
5701 | * directives.c (struct pragma_entry): Add is_internal field; | |
5702 | give boolean fields type bool. | |
5703 | (start_directive): Initialize pfile->directive_result.type. | |
5704 | (_cpp_do__Pragma): Likewise. | |
5705 | (run_directive): Do not crash if pfile->buffer->prev is NULL. | |
5706 | (insert_pragma_entry): Add 'internal' argument; set new->is_internal | |
5707 | from it. | |
5708 | (register_pragma): New static function, bulk of former | |
5709 | cpp_register_pragma here; add 'internal' argument, pass along | |
5710 | to insert_pragma_entry. | |
5711 | (cpp_register_pragma): Now a wrapper around register_pragma which | |
5712 | always passes false for 'internal' argument. | |
5713 | (_cpp_init_internal_pragmas): Call register_pragma directly, passing | |
5714 | true for 'internal'. | |
5715 | (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't | |
5716 | an internal pragma, save text till the end of the line as a CPP_PRAGMA | |
5717 | token instead of executing the pragma. | |
5718 | (cpp_handle_deferred_pragma): New interface. | |
5719 | * lex.c (token_spellings): Adjust OP and TK definitions to | |
5720 | match changes to cpplib.h. | |
5721 | (_cpp_lex_token): Check for a directive-result token and | |
5722 | return it if present. | |
5723 | (cpp_token_val_index): Handle CPP_PRAGMA. | |
5724 | * macro.c (cpp_builtin_macro_text): Correct comment. | |
5725 | (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma. | |
5726 | ||
735a9bc4 | 5727 | 2004-09-06 Serge Belyshev <belyshev@lubercy.com> |
5728 | ||
5729 | PR preprocessor/14699 | |
5730 | * symtab.c (ht_dump_statistics): Change type of sum_of_squares | |
5731 | from size_t to double. | |
5732 | ||
25696d3f | 5733 | 2004-08-28 Andreas Schwab <schwab@suse.de> |
5734 | Andreas Jaeger <aj@suse.de> | |
5735 | ||
5736 | * configure.ac: Set PACKAGE correctly. | |
5737 | * configure: Regenerated. | |
5738 | ||
99439f5b | 5739 | 2004-08-25 Paolo Bonzini <bonzini@gnu.org> |
5740 | ||
5741 | * Makefile.in: Add back top_builddir. | |
5742 | ||
a668be26 | 5743 | 2004-08-25 Paolo Bonzini <bonzini@gnu.org> |
5744 | ||
5745 | * configure.ac: Replace Automake macro invocations | |
5746 | with manual Autoconf checks and substitutions. | |
5747 | * configure: Regenerate. | |
5748 | * aclocal.m4: Regenerate. | |
5749 | * config.in: Regenerate. | |
5750 | * Makefile.am: Removed. | |
5751 | * Makefile.in: Heavy simplification and reorganization. | |
5752 | ||
30e9913f | 5753 | 2004-08-09 Mark Mitchell <mark@codesourcery.com> |
5754 | ||
5755 | * configure.ac (arm*-*-eabi*): New target. | |
5756 | (arm*-*-symbianelf*): Likewise. | |
5757 | * configure: Regenerated. | |
5758 | ||
3b298764 | 5759 | 2004-07-24 Bernardo Innocenti <bernie@develer.com> |
5760 | ||
5761 | * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove. | |
5762 | * directives.c: Use XNEW-family macros from libiberty. | |
5763 | * lex.c: Likewise. | |
5764 | * macro.c: Likewise. | |
5765 | * cpplib.h (cpp_deps_style): Export enum with name. | |
5766 | ||
d6d3c909 | 5767 | 2004-07-23 Matthias Klose <doko@debian.org> |
3b298764 | 5768 | |
d6d3c909 | 5769 | * init.c (init_library): Use PACKAGE for the text domain. |
1ed7d058 | 5770 | |
821fa045 | 5771 | 2004-07-16 Andris Pavenis <pavenis@latnet.lv> |
5772 | ||
5773 | PR preprocessor/16366 | |
5774 | * internal.h (struct cpp_reader): New field dir_hash. | |
5775 | * files.c (make_cpp_dir): Use dir_hash, not file_hash. | |
5776 | (_cpp_init_files, _cpp_cleanup_files): Update for new field. | |
5777 | ||
d80efa72 | 5778 | 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk> |
5779 | ||
5780 | PR preprocessor/16192 | |
5781 | PR preprocessor/15913 | |
5782 | PR preprocessor/15572 | |
5783 | * expr.c (_cpp_parse_expr): Handle remaining cases where an | |
5784 | expression is missing. | |
5785 | * init.c (post_options): Traditional cpp doesn't do // comments. | |
5786 | ||
ed000086 | 5787 | 2004-06-30 Per Bothner <per@bothner.com> |
5788 | ||
5789 | * include/line-map.h (fileline): Remove old typedef. | |
5790 | * internal.h (struct cpp_reader): Use source_location typedef instead. | |
5791 | ||
dcb9d064 | 5792 | 2004-06-26 Zack Weinberg <zack@codesourcery.com> |
5793 | ||
5794 | Partially revert patch of 2004-06-05. | |
5795 | * files.c (search_cache): Remove pfile argument. Don't check | |
5796 | for file that would be found by "" or <> search here... | |
5797 | (_cpp_find_file): ...do it here, before calling find_file_in_dir. | |
5798 | Do not apply directory-of-current-file correction to files | |
5799 | found by this check. Rearrange code slightly. | |
5800 | ||
d718b525 | 5801 | 2004-06-21 Geoffrey Keating <geoffk@apple.com> |
5802 | ||
5803 | * files.c (should_stack_file): Correct swapped parameters to call | |
5804 | to cb.read_pch. | |
5805 | * pch.c (cpp_valid_state): Handle -fpreprocessed. | |
5806 | ||
79b68529 | 5807 | 2004-06-15 Paolo Bonzini <bonzini@gnu.org> |
5808 | ||
5809 | * Makefile.in: Regenerate with automake 1.8.5. | |
5810 | * aclocal.m4: Likewise. | |
5811 | * configure: Regenerate. | |
5812 | ||
151899c5 | 5813 | 2004-06-11 Zack Weinberg <zack@codesourcery.com> |
5814 | ||
5815 | * configure.ac: Don't invoke ACX_HEADER_STDBOOL. | |
5816 | * configure, config.in: Regenerate. | |
5817 | * system.h: Unconditionally define bool as unsigned char, | |
5818 | BOOL_BITFIELD as unsigned int. | |
5819 | * .cvsignore: New file. | |
5820 | ||
c39ed964 | 5821 | 2004-06-09 Geoffrey Keating <geoffk@apple.com> |
5822 | ||
5823 | * traditional.c (push_replacement_text): Set macro->traditional. | |
5824 | (save_replacement_text): Likewise. | |
5825 | * pch.c (cpp_write_pch_state): Don't write list of defined macros. | |
5826 | (struct save_macro_item): Delete. | |
5827 | (struct save_macro_data): Use a character array not the previous | |
5828 | structured format. | |
5829 | (save_macros): Save macro as text not as internal structures. | |
5830 | (cpp_prepare_state): Update for changes to save_macro_data. | |
5831 | (cpp_read_state): Don't read macros defined in PCH. Restore | |
c84ca916 | 5832 | -D macros as text. |
c39ed964 | 5833 | * macro.c (create_iso_definition): Honour alloc_subobject. |
5834 | Clear traditional flag. | |
5835 | (_cpp_create_definition): Honour alloc_subobject. | |
5836 | * lex.c (cpp_token_val_index): New. | |
5837 | * internal.h: Include cpp-id-data.h. | |
5838 | (uchar): Move definition to cpp-id-data.h. | |
5839 | (U): Likewise. | |
5840 | (cpp_macro): Likewise. | |
5841 | * directives.c (struct answer): Move to cpp-id-data.h. | |
5842 | (do_assert): Honour alloc_subobject. | |
c84ca916 | 5843 | |
5844 | * include/symtab.h (struct ht): Add field 'alloc_subobject'. | |
5845 | * include/cpplib.h (struct cpp_string): Add GTY marker. | |
5846 | (enum cpp_token_fld_kind): New. | |
5847 | (struct cpp_token): Add GTY markers. | |
5848 | (cpp_token_val_index): Prototype. | |
5849 | (CPP_HASHNODE_VALUE_IDX): New. | |
5850 | (struct cpp_hashnode): Don't skip fields of 'value' when marking. | |
5851 | * include/cpp-id-data.h: New file. | |
c39ed964 | 5852 | |
dd6e5561 | 5853 | 2004-06-09 Paolo Bonzini <bonzini@gnu.org> |
5854 | ||
5855 | * Makefile.am (all-local): New. | |
5856 | * Makefile.in: Regenerate. | |
5857 | ||
8af0c78d | 5858 | 2004-06-06 Roger Sayle <roger@eyesopen.com> |
5859 | ||
5860 | * Makefile.am (LIBICONV): Declare. | |
5861 | (makedepend_LDADD): Use LIBICONV. | |
5862 | * Makefile.in: Regenerate. | |
5863 | ||
30302733 | 5864 | 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu> |
5865 | ||
5866 | * Makefile.am (LIBINTL): Declare | |
5867 | (makedepend_LDADD): Use LIBINTL. | |
5868 | * Makefile.in: Regenerate. | |
5869 | ||
3eb3f293 | 5870 | 2004-06-05 Zack Weinberg <zack@codesourcery.com> |
5871 | ||
5872 | * Makefile.am: Add makedepend. | |
5873 | * Makefile.in, aclocal.m4: Regenerate. | |
5874 | * charset.c: Insert a space to avoid a warning. | |
5875 | * directives.c: Include mkdeps.h. | |
5876 | (_cpp_handle_directive): Reenable macro expander if appropriate. | |
5877 | (undefine_macros): Inline body of _cpp_free_definition for speed. | |
5878 | Do not call undef callback or _cpp_warn_if_unused_macro. | |
5879 | (cpp_get_deps): New interface. | |
5880 | * files.c (search_cache): Add pfile argument. Check for file | |
5881 | that would be found by "" or <> search here... | |
5882 | (_cpp_find_file): ...not here. Correct recorded start_dir of | |
5883 | files found by directory-of-current-file search that would be | |
5884 | found by "" or <> search. | |
5885 | * init.c (cpp_add_dependency_target): Delete. | |
5886 | * internal.h (struct lexer_state): Add discarding_output flag. | |
5887 | * lex.c (lex_identifier): Compute hash function while scanning. | |
5888 | * macro.c (cpp_scan_nooutput): Disable macro expansion outside | |
5889 | directives. | |
5890 | * makedepend.c: New file. | |
5891 | * mkdeps.c (struct deps): Add vpath vector. | |
5892 | (apply_vpath, deps_add_vpath): New function. | |
5893 | (deps_free): Free vpath vector. | |
5894 | (deps_add_dep, deps_add_target): Use apply_vpath. | |
5895 | * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH. | |
5896 | (ht_lookup_with_hash): New function. | |
5897 | * cpplib.h, mkdeps.h: Update prototypes. | |
5898 | * symtab.h: Update prototypes. | |
5899 | (HT_HASHSTEP, HT_FINISH): New macros. | |
5900 | ||
8ed01400 | 5901 | 2004-05-29 Geoffrey Keating <geoffk@apple.com> |
5902 | ||
5903 | * symtab.c (ht_create): Set entries_owned. | |
5904 | (ht_destroy): Honour entries_owned. | |
5905 | (ht_expand): Likewise. | |
5906 | (ht_load): New. | |
c84ca916 | 5907 | * include/symtab.h (struct ht): New field 'entries_owned' |
5908 | (ht_load): New prototype. | |
8ed01400 | 5909 | |
347a3ab5 | 5910 | 2004-05-26 Paolo Bonzini <bonzini@gnu.org> |
5911 | ||
5912 | PR bootstrap/15651 | |
5913 | * configure.ac: Fix m4 quoting when picking | |
5914 | the size of HOST_WIDE_INT. | |
5915 | * configure: Regenerate. | |
5916 | ||
fc231f28 | 5917 | 2004-05-25 Paolo Bonzini <bonzini@gnu.org> |
5918 | ||
5919 | * Makefile.am: the correct directory for | |
5920 | gettext include files is given by @INCINTL@. | |
5921 | * Makefile.in: Regenerate. | |
5922 | ||
babfbd63 | 5923 | 2004-05-24 Paolo Bonzini <bonzini@gnu.org> |
5924 | ||
5925 | * system.h [!ENABLE_NLS]: dgettext takes two | |
5926 | parameters. | |
5927 | ||
d856c8a6 | 5928 | 2004-05-23 Paolo Bonzini <bonzini@gnu.org> |
5929 | ||
5930 | Moved libcpp from the gcc subdirectory to the toplevel. | |
5931 | * Makefile.am: New file. | |
5932 | * Makefile.in: Regenerate. | |
5933 | * configure.ac: New file. | |
5934 | * configure: Regenerate. | |
5935 | * config.in: Regenerate. | |
5936 | * charset.c: Moved from gcc/cppcharset.c. Add note about | |
5937 | brokenness of input charset detection. Adjust for change | |
5938 | in name of cppucnid.h. | |
5939 | * errors.c: Moved from gcc/cpperror.c. Do not include intl.h. | |
5940 | * expr.c: Moved from gcc/cppexp.c. | |
5941 | * files.c: Moved from gcc/cppfiles.c. Do not include intl.h. | |
5942 | Remove #define of O_BINARY, it is in system.h. | |
5943 | * identifiers.c: Moved from gcc/cpphash.c. | |
5944 | * internal.h: Moved from gcc/cpphash.h. Change header | |
5945 | guard name. All other files adjusted to match name change. | |
5946 | * init.c: Moved from gcc/cppinit.c. | |
5947 | (init_library) [ENABLE_NLS]: Call bindtextdomain. | |
5948 | * lex.c: Moved from gcc/cpplex.c. | |
5949 | * directives.c: Moved from gcc/cpplib.c. | |
5950 | * macro.c: Moved from gcc/cppmacro.c. | |
5951 | * pch.c: Moved from gcc/cpppch.c. Do not include intl.h. | |
5952 | * traditional.c: Moved from gcc/cpptrad.c. | |
5953 | * ucnid.h: Moved from gcc/cppucnid.h. Change header | |
5954 | guard name. | |
5955 | * ucnid.pl: Moved from gcc/cppucnid.pl. | |
5956 | * ucnid.tab: Moved from gcc/cppucnid.tab. Change header | |
5957 | guard name. | |
5958 | * symtab.c: Moved from gcc/hashtable.c. | |
5959 | * line-map.c: Moved from gcc. Do not include intl.h. | |
5960 | * mkdeps.c: Moved from gcc. | |
5961 | * system.h: New file. | |
c84ca916 | 5962 | * include/cpplib.h: Moved from gcc. Change header guard name. |
5963 | * include/line-map.h: Moved from gcc. Change header guard name. | |
5964 | * include/mkdeps.h: Moved from gcc. Change header guard name. | |
5965 | * include/symtab.h: Moved from gcc/hashtable.h. Change header | |
5966 | guard name. | |
f1717362 | 5967 | \f |
fbd26352 | 5968 | Copyright (C) 2004-2019 Free Software Foundation, Inc. |
f1717362 | 5969 | |
5970 | Copying and distribution of this file, with or without modification, | |
5971 | are permitted in any medium without royalty provided the copyright | |
5972 | notice and this notice are preserved. |