wikisort benchmark uses gcc extensions
kjetilos opened this issue · 2 comments
The wikisort benchmark is using the typeof gcc extension which will make the benchmark fail on non-gcc compilers like for instance the IAR compiler.
One possible fix is to add the type as an argument to the Var and Swap macros instead of using typeof inside these macros. typeof is also used in the benchmark_body() function and can be replaced by writing the full type.
Hi @kjetilos
Thanks for the bug report and sorry for the slow reply. The benchmarks are all supposed to be free of GCC extensions. Assigned to Paolo Savini to do two things
- Fix this particular issue
- Run all benchmarks checking for pedantic standards compliance.
Will also raise at our next meeting to get agreement on what C standard we require. Do we really want to be going back to C89 in 2020?
I think it would be ok to require C99, as many compilers support this.