public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52458] New: [c++0x] compiler fails on for(:*this) with non-public inheritance with message: Internal compiler error: Error reporting routines re-entered.
@ 2012-03-02  2:17 crimaniak at gmail dot com
  2012-03-02  2:19 ` [Bug c++/52458] " crimaniak at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: crimaniak at gmail dot com @ 2012-03-02  2:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52458

             Bug #: 52458
           Summary: [c++0x] compiler fails on for(:*this) with non-public
                    inheritance with message: Internal compiler error:
                    Error reporting routines re-entered.
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: crimaniak@gmail.com


Created attachment 26805
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26805
preprocessed code

Command line: c++ -std=c++0x -save-temps bug1.cpp
Code:

#include <vector>
/*#include <iostream>*/

#if false
class V : public    std::vector<int>
#else
class V : protected std::vector<int>
#endif
{
public:
  void echo(){for(int x:*this) /*std::cout << ' ' << x */ ;};
};


int main()
{
    V a;
    a.resize(20);
    a.echo();
}

Change false to true in #if directive and code will be compiled succesfully.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-04 12:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-02  2:17 [Bug c++/52458] New: [c++0x] compiler fails on for(:*this) with non-public inheritance with message: Internal compiler error: Error reporting routines re-entered crimaniak at gmail dot com
2012-03-02  2:19 ` [Bug c++/52458] " crimaniak at gmail dot com
2012-03-02  9:36 ` redi at gcc dot gnu.org
2012-03-02 10:35 ` redi at gcc dot gnu.org
2012-03-02 12:39 ` redi at gcc dot gnu.org
2012-03-02 14:50 ` crimaniak at gmail dot com
2012-03-02 17:07 ` redi at gcc dot gnu.org
2012-10-04 12:14 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).