This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c/14088
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 11 Feb 2004 12:36:23 +1100 (EST)
- Subject: Re: [PATCH] PR c/14088
--- "Joseph S. Myers" > wrote: > On Wed, 11 Feb 2004, [iso-8859-1] Danny Smith wrote:
>
> 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).
>
Right. OK to commit?
Danny
testsuite/ChangeLog
2004-02-11 Danny Smith <dannysmith@users.sourceforge.net>
* gcc.dg/c99-hexfloat-3.c: New file.
*** /dev/null Wed Feb 11 01:24:33 2004
--- gcc.dg/c99-hexfloat-3.c Wed Feb 11 01:18:21 2004
***************
*** 0 ****
--- 1,11 ----
+ /* PR c/14088
+ Test that both uppercase and lowercase 'x' in hexfloat prefix
+ yield oorrect number. */
+
+ /* { dg-options "-std=iso9899:1999" } */
+
+ #define x1 (int)0x1p1
+ #define x2 (int)0X1p1
+
+ char tst1 [(x1 == 2) ? 1 : -1];
+ char tst2 [(x2 == 2) ? 1 : -1];
http://greetings.yahoo.com.au - Yahoo! Greetings
Send your love online with Yahoo! Greetings - FREE!