Created
July 27, 2019 01:40
-
-
Save lemire/d442fb2a9763e53c44055c1d02a3378f to your computer and use it in GitHub Desktop.
LLVM, attribute push and namespace... bad interactions?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the following works fine under clang: | |
#pragma clang attribute push(__attribute__((target("sse4.2,pclmul"))), apply_to=function) | |
void f(){} | |
#pragma clang attribute pop | |
//////////// | |
/// The following DOES NOT WORK: 'error: expected unqualified-id' | |
////////// | |
namespace joe { | |
#pragma clang attribute push(__attribute__((target("sse4.2,pclmul"))), apply_to=function) | |
void g() {} | |
#pragma clang attribute pop | |
} | |
int main() { | |
g(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment