g++, trunk, recent weird mismatch for arguments with forwarded declaration when attributes are involved
Ian Lance Taylor
iant@google.com
Fri Sep 10 15:40:00 GMT 2010
tbp <tbptbp@gmail.com> writes:
> 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.
I understand what you are trying to do, but it's very unlikely that
anybody will be able to solve this problem without a test case. Since
you do have a test case, you could try using a tool like delta to reduce
it to something that you can share.
Ian
More information about the Gcc
mailing list