This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39639] New: no diagnostic for ill-formed pack expansion
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Apr 2009 19:45:44 -0000
- Subject: [Bug c++/39639] New: no diagnostic for ill-formed pack expansion
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc 4.3.2 and a recent pull of 4.4 accept the following (presumably) ill-formed
program:
$ cat t.C && g++ -v && g++ -std=c++0x t.C && ./a.out
#include <cstdio>
template <class... Types>
struct S: S<...Types>, S<...Types...>, S<...>
{
static const char* f () { return __PRETTY_FUNCTION__; }
};
int main ()
{
std::puts (S<void>::f ());
}
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/sebor/gcc/trunk/configure
--prefix=/build/sebor/bin/gcc-4.4.0 --enable-languages=c,c++
--with-mpfr=/usr/local/mpfr-2.3.1
Thread model: posix
gcc version 4.4.0 20081105 (experimental) (GCC)
static const char* S<Types>::f() [with Types = void]
--
Summary: no diagnostic for ill-formed pack expansion
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39639