mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
7919812378
* Now comments represent the fact that there may not be curly braces.
40 lines
548 B
C
40 lines
548 B
C
/*
|
|
!!DESCRIPTION!! Testing empty bodied switch statements.
|
|
!!ORIGIN!!
|
|
!!LICENCE!! GPL, read COPYING.GPL
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
unsigned char success=0;
|
|
unsigned char failures=0;
|
|
unsigned char dummy=0;
|
|
|
|
void done()
|
|
{
|
|
dummy++;
|
|
}
|
|
|
|
void switch_no_body(void)
|
|
{
|
|
switch(0);
|
|
}
|
|
|
|
void switch_empty_body(void)
|
|
{
|
|
switch(0) {}
|
|
}
|
|
|
|
/* only worried about this file compiling successfully */
|
|
int main(void)
|
|
{
|
|
switch_no_body();
|
|
switch_empty_body();
|
|
|
|
success=failures;
|
|
done();
|
|
printf("failures: %d\n",failures);
|
|
|
|
return failures;
|
|
}
|