------- Additional Comments From bangerth at dealii dot org  2005-09-13 14:04 
-------
Here's a slightly smaller version: 
----------------- 
struct A {}; 
struct B : private A {}; 
 
B *p = static_cast<B*>((A*)0); 
----------------- 
 
g/x> /home/bangerth/bin/gcc-3.2.3/bin/c++ -c x.cc 
g/x> /home/bangerth/bin/gcc-3.4*/bin/c++ -c x.cc 
x.cc:4: error: `A' is an inaccessible base of `B' 
 
The code is rejected at least since gcc3.3.4pre. I must admit that I don't 
know right away whether the code is legal -- icc for one accepts it -- though 
I could think of arguments why it shouldn't be. 
 
W. 

-- 


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

Reply via email to