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]
Other format: [Raw text]

Re: c/10025: gcc 3.2.2 recognizes complex functions even without complex.h


GCC's builtins don't need header files to access them.  So it isn't 
possible to just disable them by not including a header.

Anyway, there's no need to restrict yourself to ansi C.  Simply disable 
the conflicting builtin:

$ cat conj.c
int conj (int a, int b);

void f(){}

$ gcc -c conj.c
conj.c:1: warning: conflicting types for built-in function `conj'
$ gcc -c conj.c -fno-builtin-conj
$


> Document it and call it a feature, eh?  I think it's a bug; GCC shouldn't
> talk about conflicts with any builtin function if the header file for it
> hasn't been included.
> 
> This is pretty sad.
> 
> Arnold
> 
> > Date: 11 Mar 2003 15:07:13 -0000
> > To: arnold at skeeve dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org,
> >    nobody at gcc dot gnu dot org
> > From: bangerth at dealii dot org
> > Reply-To: bangerth at dealii dot org, arnold at skeeve dot com, gcc-bugs at gcc dot gnu dot org,
> >    gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
> > Subject: Re: c/10025: gcc 3.2.2 recognizes complex functions even without complex.h
> >
> > Synopsis: gcc 3.2.2 recognizes complex functions even without complex.h
> >
> > State-Changed-From-To: open->closed
> > State-Changed-By: bangerth
> > State-Changed-When: Tue Mar 11 15:07:12 2003
> > State-Changed-Why:
> >     This is a gnu extension. The builtin conj function is switched
> >     off if you use -ansi or -std=c89.
> >     
> >     W.
> >
> > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10025



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