Looking for counterexample: My C code never uses pointer casts, volatile, memcpy (etc.), unions, so it never violates strict aliasing rules.
Such a rule would be "the result of malloc is immediately assigned to a pointer-to-T where T is a non-void type", maybe?
-
-
“a complete type”, otherwise: int (*p)[] = malloc(…); int (*q)[5] = p; int (*r)[6] = p; See http://stackoverflow.com/questions/40606989/gcc-and-strict-aliasing-between-arrays-of-a-same-type …
-
although when this was pointed out GCC devs changed the behavior: https://gcc.gnu.org/ml/gcc/2016-11/msg00111.html …
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.