delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/17/05:04:58

Date: Mon, 17 Sep 2001 11:44:01 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
X-Sender: pavenis AT ieva06
To: djgpp AT delorie DOT com
Subject: Re: Option -Wunused & STL
In-Reply-To: <3BA5B92A.EE46A001@bigfoot.com>
Message-ID: <Pine.A41.4.05.10109171134540.56990-100000@ieva06>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Mon, 17 Sep 2001, Alex Vinokur wrote:

> 
> 
> Eli Zaretskii wrote:
> 
> > On Mon, 17 Sep 2001, Alex Vinokur wrote:
> >
> > > Option -Wunused :
> > > -Wunused                Warn when a variable is unused
> > >
> > > It seems the option doesn't detect unused variables of STL-types.
> >
> > Did you try compiling with -O (that's an oh, not a zero)?
> 
> %gpp -Wunused file.c        // Unused variables of STL-types NOT
> detected
> 
> %gpp -O -Wunused file.c    // Unused variables of STL-types NOT detected
> 
> %gpp -O file.c        // Unused variables of STL-types NOT detected
> 

It is so also with gcc-3.0.X after adding missing 'using namespace std;'
and I don't expect changes, as it's not always simple to say when object
is not only unused but really useless

Andris

- Raw text -


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