This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ 2.95 bug: template invalidates code
- To: joseph at itginc dot com
- Subject: Re: g++ 2.95 bug: template invalidates code
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Fri, 20 Aug 1999 10:21:57 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- References: <37BBBDC6.4BA37AB3@itginc.com>
> 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