0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

きょうのgcc error

Posted at

C言語記事へのコメント
https://qiita.com/kaizen_nagoya/items/89a9c709e7918e465d50

にあるWikiへのリンクのソースコードをコンパイルしてみた。

139b58:/tmp/gcc/mikecat_mixc# vi wiki.c
root@e69d75139b58:/tmp/gcc/mikecat_mixc# gcc -Wall -Wextra -O2 -o wiki wiki.c
wiki.c: In function 'main':
wiki.c:6:12: warning: missing terminating " character
    6 |   B(printf("#include <stdio.h>\nint main(int argc, char** argv)\n{\n#define B(x)
      |            ^
wiki.c:9:2: error: unterminated argument list invoking macro "B"
    9 | }
      |  ^
wiki.c:6:3: error: 'B' undeclared (first use in this function)
    6 |   B(printf("#include <stdio.h>\nint main(int argc, char** argv)\n{\n#define B(x)
      |   ^
wiki.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
wiki.c:6:4: error: expected ';' at end of input
    6 |   B(printf("#include <stdio.h>\nint main(int argc, char** argv)\n{\n#define B(x)
      |    ^
      |    ;
......
wiki.c:6:3: error: expected declaration or statement at end of input
    6 |   B(printf("#include <stdio.h>\nint main(int argc, char** argv)\n{\n#define B(x)
      |   ^
wiki.c:2:14: warning: unused parameter 'argc' [-Wunused-parameter]
    2 | int main(int argc, char** argv)
      |          ~~~~^~~~
wiki.c:2:27: warning: unused parameter 'argv' [-Wunused-parameter]
    2 | int main(int argc, char** argv)
      |                    ~~~~~~~^~~~
root@e69d75139b58:/tmp/gcc/mikecat_mixc# ERRO[3849] error waiting for container:
docker
$ docker commit bb780993fd9a  kaizenjapan/gccqiita 
sha256:035251e835d9e8e30b4963e6298e77d5dfba53168c6cc45915a7ab7d51df40dc
$ docker push kaizenjapan/gccqiita
Using default tag: latest
The push refers to repository [docker.io/kaizenjapan/gccqiita]
198ab69cd830: Pushed 
3ed7ac3e2a38: Mounted from library/gcc 
0354c659d1f8: Mounted from library/gcc 
482ad84b6119: Mounted from library/gcc 
e8b7ad9c7816: Mounted from library/gcc 
d8a1e7648c7f: Mounted from library/gcc 
45e194afeef2: Mounted from library/gcc 
7bcfc560f59e: Mounted from library/gcc 
dc1054477fdd: Mounted from library/gcc 
latest: digest: sha256:6ea84eab3d7a2268116fea75081d406ffd9d0549e69faac7d692ada84c84a57a size: 2213
$ 
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?