public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/9775: -O3 complains about stdarg functions
@ 2003-02-20 16:06 mlelstv
0 siblings, 0 replies; only message in thread
From: mlelstv @ 2003-02-20 16:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 9775
>Category: optimization
>Synopsis: -O3 complains about stdarg functions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 20 16:06:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Michael van Elst
>Release: gcc-3.2.2
>Organization:
>Environment:
FreeBSD dt4.dev.de.cw.net 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Oct 11 18:32:25 CEST 2002 root@dt4.dev.de.cw.net:/usr/src/sys/compile/DT4 i386
Reading specs from /cw/lib/gcc-lib/i386-unknown-freebsd4.7/3.2.2/specs
Configured with: ../configure --prefix=/cw --exec-prefix=/cw --includedir=/cw/include/gcc --with-gxx-include-dir=/cw/include/g++ --with-local-prefix=/cw/lib/gcc-lib --enable-languages=c,c++ --enable-threads=posix --disable-maintainer-mode --disable-shared --disable-nls --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 3.2.2
>Description:
gcc does not compile the following source with -O3, smaller optimization levels do work fine. The error reported is:
% gcc -O3 -c c.c
c.c: In function `bar':
c.c:8: `va_start' used in function with fixed args
c.c:8: `va_start' used in function with fixed args
-- snip --
#include <stdarg.h>
int foo(int c, ...)
{
va_list ap;
int a, s=0;
va_start(ap,c);
while (c > 0) {
a = va_arg(ap, int);
c += a;
}
va_end(ap);
return s;
}
int bar(void)
{
return foo(4,1,2,3,4) + foo(2,9,5);
}
>How-To-Repeat:
see above. The same happens with gcc-3.2.1 but not with gcc-2.95.4
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-20 16:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20 16:06 optimization/9775: -O3 complains about stdarg functions mlelstv
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).