Skip to content

Commit f6574fa

Browse files
authored
Merge pull request #2365 from mitza-oci/warnings
Conditionally restore code that silences a GCC 8 warning
2 parents e75a158 + 6cce4f6 commit f6574fa

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

TAO/tao/PortableServer/Servant_Base.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,15 @@ TAO_ServantBase::TAO_ServantBase (TAO_Operation_Table *optable)
6262
}
6363

6464
TAO_ServantBase::TAO_ServantBase (const TAO_ServantBase &rhs)
65-
: ref_count_ (1)
65+
:
66+
#if defined __GNUC__ && __GNUC__ < 9
67+
// GCC version 8 issues an invalid warning without the next non-comment line.
68+
// Other compilers (MSVC) may warn when this line is present, since it will never be used for initialization.
69+
// In copy constructor TAO_ServantBase::TAO_ServantBase(const TAO_ServantBase&):
70+
// warning: base class class TAO_Abstract_ServantBase should be explicitly initialized in the copy constructor [-Wextra]
71+
TAO_Abstract_ServantBase (),
72+
#endif
73+
ref_count_ (1)
6674
, optable_ (rhs.optable_)
6775
{
6876
}

0 commit comments

Comments
 (0)