This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c/14088
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Feb 2004 23:31:02 +0000 (UTC)
- Subject: Re: [PATCH] PR c/14088
- References: <20040210232544.39103.qmail@web61007.mail.yahoo.com>
On Wed, 11 Feb 2004, [iso-8859-1] Danny Smith wrote:
> Will this do?
>
> /* PR c/14088
> Test that uppercase and lowercase 'x' in hexfloat prefix
> yield same real nuber. */
>
> * { dg-options "-std=iso9899:1999" } */
>
> #define x1 (double)0x1p1
> #define x2 (double)0X1p1
>
> char tst1 [(x1 == 2.0) ? 1 : -1];
> char tst2 [(x1 == x2) ? 1 : -1];
These aren't actually integer constant expressions (although they are
wrongly accepted as such at present) so defining x1 as (int)0x1p1 etc.
(and comparing then with integer 2) would be better (and I think would
still detect this bug).
--
Joseph S. Myers
jsm@polyomino.org.uk