Author
anonymous
over 3 years ago
Language
C
Compiler
gcc 11.1.0
Options
Warnings
C11
-pedantic
Author
anonymous
over 3 years ago
$ gcc prog.c -Wall -Wextra -std=c11 -pedantic
prog.c: In function 'main':
prog.c:39:5: error: array size missing in 'data'
39 | int data[];
| ^~~~
prog.c:43:13: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
43 | scanf("%d",data[i]);}
| ~^ ~~~~~~~
| | |
| int * int
prog.c:45:32: warning: format '%d' expects a matching 'int' argument [-Wformat=]
45 | printf("小さい順に並べると%dとなります。");min3(&data[0],&data[1],&data[2]);
| ~^
| |
| int
prog.c:45:53: warning: passing argument 1 of 'min3' makes integer from pointer without a cast [-Wint-conversion]
45 | printf("小さい順に並べると%dとなります。");min3(&data[0],&data[1],&data[2]);
| ^~~~~~~~
| |
| int *
prog.c:15:15: note: expected 'int' but argument is of type 'int *'
15 | void min3(int x,int y,int z)
| ~~~~^
prog.c:45:62: warning: passing argument 2 of 'min3' makes integer from pointer without a cast [-Wint-conversion]
45 | printf("小さい順に並べると%dとなります。");min3(&data[0],&data[1],&data[2]);
| ^~~~~~~~
| |
| int *
prog.c:15:21: note: expected 'int' but argument is of type 'int *'
15 | void min3(int x,int y,int z)
| ~~~~^
prog.c:45:71: warning: passing argument 3 of 'min3' makes integer from pointer without a cast [-Wint-conversion]
45 | printf("小さい順に並べると%dとなります。");min3(&data[0],&data[1],&data[2]);
| ^~~~~~~~
| |
| int *
prog.c:15:27: note: expected 'int' but argument is of type 'int *'
15 | void min3(int x,int y,int z)
| ~~~~^
Exit Code:
1