[Bug c/37231] GCC does not compile code with label statements that are followed by a declaration

2010-05-09 Thread alex dot pyattaev at gmail dot com
--- Comment #7 from alex dot pyattaev at gmail dot com 2010-05-09 10:29 --- I have encountered the bug with switch construct. And the problem is not the error message, but the fact that it is still compiling just fine this code: switch (chan_prop.model_type) {

[Bug c/37231] GCC does not compile code with label statements that are followed by a declaration

2010-05-09 Thread manu at gcc dot gnu dot org
--- Comment #8 from manu at gcc dot gnu dot org 2010-05-09 15:26 --- (In reply to comment #7) There should be some consistency at least! I'd like to see this fixed properly. The compiler should be perfectly predictable, and not like Sorry, i don't like It is predictable: a label

[Bug c/37231] GCC does not compile code with label statements that are followed by a declaration

2010-05-09 Thread alex dot pyattaev at gmail dot com
--- Comment #9 from alex dot pyattaev at gmail dot com 2010-05-09 19:07 --- (In reply to comment #7) I have encountered the bug with switch construct. And the problem is not the error message, but the fact that it is still compiling just fine this code: switch (chan_prop.model_type)

[Bug c/37231] GCC does not compile code with label statements that are followed by a declaration

2010-05-09 Thread dougsemler at gmail dot com
--- Comment #10 from dougsemler at gmail dot com 2010-05-09 23:25 --- (In reply to comment #9) A good example of seemingly normal code is following: switch (whatever) { case 1: int i=0; i++;

[Bug c/37231] GCC does not compile code with label statements that are followed by a declaration

2010-05-09 Thread alex dot pyattaev at gmail dot com
--- Comment #11 from alex dot pyattaev at gmail dot com 2010-05-09 23:29 --- (In reply to comment #10) (In reply to comment #9) A good example of seemingly normal code is following: switch (whatever) { case 1: int i=0;

[Bug c/37231] GCC does not compile code with label statements that are followed by a declaration

2009-07-09 Thread manu at gcc dot gnu dot org
--- Comment #6 from manu at gcc dot gnu dot org 2009-07-09 09:25 --- Is this mandated to be an error by the standard? Perhaps GCC could just pedwarn and add the ';' itself, and compile just fine. Otherwise, I might add a hint: note: either add ';' or open a block after the label.

[Bug c/37231] GCC does not compile code with label statements that are followed by a declaration

2008-08-25 Thread paolo dot carlini at oracle dot com
--- Comment #1 from paolo dot carlini at oracle dot com 2008-08-25 10:43 --- I think the improved error message in mainline makes clear this is invalid (the EDG front-end agrees, by the way): 37231.c:6: error: a label can only be part of a statement and a declaration is not a

[Bug c/37231] GCC does not compile code with label statements that are followed by a declaration

2008-08-25 Thread manu at gcc dot gnu dot org
--- Comment #2 from manu at gcc dot gnu dot org 2008-08-25 18:55 --- I think this was fixed already in GCC 4.3. -- manu at gcc dot gnu dot org changed: What|Removed |Added