[LLVMdev] function getting typed as variable argument functions
Eli Friedman
eli.friedman at gmail.com
Thu Mar 12 20:11:00 PDT 2009
On Thu, Mar 12, 2009 at 3:19 PM, Ryan M. Lefever
<lefever at crhc.illinois.edu> wrote:
> the following C code
>
> uint64_t getStartTime();
>
> is getting compiled to
>
> declare i64 @getStartTime(...)
>
> in bitcode. Why would this happen?
Because the number/types of the arguments are unknown. For example,
the following is legal:
a.c:
uint64_t getStartTime();
uint64_t x() { return getStartTime(10); }
b.c:
uint64_t getStartTime(int x) { return x + 10; }
Perhaps you meant to write "uint64_t getStartTime(void)"?
-Eli
More information about the llvm-dev
mailing list