Added TODO test for better pointer aliasing with memset

This commit is contained in:
Daniel Marjamäki 2010-01-17 08:43:10 +01:00
parent 70dbb8ba17
commit 3aa67cd537
1 changed files with 12 additions and 0 deletions

View File

@ -2780,6 +2780,18 @@ private:
ASSERT_EQUALS(expected, tok(code)); ASSERT_EQUALS(expected, tok(code));
} }
{
const char code[] = "int a[10];\n"
"int *b = a;\n"
"memset(b,0,sizeof(a));";
const char expected[] = "int a [ 10 ] ; "
"int * b ; b = a ; "
"memset ( a , 0 , 40 ) ;";
TODO_ASSERT_EQUALS(expected, tok(code));
}
} }