Language: C

void main()
{
  if(S = 'SUN')
  {
    printf("7")
  }
    if(S = 'MON')
  {
    printf("6")
  }
    if(S = 'TUE')
  {
    printf("5")
  }
    if(S = 'WED')
  {
    printf("4")
  }
    if(S = 'THU')
  {
    printf("3")
  }
    if(S = 'FRI')
  {
    printf("2")
  }
    if(S = 'SAT')
  {
    printf("1")
  }
}

Compiler output:
main.c: In function 'main':
main.c:3:6: error: 'S' undeclared (first use in this function)
    3 |   if(S = 'SUN')
      |      ^
main.c:3:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:10: warning: multi-character character constant [-Wmultichar]
    3 |   if(S = 'SUN')
      |          ^~~~~
main.c:5:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 |     printf("7")
      |     ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | void main()
main.c:5:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    5 |     printf("7")
      |     ^~~~~~
main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:16: error: expected ';' before '}' token
    5 |     printf("7")
      |                ^
      |                ;
    6 |   }
      |   ~             
main.c:7:12: warning: multi-character character constant [-Wmultichar]
    7 |     if(S = 'MON')
      |            ^~~~~
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |     printf("6")
      |     ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:16: error: expected ';' before '}' token
    9 |     printf("6")
      |                ^
      |                ;
   10 |   }
      |   ~             
main.c:11:12: warning: multi-character character constant [-Wmultichar]
   11 |     if(S = 'TUE')
      |            ^~~~~
main.c:13:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   13 |     printf("5")
      |     ^~~~~~
main.c:13:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:16: error: expected ';' before '}' token
   13 |     printf("5")
      |                ^
      |                ;
   14 |   }
      |   ~             
main.c:15:12: warning: multi-character character constant [-Wmultichar]
   15 |     if(S = 'WED')
      |            ^~~~~
main.c:17:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   17 |     printf("4")
      |     ^~~~~~
main.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:16: error: expected ';' before '}' token
   17 |     printf("4")
      |                ^
      |                ;
   18 |   }
      |   ~             
main.c:19:12: warning: multi-character character constant [-Wmultichar]
   19 |     if(S = 'THU')
      |            ^~~~~
main.c:21:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   21 |     printf("3")
      |     ^~~~~~
main.c:21:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:16: error: expected ';' before '}' token
   21 |     printf("3")
      |                ^
      |                ;
   22 |   }
      |   ~             
main.c:23:12: warning: multi-character character constant [-Wmultichar]
   23 |     if(S = 'FRI')
      |            ^~~~~
main.c:25:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   25 |     printf("2")
      |     ^~~~~~
main.c:25:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:16: error: expected ';' before '}' token
   25 |     printf("2")
      |                ^
      |                ;
   26 |   }
      |   ~             
main.c:27:12: warning: multi-character character constant [-Wmultichar]
   27 |     if(S = 'SAT')
      |            ^~~~~
main.c:29:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   29 |     printf("1")
      |     ^~~~~~
main.c:29:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:16: error: expected ';' before '}' token
   29 |     printf("1")
      |                ^
      |                ;
   30 |   }
      |   ~