* decl.c (duplicate_decls): Don't complain about different
exceptions from an internal decl even if pedantic.
+1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * typeck.c (c_expand_return): Handle the case that valtype
+ is wider than the functions return type.
+
1998-08-17 Mark Mitchell <mark@markmitchell.com>
* pt.c (check_explicit_specialization): Don't abort on bogus
}
else
{
+ tree functype = TREE_TYPE (TREE_TYPE (current_function_decl));
+
+ /* First convert the value to the function's return type, then
+ to the type of return value's location to handle the
+ case that functype is thiner than the valtype. */
+
retval = convert_for_initialization
- (NULL_TREE, valtype, retval, LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING,
+ (NULL_TREE, functype, retval, LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING,
"return", NULL_TREE, 0);
+ retval = convert (valtype, retval);
+
if (retval == error_mark_node)
{
/* Avoid warning about control reaching end of function. */