run-pass-warn.cpp 402 B

1234567891011121314
  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. // provoke one or more compiler warnings
  5. int main(int argc, char * argv[] )
  6. {
  7. short s;
  8. unsigned long ul;
  9. s = s & ul; // warning from many compilers
  10. if ( s == ul ) {} // warning from GCC
  11. return 0;
  12. }
粤ICP备19079148号