diff options
Diffstat (limited to 'gcc/c-common.c')
| -rw-r--r-- | gcc/c-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 817d939be3b..f68c8532ebe 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4808,9 +4808,9 @@ static tree handle_malloc_attribute (tree *node, tree name, tree ARG_UNUSED (args), int ARG_UNUSED (flags), bool *no_add_attrs) { - if (TREE_CODE (*node) == FUNCTION_DECL) + if (TREE_CODE (*node) == FUNCTION_DECL + && POINTER_TYPE_P (TREE_TYPE (TREE_TYPE (*node)))) DECL_IS_MALLOC (*node) = 1; - /* ??? TODO: Support types. */ else { warning ("%qE attribute ignored", name); |

