This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24425] New: [4.0/4.1 Regression] Rejects code from kdegraphics3
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2005 10:05:10 -0000
- Subject: [Bug c++/24425] New: [4.0/4.1 Regression] Rejects code from kdegraphics3
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
kdegraphics3 contains auto-generated code that fails to build with recent
4.0/4.1
while it worked at least with
g++ (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux)
Testcase:
class QString;
namespace DOM {
class __attribute__ ((visibility("default"))) DomShared {};
class NodeImpl;
class __attribute__ ((visibility("default"))) Node {
Node firstChild() const;
Node nextSibling() const;
bool hasChildNodes ( );
bool isNull() const { return !impl; }
NodeImpl *impl;
};
class __attribute__ ((visibility("default"))) Element : public Node {};
}
namespace KSVG {
class SVGDOMNodeBridge {};
class SVGDOMElementBridge : public SVGDOMNodeBridge {};
class SVGDocumentImpl;
class SVGElementImpl : virtual public DOM::DomShared, public DOM::Element,
public SVGDOMElementBridge
{
SVGDocumentImpl *ownerDoc() const;
};
class SVGHelperImpl {
template<class T>
static void applyContainer(T *obj, int token, const QString &value)
{
SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(obj);
for(DOM::Node node = element->firstChild(); !node.isNull(); node =
node.nextSibling())
T *cast = dynamic_cast<T
*>(element->ownerDoc()->getElementFromHandle(node));
}
};
}
SVGLengthImpl.min.ii: In static member function ?static void
KSVG::SVGHelperImpl::applyContainer(T*, int, const QString&)?:
SVGLengthImpl.min.ii:28: error: invalid use of undefined type ?struct
KSVG::SVGDocumentImpl?
SVGLengthImpl.min.ii:17: error: forward declaration of ?struct
KSVG::SVGDocumentImpl?
--
Summary: [4.0/4.1 Regression] Rejects code from kdegraphics3
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24425