delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/25/02:58:52

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Tue, 25 Dec 2001 09:58:11 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
Subject: Re: gcc 3.03 and libc sources
In-Reply-To: <200112241932.UAA08772@father.ludd.luth.se>
Message-ID: <Pine.SUN.3.91.1011225095732.3951K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 24 Dec 2001, Martin Str|mberg wrote:

> gcc ... -c doprnt.c
> cc1.exe: warnings being treated as errors
> doprnt.c: In function `_doprnt':
> doprnt.c:303: warning: signed and unsigned type in conditional expression
> doprnt.c:347: warning: signed and unsigned type in conditional expression
> doprnt.c:354: warning: signed and unsigned type in conditional expression
> #define ARG(basetype) _ulonglong = \
>                 flags&LONGDBL ? va_arg(argp, long long basetype) : \
>                 flags&LONGINT ? va_arg(argp, long basetype) : \
>                 flags&SHORTINT ? (short basetype)va_arg(argp, int) : \
>                 va_arg(argp, int)
> [...]
> I'm not sure what I should do to solve this.

Report a bug to the gcc-bug mailing list, I guess.  I don't see
anything wrong with the code it flags here.

Note that the complaints are about the calls of ARG with an unsigned
type as its argument, while `flags' is an int.  I don't see how could
that be wrong, but maybe declare `flags' unsigned and see if that
helps.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019