<br><br><div class="gmail_quote">On Nov 12, 2007 3:28 AM, Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> 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>> struct mem_var_str_t{<br>> static std::string class_name;<br>> std::string identity(std::string x){ return x; }<br>> };<br>> Gccxml 0.7 reports correctly type of "x", while gccxml
0.9 reports it<br>> as: "restrict & string".<br>><br>> It does this for std and user defined classes passed by value.<br><br></div>I've reproduced it with minimal code:<br><br>struct A { ~A(); };
<br>struct B {<br> void f(A x) {}<br>};<br><br>It happens when non-POD types are passed by value into the *definition*<br>of a function. </blockquote><div><br>Aha, good to know<br> </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's code about "invisible<br>references". There is a predicate macro provided to detect them. I've<br>committed a fix:<br></blockquote><div> </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 <-- 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 the change this evening and will let you 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>