X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-stdbool.c;h=30d53217a551cd962a7290262bb019222f068a27;hb=afd0e4d2fd87ba6eaddc04476ed6d808c3afc5b0;hp=73fd61e02be91da9a2cb2383e0cf8129ea033a17;hpb=4dc5127ae2b91d18a8af1ef298e6b28030e1406c;p=gnulib.git diff --git a/tests/test-stdbool.c b/tests/test-stdbool.c index 73fd61e02..30d53217a 100644 --- a/tests/test-stdbool.c +++ b/tests/test-stdbool.c @@ -1,10 +1,10 @@ /* Test of substitute. Copyright (C) 2002-2007 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -40,21 +39,28 @@ "error: __bool_true_false_are_defined is not defined" #endif +#if 0 /* Cannot be guaranteed with gnulib's . */ struct s { _Bool s: 1; _Bool t; } s; +#endif char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; +#if 0 /* Cannot be guaranteed with gnulib's . */ char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; +#endif char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; +#if 0 /* See above. */ char i[sizeof s.t]; +#endif enum { j = false, k = true, l = false * true, m = true * 256 }; _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; +#if 0 /* Cannot be guaranteed with gnulib's . */ #if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see @@ -74,6 +80,7 @@ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); #endif +#endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html