aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-03-23 09:02:39 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-03-23 09:02:39 +0100
commitfb136e35c77e0374112189e3283c9ecf1e83abb1 (patch)
treeca62635a383044139bfcff92d867148331a09a0f /libcpp/directives.c
parent30c931de07f8fcbe4ef3b550633c274fe7828975 (diff)
downloadgcc-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.c2
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--;