|
|
Reporter | JoGi | |
---|
Assigned To | AllanBlanchard | |
---|
Priority | low | Severity | minor | Reproducibility | always |
---|
Status | assigned | Resolution | open | |
---|
Platform | Linux | OS | Ubuntu | OS Version | 18.04 LTS |
---|
Product Version | Frama-C 19-Potassium | |
---|
Target Version | | Fixed in Version | | |
---|
|
|
Summary | 0002508: cabs2cil fails with statements in expression in a question |
---|
Description | When you have a statement in expression ( https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html ) in a question expression for example « 0 ? ({ printf("1"); }): ({ printf("1"); }); », the type-checker fails. |
---|
Steps To Reproduce | frama-c ex_stmt_exp.c -kernel-debug 1
Should do the trick. |
---|
Additional Information | If the question expression is not a statement itself (but, for example, a right-value) then the type checking doesn't fail. |
---|
Tags | No tags attached. |
---|
|
|
Attached Files |
-
ex_stmt_expr.c (241 bytes) 2020-06-10 08:22
#include "stdio.h"
int main(int argc, char** args){
int a = 0;
0 ? a-- : a++ ; // doesn't fail
0 ? ({ a++; }): ({ a--; }) ; // fails !
int i = 0 ? ({ a++; }): ({ a--; }) ; // doesn't fail !
return 0;
}
|
---|