public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bill Wendling <wendling@ncsa.uiuc.edu>
To: gcc@gcc.gnu.org
Subject: Bug with -finline-functions and va_start on FreeBSD
Date: Wed, 29 Jan 2003 19:40:00 -0000	[thread overview]
Message-ID: <20030129183055.GA29947@ncsa.uiuc.edu> (raw)

Hi all,

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? :-)

Thanks!

-- 
|| Bill Wendling            "Real Programmers have a Snoopy Calendar
|| wendling@ncsa.uiuc.edu    of '69 hanging on their wall"
|| Coding Simian                       -- Toon Moene

             reply	other threads:[~2003-01-29 18:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-29 19:40 Bill Wendling [this message]
2003-01-29 21:41 ` Joe Buck
2003-01-29 22:31   ` Bill Wendling
2003-01-30  8:44 ` Loren James Rittle
2003-01-30  9:26   ` Bill Wendling
2003-01-30 11:02     ` Loren James Rittle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030129183055.GA29947@ncsa.uiuc.edu \
    --to=wendling@ncsa.uiuc.edu \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).