re PR c++/8385 (typeof(...) as template arg)
PR c++/8385 * g++.dg/ext/typeof5.C: New test. PR c++/8385 * semantics.c (finish_typeof): Refine type-dependency check. From-SVN: r66835
This commit is contained in:
parent
411f7850d7
commit
dffbbe8019
@ -1,3 +1,8 @@
|
||||
2003-05-15 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/8385
|
||||
* semantics.c (finish_typeof): Refine type-dependency check.
|
||||
|
||||
2003-05-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* typeck.c (build_modify_expr): Don't always stabilize the lhs and
|
||||
|
@ -2163,7 +2163,7 @@ finish_typeof (expr)
|
||||
{
|
||||
tree type;
|
||||
|
||||
if (processing_template_decl)
|
||||
if (type_dependent_expression_p (expr))
|
||||
{
|
||||
type = make_aggr_type (TYPEOF_TYPE);
|
||||
TYPE_FIELDS (type) = expr;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-05-15 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/8385
|
||||
* g++.dg/ext/typeof5.C: New test.
|
||||
|
||||
2003-05-15 J"orn Rennecke <joern.rennecke@superh.com>
|
||||
|
||||
* gcc.c-torture/execute/builtins/string-asm-1.c: Take
|
||||
|
8
gcc/testsuite/g++.dg/ext/typeof5.C
Normal file
8
gcc/testsuite/g++.dg/ext/typeof5.C
Normal file
@ -0,0 +1,8 @@
|
||||
// { dg-options "" }
|
||||
|
||||
int foo;
|
||||
|
||||
template <class T> struct Base {};
|
||||
|
||||
template <class T>
|
||||
struct Derived : public Base<typeof(foo)> {};
|
Loading…
Reference in New Issue
Block a user