This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Invalid code in <limits>
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "gdr at integrable-solutions dot net" <gdr at integrable-solutions dot net>
- Date: Wed, 29 Jan 2003 00:06:18 -0800
- Subject: Re: Invalid code in <limits>
--On Wednesday, January 29, 2003 12:01:33 AM -0800 Richard Henderson
<rth@redhat.com> wrote:
Plus, I don't see how this helps. A name's a name, isn't it?
How does having a magic variable work out better than a magic
function? Seems like you still go through name lookup...
Name lookup's not the problem -- you have to do that. It's evaluating
function calls that's the problem. You'll have to trust me on this one;
trying to explain it would require so much standardese it would be silly.
The bottom line is that there's no need to make the compiler work
hard to deal with this stuff; it's easy to make a keyword whose value
is "__builtin_huge_valf () / 2 == __builtin_huge_valf ()" or
"__builtin_nanf ("") != __builtin_nanf ("")"; you just evaluate that
expression in the guts of the compiler where it can do whatever it
wants.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com