Commit f1aba0a5 by Mark Mitchell Committed by Mark Mitchell

parser.c (cp_parser_dependent_type_p): Fix thinko.

	* parser.c (cp_parser_dependent_type_p): Fix thinko.

	* g++.dg/init/array9.C: New test.

From-SVN: r60718
parent 89a7012a
2002-12-31 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_dependent_type_p): Fix thinko.
2002-12-31 Nathan Sidwell <nathan@codesourcery.com> 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
* class.c (modify_vtable_entry): Remove unused variable. * class.c (modify_vtable_entry): Remove unused variable.
......
...@@ -1882,7 +1882,7 @@ cp_parser_dependent_type_p (type) ...@@ -1882,7 +1882,7 @@ cp_parser_dependent_type_p (type)
value-dependent. */ value-dependent. */
if (TREE_CODE (type) == ARRAY_TYPE) if (TREE_CODE (type) == ARRAY_TYPE)
{ {
if (TYPE_DOMAIN (TREE_TYPE (type)) if (TYPE_DOMAIN (type)
&& ((cp_parser_value_dependent_expression_p && ((cp_parser_value_dependent_expression_p
(TYPE_MAX_VALUE (TYPE_DOMAIN (type)))) (TYPE_MAX_VALUE (TYPE_DOMAIN (type))))
|| (cp_parser_type_dependent_expression_p || (cp_parser_type_dependent_expression_p
......
struct S {
};
extern S i[];
void g (S*);
template <typename T>
void f () {
g (&i[2]);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment