https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86578
Bug ID: 86578 Summary: requested alignment is dependent but declaration is not dependent Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhonghao at pku dot org.cn Target Milestone: --- The code is as follow: template <typename T> void Fun(T A) { typedef int __attribute__((__aligned__(A))) T1; int k1[__alignof__(T1)]; } g++ accepts it, but clang++ rejects it: code0.cpp:2:29: error: requested alignment is dependent but declaration is not dependent typedef int __attribute__((__aligned__(A))) T1; ^ ~ 1 error generated.