delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/11/07:17:39

From: Roman Suzi <nuser AT rsuzi DOT pgu DOT karelia DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Warning control. Is there more convenient way?
Date: Sat, 11 Oct 97 09:58:15 +0300
Distribution: world
Organization: unknown
Message-ID: <AD7EoFq8hO@rsuzi.pgu.karelia.ru>
Sender: news-service AT sampo DOT karelia DOT ru
Reply-To: nuser AT rsuzi DOT pgu DOT karelia DOT ru
Lines: 70
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi, all!

I have an annoying problem with C and C++ (DJGPP).

The question is: how to control 'unused argument/variable'
warning so, that I will receive a warning only
when it is really  wanted?
(The problem is not just that of switching
all warnings manually and leaving unswitched
a few of them)

In some functions I have comletely justified unused variables:
they are just pointing the type of template, or
they are elements in arrays of functions, but
some parameters are unused.
But sometimes the warning become warning: I dont want
just switch the flag off.



What can I add to suppress them in GCC, so that
 - I shall not receive another kind of warning;
 - the effectiveness of the code will remain the
same (no additional commands will be inserted for dummy
usage of the variables) ?


I think the author of DJGPP can easily include
along INCLUDE warning checkboxes the EXCLUDE
warning ones: so it will be much easier to
check just 'Wall' and a few of unwanted warnings.

Or are there any #pragma s  to do the trick?


I am using DJGPP for a month already and am satisfied.
It is better than Borland C++s
(possibly it is slower in compiling
(no precompiled headers features), but it is more friendly).

























--
 ---              *                           ---
--  Roman A. Suzi * Petrozavodsk Karelia Russia --
 ---              *                           ---


- Raw text -


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