This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC problem/bug with floats
- To: gcc-bugs at gcc dot gnu dot org
- Subject: GCC problem/bug with floats
- From: James Allwright <jallwright at dcehost dot dcecomms dot com>
- Date: Tue, 5 Sep 2000 12:15:12 +0100
- Cc: J dot R dot Allwright at westminster dot ac dot uk
I believe that I have found a bug in the GCC compiler.
I am running gcc version 2.8.1 in its DJGPP incarnation, but this is a
problem that was originally spotted by someone running GCC on Linux.
The following code appears to be legal C, but exhibits the problem :
extern void vskip();
void vskip(float gap)
{
/* do nothing */
}
Compiling this code with gcc -c gives :
gccbug.c:4: conflicting types for `vskip'
gccbug.c:4: An argument type that has a default promotion
gccbug.c:4: can't match an empty parameter name list declaration.
gccbug.c:1: previous declaration of `vskip'
A workaround is to change the float to double.
Regards,
James Allwright