[Bug c++/57709] -Wshadow is too strict / has false positives
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Tue Dec 17 22:35:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list