Hi!
Im useing SDCC Feb 3 2004 (MINGW) with the
parameters:
sdcc.exe main.c -mmcs51 --use-stdout --no-xinit-opt -
I. -c
It will fail to compile the code:
void f(int a)
{
switch (a)
{
default:
}
}
The message:
main.c:7: parse error: token -> '}' ; column 9
But if you place a "break;" under the default it will work
fine.
Anyway its ok just ....
Best regards and many thanks for this compiler guys!
beba
beba(no spam)koli.kando.hu
Logged In: YES
user_id=635249
This is not a bug. According to the syntax given in the ANSI
C standard, all labels, including "default:" are to be
followed a statement. However, it is not usual for compilers
to support what you are wanting as an extension to the
language, so I have reclassified this from a bug report to a
feature request.
Logged In: YES
user_id=635249
Implemented in src/SDCC.y 1.93