delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/27/01:07:26

Date: Mon, 27 May 2002 08:03:31 +0300 (IDT)
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: refresh++
In-Reply-To: <200205261623.SAA08354@lws256.lu.erisoft.se>
Message-ID: <Pine.SUN.3.91.1020527080117.5477F-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 Sun, 26 May 2002, Martin Stromberg wrote:

> > It's actually trying to help us out. The warning is about the "zero-length
> > format string" we're passing to snprintf. It's only an error, because we're
> > compiling with -Werror now.
> 
> Sure it's trying to help us. But what's wrong with an empty format
> string if all we want is a zero length string?
> 
> It's insane. Can anybody understand why this would be helpful?

I suggest to post the question to the GCC mailing list.  They have some 
weird ideas about useful warnings in some cases, so maybe this is one of 
them.  But it could also be a bug (e.g., GCC is trying to apply its 
extended checks on printf-style functions, and fails), in which case 
reporting it to the maintainers is the Right Thing.

FWIW, I agree that in this case the warning is a useless annoyance.

- Raw text -


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