* [BUG] GCC 3.4-20041224: __attribute__ ((regparm)) misbehaviour
@ 2004-12-28 3:44 Denis Zaitsev
2004-12-28 3:49 ` Andrew Pinski
0 siblings, 1 reply; 5+ messages in thread
From: Denis Zaitsev @ 2004-12-28 3:44 UTC (permalink / raw)
To: gcc, linux-gcc
This program:
static
int x(int y)
__attribute__ ((regparm(1)));
static
int x(int y)
{
return y;
}
can't be compiled with GCC 3.4.4 20041224. The compiler complains:
y-bug.c:7: error: conflicting types for 'x'
y-bug.c:3: error: previous declaration of 'x' was here
y-bug.c:7: error: conflicting types for 'x'
y-bug.c:3: error: previous declaration of 'x' was here
It seems that it's a bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] GCC 3.4-20041224: __attribute__ ((regparm)) misbehaviour
2004-12-28 3:44 [BUG] GCC 3.4-20041224: __attribute__ ((regparm)) misbehaviour Denis Zaitsev
@ 2004-12-28 3:49 ` Andrew Pinski
2004-12-28 3:54 ` Denis Zaitsev
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Pinski @ 2004-12-28 3:49 UTC (permalink / raw)
To: Denis Zaitsev; +Cc: gcc, linux-gcc
On Dec 27, 2004, at 10:44 PM, Denis Zaitsev wrote:
> This program:
>
>
> static
> int x(int y)
> __attribute__ ((regparm(1)));
>
> static
> int x(int y)
> {
> return y;
> }
>
No this is not a bug. You need regparm attribute on the function
definition too.
-- Pinski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] GCC 3.4-20041224: __attribute__ ((regparm)) misbehaviour
2004-12-28 3:49 ` Andrew Pinski
@ 2004-12-28 3:54 ` Denis Zaitsev
2004-12-28 3:57 ` Andrew Pinski
0 siblings, 1 reply; 5+ messages in thread
From: Denis Zaitsev @ 2004-12-28 3:54 UTC (permalink / raw)
To: Andrew Pinski; +Cc: gcc, linux-gcc
On Mon, Dec 27, 2004 at 10:49:46PM -0500, Andrew Pinski wrote:
>
> On Dec 27, 2004, at 10:44 PM, Denis Zaitsev wrote:
>
> > This program:
> >
> >
> > static
> > int x(int y)
> > __attribute__ ((regparm(1)));
> >
> > static
> > int x(int y)
> > {
> > return y;
> > }
> >
>
> No this is not a bug. You need regparm attribute on the function
> definition too.
Hmm... Is it regparm-only related? And is it something new though?
GCC 3.3.x doesnt show this behaviour.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] GCC 3.4-20041224: __attribute__ ((regparm)) misbehaviour
2004-12-28 3:54 ` Denis Zaitsev
@ 2004-12-28 3:57 ` Andrew Pinski
2004-12-28 4:04 ` Denis Zaitsev
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Pinski @ 2004-12-28 3:57 UTC (permalink / raw)
To: Denis Zaitsev; +Cc: gcc, linux-gcc
On Dec 27, 2004, at 10:54 PM, Denis Zaitsev wrote:
> Hmm... Is it regparm-only related? And is it something new though?
> GCC 3.3.x doesnt show this behaviour.
Read <http://gcc.gnu.org/ml/gcc/2004-03/msg00039.html>.
-- Pinski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] GCC 3.4-20041224: __attribute__ ((regparm)) misbehaviour
2004-12-28 3:57 ` Andrew Pinski
@ 2004-12-28 4:04 ` Denis Zaitsev
0 siblings, 0 replies; 5+ messages in thread
From: Denis Zaitsev @ 2004-12-28 4:04 UTC (permalink / raw)
To: Andrew Pinski; +Cc: gcc, linux-gcc
On Mon, Dec 27, 2004 at 10:57:07PM -0500, Andrew Pinski wrote:
>
> On Dec 27, 2004, at 10:54 PM, Denis Zaitsev wrote:
>
> > Hmm... Is it regparm-only related? And is it something new though?
> > GCC 3.3.x doesnt show this behaviour.
Ok, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-12-28 4:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-28 3:44 [BUG] GCC 3.4-20041224: __attribute__ ((regparm)) misbehaviour Denis Zaitsev
2004-12-28 3:49 ` Andrew Pinski
2004-12-28 3:54 ` Denis Zaitsev
2004-12-28 3:57 ` Andrew Pinski
2004-12-28 4:04 ` Denis Zaitsev
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 NNTP newsgroup(s).