记录详情

Compile Error

foo.c: In function 'cal':
foo.c:5:5: error: expected '(' before '{' token
    5 |     {
      |     ^
      |     (
foo.c:6:9: error: unknown type name 'mov'
    6 |         mov eax,a;
      |         ^~~
foo.c:7:9: error: unknown type name 'mov'
    7 |         mov ebx,b;
      |         ^~~
foo.c:8:9: error: unknown type name 'add'
    8 |         add eax,ebx;
      |         ^~~
foo.c:8:13: error: redeclaration of 'eax' with no linkage
    8 |         add eax,ebx;
      |             ^~~
foo.c:6:13: note: previous declaration of 'eax' was here
    6 |         mov eax,a;
      |             ^~~
foo.c:8:17: error: redeclaration of 'ebx' with no linkage
    8 |         add eax,ebx;
      |                 ^~~
foo.c:7:13: note: previous declaration of 'ebx' was here
    7 |         mov ebx,b;
      |             ^~~
foo.c:8:17: warning: unused variable 'ebx' [-Wunused-variable]
    8 |         add eax,ebx;
      |                 ^~~
foo.c:8:13: warning: unused variable 'eax' [-Wunused-variable]
    8 |         add eax,ebx;
      |             ^~~
foo.c:7:17: warning: unused variable 'b' [-Wunused-variable]
    7 |         mov ebx,b;
      |                 ^
foo.c:6:17: warning: unused variable 'a' [-Wunused-variable]
    6 |         mov eax,a;
      |                 ^
foo.c: In function 'main':
foo.c:14:13: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long int *' [-Wformat=]
   14 |     scanf("%d%d",&a,&b);
      |            ~^    ~~
      |             |    |
      |             |    long long int *
      |             int *
      |            %lld
foo.c:14:15: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'long long int *' [-Wformat=]
   14 |     scanf("%d%d",&a,&b);
      |              ~^     ~~
      |               |     |
      |               int * long long int *
      |              %lld
foo.c: In function 'cal':
foo.c:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
foo.c: In function 'main':
foo.c:14:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   14 |     scanf("%d%d",&a,&b);
      |     ^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1187 汇编你好
语言
C
递交时间
2022-07-29 18:42:43
评测时间
2022-07-29 18:42:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes