This is the mail archive of the
libstdc++-prs@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: libstdc++/47: Build of testsuite fails to compile bits/ios_base.h - exception not declared
- To: nobody at sourceware dot cygnus dot com
- Subject: Re: libstdc++/47: Build of testsuite fails to compile bits/ios_base.h - exception not declared
- From: Benjamin Kosnik <bkoz at cygnus dot com>
- Date: 28 Mar 2000 23:47:00 -0000
- Cc: libstdc++-prs at sourceware dot cygnus dot com,
- Reply-To: Benjamin Kosnik <bkoz at cygnus dot com>
The following reply was made to PR libstdc++/47; it has been noted by GNATS.
From: Benjamin Kosnik <bkoz@cygnus.com>
To: anthony_w.geo@yahoo.com
Cc: libstdc++-gnats@sourceware.cygnus.com
Subject: Re: libstdc++/47: Build of testsuite fails to compile bits/ios_base.h - exception not declared
Date: Tue, 28 Mar 2000 15:38:17 -0800 (PST)
this is from "mkcheck" including the new headers twice. Here's some mail
on the subject:
http://sourceware.cygnus.com/ml/libstdc++/2000-q1/msg00452.html
> 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:
>