]> granicus.if.org Git - clang/commitdiff
Sema: Just ignore '#pragma options align=power' for now, this is no worse than
authorDaniel Dunbar <daniel@zuster.org>
Fri, 28 May 2010 19:43:33 +0000 (19:43 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 28 May 2010 19:43:33 +0000 (19:43 +0000)
what we used to be doing, and makes sure that paired '#pragma options
align=reset' won't fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104998 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaAttr.cpp
test/Parser/pragma-options.c

index fcf5bfd66933d8ad6c0068017463abf323af5875..df68f53da60674c3aae0124e05658da1c8886a45 100644 (file)
@@ -135,7 +135,6 @@ void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind,
     return;
   }
 
-  // We don't support #pragma options align=power.
   switch (Kind) {
     // For all targets we support native and natural are the same.
     //
@@ -146,6 +145,12 @@ void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind,
     Context->setAlignment(0);
     break;
 
+    // FIXME: We just ignore #pragma options align=power for now.
+  case POAK_Power:
+    Context->push(0);
+    Context->setAlignment(0);
+    break;
+
     // Note that '#pragma options align=packed' is not equivalent to attribute
     // packed, it has a different precedence relative to attribute aligned.
   case POAK_Packed:
index 332249fdcfe31ec137df85ff629ca5911b69cdea..daf385dddba732cbf9380b71f37a9c6a2166dcc4 100644 (file)
@@ -9,4 +9,4 @@
 #pragma options align=natural
 #pragma options align=reset
 #pragma options align=mac68k
-/* expected-warning {{unsupported alignment option}} */ #pragma options align=power
+#pragma options align=power