[GCC-XML] Failed to compile pimpl idiom with up to date gccxml and boost's scoped_ptr

Kirill Lapshin kir at lapshin.net
Mon Jan 5 13:12:34 EST 2009


Kirill Lapshin wrote:

> Another interesting observation is that we don't observe this problem 
> with older gccxml versions. Not sure when it was introduced -- I'll try 
> to pick some older version to see if it solves this problem.

I've tried to bisect, and it turned out that cvs version as of 
2008-10-01 works fine, but as of 2008-10-02 fails. My guess (wild guess 
that is) that offending change is  GCC/gcc/cp/xml.c revision 1.124. Here 
is a courtesy copy of commit log message

revision 1.124
date: 2008-10-01 19:08:24 +0400;  author: king;  state: Exp;  lines: +34 
-1;  commitid: 3grJQuAcjzu76Wkt;
BUG: Suppress invalid compiler-generated methods

The GCC parser generates artificial declarations for methods that may be
implicitly defined.  Unfortunately it does so even when the method is
not supposed to be available, and waits until the code tries to call the
method to report an error.  For example, the code

   struct A { A(); const int a; };

should not have an implicit assignment operator.  In order to drop these
methods from the xml output, we test synthesizing them as if they were
called.  During the test, error diagnostics are suppressed but used to
discard the offending method.




More information about the gccxml mailing list