http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56556
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-03-07 00:46:12 UTC --- The main reason for the warning here is namelookup happens before access control happens. So even if change the name of x usage in Derived, you will start to get weird error messages.