mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-14 22:38:46 +00:00
Forbid incompatible pointer conversion
This commit is contained in:
@@ -811,9 +811,6 @@ mod calculator {
|
||||
(Value::Float { value, .. }, Dtype::Float { width, .. }) => {
|
||||
Ok(Value::float(value.into_inner(), width))
|
||||
}
|
||||
(Value::Pointer { bid, offset, .. }, Dtype::Pointer { inner, .. }) => {
|
||||
Ok(Value::pointer(bid, offset, inner.deref().clone()))
|
||||
}
|
||||
(value, dtype) => todo!("calculate_typecast ({:?}) {:?}", value, dtype),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ REPLACE_DICT = {
|
||||
"_Nullable": "",
|
||||
"\"g_\w*\", ": "", # transparent_crc에서 프린트 목적으로 받은 StringLiteral 삭제
|
||||
"char\* vname, ": "", # transparent_crc에서 사용하지 않는 파라미터 삭제
|
||||
r"transparent_crc_bytes\s*\([^;]*\);": "", # transparent_crc_bytes 삭제
|
||||
r"[^\n]*_IO_2_1_[^;]*;": "", # extern을 지우면서 생긴 size를 알 수 없는 struct 삭제
|
||||
r"__asm\s*\([^\)]*\)": "", # asm extension in mac
|
||||
r"__asm__\s*\([^\)]*\)": "", # asm extension in linux
|
||||
|
||||
@@ -47,6 +47,7 @@ if
|
||||
grep 'no semicolon at end' outa.txt ||\
|
||||
grep 'type defaults to' outa.txt ||\
|
||||
grep 'too few arguments for format' outa.txt ||\
|
||||
grep 'incompatible pointer' out_gcc.txt ||\
|
||||
grep 'ordered comparison of pointer with integer' outa.txt ||\
|
||||
grep 'declaration does not declare anything' outa.txt ||\
|
||||
grep 'expects type' outa.txt ||\
|
||||
|
||||
Reference in New Issue
Block a user