Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

GNU attributes on RHS of alias declaration are silently discarded #17665

Open Quuxplusone opened 11 years ago

Quuxplusone commented 11 years ago
Bugzilla Link PR17666
Status REOPENED
Importance P normal
Reported by Stephan Tolksdorf (st@quanttec.com)
Reported on 2013-10-23 14:58:24 -0700
Last modified on 2013-10-24 15:27:18 -0700
Version trunk
Hardware All All
CC llvm-bugs@lists.llvm.org, rafael@espindo.la, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
The current trunk version of clang in C++11 mode reports an error for the
second static assert in the following sample (but not for the equivalent first
one) and crashes for the T3 typedef.

int main() {
  typedef int __attribute__((__aligned__(1))) T1; // no error
  static_assert(alignof(T1) == 1, "wrong alignment");

  constexpr int A = 1;

  using T2 = int __attribute__((__aligned__(A)));
  static_assert(alignof(T2) == 1, "wrong alignment"); // error

  typedef int __attribute__((__aligned__(A))) T3; // crash
  static_assert(alignof(T3) == 1, "wrong alignment");
}
Quuxplusone commented 11 years ago

Crash fixed in r193295.

Quuxplusone commented 11 years ago

closing per comment 1.

Quuxplusone commented 11 years ago

We still issue a bogus error for the second example.