Ping http://gcc.gnu.org/ml/gcc-patches/2013-11/msg03822.html
On Sat, 30 Nov 2013, Marc Glisse wrote:
Hello,
we currently reject:
constexpr int s = 32;
typedef double VEC __attribute__ ((__vector_size__ (s)));
and similarly for other attributes, while we accept s+0 or (int)s, etc. The
code is basically copied from the constructor attribute. The C front-end is
much less forgiving than the C++ one, so we need to protect the call to
default_conversion (as in PR c/59280), and for some reason one of the
attributes can see a FUNCTION_DECL where others see an IDENTIFIER_NODE, I
didn't try to understand why and just added that check to the code.
Bootstrap and testsuite on x86_64-linux-gnu.
2013-11-30 Marc Glisse <marc.gli...@inria.fr>
PR c++/53017
PR c++/59211
gcc/c-family/
* c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
handle_vector_size_attribute, handle_nonnull_attribute): Call
default_conversion on the attribute argument.
gcc/cp/
* tree.c (handle_init_priority_attribute): Likewise.
gcc/
* doc/extend.texi (Function Attributes): Typo.
gcc/testsuite/
* c-c++-common/attributes-1.c: New testcase.
* g++.dg/cpp0x/constexpr-attribute2.C: Likewise.
--
Marc Glisse