Bug 28535 - gcc (g++) fails to build OpenSP, egcs++ works.
Summary: gcc (g++) fails to build OpenSP, egcs++ works.
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL: http://download.sourceforge.net/openj...
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-21 04:46 UTC by Terje Bless
Modified: 2007-04-18 16:31 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-22 00:32:25 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Preprosessed C++ source (-save-temps) (334.69 KB, text/plain)
2001-02-22 00:32 UTC, Terje Bless
no flags Details

Description Terje Bless 2001-02-21 04:46:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22smp i686)


Building OpenSP with g++ fails with an error related to an inaccessible
class. Using egcs++ works. Both compilers are the stock Red Hat 7.0
versions.

(BTW: first bugreport. My cluelessness probably shines through, but it's
not polite to mention it. ;D)

Reproducible: Always
Steps to Reproduce:
1. Get OpenSP (URL above)
2. tar xzf OpenSP
3. ./configure
4. make
	

Actual Results:  The make stops with an error message about an inacessible
class "in this context".

Expected Results:  Uhm, the make should finish successfully? :-)

Relevant output of the make:

make[2]: Entering directory `/home/link/tmp/OpenSP-1.5pre5/nsgmls'
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../generic     -g -O2 -c
nsgmls.cxx
nsgmls.cxx: In method `void XRastEventHandler::message 
(OpenSP::MessageEvent *)':
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:60: within this context
nsgmls.cxx: In method `void XRastEventHandler::truncateOutput ()':
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:61: within this context
nsgmls.cxx: In method `void XRastEventHandler::allLinkTypesActivated 
()':
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:62: within this context
nsgmls.cxx: At top level:
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:64: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:64: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:66: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:66: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:67: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:67: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:68: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:68: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:69: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:69: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:70: within this context
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:70: within this context
nsgmls.cxx: In method `XRastEventHandler::XRastEventHandler 
(OpenSP::SgmlParser *, const char *, const StringC &, const 
OpenSP::OutputCodingSystem *, OpenSP::CmdLineApp *, OpenSP::Messenger 
*)':
../include/Message.h:157: `class OpenSP::Messenger' is inaccessible
nsgmls.cxx:243: within this context
make[2]: *** [nsgmls.o] Error 1
make[2]: Leaving directory `/home/link/tmp/OpenSP-1.5pre5/nsgmls'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/link/tmp/OpenSP-1.5pre5'
make: *** [all-recursive-am] Error 2

Comment 1 Jakub Jelinek 2001-02-21 22:08:19 UTC
Can you please run
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../generic     -g -O2 -c nsgmls.cxx -save-temps
and attach here nsgmls.ii it creates?
It looks like bug in OpenSP (g++ 2.96 is much stricter and closer
to ISO C++), but after looking at the preprocessed source I could
tell more.

Comment 2 Terje Bless 2001-02-22 00:32:21 UTC
Created attachment 10722 [details]
Preprosessed C++ source (-save-temps)

Comment 3 Jakub Jelinek 2001-02-22 14:16:04 UTC
Ok, here is what our C++ lawyers said:
The compiler is correct; the example is in error.  Lookup of 'Messenger' in
XRastEventHandler finds the implicit declaration of Messenger within RastEventHandler, which is inaccessible.
The example should say OpenSP::Messenger.

Simplified testcase is:
struct Messenger {
};

struct RastEventHandler : private Messenger {
};

struct XRastEventHandler : public RastEventHandler {
  Messenger *Messenger_;
};

so OpenSP should be fixed.


Note You need to log in before you can comment on or make changes to this bug.