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. 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

-Brad

_______________________________________________
gccxml mailing list
[email protected]
http://www.gccxml.org/mailman/listinfo/gccxml

Reply via email to