embench / embench-iot

The main Embench repository
https://www.embench.org/
GNU General Public License v3.0
259 stars 105 forks source link

wikisort benchmark uses gcc extensions #72

Open kjetilos opened 4 years ago

kjetilos commented 4 years ago

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.

jeremybennett commented 4 years ago

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

  1. Fix this particular issue
  2. 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?

kjetilos commented 4 years ago

I think it would be ok to require C99, as many compilers support this.