From: David Wells Date: Sat, 7 May 2016 23:28:26 +0000 (-0400) Subject: Get around a GCC 6 warning. X-Git-Tag: v8.5.0-rc1~1053^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b919905c49241b83ef5b4a6c6425c4033bde2459;p=dealii.git Get around a GCC 6 warning. GCC 6.1 now warns (-Waddress) that (since the dynamic cast of an object back to its own type always succeeds) the address of an object is always nonzero, so these casts result in tautologies for valid vector types. --- diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index dbf4030aab..e1f47314f4 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -7086,15 +7086,8 @@ namespace VectorTools } else { - // This function is not implemented for distributed vectors, so - // if v is not a boring Vector or BlockVector: - Assert( dynamic_cast *>(& v) - || dynamic_cast *>(& v) - || dynamic_cast *>(& v) - || dynamic_cast *>(& v) - || dynamic_cast *>(& v) - || dynamic_cast *>(& v), - ExcNotImplemented()); + // This function is not implemented for distributed vectors. + Assert(!v.supports_distributed_data, ExcNotImplemented()); const unsigned int n = v.size();