Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- file: "temp.cpp"
- gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)
- $ g++ -std=c++11 -Wall -Wextra -pedantic -O2 temp.cpp -o temp.o
- temp.cpp: In function ‘int main()’:
- temp.cpp:19:28: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int64_t {aka long int}’ [-Wformat=]
- printf("%lld\n", number);
- ^
- temp.cpp:20:47: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
- printf("sizeof(long) = %u\n", sizeof(long));
- ^
- $ ./temp.o
- 1
- sizeof(long) = 8
- */
- #pragma GCC diagnostic ignored "-Wunused-result"
- #include <cstdio>
- #include <cstdint>
- int main() {
- int64_t number = 1;
- printf("%lld\n", number);
- printf("sizeof(long) = %u\n", sizeof(long));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement