[PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier
Andrey Bokhanko via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 31 08:04:50 PDT 2016
andreybokhanko marked 3 inline comments as done.
andreybokhanko added a comment.
Aaron, Reid, David, thank you for the review!
I resolved some of your comments. As for
In http://reviews.llvm.org/D18596#386841, @aaron.ballman wrote:
> I'd like to see some Sema tests for sanity checking; like applying __unaligned to a non-pointer type, to a declaration, when -fno-ms-extensions is enabled, etc.
Do we want to accept __unaligned for non-pointer types, as MS compiler does? Their doc (https://msdn.microsoft.com/en-us/library/ms177389.aspx) only mentions pointers, but cl.exe also accepts non-pointers with __unaligned, with no visible effect to generated code (including mangling). Clang currently does accept this, so starting to issue an error would be a regression.
In http://reviews.llvm.org/D18596#387129, @majnemer wrote:
> I didn't implement a mangling for `__unaligned` because our implementation of it is broken.
> It should not be modeled as an attribute, it should be modeled as a qualifier because it is possible to overload on it.
I see.
Well, now we have not quite compatible implementation + incorrect mangling. My patch fixes mangling part. IMHO, implementation part should be fixed in a separate patch.
Andrey
http://reviews.llvm.org/D18596
More information about the cfe-commits
mailing list