This is the mail archive of the libstdc++-prs@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libstdc++/47: Build of testsuite fails to compile bits/ios_base.h - exception not declared



>Number:         47
>Category:       libstdc++
>Synopsis:       Build of testsuite fails to compile bits/ios_base.h - exception not declared
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 28 03:27:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Anthony Williams
>Release:        2.90.8
>Organization:
>Environment:
Sparc-solaris-2.7
gcc-2.95.2
>Description:
I have tried building a new copy of gcc 2.95.2 with libstdc++ from the 2.90.8 snapshot, using gcc-2.95.2

It configures and builds OK, but when I run

make check

I get compilation erros on lots of the modules, huge reams of errors and warnings, starting with:

In file included from ../../../gcc-2.95.2/libstdc++/bits/std_ios.h:43,
                 from ../../../gcc-2.95.2/libstdc++/bits/std_istream.h:37,
                 from ../../../gcc-2.95.2/libstdc++/bits/std_fstream.h:37,
                 from ../../../gcc-2.95.2/libstdc++/std/fstream:2,
                 from ../../../gcc-2.95.2/libstdc++/testsuite/17_intro/header_fstream.cc:23:
../../../gcc-2.95.2/libstdc++/bits/ios_base.h:144: parse error before `{'
../../../gcc-2.95.2/libstdc++/bits/ios_base.h:152: destructor `failure' must match class name `ios_base'
../../../gcc-2.95.2/libstdc++/bits/ios_base.h:226: parse error before `protected'
../../../gcc-2.95.2/libstdc++/bits/ios_base.h:239: syntax error before `;'
../../../gcc-2.95.2/libstdc++/bits/ios_base.h:243: parse error before `,'
../../../gcc-2.95.2/libstdc++/bits/ios_base.h:245: missing ';' before right brace

I checked bits/ios_base.h, and it uses namespace std, whilst std_exception uses __STL_BEGIN_NAMESPACE

There are many headers that use each - shouldn't this be consistent across the source?

However, it appears the cause is the __GNUG__ macro - in std_exception.h we do #include<exception> if __GNUG__ is defined, otherwise we declare the exception class.

Fine, except that <exception> just does #include <bits/std_exception.h> - circular reference, and exception never gets declared.

It doesn't make any difference whether or not I specify --enable-namespaces or --disable-namespaces on the configure line
>How-To-Repeat:
Build + install binutils + gcc2.95.2 (normal) on sparc-solaris-2.7

rebuild gcc using libstdc++-2.90.8 as drop-in replacement for v2 libraries

make check
>Fix:
Remove the #ifdef __GNUG__ from bits/std_exception.h
?
>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]