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++/18770] g++ accepts invalid code with scopes on ifs



------- Comment #3 from akyrtzi at gmail dot com  2008-10-08 09:09 -------
Note that the same rule applies to the 'switch' statement too:

switch (int x = 1)
{
  default:
  int x = 2; // there should be an error because of redeclaration
}


-- 

akyrtzi at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |akyrtzi at gmail dot com


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


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