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?

misra Example Suite D04

Last updated at Posted at 2025-07-02

Misra Example Suite at docker コンパイル完了までの道のり。docker(154) error(56)
https://qiita.com/kaizen_nagoya/items/71f04a0204d5a1114577

misrac2012.h
https://qiita.com/kaizen_nagoya/items/e9624af1832b0c28ec67

d04.sh
gcc D_04_01.c D_04_02.c D_04_03.c D_04_04.c D_04_05.c D_04_06.c D_04_07.c D_04_08_1.c D_04_08_2.c D_04_09.c D_04_10.c D_04_11.c D_04_12.c D_04_13.c D_04_14.c D_04_support.c D_04_system.c
ubuntu
$ ./D_04.sh
D_04_03.c: In function ‘D_4_3_1’:
D_04_03.c:24:8: error: expected ‘(’ before ‘{’ token
   24 |    asm { "CLI" };                      /* Non-compliant  */
      |        ^
      |        (
D_04_03.c:24:15: error: expected ‘;’ before ‘}’ token
   24 |    asm { "CLI" };                      /* Non-compliant  */
      |               ^~
      |               ;
D_04_03.c:26:8: error: expected ‘(’ before ‘{’ token
   26 |    asm { "SEI" };                      /* Non-compliant  */
      |        ^
      |        (
D_04_03.c:26:15: error: expected ‘;’ before ‘}’ token
   26 |    asm { "SEI" };                      /* Non-compliant  */
      |               ^~
      |               ;
$ ./D_04.sh
D_04_03.c: In function ‘D_4_3_1’:
D_04_03.c:24:4: warning: implicit declaration of function ‘_asm’ [-Wimplicit-function-declaration]
   24 |    _asm  ("CLI" );                      /* Non-compliant  */
      |    ^~~~
/usr/bin/ld: /tmp/ccIcdiSR.o: in function `msg_body':
D_04_01.c:(.text+0x27): undefined reference to `msg_header_valid'
/usr/bin/ld: /tmp/ccIcdiSR.o: in function `D_4_1':
D_04_01.c:(.text+0x120): undefined reference to `use_float32'
/usr/bin/ld: D_04_01.c:(.text+0x12f): undefined reference to `use_float32'
/usr/bin/ld: /tmp/ccKPqAJL.o: in function `D_4_3_1':
D_04_03.c:(.text+0x18): undefined reference to `_asm'
/usr/bin/ld: D_04_03.c:(.text+0x22): undefined reference to `use_int16'
/usr/bin/ld: D_04_03.c:(.text+0x36): undefined reference to `_asm'
/usr/bin/ld: /tmp/ccKPqAJL.o: in function `D_4_3_2':
D_04_03.c:(.text+0x55): undefined reference to `_asm'
/usr/bin/ld: /tmp/ccijkL4K.o: in function `D_4_4':
D_04_04.c:(.text+0x19): undefined reference to `use_int32'
/usr/bin/ld: /tmp/cckMn3XQ.o: in function `D_4_5':
D_04_05.c:(.text+0x9f): undefined reference to `use_int32'
/usr/bin/ld: D_04_05.c:(.text+0xc2): undefined reference to `use_int32'
/usr/bin/ld: D_04_05.c:(.text+0xe5): undefined reference to `use_int32'
/usr/bin/ld: D_04_05.c:(.text+0xf4): undefined reference to `use_int32'
/usr/bin/ld: /tmp/ccmjjgch.o: in function `D_4_6':
D_04_06.c:(.text+0x32): undefined reference to `use_char'
/usr/bin/ld: D_04_06.c:(.text+0x4b): undefined reference to `use_int32'
/usr/bin/ld: /tmp/ccIN7b1p.o: in function `D_4_7':
D_04_07.c:(.text+0x64): undefined reference to `get_uint16'
/usr/bin/ld: D_04_07.c:(.text+0x6d): undefined reference to `get_uint16'
/usr/bin/ld: D_04_07.c:(.text+0xca): undefined reference to `use_uint16'
/usr/bin/ld: /tmp/ccAOY4ZL.o: in function `D_4_8_1':
D_04_08_1.c:(.text+0x1c): undefined reference to `use_ptrX'
/usr/bin/ld: D_04_08_1.c:(.text+0x33): undefined reference to `use_int32'
/usr/bin/ld: /tmp/ccAOY4ZL.o: in function `D_4_8':
D_04_08_1.c:(.text+0x71): undefined reference to `get_ptrX'
/usr/bin/ld: D_04_08_1.c:(.text+0x7a): undefined reference to `get_ptrX'
/usr/bin/ld: /tmp/ccOqvYo8.o: in function `UseObject':
D_04_08_2.c:(.text+0x48): undefined reference to `use_int32'
/usr/bin/ld: D_04_08_2.c:(.text+0x5d): undefined reference to `use_int32'
/usr/bin/ld: /tmp/ccOqvYo8.o: in function `UseObject_notop':
D_04_08_2.c:(.text+0xac): undefined reference to `use_int32'
/usr/bin/ld: D_04_08_2.c:(.text+0xc1): undefined reference to `use_int32'
/usr/bin/ld: /tmp/ccay48Bh.o: in function `fn':
D_04_09.c:(.text+0x25): undefined reference to `use_uint16'
/usr/bin/ld: /tmp/ccay48Bh.o: in function `D_4_9':
D_04_09.c:(.text+0x45): undefined reference to `use_uint32'
/usr/bin/ld: /tmp/cc482vIv.o: in function `D_4_10':
D_04_10.c:(.text+0xe): undefined reference to `use_int32'
/usr/bin/ld: /tmp/ccGFdqgx.o: in function `D_4_11':
D_04_11.c:(.text+0xd): undefined reference to `get_int32'
/usr/bin/ld: D_04_11.c:(.text+0x39): undefined reference to `use_int32'
/usr/bin/ld: D_04_11.c:(.text+0x3e): undefined reference to `get_int32'
/usr/bin/ld: D_04_11.c:(.text+0x58): undefined reference to `use_int32'
/usr/bin/ld: D_04_11.c:(.text+0x62): undefined reference to `use_int32'
/usr/bin/ld: /tmp/cclaQjNE.o: in function `f':
D_04_12.c:(.text+0x36): undefined reference to `use_char_ptr'
/usr/bin/ld: /tmp/ccZdvmbn.o: in function `fpair':
D_04_13.c:(.text+0xd): undefined reference to `mutex_lock'
/usr/bin/ld: D_04_13.c:(.text+0x26): undefined reference to `mutex_unlock'
/usr/bin/ld: /tmp/ccZdvmbn.o: in function `D_4_13':
D_04_13.c:(.text+0x36): undefined reference to `get_int16'
collect2: error: ld returned 1 exit status
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?