This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/57709] -Wshadow is too strict / has false positives
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Dec 2013 22:35:34 +0000
- Subject: [Bug c++/57709] -Wshadow is too strict / has false positives
- Auto-submitted: auto-generated
- References: <bug-57709-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57709
--- Comment #12 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Sat, 14 Dec 2013, jan.kratochvil at redhat dot com wrote:
> Similar inappropriate warning is generated for typedef-vs-variable as reported
> now by Adam Jackson. Again a mistaken use cannot harm as it causes other
> errors. And clang also does not warn on it.
>
> int main(void) {
> typedef int x;
> {
> int x = 0;
> return x;
If that's "return (x)-1;" then the interpretation as cast or arithmetic
depends on whether x is a type or a variable.