W
Wiseguy
I'm in the process of trying to create my own lean, mean, uber
linux distro and have bootstrapped a prototype system to build upon.
I'm using the gcc 3.4.3 compiler and am getting an error that I have
to question.
Some of the code I'm compiling places labels at the end of a construct,
either as the destination of a goto or even something as benign as a
default: label in a switch statement.
starting with 3.4.3 (but not before) I'm seeing a compiler error
about not being allowed to place a label directly before the
ending brace of a construct like
label:
}
or
case 'a': break;
default:
}
What's the deal? Whether it is good form or not, I cannot see any
legitimate reason why I would be prohibited from doing this? Is there
a difference in requirements between c and c++ where this is concerned?
should I look for a compiler switch to disable this behavior?
linux distro and have bootstrapped a prototype system to build upon.
I'm using the gcc 3.4.3 compiler and am getting an error that I have
to question.
Some of the code I'm compiling places labels at the end of a construct,
either as the destination of a goto or even something as benign as a
default: label in a switch statement.
starting with 3.4.3 (but not before) I'm seeing a compiler error
about not being allowed to place a label directly before the
ending brace of a construct like
label:
}
or
case 'a': break;
default:
}
What's the deal? Whether it is good form or not, I cannot see any
legitimate reason why I would be prohibited from doing this? Is there
a difference in requirements between c and c++ where this is concerned?
should I look for a compiler switch to disable this behavior?