This is the mail archive of the gcc-patches@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]

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



On Sep 28, 2007, at 12:02 PM, Tom Tromey wrote:


"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.

It's hard to handle code like this both correctly and efficiently:


void foo() {
  l:
    {
       goto l;
       __label__ l;
       l:
    }
}


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