> That's a dicey issue. We don't like to figure out what compiler versions work
> or don't work based on OS and compiler version numbers. Ideally, we would
> have a small testcase that we can run in ./configure to see if the compiler
> is broken or not. I'd rather not try to use version numbers because one
> always seems to get this wrong (note, for example, that gcc4.5 hasn't even
> been released yet, and so is still changing -- which means that we can't test
> for version number 4.5 to see if it is broken or not).
I think a _APPLE_DYNAMIC_CAST_BUG flag would be a good idea, and it does not
look like there are too many places in the code where it would be needed.
Here is a short snippet of code that fails when compiled with Apple compilers
on Snow Leopard:
const unsigned int dim = 2;
Quadrature<dim> quadrature;
const Subscriptor* quadrature_base_pointer = &quadrature;
if(dynamic_cast<const Quadrature<dim>
*>(quadrature_base_pointer) != 0)
std::cout<<"SUCCESS"<<std::endl;
else
std::cout<<"FAILURE"<<std::endl;
Running the above code on my Snow Leopard install (using gcc 4.2):
FAILURE
Running it on "regular" Leopard with gcc 4.2:
SUCCESS
Perhaps a configure test that mimics the above functionality could be written?
I have not dug into the Subscriptor base class yet, so I do not know how much
effort it would be to write such a test.
-Scott_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii