#include <stdio.h> void func(int **p) { } int main(void) { int *p; func(p); func(&p); int **pp = &p; func(&pp); return 0; }
Standard input is empty
prog.c: In function 'main':
prog.c:9:8: error: passing argument 1 of 'func' from incompatible pointer type [-Werror]
func(p);
^
prog.c:3:6: note: expected 'int **' but argument is of type 'int *'
void func(int **p) {
^
prog.c:12:8: error: passing argument 1 of 'func' from incompatible pointer type [-Werror]
func(&pp);
^
prog.c:3:6: note: expected 'int **' but argument is of type 'int ***'
void func(int **p) {
^
cc1: all warnings being treated as errors
Standard output is empty