bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: erroneous "non-constant expression" error


From: Alan Modra
Subject: Re: erroneous "non-constant expression" error
Date: Sun, 26 Jun 2005 01:58:26 +0930
User-agent: Mutt/1.4i

On Thu, Jun 23, 2005 at 09:37:00PM +0100, Zefram wrote:
> t.s: Assembler messages:
> t.s:55: Error: non-constant expression in ".if" statement
> $
> 
> The expression in the .if is most definitely constant

Agreed.  However, gas can't immediately evaluate it because of the way
gas frags work.  The problem is that your start label is in a different
frag from the end label, most likely because code emitted prior to the
macro invocation, plus the space needed by the ascii string exceeded the
max frag size.  Incidentally, I don't see how the code you posted could
cause this to happen since the .p2align ought to cause a new frag to be
started, but I do know that this sort of problem can happen.  A
workaround is to align at the start of your macro.  See also
http://sources.redhat.com/bugzilla/show_bug.cgi?id=997

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]