3.6% of heads up: Please correct your #includes or optflags use

Hans de Goede j.w.r.degoede at hhs.nl
Mon Mar 24 21:01:23 UTC 2008


Patrice Dumas wrote:
> On Mon, Mar 24, 2008 at 07:11:27PM +0100, Hans de Goede wrote:
>> Yes fixing them is important, missing prototypes can lead to all sort of 
>> errors and often lead to 64 bit issues (== crashes).
> 
> And more specifically? What kid of 64bit issues and for which function?
> For that example, I don't mind fixing dome missing prototypes, but all
> is certainly a waste of my time.
> 

Anything (any function) that returns a pointer, will be a problem when compiled 
on 64 bit without a prototype, as the compiler will assume the return type is 
an int, and then cast that to a pointer as needed.

Anything returning a float / double will be a problem regardless of 32/64 bits 
as only 32 bits of the returned floating point number will be taken and 
interpreted as an int (and then cast back to a float / double if used as such).

Any function called with arguments of different type then expected (for example 
a float, where the function expects an int or visa versa) will have the same 
problem.

Which is why I say: fix them all.

Regards,

Hans




More information about the devel mailing list