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