This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34229] error on correct code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Nov 2007 20:46:31 -0000
- Subject: [Bug c++/34229] error on correct code
- References: <bug-34229-3137@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-11-25 20:46 -------
I don't think this is valid code. There is no definition for the is_const part
for the template where bind_return is in the anonymous namespace. The code was
diagnose before that date but it was not rejected because GCC did not diagnose
the issue before. We are diagnosing the invalid code now (which does not have
to be diagnose according to the C++ standard).
Please read PR 34094 also.
Basically it comes down to (which is not rejected but should be but that is a
different bug):
template <class a> struct c
{
static const bool t = 1;
};
namespace {
struct b{};
}
int main(void)
{
return c<b>::t;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34229