From: Matt Wilson <msw@redhat.com>
To: axp-list@redhat.com
Subject: Re: gcc-2.96 problem under rh70
Date: Tue, 6 Feb 2001 10:32:25 -0500 [thread overview]
Message-ID: <20010206103225.A31050@devserv.devel.redhat.com> (raw)
In-Reply-To: <20010206145801.A3282@twister.gmd.de>; from Georg.Wittig@gmd.de on Tue, Feb 06, 2001 at 02:58:01PM +0100
There are many cases where the new compiler is a bit more strict
and/or pedantic. Why are you including varargs.h? You're using the
ANSI C va_start, etc macros. If you include varargs.h you get the old
compatibility macros:
from "man va_start"
COMPATIBILITY
These macros are not compatible with the historic macros
they replace. A backward compatible version can be found
in the include file varargs.h.
varargs.h now blows away the stdargs.h macros (at least in the gcc
build I have here, which is in rawhide). But this will also make your
program build because va_start only takes one argument in the old
style.
So, in short, remove the varargs.h include - stick with stdarg.h
Cheers,
Matt
On Tue, Feb 06, 2001 at 02:58:01PM +0100, Georg Wittig wrote:
> The following program doesn't compile with gcc-2.96:
>
> ---------------------------------
> #include <stdarg.h>
> #include <varargs.h>
>
> demo(int dummy1, ...){
> va_list dummy2;
> va_start(dummy2, dummy1);
> }
> ---------------------------------
> /usr/lib/gcc-lib/alpha-redhat-linux/2.96/include/varargs.h:66:17: warning: "va_start" redefined
> /usr/lib/gcc-lib/alpha-redhat-linux/2.96/include/stdarg.h:54:1: warning: this is the location of the previous definition
> test.c:6:26: too many arguments for macro "va_start"
> ---------------------------------
>
> Of course, this isn't a real program, but an excerpt from a bigger
> program to nail down the problem. That program used to compile and
> work under RH >= 4.2 on all the Alphas, but no longer under RH70.
>
> $ rpm -qa | grep gcc
> gcc-c++-2.96-69
> gcc-2.96-69
> $ uname -r
> 2.2.17-4
> $ grep platform /proc/cpuinfo
> platform string : COMPAQ Professional Workstation XP1000
> $ cat /etc/redhat-release
> Red Hat Linux release 7.0 (Guinness)
> $
>
> Suggestions how to work-around that problem until the bug is fixed are
> welcome. Thanks in advance for your help.
>
>
> --
> Georg Wittig, GMD Georg.Wittig@gmd.de
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> A lot of time has been wasted arguing over what came first --
> the chicken or the egg. It was undoubtedly the rooster.
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
next prev parent reply other threads:[~2001-02-06 15:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-06 13:58 gcc-2.96 problem under rh70 Georg Wittig
2001-02-06 15:32 ` Matt Wilson [this message]
2001-02-07 12:59 ` Georg Wittig
2001-02-07 16:12 ` PCi64 memory Speedracer
2001-02-07 16:32 ` Jay Estabrook
2001-02-07 20:11 ` geerten kuiper
2001-02-06 15:55 ` gcc-2.96 problem under rh70 Michal Jaegermann
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox