+2018-05-02 Paolo Carlini <paolo.carlini@oracle.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/68374
+ * name-lookup.c (check_local_shadow): Don't handle static old
+ declarations in the block handling locals shadowing locals.
+
2018-05-01 Jason Merrill <jason@redhat.com>
PR c++/85587 - error with scoped enum in template.
|| (TREE_CODE (old) == TYPE_DECL
&& (!DECL_ARTIFICIAL (old)
|| TREE_CODE (decl) == TYPE_DECL)))
+ && DECL_FUNCTION_SCOPE_P (old)
&& (!DECL_ARTIFICIAL (decl)
|| DECL_IMPLICIT_TYPEDEF_P (decl)
|| (VAR_P (decl) && DECL_ANON_UNION_VAR_P (decl))))
+2018-05-02 Paolo Carlini <paolo.carlini@oracle.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/68374
+ * g++.dg/warn/Wshadow-13.C: New.
+ * g++.dg/warn/Wshadow-14.C: Likewise.
+
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR libgomp/82428
--- /dev/null
+// PR c++/68374
+// { dg-options "-Wshadow" }
+
+class f {
+ static int mVar; // { dg-message "shadowed declaration" }
+ int g(int x) { int mVar=3; return x+mVar; } // { dg-warning "shadows a member of 'f'" }
+};
+int f::mVar = 1;
--- /dev/null
+// PR c++/68374
+// { dg-options "-Wshadow" }
+
+void foo ()
+{
+ static int i; // { dg-message "shadowed declaration" }
+ {
+ int i; // { dg-warning "shadows a previous local" }
+ }
+}