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

Andreas Beckmann <gcc at abeckmann dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc at abeckmann dot de

--- Comment #1 from Andreas Beckmann <gcc at abeckmann dot de> 2011-01-11 
12:49:41 UTC ---
The following testcase (invalid code) results in the same ICE, but
unfortunately ICEs are difficult to compare, so this may be an independent
issue.

===== 8< =====
template < , , >
struct S ;
template < typename >
f ( ) {
        const bool b = && ;
        S < , b ,
===== >8 =====

$ g++-trunk -m64 -std=c++0x -pthread -O3 -c -o a.o PR46871-2.C
PR46871-2.C:1:12: error: expected identifier before ‘,’ token
PR46871-2.C:1:14: error: expected identifier before ‘,’ token
PR46871-2.C:1:16: error: expected identifier before ‘>’ token
PR46871-2.C:4:5: error: ISO C++ forbids declaration of ‘f’ with no type
[-fpermissive]
PR46871-2.C: In function ‘int f()’:
PR46871-2.C:5:20: error: expected identifier before ‘;’ token
PR46871-2.C:6:10: error: template argument 1 is invalid
PR46871-2.C:6:10: error: ‘(int)b’ is not a valid template argument for type
‘int’ because it is a non-constant expression
PR46871-2.C:6:10: error: the value of ‘b’ is not usable in a constant
expression
PR46871-2.C:6:10: internal compiler error: in cxx_eval_constant_expression, at
cp/semantics.c:6688
Please submit a full bug report,

gcc version 4.6.0 20110107 (experimental) (GCC)

Reply via email to