https://bugs.llvm.org/show_bug.cgi?id=36638
Bug ID: 36638
Summary: [MS] clang fails to compile function with __unaligned
argument to class member
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: ilia.tara...@intel.com
CC: llvm-bugs@lists.llvm.org
clang fails to compile function with __unaligned argument to class member:
=============== nice.cpp ==============
class A;
void func(void (A::*a)(int) __unaligned);
=======================================
>>> clang -v
clang version 7.0.0 (trunk 326880)
Target: x86_64-unknown-linux-gnu
Thread model: posix
...
>>> clang++ -c nice.cpp -fms-extensions
nice.cpp:2:6: error: variable has incomplete type 'void'
void func(void (A::*a)(int) __unaligned);
^
nice.cpp:2:20: error: expected unqualified-id
void func(void (A::*a)(int) __unaligned);
^
nice.cpp:2:21: error: use of undeclared identifier 'a'
void func(void (A::*a)(int) __unaligned);
^
nice.cpp:2:27: error: expected '(' for function-style cast or type construction
void func(void (A::*a)(int) __unaligned);
But this test is compiled without any errors using cl and icl -
https://godbolt.org/g/iPp9Yq
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs