consumer.c 816 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_OR_XCODE
  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. #if !LANG_IS_C_OR_CXX
  31. # error Expected LANG_IS_C_OR_CXX
  32. #endif
  33. void consumer_c()
  34. {
  35. }