...
| Code Block | ||||
|---|---|---|---|---|
| ||||
#include <stdio.h>
struct X { int a[6]; };
struct X addressee(void) {
struct X result = { { 1, 2, 3, 4, 5, 6 } };
return result;
}
int main(void) {
struct X my_x = addressee();
printf("%x", ++(my_x.a[0]));
return 0;
}
|
Exceptions
EXP35-C-EX0: Since this behavior is well-defined in C11, programs may take advantage of it as long as they require that a C11 or newer compiler is always used to compile them.
Risk Assessment
Attempting to modify an array or access it after its lifetime expires may result in erroneous program behavior.
...