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++/20118] New: spurious error


The code:

template<typename t>struct foo {
static const int i; };

const int foo<bool>::i = 5;

int main() { return 0;}

gets you:
~/ootbc/members/src$ g++ foo.cc
foo.cc:4: error: too few template-parameter-lists
foo.cc:4: error: expected `,' or `;' before '=' token

I'm pretty sure that the code is valid, but if it isn't then it's still an awful 
error message.

Ivan

-- 
           Summary: spurious error
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20118


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