Fix for #830 supplied by UvB

This commit is contained in:
IrgendwerA8
2019-04-22 17:40:09 +02:00
committed by Oliver Schmidt
parent 14d8f3d81d
commit 37f80534c9
2 changed files with 56 additions and 16 deletions

13
test/val/bug830.c Normal file
View File

@@ -0,0 +1,13 @@
#include "unittest.h"
char test[1];
char *dst = &test[0];
TEST
{
char src = 0;
*dst = (src == 0) ? 42 : src;
ASSERT_AreEqual(42, *dst, "%u", "Incorrect ternary expression evaluation!");
}
ENDTEST