This is the mail archive of the gcc@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]

C++ DR/354


Hello.

I tried to look at fixing DR/354 but ended up lost in cp/parser.c

I have the following test case:

template <int*> struct S { };
S<(int*)0> s;

and end up with the following errors

:2:9: error: a cast to a type other than an integral or enumeration type
cannot appear in a constant-expression
:2:10: error: template argument 1 is invalid
:2:13: error: invalid type in declaration before ';' token

Now my question is how I should go about allowing that (int*)0?

/MF (Have not wrapped my head around gcc/cp/parser.c yet)


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