]> git.ipfire.org Git - thirdparty/gcc.git/commit - libcpp/ChangeLog
re PR preprocessor/65238 (__has_attribute is not handled properly with -traditional...
authorJakub Jelinek <jakub@redhat.com>
Mon, 23 Mar 2015 08:02:39 +0000 (09:02 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 23 Mar 2015 08:02:39 +0000 (09:02 +0100)
commitfb136e35c77e0374112189e3283c9ecf1e83abb1
treeca62635a383044139bfcff92d867148331a09a0f
parent30c931de07f8fcbe4ef3b550633c274fe7828975
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
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/cpp/pr65238-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/pr65238-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/trad/pr65238-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/trad/pr65238-4.c [new file with mode: 0644]
libcpp/ChangeLog
libcpp/directives.c
libcpp/internal.h
libcpp/traditional.c