------- Comment #2 from hjl dot tools at gmail dot com  2008-07-26 17:08 -------
A simple testcase:

bash-3.2$ cat /tmp/bar.cc
class XObject
{
public:
  int foo;
};

class XObjectPtr
{
public:
 explicit
 XObjectPtr(XObject* theXObject = 0) : m_xobjectPtr(theXObject)
 {
 }

private:
 XObject * m_xobjectPtr;
};

class SelectionEvent
{
public:
 SelectionEvent(bool selection) : m_selection() {}
 const XObjectPtr m_selection;
};
bash-3.2$ ./xgcc -B./ -S /tmp/bar.cc
/tmp/bar.cc: In constructor ‘SelectionEvent::SelectionEvent(bool)’:
/tmp/bar.cc:22: error: uninitialized member ‘SelectionEvent::m_selection’ with
‘const’ type ‘const XObjectPtr’
bash-3.2$ 


-- 


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

Reply via email to