aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-12-04 13:18:27 -0500
committerJason Merrill <jason@gcc.gnu.org>2015-12-04 13:18:27 -0500
commitf0a7c00bfe8a7e2af956eedfbdbb5cf63d28a1dc (patch)
treef0868f627aacafc71f710dd7fcc80de0f65005e2 /gcc/cp
parente87eed2a9cbc1fe429ad550337e819cddcdc9c5a (diff)
downloadgcc-f0a7c00bfe8a7e2af956eedfbdbb5cf63d28a1dc.zip
gcc-f0a7c00bfe8a7e2af956eedfbdbb5cf63d28a1dc.tar.gz
gcc-f0a7c00bfe8a7e2af956eedfbdbb5cf63d28a1dc.tar.bz2
re PR c++/68645 (FAIL: c-c++-common/attr-simd-3.c -std=gnu++11 (test for excess errors))
PR c++/68645 * parser.c (cp_parser_direct_declarator) (cp_parser_late_return_type_opt): Put Cilk+ attributes on declarator->attributes, not std_attributes. From-SVN: r231294
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/parser.c16
2 files changed, 16 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index dd56155..4568fb8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2015-12-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/68645
+ * parser.c (cp_parser_direct_declarator)
+ (cp_parser_late_return_type_opt): Put Cilk+ attributes on
+ declarator->attributes, not std_attributes.
+
2015-12-04 David Malcolm <dmalcolm@redhat.com>
* cp-tree.h (class cp_expr): New class.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 17dba0d..b28d17a9 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -18714,6 +18714,7 @@ cp_parser_direct_declarator (cp_parser* parser,
/* In here, we handle cases where attribute is used after
the function declaration. For example:
void func (int x) __attribute__((vector(..))); */
+ tree gnu_attrs = NULL_TREE;
if (flag_cilkplus
&& cp_next_tokens_can_be_gnu_attribute_p (parser))
{
@@ -18727,7 +18728,7 @@ cp_parser_direct_declarator (cp_parser* parser,
else if (!cp_parser_parse_definitely (parser))
;
else
- attrs = chainon (attr, attrs);
+ gnu_attrs = attr;
}
tree requires_clause = NULL_TREE;
late_return = (cp_parser_late_return_type_opt
@@ -18748,6 +18749,7 @@ cp_parser_direct_declarator (cp_parser* parser,
late_return,
requires_clause);
declarator->std_attributes = attrs;
+ declarator->attributes = gnu_attrs;
/* Any subsequent parameter lists are to do with
return type, so are not those of the declared
function. */
@@ -19547,17 +19549,17 @@ cp_parser_late_return_type_opt (cp_parser* parser, cp_declarator *declarator,
requires_clause = cp_parser_requires_clause_opt (parser);
if (cilk_simd_fn_vector_p)
- declarator->std_attributes
+ declarator->attributes
= cp_parser_late_parsing_cilk_simd_fn_info (parser,
- declarator->std_attributes);
+ declarator->attributes);
if (declare_simd_p)
- declarator->std_attributes
+ declarator->attributes
= cp_parser_late_parsing_omp_declare_simd (parser,
- declarator->std_attributes);
+ declarator->attributes);
if (oacc_routine_p)
- declarator->std_attributes
+ declarator->attributes
= cp_parser_late_parsing_oacc_routine (parser,
- declarator->std_attributes);
+ declarator->attributes);
if (quals >= 0)
{