https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108147

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #14 from Alan Modra <amodra at gmail dot com> ---
In C it would also be OK to simply not prototype the problem functions.  No
prototype is better than a lying prototype..

eg.
void f1 (int, int);
void f2 (int, ...);
void f3 ();
int g1 (void) { f1 (1, 2); return 0; }
int g2 (void) { f2 (1, 2); return 0; }
int g3 (void) { f3 (1, 2); return 0; }
shows g1 with a frame of 32 bytes, g2 and g3 with 96.

We hit this sort of problem on ELFv2 because the ABI allows omitting the
64-byte paramater save area when the callee is known not to use it.  The idea
of course is to minimize stack frames.  (ELFv2 minimum frame is 32 bytes, ELFv1
which always allocates param save has a minimum of 112 byes.)  Variadic
functions on both ABIs make use of the parameter save area because PowerPC64
uses a simple va_list type, a pointer to memory, requiring variadic functions
to save incoming arguments in registers to the parameter save area.

Reply via email to