Skip to content

Instantly share code, notes, and snippets.

@lemmi
Created May 12, 2015 16:21
Show Gist options
  • Save lemmi/2c1b7bd9d77b65a5fdb5 to your computer and use it in GitHub Desktop.
Save lemmi/2c1b7bd9d77b65a5fdb5 to your computer and use it in GitHub Desktop.
issue with #define stderr (stderr) + openmp
$ make
gcc -fopenmp -o main-glibc main.c
musl-gcc -fopenmp -o main-musl main.c
In file included from main.c:1:0:
main.c: In function ‘main’:
main.c:4:43: error: expected identifier before ‘(’ token
#pragma omp parallel default(none) shared(stderr)
^
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
#include <stdio.h>
int main(int argc, char *argv[]) {
#pragma omp parallel default(none) shared(stderr)
{
fprintf(stderr, "test\n");
}
return 0;
}
all:
gcc -fopenmp -o main main.c
musl-gcc -fopenmp -o main-musl main.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment