Author
anonymous
almost 8 years ago
Language
C++
Compiler
clang HEAD 5.0.0 (https://github.com/llvm-mirror/clang.git 3022dac388832e0bb669821e6677abd5cb8a8784) (https://github.com/llvm-mirror/llvm.git aade6b806c28159a39ed031722c9ff3e34932e8f)
Options
Warnings
Boost 1.64.0
C++1z(GNU)
no pedantic
Author
anonymous
almost 8 years ago
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.64.0/clang-head/include -std=gnu++1z
prog.cc:8:82: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("char max: \t\t%d\t\t\tmin: %d\t\tbajtów: %d\n", CHAR_MAX, CHAR_MIN, sizeof(char));
~~ ^~~~~~~~~~~~
%lu
prog.cc:9:83: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("short max: \t\t%d\t\t\tmin: %d\t\tbajtów: %d\n", SHRT_MAX, SHRT_MIN, sizeof(short));
~~ ^~~~~~~~~~~~~
%lu
prog.cc:10:75: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("int max: \t\t%d\t\tmin: %d\tbajtów: %d\n", INT_MAX, INT_MIN, sizeof(int));
~~ ^~~~~~~~~~~
%lu
prog.cc:11:58: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
printf("long max: \t\t%d\t\tmin: %d\tbajtów: %d\n", LONG_MAX, LONG_MIN, sizeof(long));
~~ ^~~~~~~~
%ld
/opt/wandbox/clang-head/lib/clang/5.0.0/include/limits.h:63:19: note: expanded from macro 'LONG_MAX'
#define LONG_MAX __LONG_MAX__
^~~~~~~~~~~~
<built-in>:83:22: note: expanded from here
#define __LONG_MAX__ 9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
prog.cc:11:68: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
printf("long max: \t\t%d\t\tmin: %d\tbajtów: %d\n", LONG_MAX, LONG_MIN, sizeof(long));
~~ ^~~~~~~~
%ld
/opt/wandbox/clang-head/lib/clang/5.0.0/include/limits.h:68:19: note: expanded from macro 'LONG_MIN'
#define LONG_MIN (-__LONG_MAX__ -1L)
^~~~~~~~~~~~~~~~~~~
prog.cc:11:78: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("long max: \t\t%d\t\tmin: %d\tbajtów: %d\n", LONG_MAX, LONG_MIN, sizeof(long));
~~ ^~~~~~~~~~~~
%lu
prog.cc:13:85: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("unsigned char max: \t%d\t\t\tmin: %d\t\t\tbajtów: %d\n", UCHAR_MAX, 0, sizeof(unsigned char));
~~ ^~~~~~~~~~~~~~~~~~~~~
%lu
prog.cc:14:86: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("unsigned short max: \t%d\t\t\tmin: %d\t\t\tbajtów: %d\n", USHRT_MAX, 0, sizeof(unsigned short));
~~ ^~~~~~~~~~~~~~~~~~~~~~
%lu
prog.cc:15:77: warning: format specifies type 'long long' but the argument has type 'unsigned int' [-Wformat]
printf("ŹLE unsigned int max: \t%lld\t\tmin: %d\t\t\tbajtów: %d\n", UINT_MAX, 0, sizeof(unsigned int));
~~~~ ^~~~~~~~
%u
/opt/wandbox/clang-head/lib/clang/5.0.0/include/limits.h:72:19: note: expanded from macro 'UINT_MAX'
#define UINT_MAX (__INT_MAX__ *2U +1U)
^~~~~~~~~~~~~~~~~~~~~~
prog.cc:15:90: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("ŹLE unsigned int max: \t%lld\t\tmin: %d\t\t\tbajtów: %d\n", UINT_MAX, 0, sizeof(unsigned int));
~~ ^~~~~~~~~~~~~~~~~~~~
%lu
prog.cc:16:78: warning: format specifies type 'long long' but the argument has type 'unsigned long' [-Wformat]
printf("ŹLE unsigned long max: \t%lld\t\tmin: %d\t\t\tbajtów: %d\n", ULONG_MAX, 0, sizeof(unsigned long));
~~~~ ^~~~~~~~~
%lu
/opt/wandbox/clang-head/lib/clang/5.0.0/include/limits.h:73:19: note: expanded from macro 'ULONG_MAX'
#define ULONG_MAX (__LONG_MAX__ *2UL+1UL)
^~~~~~~~~~~~~~~~~~~~~~~
prog.cc:16:92: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("ŹLE unsigned long max: \t%lld\t\tmin: %d\t\t\tbajtów: %d\n", ULONG_MAX, 0, sizeof(unsigned long));
~~ ^~~~~~~~~~~~~~~~~~~~~
%lu
12 warnings generated.
char max: 127 min: -128 bajtów: 1
short max: 32767 min: -32768 bajtów: 2
int max: 2147483647 min: -2147483648 bajtów: 4
long max: -1 min: 0 bajtów: 8
unsigned char max: 255 min: 0 bajtów: 1
unsigned short max: 65535 min: 0 bajtów: 2
ŹLE unsigned int max: 4294967295 min: 0 bajtów: 4
ŹLE unsigned long max: -1 min: 0 bajtów: 8
Exit Code:
0