Eric Blake wrote:
> | +++ lib/error.h 2008-01-11 01:53:27.0 +0100
> | @@ -20,7 +20,7 @@
> |
> | #ifndef __attribute__
> | /* This feature is available in gcc versions 2.5 and later. */
> | -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) ||
> __STRICT_ANSI__
> | +# if __GN
Jim Meyering wrote:
> That was necessary when -ansi would make gcc
> fail to recognize __attribute__.
That's what my memory said as well. But I tested gcc 2.95.3, 3.1, 3.2, 3.3, 3.4,
4.0, 4.1, 4.2, and through the posted test program I verified that they
recognize and evaluate __attribute__ also w
Eric Blake <[EMAIL PROTECTED]> wrote:
> According to Bruno Haible on 1/10/2008 7:24 PM:
> | Thanks for these. So the problem is that if __STRICT_ANSI__ is set,
> | __attribute__(...) gets defined to empty. In some tests with GCC versions
> | starting from 2.95.3, I found that __attribute__ works al
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Bruno Haible on 1/10/2008 7:24 PM:
| Thanks for these. So the problem is that if __STRICT_ANSI__ is set,
| __attribute__(...) gets defined to empty. In some tests with GCC versions
| starting from 2.95.3, I found that __attribute__ works
Sylvain Beucler wrote:
> Here's the version:
> $ gcc --version
> gcc (GCC) 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)
>
> Here's how the test is compiled:
> freedink/native/src$ LANG=C make test.o
> gcc ... -std=c99 ...
Thanks for these. So the problem is that if __STRICT_ANSI__ is set,
__attri
Sylvain Beucler <[EMAIL PROTECTED]> writes:
> Here's a test program:
> #include
> #include
> int main(void)
> {
> printf("sizeof(Sint8) = %d\n", sizeof(Sint8));
> printf("sizeof(int8_t) = %d\n", sizeof(int8_t));
> printf("sizeof(unsigned char) = %d\n", sizeof(unsigned char));
On Fri, Jan 11, 2008 at 12:56:04AM +0100, Bruno Haible wrote:
> Sylvain Beucler wrote:
> > Afaics Gnulib's string.h will define __attribute__ to be empty:
> >
> > #ifndef __attribute__
> > /* This feature is available in gcc versions 2.5 and later. */
> > # if __GNUC__ < 2 || (__GNUC__ == 2
Sylvain Beucler wrote:
> Afaics Gnulib's string.h will define __attribute__ to be empty:
>
> #ifndef __attribute__
> /* This feature is available in gcc versions 2.5 and later. */
> # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) ||
> __STRICT_ANSI__
> # define __attribute__(
Hi,
I got a weird compilation warning when upgrading gnulib today.
Here's a test program:
#include
#include
int main(void)
{
printf("sizeof(Sint8) = %d\n", sizeof(Sint8));
printf("sizeof(int8_t) = %d\n", sizeof(int8_t));
printf("sizeof(unsigned char) = %d\n", sizeof(unsigned