This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Invalid code in <limits>
- From: Richard Henderson <rth at redhat dot com>
- To: Mark Mitchell <mark at codesourcery 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:18:31 -0800
- Subject: Re: Invalid code in <limits>
- References: <20030129080133.GE20774@redhat.com> <29230000.1043827578@warlock.codesourcery.com>
On Wed, Jan 29, 2003 at 12:06:18AM -0800, Mark Mitchell wrote:
> 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.
Ok, but how about
struct S {
static const double f = 1.0;
static const double g = __builtin_huge_valf ();
};
(or whatever context is hardest for c++)? If either
works, they should both work.
r~