[LLVMbugs] [Bug 6180] Weird error for ommitted semicolon

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Feb 1 17:27:09 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6180


Chris Lattner <clattner at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #6 from Chris Lattner <clattner at apple.com>  2010-02-01 19:27:09 ---
Fixed here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100201/027017.html

For this testcase:

template<class T>
class a{}

class temp{};

a<temp> b;

class b
{
}

we now produce:

t.cc:5:10: error: expected ';' after class
class a{}
         ^
         ;
t.cc:13:2: error: expected ';' after class
}
 ^
 ;

We used to produce:

t.cc:7:1: error: cannot combine with previous 'class' declaration specifier
class temp{};
^
t.cc:9:3: error: template argument for template type parameter must be a type
a<temp> b;
  ^~~~
t.cc:4:16: note: template parameter is declared here
template<class T>
               ^
t.cc:18:1: error: expected unqualified-id

^

GCC 4.2 produces:

t.cc:7: error: multiple types in one declaration
t.cc:9: error: non-template type ‘a’ used as a template
t.cc:9: error: invalid type in declaration before ‘;’ token
t.cc:13: error: expected unqualified-id at end of input


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list