[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module alignof
From: |
Eric Blake |
Subject: |
Re: new module alignof |
Date: |
Sat, 06 Jun 2009 13:31:44 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 5/31/2009 1:51 PM:
> Eric Blake wrote:
>> I noticed you just pushed test-alignof.c. Should this file also check
>> 'long double', and (where available) 'long long int', particularly since
>> these types often have smaller alignment than size?
>
> Good point here as well. I'm adding them:
>
> + typedef long double longdouble;
...
> + CHECK (long double)
I fixed the typo (CHECK only takes a single token argument):
> gcc -DHAVE_CONFIG_H -I. -I../../gltests -I. -I../../gltests -I..
> -I../../gltests/.. -I../gllib -I../../gltests/../gllib -g -O2 -MT
> test-alignof.o -MD -MP -MF .deps/test-alignof.Tpo -c -o test-alignof.o
> ../../gltests/test-alignof.c
> ../../gltests/test-alignof.c:46: error: long, short, signed or unsigned
> invalid for `double_helper'
> ../../gltests/test-alignof.c:46: error: conflicting types for 'double_helper'
> ../../gltests/test-alignof.c:45: error: previous declaration of
> 'double_helper' was here
> + CHECK (int64_t)
I didn't touch this, but should we still want to cater to C89 platforms
that lack 64 bit integers of any form, by making this conditional on
whether GL_INT64_T is defined from our <stdint.h> replacement?
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoqxCAACgkQ84KuGfSFAYCPQwCgwoQuDJjyC0gmmRopIqFMP80T
snwAoL9SumCUiCF/AnCkBNlHT5Tz5w0D
=ljh4
-----END PGP SIGNATURE-----
>From 766346334443c809a76ed4e798e0ed2b4fb6c8ca Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Sat, 6 Jun 2009 13:23:51 -0600
Subject: [PATCH] test-alignof: fix typo with long double
* tests/test-alignof.c (CHECK): Use longdouble typedef to avoid
compiler error.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 6 ++++++
tests/test-alignof.c | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 732c808..dd2a6c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-06 Eric Blake <address@hidden>
+
+ test-alignof: fix typo with long double
+ * tests/test-alignof.c (CHECK): Use longdouble typedef to avoid
+ compiler error.
+
2009-05-26 Eric Blake <address@hidden>
memchr: detect broken x86_64 and alpha implementations
diff --git a/tests/test-alignof.c b/tests/test-alignof.c
index 93d5ded..8bd5bc1 100644
--- a/tests/test-alignof.c
+++ b/tests/test-alignof.c
@@ -43,7 +43,7 @@ CHECK (int)
CHECK (long)
CHECK (float)
CHECK (double)
-CHECK (long double)
+CHECK (longdouble)
CHECK (int64_t)
CHECK (struct1)
CHECK (struct2)
--
1.6.3.rc3.2.g4b51
- Re: new module alignof,
Eric Blake <=