This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54943] ARM - EABI - varargs floating point issue
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 17 Oct 2012 13:30:09 +0000
- Subject: [Bug target/54943] ARM - EABI - varargs floating point issue
- Auto-submitted: auto-generated
- References: <bug-54943-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54943
--- Comment #4 from Mikael Pettersson <mikpe at it dot uu.se> 2012-10-17 13:30:09 UTC ---
Yes the EABI changes things, but I think the user error is that:
1. your sprintf uses homegrown varargs-parsing code, which won't work with
EABI; you should use <stdarg.h> as supplied by gcc itself, or
2. somehow you're linking together library code compiled for pre-EABI with
application code compiled for EABI, though I would have expected the linker to
detect and reject such invalid combinations.
BTW, the test case is invalid, it's missing a needed #include <stdio.h> (you
mustn't call variadic functions without proper declarations in scope), and the
call to sprintf should call snprintf (or drop the ", 32" actual parameter).
Either way the error isn't in gcc.