[llvm-commits] [dragonegg] r138663 - in /dragonegg/trunk: include/dragonegg/Internals.h include/dragonegg/Types.h src/Backend.cpp src/Convert.cpp src/Types.cpp

Eli Friedman eli.friedman at gmail.com
Fri Aug 26 14:44:16 PDT 2011


On Fri, Aug 26, 2011 at 2:29 PM, Duncan Sands <baldrick at free.fr> wrote:
> Author: baldrick
> Date: Fri Aug 26 16:29:18 2011
> New Revision: 138663
>
> URL: http://llvm.org/viewvc/llvm-project?rev=138663&view=rev
> Log:
> Be more careful about making functions varargs.  Use gcc's predicate to
> determine whether a function type is varargs.  As a result, functions
> with no arguments (eg: void foo() in C; void foo(...) in C++) are no
> longer considered varargs.  This fixes PR10713 which showed that such
> functions must not be considered varargs when called.  On the other hand
> there is still the problem of K&R style function declarations, and Fortran
> which likes to declare functions with arguments that are completely different
> to the arguments declared in the function type (previously these Fortran
> problems were worked around by declaring most functions to be varargs).
> Deal with these by tweaking the existing logic, which was close to be able
> to handle them already.

It's worth noting that at least on x86-64, gcc will set %al for a call
of a function without a prototype as if were a varargs call...

-Eli




More information about the llvm-commits mailing list