[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible Bug - g++ 3.4.0 and GotW #17
From: |
Paul Pluzhnikov |
Subject: |
Re: Possible Bug - g++ 3.4.0 and GotW #17 |
Date: |
27 May 2004 07:54:15 -0700 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
Jan Rendek <do@not.use> writes:
> Am I missing something here, or shall I write bug report ?
The default inheritance is *private*, and gcc-3.4 message is correct
(if somewhat cryptic).
Here is a more explanatory message from HP aCC:
Error 624: "junk.cc", line 11 # This dynamic_cast will always fail
because class A is an ambiguous or inaccessible base of class B.
A* pa1 = dynamic_cast<A*>(pb4); // (1)
^^^
And another from the EDG front end:
"junk.cc", line 11: error: conversion to inaccessible base class "A" is not
allowed
A* pa1 = dynamic_cast<A*>(pb4); // (1)
^
Make the inheritance public, and gcc-3.4 will compile it just fine.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.