I've reproduced the problem on i386; the error is:
/home/uweigand/linaro/gcc-4.4-4.4.4/src/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc:
In function 'bool test01()':^M
/home/uweigand/linaro/gcc-4.4-4.4.4/src/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc:71:
error: invalid operands of types 'bool' and 'FILE*' to binary 'operator&'^M
/home/uweigand/linaro/gcc-4.4-4.4.4/src/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc:71:
error: in evaluation of 'operator&=(bool, struct FILE*)'^M
Line 71 reads:
VERIFY( freopen(name, "r", stdin) );
and was introduced in the form by the patch testsuite-hardening-
fortify.diff
Index: libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc
(revision
+++ b/src/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc (working
@@ -67,7 +67,7 @@ bool test01()
exit(0);
}
- freopen(name, "r", stdin);
+ VERIFY( freopen(name, "r", stdin) );
s1.wait();
wint_t c1 = fgetwc(stdin);
Now, the definition of the VERIFY macro is such that in certain cases, its
argument is assumed to be of boolean type:
#ifdef _GLIBCXX_ASSERT
# include <cassert>
# define VERIFY(fn) assert(fn)
#else
# define VERIFY(fn) test &= (fn)
#endif
Note that a statement of the form "test &= x" is not valid for "x" of type
"FILE *". This specific case is deliberately triggered by the 9661-1.cc test
case:
// No asserts, avoid leaking the semaphores if a VERIFY fails.
#undef _GLIBCXX_ASSERT
All pre-existing calls to VERIFY have explicit boolean arguments, so this works
fine. However, the new uses of VERIFY introduced by the
testsuite-hardening-fortify.diff patch violate this rule. It seems to me this
simply ought to be fixed in that patch.
--
regressions in linaro test build 4.4.4-7ubuntu1~ppa2 compared to 4.4.4-6ubuntu2
https://bugs.launchpad.net/bugs/607635
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs