/in/foo.c: In function 'calc':
/in/foo.c:26:14: warning: type defaults to 'int' in declaration of 'f_val' [-Wimplicit-int]
26 | auto f_val = [&](double v) {
| ^~~~~
/in/foo.c:26:22: error: expected expression before '[' token
26 | auto f_val = [&](double v) {
| ^
/in/foo.c:26:36: error: expected ',' or ';' before '{' token
26 | auto f_val = [&](double v) {
| ^
/in/foo.c:30:16: error: called object 'f_val' is not a function or function pointer
30 | while (f_val(right) < 0) right *= 2.0;
| ^~~~~
/in/foo.c:26:14: note: declared here
26 | auto f_val = [&](double v) {
| ^~~~~
/in/foo.c:35:17: error: called object 'f_val' is not a function or function pointer
35 | if (f_val(mid) < 0) left = mid;
| ^~~~~
/in/foo.c:26:14: note: declared here
26 | auto f_val = [&](double v) {
| ^~~~~