------- Comment #1 from bangerth at dealii dot org 2006-09-12 03:58 -------
At first I thought that the warning is not useful since the variable may
in fact not be unused at all -- the using declaration simply makes the
name available in the present scope.
However, then I realized that this also holds here:
----------------
void f()
{
extern int i;
}
----------------
For this code, we warn, though:
g/x> /home/bangerth/bin/gcc-4.2-pre/bin/c++ -Wunused -c x.cc
x.cc: In function ‘void f()’:
x.cc:3: warning: unused variable ‘i’
So for the sake of consistency, we should probably do the same in both
situations, whatever "the same" is here.
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-09-12 03:58:07
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29028