Advertisement
wbooze

compiler error

Apr 12th, 2022
876
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.00 KB | None | 0 0
  1. > gcc -Wall -Wextra -Wno-main -Wpedantic -pedantic -g -O0 -o alignment_check2 alignment_check2.c
  2. alignment_check2.c: In function 'main':
  3. alignment_check2.c:21:23: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=]
  4.    21 |  printf("Size of int:%d\n", sizeof(int));
  5.       |                      ~^     ~~~~~~~~~~~
  6.       |                       |     |
  7.       |                       int   long unsigned int
  8.       |                      %ld
  9. alignment_check2.c:24:36: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'long unsigned int' [-Wformat=]
  10.    24 |  printf("Size of long long int: %lld\n\n", sizeof(long long int));
  11.       |                                 ~~~^       ~~~~~~~~~~~~~~~~~~~~~
  12.       |                                    |       |
  13.       |                                    |       long unsigned int
  14.       |                                    long long int
  15.       |                                 %ld
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement