[MPlayer-dev-eng] [PATCH] Make mp3lib SIMD optimizations work on AMD64, Part 5

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri May 25 18:41:57 CEST 2007


Hello,
On Sat, May 26, 2007 at 12:07:32AM +0800, Zuxy Meng wrote:
> 2007/5/25, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > Why should it be treated different depending on whether there is a
> > function body directly below it or not?
> 
> Because the standard says so (C99 6.7.5.3.14) :-)
> An identifier list declares only the identifiers of the parameters of
> the function. An empty list in a function declarator that is part of a
> definition of that function specifies that the function has no
> parameters. The empty list in a function declarator that is not part
> of a definition of that function specifies that no information about
> the number or types of the parameters is supplied.

Maybe that really is the case for C99 (though I doubt it, and this
section says nothing about when a compiler will create warning or
errors).
Anyway, he following code does compile with gcc, so not putting void
there is a very bad idea:

> static int test() {
>  return 0;
> }
> 
> int main(int argc, char **argv) {
>   return test(0);
> }

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list