diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-03-23 09:02:39 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-03-23 09:02:39 +0100 |
commit | fb136e35c77e0374112189e3283c9ecf1e83abb1 (patch) | |
tree | ca62635a383044139bfcff92d867148331a09a0f /libcpp/directives.c | |
parent | 30c931de07f8fcbe4ef3b550633c274fe7828975 (diff) | |
download | gcc-fb136e35c77e0374112189e3283c9ecf1e83abb1.zip gcc-fb136e35c77e0374112189e3283c9ecf1e83abb1.tar.gz gcc-fb136e35c77e0374112189e3283c9ecf1e83abb1.tar.bz2 |
re PR preprocessor/65238 (__has_attribute is not handled properly with -traditional-cpp.)
PR preprocessor/65238
* internal.h (_cpp_scan_out_logical_line): Add third argument.
* directives.c (prepare_directive_trad): Pass false to it.
* traditional.c (_cpp_read_logical_line_trad,
_cpp_create_trad_definition): Likewise.
(struct fun_macro): Add paramc field.
(fun_like_macro): New function.
(maybe_start_funlike): Handle NODE_BUILTIN macros. Initialize
macro->paramc field.
(save_argument): Use macro->paramc instead of
macro->node->value.macro->paramc.
(push_replacement_text): Formatting fix.
(recursive_macro): Use fun_like_macro helper.
(_cpp_scan_out_logical_line): Likewise. Add BUILTIN_MACRO_ARG
argument. Initialize fmacro.paramc field. Handle builtin
function-like macros.
* c-c++-common/cpp/pr65238-1.c: New test.
* gcc.dg/cpp/pr65238-2.c: New test.
* gcc.dg/cpp/trad/pr65238-3.c: New test.
* gcc.dg/cpp/trad/pr65238-4.c: New test.
From-SVN: r221587
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r-- | libcpp/directives.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c index 37cd109..2a824e6 100644 --- a/libcpp/directives.c +++ b/libcpp/directives.c @@ -346,7 +346,7 @@ prepare_directive_trad (cpp_reader *pfile) if (no_expand) pfile->state.prevent_expansion++; - _cpp_scan_out_logical_line (pfile, NULL); + _cpp_scan_out_logical_line (pfile, NULL, false); if (no_expand) pfile->state.prevent_expansion--; |