This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug with -finline-functions and va_start on FreeBSD
- From: Joe Buck <jbuck at synopsys dot com>
- To: Bill Wendling <wendling at ncsa dot uiuc dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 29 Jan 2003 11:45:54 -0800
- Subject: Re: Bug with -finline-functions and va_start on FreeBSD
- References: <20030129183055.GA29947@ncsa.uiuc.edu>
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