warning: conflicting types for built-in function bcopy

Sean Estabrooks seanlkml@rogers.com
Thu Oct 16 13:54:00 GMT 2003


On Thu, 16 Oct 2003 09:55:48 +0200
Paolo Carlini <pcarlini@unitus.it> wrote:

> Weird, I cannot reproduce this:
> 
> paolo:~> gcc -Wall -c war.c
> war.c:2: warning: return type defaults to `int'
> war.c: In function `bcopy':
> war.c:2: warning: control reaches end of non-void function
> war.c: At top level:
> war.c:4: warning: return type defaults to `int'
> war.c: In function `main':
> war.c:4: warning: control reaches end of non-void function

Paolo,

Thanks for taking the time to check on your system.
Slight change to take care of the -Wall warnings:

$ cat c2.c
void bcopy(char x) 
{ }
int main() 
{ return 0; }

$ gcc -Wall -c c2.c
c2.c:1: warning: conflicting types for built-in function `bcopy'

>
> May have to do with builtins, however, try -fno-builtin or
> -fno-builtin-bcopy, but I don't think bcopy is actually a builtin!
> 

$ gcc -Wall -c -fno-builtin c2.c
$ gcc -Wall -c -fno-builtin-bcopy c2.c
$

With no warnings!  So at least here bcopy _is_ a builtin.

> P.S. This kind of question properly belongs to gcc-help ;)

Thanks for pointing this out, I'll use that list in the future.



More information about the Gcc mailing list