run_warn-note.cpp 852 B

123456789101112131415161718192021222324
  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. std::cout << "example of output before a <note> line\n";
  11. std::cout << "<note>\n";
  12. std::cout << "example of output after a <note> line\n";
  13. // provoke a compiler warning to make sure <note> takes priority over
  14. // a warning, but neither is lost from status reporting links HTML.
  15. short s;
  16. unsigned long ul;
  17. s = s & ul; // warning from many compilers
  18. if ( s == ul ) {} // warning from GCC
  19. return 0;
  20. }
粤ICP备19079148号