This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]