consumer.c 678 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Visual Studio allows only one set of flags for C and C++.
  2. // In a target using C++ we pick the C++ flags even for C sources.
  3. #ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO
  4. #ifndef CONSUMER_LANG_CXX
  5. #error Expected CONSUMER_LANG_CXX
  6. #endif
  7. #ifdef CONSUMER_LANG_C
  8. #error Unexpected CONSUMER_LANG_C
  9. #endif
  10. #if !LANG_IS_CXX
  11. #error Expected LANG_IS_CXX
  12. #endif
  13. #if LANG_IS_C
  14. #error Unexpected LANG_IS_C
  15. #endif
  16. #else
  17. #ifdef CONSUMER_LANG_CXX
  18. #error Unexpected CONSUMER_LANG_CXX
  19. #endif
  20. #ifndef CONSUMER_LANG_C
  21. #error Expected CONSUMER_LANG_C
  22. #endif
  23. #if !LANG_IS_C
  24. #error Expected LANG_IS_C
  25. #endif
  26. #if LANG_IS_CXX
  27. #error Unexpected LANG_IS_CXX
  28. #endif
  29. #endif
  30. void consumer_c()
  31. {
  32. }