This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug with -finline-functions and va_start on FreeBSD


On Wed, Jan 29, 2003 at 12:30:55PM -0600, Bill Wendling wrote:
> I'm having a problem with gcc 3.2.1 on FreeBSD 4.7-STABLE for this piece
> of code:
> 
> #include <stdio.h>
> #include <stdarg.h>
> 
> int foo(const char *fmt, ...)
> {
>     va_list ap;
> 
>     va_start(ap, fmt);
>     vprintf(fmt, ap);
>     va_end(ap);
> }
> 
> int main(int argc, char **argv)
> {
>     foo("hello %s\n", "world");
>     return 0;
> }
> 
> When compiling with the following options:
> 
>     % gcc32 -o t t.c -finline-functions -fomit-frame-pointer -O2
> 
> I get this error:
> 
> t.c: In function `main':
> t.c:8: `va_start' used in function with fixed args
> 
> Is this a known problem? Is there a fix for this in the next release of
> gcc? :-)

I can't duplicate this report on GNU/Linux; also, it's unclear as to
just what release you are using.  Given that, if you haven't filed a PR,
it's not a known problem.  Please file one.
 
> Thanks!
> 
> -- 
> || Bill Wendling            "Real Programmers have a Snoopy Calendar
> || wendling@ncsa.uiuc.edu    of '69 hanging on their wall"
> || Coding Simian                       -- Toon Moene

-- 
Q. What's more of a headache than a bug in a compiler.
A. Bugs in six compilers.  -- Mark Johnson


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]