BAが出てないようなので・・・toshi_yamaさんのソースを(無断)借用しましたm(")m
~/test >cat tst0.c
c
1#include <stdio.h>
2
3int sample(int a, int b); ←clangだとプロトタイプがないって怒られる
4
5int main(void)
6{
7 int c,d,val ;
8 c = 1;
9 d = 2;
10
11 val = sample(c,d);
12 printf("%d\n",val); ←改行がなかった
13
14 return 0; ←valをシステムに返しているのは何か理由があったのでしょうか?
15}
16
17int sample(int a, int b) ←パラメタの型がなかった
18{
19 if (a < b){
20 return b;
21 }
22 return a; ←else節は不要(あるとコンパイラに返り値がないって怒られる)
23}