Restore __eprintf
Jeffrey Oldham
oldham@codesourcery.com
Tue May 29 16:35:00 GMT 2001
My recent upgrade to the latest dejagnu for mips-sgi-irix6.5 revealed
hundreds of libstdc++-v3 test failures all because `__eprintf' is
declared but not defined. __eprintf() is declared in a
mips-sgi-irix6.5/include/assert.h. assert.h is included by
libstdc++-v3/include/c_std/bits/std_cassert.h. See the attached file
for an example.
gcc/Makefile.in includes `__eprintf' in LIB2FUNCS_ST. These functions
are included only in the static library version. Unfortunately, the
`-static' flag is, in practice, ignored for Irix. The only solution I
see is to remove all uses of `__eprintf' in all the gcc source code
and then comment LIB2FUNCS_ST as being dangerous since `-static' does
not work on some machines.
Questions:
1) Is omitting `__eprintf' from LIB2FUNCS_ST acceptable?
2) How is assert.h created?
In the mean time, I will test omitting `__eprintf' from LIB2FUNCS_ST
on mips-sgi-irix6.5 to see if this resolves the problem.
Thanks for your help,
Jeffrey D. Oldham
oldham@codesourcery.com
# 25 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc"
# 1 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/include/std/ciso646" 1
# 26 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc" 2
# 1 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/debug_assert.h" 1
# 37 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/debug_assert.h"
# 1 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/include/std/cassert" 1
# 1 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/include/c_std/bits/std_cassert.h" 1
# 37 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/include/c_std/bits/std_cassert.h" 3
# 1 "/users/joldham/pooma/dev4/install/mips-sgi-irix6.5/mips-sgi-irix6.5/include/assert.h" 1 3
# 25 "/users/joldham/pooma/dev4/install/mips-sgi-irix6.5/mips-sgi-irix6.5/include/assert.h" 3
extern "C" {
extern void __eprintf (const char *, const char *, unsigned, const char *)
__attribute__ ((noreturn));
}
# 38 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/include/c_std/bits/std_cassert.h" 2 3
# 3 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/include/std/cassert" 2
# 38 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/debug_assert.h" 2
# 27 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc" 2
# 37 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc"
bool test01()
{
bool test = true;
# 90 "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc"
((void) ((test) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc", 90, "test"), 0)));
return test;
}
bool test02()
{
bool test = true;
bool arg1 = true;
bool arg2 = false;
int int1 = 45;
int int2 = 0;
((void) ((arg1 && int1) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc", 107, "arg1 && int1"), 0)));
((void) ((arg1 and int1) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc", 108, "arg1 and int1"), 0)));
((void) (((arg1 && arg2) == (arg1 and arg2)) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc", 110, "(arg1 && arg2) == (arg1 and arg2)"), 0)));
((void) (((arg1 && int1) == (arg1 and int1)) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc", 111, "(arg1 && int1) == (arg1 and int1)"), 0)));
((void) ((test) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/users/joldham/pooma/dev4/gcc/libstdc++-v3/testsuite/17_intro/header_ciso646.cc", 114, "test"), 0)));
return test;
}
int main(void)
{
test01();
test02();
return 0;
}
More information about the Gcc-patches
mailing list