[Bug c++/37047] New: Missing warning for deprecated use of static
gcc-bugzilla at contacts dot eelis dot net
gcc-bugzilla@gcc.gnu.org
Thu Aug 7 12:41:00 GMT 2008
In 7.3.1.1p2, the standard states "The use of the static keyword is deprecated
when declaring objects in a namespace scope", yet g++ does not warn about such
uses. Compiling the following snippet:
static int i;
int g() { return i; }
results in no diagnostics of any kind, not even with -std=c++98 -Wall -Wextra
-pedantic.
--
Summary: Missing warning for deprecated use of static
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at contacts dot eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37047
More information about the Gcc-bugs
mailing list