[Bug c++/14244] New: Regression failure with v3.3: uninstantiated template code not ignored
s_gccbugzilla at nedprod dot com
gcc-bugzilla@gcc.gnu.org
Sun Feb 22 18:17:00 GMT 2004
Default options, GCC v3.4 CVS 20040218.
The below compiles on v3.3 of GCC and MSVC. I believe the standard says that
code not instantiated should not be compiled except for syntax checking.
/* Test for error throwing bug */
#include <stdio.h>
template<bool error> struct Foo
{
enum { value=ERROR_Not_Valid };
};
template<> struct Foo<true>
{
enum { value=1 };
};
int main(void)
{
printf("Val=%d\n", Foo<true>::value);
}
Cheers,
Niall
--
Summary: Regression failure with v3.3: uninstantiated template
code not ignored
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s_gccbugzilla at nedprod dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14244
More information about the Gcc-bugs
mailing list