[syslinux] [Syslinux-GSoC] New elflink branch in the mainline repository

H. Peter Anvin hpa at zytor.com
Mon Jul 6 09:13:25 PDT 2009


Stefan Bucur wrote:
> 
>> Please note the following, however:
>>
>> int foo();
>>
>> ... in C doesn't mean a function with no parameters.  That is written:
>>
>> int foo(void);
>>
>> In C, "int foo();" means the same as "int foo(...);".  This differs from
>> C++.
> 
> Oops, I apologize for that. The irony is that I teach this to my
> students every year, but it seems that my Java habits can take
> precedence from time to time... Is there any way I could get a warning
> from the compiler when it encounters this situation?
> 

You *do* get a warning from the compiler:

In file included from atexit.c:5:
../include/stdlib.h:48: warning: function declaration isn’t a prototype
In file included from atox.c:8,
                 from atoi.c:3:

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the Syslinux mailing list