prog.c: In function 'main':
prog.c:4:2: warning: implicit declaration of function 'leftBitCount' [-Wimplicit-function-declaration]
leftBitCount(-1);
^
prog.c: At top level:
prog.c:7:6: warning: conflicting types for 'leftBitCount'
void leftBitCount(int x) {
^
prog.c:4:2: note: previous implicit declaration of 'leftBitCount' was here
leftBitCount(-1);
^
prog.c: In function 'leftBitCount':
prog.c:22:3: warning: implicit declaration of function 'showBits' [-Wimplicit-function-declaration]
showBits(b);
^
prog.c: At top level:
prog.c:27:6: warning: conflicting types for 'showBits'
void showBits(unsigned int w) {
^
prog.c:22:3: note: previous implicit declaration of 'showBits' was here
showBits(b);
^
prog.c: In function 'showBits':
prog.c:29:4: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < sizeof(w) * 8; i++) {
^
prog.c:29:4: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
prog.c:35:13: error: redefinition of 'i'
for (int i = 31; i >= 0; i--) {
^
prog.c:29:13: note: previous definition of 'i' was here
for (int i = 0; i < sizeof(w) * 8; i++) {
^
prog.c:35:4: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 31; i >= 0; i--) {
^
prog.c: In function 'main':
prog.c:5:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^