This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

["Alan R. Rogers" <rogers@csbs.utah.edu>] Re: derived class can't invoke base-class constructor



When I replied to you, I should have cc'd my reply to gcc-bugs. This
  should have gone to gcc-bugs as well, but that was my fault.

So I am forwarding this to gcc-bugs, and I appologize for any
  confusion ...



Thanks for the reply.  I'm attaching three files:

bug.cpp      :  My original source code
bug.s, bug.ii: produced by the --save-temps option of g++

I hope these are helpful.

The problem seems to have been provoked by a bug in my own code. My
constructor should have been

  buggy(std::basic_istream<charT,traits>& is)
    : std::basic_istream<charT,traits>( is.rdbuf() )  {}                                                 
                        ^^^^^^^^^^^^^^
rather than

  buggy(std::basic_istream<charT,traits>& is)
    : std::basic_istream( is.rdbuf() )  {}                                                 

I hope that this helps.

Alan Rogers

On Wed, 26 Jul 2000 llewelly@dbritsch.dsl.xmission.com wrote:

> On Wed, 26 Jul 2000, Alan R. Rogers wrote:
> 
> > I hope that this bug report will be useful to you.  If the error is in my
> > source code, then I apologize in advance.
> 
> An ICE is always an error in the compiler, even if there is also an error
>   in the code.
> 
> > 
> > GCC VERSION: 2.95.2
> > 
> > OPERATING SYSTEM: SuSE linux version 6.4 for i386, running Linux
> > kernel 2.2.9
> > 
> > COMMAND LINE: gcc -c bug.cpp
> > 
> > OUTPUT:
> > 
> >  > gcc -c bug.cpp
> > bug.cpp: In method `buggy<charT,traits>::buggy(_STL::basic_istream<charT,traits> &)':
> > bug.cpp:9: Internal compiler error.
> > bug.cpp:9: Please submit a full bug report.
> > bug.cpp:9: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.         
> 
> Please do.
> 
> > 
> > SOURCE:
> > 
> > /** file bug.cpp **/
> > #include <iosfwd>  // included from STLport-4.0
> 
> The gcc maintainers cannot do much without the preprocessed sources; not
>   everyone has STLport-4.0, and even if they do, the contents of <iosfwd>
>   mostly like vary depending on the configuration. Without knowing what is
>   in <iosfwd> it is very hard to determine the nature of the bug.
> 
> So when you report bugs, please include pre-proceessed sources (obtained
>   with g++ --save-temps, again, see the bug reporting instructions.)
> 
> > 
> > template <class charT, class traits >
> > class buggy : std::basic_istream<charT,traits> {
> > public:
> >   
> >   buggy(std::basic_istream<charT,traits>& is)
> >     : std::basic_istream(  is.rdbuf() )
> >   {}
> > };
> 
> Thank you for your bug report.
> 
> 
> 
[2. bug.cpp --- text/plain; bug.cpp]...

[3. bug.s --- text/plain; bug.s]...

[4. bug.ii --- text/plain; bug.ii]...




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