cmp0044-check.cpp 412 B

1234567891011121314151617181920212223242526
  1. #ifdef Type_Is_
  2. # if !Result
  3. # error Result should be 1 in WARN mode
  4. # endif
  5. #endif
  6. #ifdef Type_Is_NEW
  7. # if Result
  8. # error Result should be 0 in NEW mode
  9. # endif
  10. #endif
  11. #ifdef Type_Is_OLD
  12. # if !Result
  13. # error Result should be 1 in OLD mode
  14. # endif
  15. #endif
  16. #if !defined(Type_Is_) && !defined(Type_Is_OLD) && !defined(Type_Is_NEW)
  17. #error No expected definition present
  18. #endif
  19. void foo(void)
  20. {
  21. }