This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] PR61300 K&R incoming args
- From: Florian Weimer <fweimer at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 30 May 2014 21:22:30 +0200
- Subject: Re: [RFC] PR61300 K&R incoming args
- Authentication-results: sourceware.org; auth=none
- References: <20140526073809 dot GA6679 at bubble dot grove dot modra dot org>
On 05/26/2014 09:38 AM, Alan Modra wrote:
Background: The ELFv2 ABI requires a parameter save area only when
stack is actually used to pass parameters, and since varargs are
passed on the stack, unprototyped calls must pass both on the stack
and in registers. OK, easy you say, !prototype_p(fun) means a
parameter save area is needed. However, a prototype might not be in
scope when compiling an old K&R style C function body, but this does
*not* mean a parameter save area has necesasrily been allocated.
It's fine to change ABI when compiling an old-style function definition
for which a prototype exists (relative to the non-prototype case). It
happens on i386, too.
Florian Weimer / Red Hat Product Security Team