This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58855] Attributes ignored on type alias in template
- From: "ncm at cantrip dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Dec 2015 23:19:34 +0000
- Subject: [Bug c++/58855] Attributes ignored on type alias in template
- Auto-submitted: auto-generated
- References: <bug-58855-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58855
ncm at cantrip dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ncm at cantrip dot org
--- Comment #1 from ncm at cantrip dot org ---
This bug is still present in g++-5.3.1:
$ cat usingbug.cc
template <unsigned N>
struct S {
typedef unsigned __attribute__((vector_size(N*sizeof(unsigned)))) T1;
using T2 = unsigned __attribute__((vector_size(N*sizeof(unsigned))));
};
int main()
{
S<4u>::T1 v1;
S<4u>::T2 v2;
return v1[1] + v2[2];
}
$ g++ -std=c++14 usingbug.cc
usingbug.cc: In function âint main()â:
usingbug.cc:13:24: error: invalid types âS<4u>::T2 {aka unsigned int}[int]â for
array subscript
return v1[1] + v2[2];
^
$ g++ --version
g++ (Debian 5.3.1-4) 5.3.1 20151219