[Bug c/17573] New: redefinition of builtin generates error when K&R fn def used

bowdidge at apple dot com gcc-bugzilla@gcc.gnu.org
Mon Sep 20 22:00:00 GMT 2004


The following code generates an error if a function is defined in K&R style, but not if the function is 
defined in ANSI C style:

extern float dremf ( float, float );

float
dremf(x, y)
        float x;
        float y;
{
  return 1.0;
}

On Apple's gcc-3.5-based compilers, the code generates an error or warning with the K&R C definition, 
but generates no error with the ANSI C function declaration.  The problem is reproducible on at least 
the 9/2 mainline, also with powerpc-apple-darwin.

-- 
           Summary: redefinition of builtin generates error when K&R fn def
                    used
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bowdidge at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin
  GCC host triplet: powerpc-apple-darwin
GCC target triplet: powerpc-apple-darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17573



More information about the Gcc-bugs mailing list