This is the mail archive of the gcc-bugs@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]

Re: g++ 2.95 bug: template invalidates code


> b11.cc:18: attempt to take address of bit-field structure member `X::t'

Thanks for your bug report. I believe this diagnosis is correct. The
compiler detects that bool operator!=<T>(const T& x, const T& y); is a
candidate for the call to !=. It turns out to be a better candidate
than anything else, so it is selected by overload resolution. However,
it is ill-formed to pass a bitfield by reference, hence the error.

Regards,
Martin


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