0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

R7 misra c 2012 example suite

Last updated at Posted at 2025-07-16
ms3_support.c
#include "mc3_types.h"
#include "mc3_header.h"

/* ダミー実装群 */
void use_uint16(uint16_t val) {(void)val;}
void use_int32(int val) {(void)val;}
void use_int64(int64_t val) {(void)val;}
void use_uint32(uint32_t val) {(void)val;}
void use_uint64(uint64_t val) {(void)val;}
void use_int128(int128_t val) {(void)val;}
void use_uint128(uint128_t val) {(void)val;}
void use_float128(float128_t val) {(void)val;}
void use_const_char_ptr(const char *p) {(void)p;}
void use_const_volatile_char_ptr(const volatile char *p) {(void)p;}

/* f1, f2 は以下のように簡単に定義すればOK */
void f1(char *s1) {(void)s1;}
void f2(const char *s2) {(void)s2;}
r7.sh
gcc R_07_01.c  R_07_02.c  R_07_03.c R_07_04.c R_07_support.c  R_07_system.c ms3_support.c -o r7.exe
bash
$ ./r7.exe
Segmentation fault (core dumped)
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?