Mail Archives: djgpp/1997/10/11/07:17:39
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 -