-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Labels
bugThis labels issues that are bugs.This labels issues that are bugs.priority:2This labels bugs that require immediate attention.This labels bugs that require immediate attention.
Description
This example fails bounds checking after PR #903 with the error message error: it is not possible to prove argument meets declared bounds for 2nd parameter.
void foo(_Array_ptr<char> dest : count(n), _Array_ptr<char> src : count(n), int n);
struct bar {
_Array_ptr<char> x : count(l);
int l;
};
void test(_Array_ptr<char> a : count(c), int c) {
struct bar b = {a, c};
foo(a, b.x, c);
}Before the PR was merged, the compiler gave a warning instead. warning: cannot prove argument meets declared bounds for 2nd parameter. Is this change intentional? If so, what would be the correct way to write the above so that is accepted?
Metadata
Metadata
Assignees
Labels
bugThis labels issues that are bugs.This labels issues that are bugs.priority:2This labels bugs that require immediate attention.This labels bugs that require immediate attention.