Advertisement
stuw

Untitled

Feb 10th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. # cppcheck --version
  2. Cppcheck 1.86
  3.  
  4. # cppcheck --debug test.cpp -D_LIN_
  5. Checking test.cpp ...
  6. [test.cpp:8]: (error) #error "Product is not specified"
  7.  
  8. # cat test.cpp
  9. #define __PROD_P1 1
  10.  
  11. #define PROD(a) __PROD_##a
  12.  
  13. #if PROD(P1)
  14. #define VER_SHORTPRODUCTNAME_STR "P1"
  15. #else
  16. #error "Product is not specified"
  17. #endif
  18.  
  19. int main()
  20. {
  21. return 0;
  22. }
  23.  
  24. # g++ test.cpp -o test
  25. # ./test
  26. # echo $?
  27. 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement