void func (int a [static 10]) {if (a == null) {/ * This branch can be customized with printf ("% d", a [1]); / * Cause UB * /}
However, this means C11 6.7.6.3/7 is defined as meaning , not bound , which means that the function has been called incorrectly, the compiler should not continue diagnosing. In fact, compiler should not cancel , unless it is proven that UB is in all branches, for example:
int main () (function NULL); // UB int b [9]; Ceremony (b); // UB}
Why did the standard not make this a single (hence a clinical requirement)?
Secondary Question: Why the still
was ignored in the prototype (6.7.6.3/13), rather than being a part of the signature? It seems misleading to allow the prototype to be included in it, but the function body does not, and vice versa.
No comments:
Post a Comment