rfg@nsc.nsc.com (Ron Guilmette) (10/27/88)
BUG in GCC 1.30 -- suggested patches included below
In the file integrate.c, there is a function called function_cannot_inline_p()
which will return either a zero or a pointer to a string which says why a
given function could not be inlined.
If the return value from the call of this function (in toplev.c: at about 1031)
is NON-ZERO then the message pointer is passed to warning_with_decl() which
expects the message to be a formatting string which contains a "%s" format
specification (used to print the name of the offending function).
Unfortunately, the strings returned by function_cannot_inline_p() DO NOT have
"%s" parts in them. This can cause trouble when the messages are printed.
The following patches fix these strings.
diff -rc2 1.30/integrate.c 1.30-gnx/integrate.c
*** 1.30/integrate.c Sat Oct 8 10:06:53 1988
--- 1.30-gnx/integrate.c Wed Oct 26 12:18:12 1988
***************
*** 117,121
it put in to catch the volunteers. */
if (last && TREE_VALUE (last) != void_type_node)
! return "varargs function cannot be inline";
/* If its not even close, don't even look. */
--- 117,121 -----
it put in to catch the volunteers. */
if (last && TREE_VALUE (last) != void_type_node)
! return "varargs function %s cannot be inline";
/* If its not even close, don't even look. */
***************
*** 121,125
/* If its not even close, don't even look. */
if (get_max_uid () > 2 * max_insns)
! return "function too large to be inline";
/* Don't inline functions which have BLKmode arguments.
--- 121,125 -----
/* If its not even close, don't even look. */
if (get_max_uid () > 2 * max_insns)
! return "function %s too large to be inline";
/* Don't inline functions which have BLKmode arguments.
***************
*** 129,133
{
if (TYPE_MODE (TREE_TYPE (parms)) == BLKmode)
! return "function with large aggregate parameter cannot be inline";
if (last == NULL_TREE && TREE_ADDRESSABLE (parms))
return "no prototype, and parameter address used; cannot be inline";
--- 129,133 -----
{
if (TYPE_MODE (TREE_TYPE (parms)) == BLKmode)
! return "function %s with large aggregate parameter cannot be inline";
if (last == NULL_TREE && TREE_ADDRESSABLE (parms))
return "%s: no prototype, and parameter address used; cannot be inline";
***************
*** 131,135
return "function with large aggregate parameter cannot be inline";
if (last == NULL_TREE && TREE_ADDRESSABLE (parms))
! return "no prototype, and parameter address used; cannot be inline";
}
--- 131,135 -----
return "function %s with large aggregate parameter cannot be inline";
if (last == NULL_TREE && TREE_ADDRESSABLE (parms))
! return "%s: no prototype, and parameter address used; cannot be inline";
}
***************
*** 146,150
if (ninsns >= max_insns)
! return "function too large to be inline";
}
--- 146,150 -----
if (ninsns >= max_insns)
! return "function %s too large to be inline";
}