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:
Mark Mitchell 2003-05-15 17:00:06 +00:00 committed by Mark Mitchell
parent 411f7850d7
commit dffbbe8019
4 changed files with 19 additions and 1 deletions

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -0,0 +1,8 @@
// { dg-options "" }
int foo;
template <class T> struct Base {};
template <class T>
struct Derived : public Base<typeof(foo)> {};