On Mon, 12 May 2008 17:04:42 -0700
"H. Peter Anvin" <hpa zytor.com> wrote:
> The recent change to make the argument to EQU a
critical expression
> broke some of my code in a hard to fix way.
There was no such change. The comments in parser.c, which
have been
there for as long as I can recall, say:
/*
* RESB, RESW and RESD cannot be satisfied with
incorrectly
* evaluated operands, since the correct values _must_
be known
* on the first pass. Hence, even in pass one, we set
the
* `critical' flag on calling evaluate(), so that it
will bomb
* out on undefined symbols. Nasty, but there's nothing
we can
* do about it.
*
* For the moment, EQU has the same difficulty, so
we'll
* include that.
*/
What was changed was the behavior that, when optimization
was turned on,
ALL critical error checking was turned off.
> I don't recall the exact failure scenario that
prompted the change
The exact failure scenario was that, when optimization was
turned on,
using EQU to set a label equal to a forward referenced label
did not
produce a "symbol `%s%s' not defined before use"
message. At the time,
you expressed the opinion that such a message was the
desired behavior.
> but I'd like to revisit it
Fine with me, but merely reverting to the 'no such thing as
a critical
error, so something else must be wrong' behavior does not
seem to me to
be sufficient. We might be better off to drop entirely the
concept of
allowing the user to specify a specific number of
optimization passes
(which can still produce phase errors) and, instead, to use
the command
line switch to control what types of optimization to
perform, rather
than make them guess at how many passes it takes to do
them.
--
Chuck
htt
p://www.pacificsites.com/~ccrayne/charles.html
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
a>
_______________________________________________
Nasm-devel mailing list
Nasm-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-devel
a>
|