run-fail_warn.cpp 628 B

1234567891011121314151617181920
  1. // (C) Copyright Beman Dawes 2003. Distributed under the Boost
  2. // Software License, Version 1.0. (See accompanying file
  3. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. // Test naming convention: the portion of the name before the tilde ("~")
  5. // identifies the bjam test type. The portion after the tilde
  6. // identifies the correct result to be reported by compiler_status.
  7. #include <iostream>
  8. int main()
  9. {
  10. short s;
  11. unsigned long ul;
  12. s = s & ul; // warning from many compilers
  13. if ( s == ul ) {} // warning from GCC
  14. std::cout << "example of output from a run-time failure\n";
  15. return 1;
  16. }
粤ICP备19079148号