[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gccxml
Subject:    Re: [GCC-XML] GCC-XML 0.9 - another difference
From:       "Roman Yakovenko" <roman.yakovenko () gmail ! com>
Date:       2007-11-12 6:37:45
Message-ID: 7465b6170711112237ha6de0f0wb75acff0e23d1bb3 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Nov 12, 2007 3:28 AM, Brad King <brad.king@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/

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Nov 12, 2007 3:28 AM, Brad King &lt;<a \
href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>&gt; \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">Roman \
Yakovenko wrote:<br>&gt; struct mem_var_str_t{<br>&gt; &nbsp; &nbsp; static \
std::string class_name;<br>&gt; &nbsp; &nbsp; std::string identity(std::string x){ \
return x; }<br>&gt; };<br>&gt; Gccxml 0.7 reports correctly type of &quot;x&quot;, \
while gccxml  0.9 reports it<br>&gt; as: &quot;restrict &amp; \
string&quot;.<br>&gt;<br>&gt; It does this for std and user defined classes passed by \
value.<br><br></div>I&#39;ve reproduced it with minimal code:<br><br>struct A { ~A(); \
}; <br>struct B {<br> &nbsp; void f(A x) {}<br>};<br><br>It happens when non-POD \
types are passed by value into the *definition*<br>of a function. \
&nbsp;</blockquote><div><br>Aha, good to know<br>&nbsp;</div><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> I found something in GCC&#39;s code about \
&quot;invisible<br>references&quot;. &nbsp;There is a predicate macro provided to \
detect them. &nbsp;I&#39;ve<br>committed a \
fix:<br></blockquote><div>&nbsp;</div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> <br>/cvsroot/GCC_XML/gccxml/GCC/gcc/cp/xml.c,v &nbsp;&lt;-- \
&nbsp;xml.c<br>new revision: 1.118; previous revision: 1.117<br><font \
color="#888888"></font></blockquote><div><br>Thank you very much. I will try&nbsp; \
the change this evening and will let you&nbsp; know.  <br></div></div><br><br \
clear="all"><br>-- <br>Roman Yakovenko<br>C++ Python language binding<br><a \
href="http://www.language-binding.net/">http://www.language-binding.net/</a>



_______________________________________________
gccxml mailing list
gccxml@gccxml.org
http://www.gccxml.org/mailman/listinfo/gccxml


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic