+2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/35327
+ * decl.c (grokdeclarator): In case of wrong return type return
+ immediately error_mark_node.
+
2008-06-06 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
set_no_warning = true;
}
- /* Warn about some types functions can't return. */
+ /* Error about some types functions can't return. */
if (TREE_CODE (type) == FUNCTION_TYPE)
{
error ("%qs declared as function returning a function", name);
- type = integer_type_node;
+ return error_mark_node;
}
if (TREE_CODE (type) == ARRAY_TYPE)
{
error ("%qs declared as function returning an array", name);
- type = integer_type_node;
+ return error_mark_node;
}
/* Pick up type qualifiers which should be applied to `this'. */