run-fail-warn.cpp 420 B

12345678910111213141516
  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. #include <iostream>
  5. int main()
  6. {
  7. short s;
  8. unsigned long ul;
  9. s = s & ul; // warning from many compilers
  10. if ( s == ul ) {} // warning from GCC
  11. std::cout << "example of output from a run-time failure\n";
  12. return 1;
  13. }
粤ICP备19079148号