+2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/9779
+ * decl2.c (arg_assoc_class): Don't die on NULL type.
+ * typeck.c (type_unknown_p): Don't die on untyped expressions.
+
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/6949
static bool
arg_assoc_type (struct arg_lookup *k, tree type)
{
+ /* As we do not get the type of non-type dependent expressions
+ right, we can end up with such things without a type. */
+ if (!type)
+ return false;
+
switch (TREE_CODE (type))
{
case ERROR_MARK:
return (TREE_CODE (exp) == OVERLOAD
|| TREE_CODE (exp) == TREE_LIST
|| TREE_TYPE (exp) == unknown_type_node
- || (TREE_CODE (TREE_TYPE (exp)) == OFFSET_TYPE
+ /* Until we get the type of non type-dependent expressions
+ correct, we can have non-type dependent expressions with
+ no type. */
+ || (TREE_TYPE (exp)
+ && TREE_CODE (TREE_TYPE (exp)) == OFFSET_TYPE
&& TREE_TYPE (TREE_TYPE (exp)) == unknown_type_node));
}
+2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/9779
+ * g++.dg/template/dependent-expr1.C: New.
+
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/6949
--- /dev/null
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 30 Jun 2003 <nathan@codesourcery.com>
+
+// PR c++ 9779. ICE
+
+struct I
+{
+};
+
+void Foo (int);
+namespace std
+{
+ template <typename X>
+ void Baz (I *x)
+ {
+ Foo (sizeof (I));
+ Foo (sizeof (x));
+ Foo (__alignof__ (I));
+ Foo (__alignof__ (x));
+ Foo (x->~I ());
+ // Foo (typeid (I));
+ Foo (delete x);
+ Foo (delete[] x);
+ Foo (throw x);
+ }
+
+}