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

Richard Earnshaw rearnsha@arm.com
Wed Mar 12 12:46:00 GMT 2003


The following reply was made to PR c/10025; it has been noted by GNATS.

From: Richard Earnshaw <rearnsha@arm.com>
To: Aharon Robbins <arnold@skeeve.com>
Cc: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
        gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, Richard.Earnshaw@arm.com
Subject: Re: c/10025: gcc 3.2.2 recognizes complex functions even without 
 complex.h
Date: Wed, 12 Mar 2003 12:36:15 +0000

 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@skeeve.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
 > >    nobody@gcc.gnu.org
 > > From: bangerth@dealii.org
 > > Reply-To: bangerth@dealii.org, arnold@skeeve.com, gcc-bugs@gcc.gnu.org,
 > >    gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.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
 
 



More information about the Gcc-prs mailing list