[GCC-XML] wrong artificial op=()
Brad King
brad.king at kitware.com
Wed Oct 1 11:15:17 EDT 2008
Axel Naumann wrote:
> when running GCCXML 0.9 from 2008-09-09, built with gcc 3.4 for 64bit
> GNU/Linux, on the following code:
[snip]
> the XML file contains an artificial operator=() for the classes S, T, V, and W.
> This assignment operator should not exist according to the standard
> [class.copy], 12.8.12. Both GCC 4.3 and MSVC 9.0 will refuse to compile code
> that requires the implicit definition of these operators:
[snip]
> Could these operators be suppressed, please?
gccxml is just dumping what gcc's parser produces. The parser seems to
be producing the declarations for these operators but until they are
required does not try to compile them. The compiler itself does not
distinguish them until code tries to do an assignment.
I've come up with a hack that pretends these artifical methods are
called, suppresses any resulting error messages, and then discards the
methods if errors occurred. It seems to work for the examples you provided.
-Brad
/cvsroot/GCC_XML/gccxml/GCC/gcc/cp/xml.c,v <-- GCC/gcc/cp/xml.c
new revision: 1.124; previous revision: 1.123
/cvsroot/GCC_XML/gccxml/GCC/gcc/diagnostic.c,v <-- GCC/gcc/diagnostic.c
new revision: 1.3; previous revision: 1.2
More information about the gccxml
mailing list