repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
re PR c++/68374 (G++ -Wshadow doesn't warn about static member shadowing)
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wshadow-13.C
blob
d75560c8e9ed14ab16ac22e9499835453fef6741
1
// PR c++/68374
2
// { dg-options "-Wshadow" }
3
4
class f {
5
static int mVar; // { dg-message "shadowed declaration" }
6
int g(int x) { int mVar=3; return x+mVar; } // { dg-warning "shadows a member of 'f'" }
7
};
8
int f::mVar = 1;