diff options
author | Martin Sebor <msebor@redhat.com> | 2016-01-23 16:01:47 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2016-01-23 09:01:47 -0700 |
commit | 69da78025ec5e1408576eda81cb97d2e53cdace8 (patch) | |
tree | e9b91070a11e2d484f40225f0a340529e27fe643 /gcc/cp/decl2.c | |
parent | 6af801f52a1459111cdac2097f50d431a80f70cb (diff) | |
download | gcc-69da78025ec5e1408576eda81cb97d2e53cdace8.zip gcc-69da78025ec5e1408576eda81cb97d2e53cdace8.tar.gz gcc-69da78025ec5e1408576eda81cb97d2e53cdace8.tar.bz2 |
PR c++/58109 - alignas() fails to compile with constant expression
PR c++/58109 - alignas() fails to compile with constant expression
PR c++/69022 - attribute vector_size ignored with dependent bytes
gcc/testsuite/ChangeLog:
2016-01-23 Martin Sebor <msebor@redhat.com>
PR c++/58109
PR c++/69022
* g++.dg/cpp0x/alignas5.C: New test.
* g++.dg/ext/vector29.C: Same.
gcc/cp/ChangeLog:
2016-01-23 Martin Sebor <msebor@redhat.com>
PR c++/58109
PR c++/69022
* decl2.c (is_late_template_attribute): Handle dependent argument
to attribute align and attribute vector_size.
From-SVN: r232766
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index a7212ca0..7d68961 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1193,7 +1193,8 @@ is_late_template_attribute (tree attr, tree decl) second and following arguments. Attributes like mode, format, cleanup and several target specific attributes aren't late just because they have an IDENTIFIER_NODE as first argument. */ - if (arg == args && identifier_p (t)) + if (arg == args && attribute_takes_identifier_p (name) + && identifier_p (t)) continue; if (value_dependent_expression_p (t) |