run-is_compile_constant.c 650 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright 2011 Rusty Russell
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; either version 3 of the License, or (at your option) any
  7. * later version. See LICENSE for more details.
  8. */
  9. #include <ccan/compiler/compiler.h>
  10. #include <ccan/tap/tap.h>
  11. int main(int argc, char *argv[])
  12. {
  13. plan_tests(2);
  14. ok1(!IS_COMPILE_CONSTANT(argc));
  15. #if HAVE_BUILTIN_CONSTANT_P
  16. ok1(IS_COMPILE_CONSTANT(7));
  17. #else
  18. pass("If !HAVE_BUILTIN_CONSTANT_P, IS_COMPILE_CONSTANT always false");
  19. #endif
  20. return exit_status();
  21. }