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++/21487] new object affectation in a switch


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-10 14:51 -------
(In reply to comment #2)
> Subject: RE:  new object affectation in a switch
> 
> So, I don't understand why :
...
> is OK for g++.
Because there is no initialization of a variable in the declaration.
....
> is "correct" too, but
because there is no case statement after the initialization of the variable so there is no way to cross the 
initialization.

> is rejected with a french and english (:-D) error message !
Because you cross an initialization.

-- 


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


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