&& TREE_CODE (type) != BOOLEAN_TYPE)
warning (0, "width of %q+D exceeds its type", field);
else if (TREE_CODE (type) == ENUMERAL_TYPE
- && (0 > compare_tree_int (w,
- tree_int_cst_min_precision
- (TYPE_MIN_VALUE (type),
- TYPE_UNSIGNED (type)))
- || 0 > compare_tree_int (w,
- tree_int_cst_min_precision
- (TYPE_MAX_VALUE (type),
- TYPE_UNSIGNED (type)))))
+ && (0 > (compare_tree_int
+ (w, TYPE_PRECISION (ENUM_UNDERLYING_TYPE (type))))))
warning (0, "%q+D is too small to hold all values of %q#T", field, type);
}
return NULL_TREE;
}
+/* Returns the innermost class type which is not a lambda closure type. */
+
+tree
+current_nonlambda_class_type (void)
+{
+ int i;
+
+ /* We start looking from 1 because entry 0 is from global scope,
+ and has no type. */
+ for (i = current_class_depth; i > 0; --i)
+ {
+ tree c;
+ if (i == current_class_depth)
+ c = current_class_type;
+ else
+ {
+ if (current_class_stack[i].hidden)
+ break;
+ c = current_class_stack[i].type;
+ }
+ if (!c)
+ continue;
+ if (!LAMBDA_TYPE_P (c))
+ return c;
+ }
+ return NULL_TREE;
+}
+
/* When entering a class scope, all enclosing class scopes' names with
static meaning (static variables, static functions, types and
enumerators) have to be visible. This recursive function calls
flags &= ~tf_ptrmem_ok;
- if (TREE_CODE (lhstype) == UNKNOWN_TYPE)
+ if (lhstype == unknown_type_node)
{
if (flags & tf_error)
error ("not enough type information");