fork download
  1. #include <stdio.h>
  2.  
  3. float popStack_f(void) {
  4. return 1.0f;
  5. }
  6.  
  7. int popStack_i(void) {
  8. return 6;
  9. }
  10.  
  11. #define popStack(X) _Generic((X), \
  12.   int: popStack_i, \
  13.   float: popStack_f)()
  14.  
  15.  
  16. int main(void) {
  17. printf("%d\n", popStack((int)0));
  18. printf("%f\n", popStack((float)0));
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 4908KB
stdin
Standard input is empty
stdout
6
1.000000