[GCC-XML] GCC-XML 0.9 - another difference

Roman Yakovenko roman.yakovenko at gmail.com
Mon Nov 12 01:37:45 EST 2007


On Nov 12, 2007 3:28 AM, Brad King <brad.king at kitware.com> wrote:

> Roman Yakovenko wrote:
> > struct mem_var_str_t{
> >     static std::string class_name;
> >     std::string identity(std::string x){ return x; }
> > };
> > Gccxml 0.7 reports correctly type of "x", while gccxml 0.9 reports it
> > as: "restrict & string".
> >
> > It does this for std and user defined classes passed by value.
>
> I've reproduced it with minimal code:
>
> struct A { ~A(); };
> struct B {
>   void f(A x) {}
> };
>
> It happens when non-POD types are passed by value into the *definition*
> of a function.


Aha, good to know


> I found something in GCC's code about "invisible
> references".  There is a predicate macro provided to detect them.  I've
> committed a fix:
>


>
> /cvsroot/GCC_XML/gccxml/GCC/gcc/cp/xml.c,v  <--  xml.c
> new revision: 1.118; previous revision: 1.117
>

Thank you very much. I will try  the change this evening and will let you
know.



-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20071112/f368509b/attachment.html>


More information about the gccxml mailing list