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/48062] New: `shadowed declaration is here' should be a note


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48062

           Summary: `shadowed declaration is here' should be a note
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com


cat > main.c
int i;

int main(void)
{
  int i = 0;
  return i;
}
^D
$ gcc -Wshadow main.c
main.c: In function 'main':
main.c:5:7: warning: declaration of 'i' shadows a global declaration [-Wshadow]
main.c:1:5: warning: shadowed declaration is here [-Wshadow]


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