fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int test(int i) {return i; }
  5.  
  6. int my_func()
  7. {
  8. cout << "my_func\n";
  9. return 1;
  10. }
  11.  
  12. #define MY_MACRO && my_func()
  13.  
  14. int main(int argc, const char * argv[])
  15. {
  16. cout << "------------\n";
  17. test(0) MY_MACRO;
  18. cout << "------------\n";
  19. test(2) MY_MACRO;
  20. cout << "------------\n";
  21. }
  22.  
  23.  
  24.  
Success #stdin #stdout 0s 4380KB
stdin
Standard input is empty
stdout
------------
------------
my_func
------------