This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/39639] New: no diagnostic for ill-formed pack expansion


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]