This is the mail archive of the gcc-patches@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: [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!


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