Skip to content

Instantly share code, notes, and snippets.

@Leandros
Last active February 16, 2017 22:43
Show Gist options
  • Save Leandros/51080fb438fa6c93a74cae9a2373a382 to your computer and use it in GitHub Desktop.
Save Leandros/51080fb438fa6c93a74cae9a2373a382 to your computer and use it in GitHub Desktop.
-frewrite-includes bug in clang
#!/bin/sh -x
LLVM_BIN=/usr/bin
cat <<EOF > test.c
#include <stdatomic.h>
int main(void)
{
volatile atomic_long i = 0;
return 0;
}
EOF
$LLVM_BIN/clang test.c -std=c11 -E -frewrite-includes > test.e.c
$LLVM_BIN/clang test.e.c -std=c11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment