Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests use GNU C extensions and fail to compile #43

Open
thomwiggers opened this issue May 19, 2021 · 0 comments
Open

Tests use GNU C extensions and fail to compile #43

thomwiggers opened this issue May 19, 2021 · 0 comments

Comments

@thomwiggers
Copy link

gcc -O3      -std=c11 -fsanitize=undefined,address -march=native -D _AMD64_ -D __NIX__ -D _FAST_ -D _MULX_ -D _ADX_ -L./lib434 tests/arith_tests-p434.c tests/test_extras.c -lsidh -lm -o arith_tests-p434
tests/test_extras.c: In function ‘cpucycles’:
tests/test_extras.c:37:5: error: ‘asm’ undeclared (first use in this function)
   37 |     asm volatile ("rdtsc\n\t" : "=a" (lo), "=d"(hi));
      |     ^~~
tests/test_extras.c:37:5: note: each undeclared identifier is reported only once for each function it appears in
tests/test_extras.c:37:8: error: expected ‘;’ before ‘volatile’
   37 |     asm volatile ("rdtsc\n\t" : "=a" (lo), "=d"(hi));
      |        ^~~~~~~~~
      |        ;

If you use -std=gnu11, these errors go away.

@thomwiggers thomwiggers changed the title tests use GNU C extensions Tests use GNU C extensions and fail to compile May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant