>Submitter-Id:  net
>Originator:    
>Organization:  BlueArc
>Confidential:  no
>Synopsis:      -pedantic reports ambiguous base
>Severity:      non-critical
>Priority:      low
>Category:      c++
>Class:         rejects-legal
>Release:       3.0.3 (Debian testing/unstable)
>Environment:
System: Linux trevithick 2.4.16 #2 Mon Dec 10 15:54:50 GMT 2001 i686 unknown
Architecture: i686

        
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,proto,objc --prefix=/usr 
--infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as 
--with-gnu-ld --with-system-zlib --enable-long-long --enable-nls 
--without-included-gettext --disable-checking --enable-threads=posix 
--enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
struct HwQueue
{
    void pop ();
};

struct ISPmq : HwQueue
{
};
struct ISImq : HwQueue
{
};

struct IS : ISPmq, ISImq
{
    void monk ();
};

void IS::monk()
{
    ISPmq::pop();
}

$ gcc-3.0 -c -pedantic twosamebase.cpp
twosamebase.cpp: In member function `void IS::monk()':
twosamebase.cpp:21: `HwQueue' is an ambiguous base of `IS'

Without -pedantic there is not even a warning (even with -W -Wall).

10.2.1 says "for a qualified-id, name lookup begins in the scope of the 
nested-name-specifier".  In which scope, I don't think the reference to pop() 
or HWQueue, for that matter, is ambiguous.

>How-To-Repeat:
        
>Fix:
        Workaround: this->ISPmq::pop(); works fine.



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


Reply via email to