[PATCH] D17709: [MSVC Compat] Support for '__unaligned' attribute in function declaration

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 14 09:24:54 PDT 2016


rnk added a comment.

Unless there is a compelling example of Microsoft or a popular third-party header relying on this behavior, I don't think we should implement it.


================
Comment at: lib/Parse/ParseDecl.cpp:4813
@@ -4812,1 +4812,3 @@
+      if ((AttrReqs & AR_DeclspecAttributesParsed) ||
+          (Tok.getKind() == tok::kw___unaligned)) {
         ParseMicrosoftTypeAttributes(DS.getAttributes());
----------------
This will allow __unaligned in a variety of other locations where we shouldn't accept it.


http://reviews.llvm.org/D17709





More information about the cfe-commits mailing list