This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/57709] -Wshadow is too strict / has false positives


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]