This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
g++, trunk, recent weird mismatch for arguments with forwarded declaration when attributes are involved
- From: tbp <tbptbp at gmail dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Fri, 10 Sep 2010 14:09:47 +0200
- Subject: g++, trunk, recent weird mismatch for arguments with forwarded declaration when attributes are involved
Since about 2010/09/07 i've had a weird error with a mismatched
prototype involving an argument once forward declared as 'class foo;'
and later defined as 'class __attribute((aligned(16))) foo {...};', a
bit like
namespace n1 {
class fwd;
namespace n2 {
class foo {
void bar(fwd &);
};
}
class __attribute((aligned(16))) fwd {};
}
// error prototype for... candidate is... would be here.
void n1::n2::foo::bar(n1::fwd &) {}
Except that's no testcase because it works: to kludge around, i have
to forward declare with matching attributes (or get an error).
I fail to reduce it, and the source code is large & fugly; i'd prefer
not to have to disclose, hence no formal bug report.
My hope being that will ring a bell for whoever's responsible :)
PS: x86-64/32, linux, -std=c++0x.