[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] PML trouble with -m68020-60
Eero Tamminen wrote:
And why one wouldn't be using "-Wmissing-prototypes -Wstrict-prototypes"
in C code when using GCC? :-)
I have checked, the problem exists.
If someone calls a function returning a double without having provided a
prototype, the result is considered as int then casted to double.
The result is totally wrong, and by default GCC issues no warning :-(
-Wmissing-prototypes
Useless.
This warns the author of a function if he forgot to provide a prototype in
its .h, but does nothing if the user forgets to include the .h.
-Wstrict-prototypes
Useless.
This warns the author of a function if he has provided an old-school
prototype, without arguments. No effect on the user.
Please test your tips.
However:
-Wimplicit-function-declaration warns the user if he forgot the include
file. If there is no warning, he can be sure he will not have trouble
because of functions returning doubles.
-Wall would be usually better, as it includes this warning and many others.
--
Vincent Rivière