This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++, trunk, recent weird mismatch for arguments with forwarded declaration when attributes are involved


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]