From: Wolfgang Bangerth Date: Thu, 2 Apr 1998 08:33:37 +0000 (+0000) Subject: Workaround for gcc2.8 bug X-Git-Tag: v8.0.0~23142 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4fe23c9bcc5f8274d824f88da79f8a75b0a4292;p=dealii.git Workaround for gcc2.8 bug git-svn-id: https://svn.dealii.org/trunk@112 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/Todo b/deal.II/deal.II/Todo index 55e55269ba..ac4704c4a2 100644 --- a/deal.II/deal.II/Todo +++ b/deal.II/deal.II/Todo @@ -39,6 +39,8 @@ Replace function objects by mem_fun, fun_ptr, ... when member function implement ProblemBase::distribute_cell_to_dof_vector +Remove gcc2.8 workaround with DoFSubstructAccessor + diff --git a/deal.II/deal.II/include/dofs/dof_accessor.h b/deal.II/deal.II/include/dofs/dof_accessor.h index 2ff7959be7..c01fc38f8a 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.h @@ -298,9 +298,29 @@ class DoFQuadAccessor : public DoFAccessor, public BaseClass { /** Intermediate, "typedef"-class, not for public use. + + Rationale for the declaration of members for this class: gcc 2.8 has a bug + when deriving from explicitely specialized classes which materializes in + the calculation of wrong addresses of member variables. By declaring the + general template of #DoFSubstructAccessor# to have the same object layout as + the specialized versions (using the same base classes), we fool the compiler, + which still looks in the wrong place for the addresses but finds the + right information. This way, at least ot works. + + Insert a guard, however, in the constructor to avoid that anyone (including + the compiler) happens to use this class. */ template -class DoFSubstructAccessor; +class DoFSubstructAccessor : public DoFAccessor, + public TriaAccessor { + public: + DoFSubstructAccessor () { + Assert (false, ExcInternalError()); + }; + + DeclException0 (ExcInternalError); +}; +