No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

feature_tests.c 688B

12345678910111213141516171819202122232425262728293031323334
  1. const char features[] = {"\n"
  2. "C_FEATURE:"
  3. #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304
  4. "1"
  5. #else
  6. "0"
  7. #endif
  8. "c_function_prototypes\n"
  9. "C_FEATURE:"
  10. #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  11. "1"
  12. #else
  13. "0"
  14. #endif
  15. "c_restrict\n"
  16. "C_FEATURE:"
  17. #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L
  18. "1"
  19. #else
  20. "0"
  21. #endif
  22. "c_static_assert\n"
  23. "C_FEATURE:"
  24. #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  25. "1"
  26. #else
  27. "0"
  28. #endif
  29. "c_variadic_macros\n"
  30. };
  31. int main(int argc, char** argv) { (void)argv; return features[argc]; }