diff options
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 7bd01f8..aa797e2 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1410,6 +1410,11 @@ useless_type_conversion_p (tree outer_type, tree inner_type) if (!prototype_p (outer_type)) return true; + /* A conversion between unprototyped and empty argument list is ok. */ + if (TYPE_ARG_TYPES (outer_type) == void_list_node + && !prototype_p (inner_type)) + return true; + /* If the unqualified argument types are compatible the conversion is useless. */ if (TYPE_ARG_TYPES (outer_type) == TYPE_ARG_TYPES (inner_type)) |