[C++ PATCH] Only allow __label__ at the beginning of compound statements as documented (PR c++/32121)

Tom Tromey tromey@redhat.com
Fri Sep 28 22:02:00 GMT 2007


>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

Jakub> Until GCC 3.3 we allowed it only at the beginning of the block
Jakub> even for C++ and it is documented that way.

Yeah.  If it changed back then, then perhaps people are using it.  I
wonder.

Anyway I'm just trying to look at it from a language design point of
view.  I couldn't think of a reason to restrict this, particularly for
C99/C++, where the parallel construct for variables works fine.

Jakub> Anyway, even if it is supposed to be allowed anywhere, I think it should
Jakub> be always declared before their label, or at least must not result in
Jakub> allowing silently duplicate labels, as does:

Yeah, I agree.

Tom



More information about the Gcc-patches mailing list