bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnulib-tests/test-stdbool.c vs gcc2.95/OpenBSD


From: Christian Weisgerber
Subject: gnulib-tests/test-stdbool.c vs gcc2.95/OpenBSD
Date: Wed, 30 Jun 2010 19:32:12 +0200
User-agent: Mutt/1.4.2.3i

Here's another issue I noticed while running the gettext-0.18.1
regression tests on OpenBSD/sparc (gcc2.95):

In gettext-tools/gnulib-tests...

source='test-stdbool.c' object='test-stdbool.o' libtool=no  DEPDIR=.deps 
depmode=gcc /bin/sh ../../build-aux/depcomp  cc -DHAVE_CONFIG_H -I. -I..  
-DIN_GETTEXT_TOOLS_GNULIB_TESTS=1 -I. -I. -I..  -I./.. -I../gnulib-lib 
-I./../gnulib-lib  -I../intl  -I/usr/local/include  -O2 -pipe -c -o 
test-stdbool.o test-stdbool.c
test-stdbool.c:36: syntax error before string constant

Specifically, it's  "error: true is not 1".

The relevant part of OpenBSD's stdbool.h is this:
------->
/* `_Bool' type must promote to `int' or `unsigned int'. */
typedef enum {
        false = 0,
        true = 1
} _Bool;

/* And those constants must also be available as macros. */
#define false   false
#define true    true
<-------
http://www.openbsd.org/cgi-bin/cvsweb/src/include/stdbool.h?rev=1.4

So, true *is* 1, but this isn't visible at the preprocessor level.

I don't know if this is to be considered a bug in the gnulib test
or in OpenBSD's headers.

-- 
Christian "naddy" Weisgerber                          address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]