This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GCC problem/bug with floats



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]