it wasn't complete.
Unified · Split
| @@ -957,8 +957,12 @@ static void patch_type(Sym *sym, CType *type) · 956 unmodified lines | ||
| 957 | 957 | |
| 958 | 958 | /* Force external definition if unequal inline specifier |
| 959 | 959 | or an explicit extern one. */ |
| 960 | − if ((type->t & VT_INLINE) != (sym->type.t & VT_INLINE) | |
| 961 | − || (type->t | sym->type.t) & VT_EXTERN) { | |
| 960 | + if ((sym->type.t | type->t) & VT_STATIC) { | |
| 961 | + type->t |= sym->type.t & VT_INLINE; | |
| 962 | + sym->type.t |= type->t & VT_INLINE; | |
| 963 | + } else if (((type->t & VT_INLINE) != (sym->type.t & VT_INLINE) | |
| 964 | + || (type->t | sym->type.t) & VT_EXTERN) | |
| 965 | + && !static_proto) { | |
| 962 | 966 | type->t &= ~VT_INLINE; |
| 963 | 967 | sym->type.t &= ~VT_INLINE; |
| 964 | 968 | } |