public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/10025: gcc 3.2.2 recognizes complex functions even without complex.h
@ 2003-03-11 9:36 Aharon Robbins
0 siblings, 0 replies; 4+ messages in thread
From: Aharon Robbins @ 2003-03-11 9:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 10025
>Category: c
>Synopsis: gcc 3.2.2 recognizes complex functions even without complex.h
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Mar 11 09:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Arnold Robbins
>Release: 3.2.2
>Organization:
Pioneer Consulting Ltd.
>Environment:
System: Linux aahz 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/usr/gcc3
>Description:
GCC recognizes the `conj' function and complains about it, even if NO headers
are included.
>How-To-Repeat:
int conj(a)
int a;
{
return a;
}
main()
{
printf("%d\n", conj(1));
}
/* Note: NO header files included. Error message is:
* foo.c:2: warning: conflicting types for built-in function `conj'
*/
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c/10025: gcc 3.2.2 recognizes complex functions even without complex.h
@ 2003-03-12 12:46 Richard Earnshaw
0 siblings, 0 replies; 4+ messages in thread
From: Richard Earnshaw @ 2003-03-12 12:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c/10025: gcc 3.2.2 recognizes complex functions even without complex.h
@ 2003-03-12 12:26 Aharon Robbins
0 siblings, 0 replies; 4+ messages in thread
From: Aharon Robbins @ 2003-03-12 12:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/10025; it has been noted by GNATS.
From: Aharon Robbins <arnold@skeeve.com>
To: arnold@skeeve.com, bangerth@dealii.org, gcc-bugs@gcc.gnu.org,
gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: c/10025: gcc 3.2.2 recognizes complex functions even without complex.h
Date: Wed, 12 Mar 2003 14:15:41 +0200
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c/10025: gcc 3.2.2 recognizes complex functions even without complex.h
@ 2003-03-11 15:07 bangerth
0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-03-11 15:07 UTC (permalink / raw)
To: arnold, gcc-bugs, gcc-prs, nobody
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-12 12:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-11 9:36 c/10025: gcc 3.2.2 recognizes complex functions even without complex.h Aharon Robbins
2003-03-11 15:07 bangerth
2003-03-12 12:26 Aharon Robbins
2003-03-12 12:46 Richard Earnshaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).