[PATCH] D42576: [test-suite] Add prototypes to functions in Olden and MiBench

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 11:01:17 PST 2018


MatzeB added a comment.

As far as I can tell, those are correct C programs.

Using this old K&R style definitions:
void func(x,y)

  int x;
  int y;

{ ... }
does indeed give you a different calling convention than
void func(int x, int y) { ... }

and the former is supposed to work with a void func() declaration.

This style of coding is luckily getting scarce. But it is still allowed by C and there is software out there written this way. From that perspective I consider it a good thing that we have some code like this in the llvm test-suite so we get some testing.

May I propose a compromise here: Leave the benchmarks as is but add a cmake variable (similar to the existing `TEST_SUITE_BENCHMARKING_ONLY`) allowing users to optionally skip benchmarks using K&R style functions.


Repository:
  rT test-suite

https://reviews.llvm.org/D42576





More information about the llvm-commits mailing list