This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: comparing undefined symbols with constants
On Mon, Jan 29, 2018 at 02:45:34AM -0700, Jan Beulich wrote:
> >>> On 29.01.18 at 00:29, <amodra@gmail.com> wrote:
> > On Thu, Jan 25, 2018 at 03:17:40AM -0700, Jan Beulich wrote:
> >> as the documentation doesn't clarify this, I'd like to understand
> >> whether "<undefined> == <constant>" being always false, and
> >> "<undefined> != <constant>" being always true is really intended
> >> to be that way.
> >
> > Yes, I think so.
>
> Interesting. This, as explained, not being correct in certain cases is
> not considered a problem then?
I don't see the problem. gas is a single-pass assembler. A
conditional expression should evaluate with values (or lack of values)
at the point the expression is used.
> (Not that I could think of a neat way
> to address this without breaking code actually relying on the current
> behavior.)
>
> Jan
>
--
Alan Modra
Australia Development Lab, IBM