You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the following code in test/CheckedC/inferred-bounds/bounds-context.c:
void f(char p nt_checked[0] : count(len), unsigned len) {}
The compiler currently allows this because p has a declared bounds of count(len). But this declaration conflicts with the empty size declaration which is illegal.
Also if we remove the declared bounds then the compiler asserts.
void f(char p nt_checked[0]) {}
clang: /usr/magrang/master/src/clang/lib/Sema/BoundsUtils.cpp:57:
static clang::BoundsExpr* clang::BoundsUtil::CreateBoundsForArrayType(clang::Sema&, clang::QualType, bool):
Assertion `size.uge(1) && "must have at least one element"' failed.
The text was updated successfully, but these errors were encountered:
We have the following code in test/CheckedC/inferred-bounds/bounds-context.c:
void f(char p nt_checked[0] : count(len), unsigned len) {}
The compiler currently allows this because p has a declared bounds of count(len). But this declaration conflicts with the empty size declaration which is illegal.
Also if we remove the declared bounds then the compiler asserts.
void f(char p nt_checked[0]) {}
clang: /usr/magrang/master/src/clang/lib/Sema/BoundsUtils.cpp:57:
static clang::BoundsExpr* clang::BoundsUtil::CreateBoundsForArrayType(clang::Sema&, clang::QualType, bool):
Assertion `size.uge(1) && "must have at least one element"' failed.
We have the following code in
test/CheckedC/inferred-bounds/bounds-context.c
:void f(char p nt_checked[0] : count(len), unsigned len) {}
The compiler currently allows this because
p
has a declared bounds ofcount(len)
. But this declaration conflicts with the empty size declaration which is illegal.Also if we remove the declared bounds then the compiler asserts.
void f(char p nt_checked[0]) {}
The text was updated successfully, but these errors were encountered: