Subject: Re: gcc builtin function prototypes
To: Paul Kranenburg <pk@cs.few.eur.nl>
From: Chris Torek <torek@BSDI.COM>
List: port-sparc
Date: 12/02/1993 21:09:07
>The sparc gcc compiler complains:
>" .../string.h:54: warning: conflicting types for built-in function `memcmp' "

>The i386 version doesn't bother. Any ideas why this is so?

Sounds like you rebuilt the sparc compiler.  The default for
the builtin types for the things the compiler knows all about
(but should not---gcc is attempting to compensate for broken
vendor headers; the correct fix is not to put magic goop in
the compiler, but rather to fix the vendor's distribution)
depends on the architecture.  GCC believes that

	#ifdef sparc

means

	This is SunOS and therefore has bug-set-X

My personal preference is to snip out the gcc builtins (all except
`alloca', anyway).  This requires touching the source---the

	-fno-builtin

flag turns off alloca() too.  (You can still use __builtin_alloca,
and if you have an <alloca.h> that defines alloca to that, it works,
but people do not include <alloca.h> in most cases.)

Chris

------------------------------------------------------------------------------