This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25503] g++ accepts invalid typedef in template code
- From: "d dot bonekaemper at rtsgroup dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Dec 2005 12:28:11 -0000
- Subject: [Bug c++/25503] g++ accepts invalid typedef in template code
- References: <bug-25503-11904@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from d dot bonekaemper at rtsgroup dot net 2005-12-20 12:28 -------
(Sorry, pressed return to early...)
g++ accepts the following code, which contains a typedef that's supposed to act
as a static assert.
-------------------------------------------------------------------------------
template<int N>
struct Test
{
Test()
{
typedef struct StaticAssert {unsigned condition : (N); } XXX;
}
};
int
main()
{
Test<0> T;
}
-------------------------------------------------------------------------------
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25503