Undefined behavior is something that you will avoid - of course, only if you know the language pretty well.
UB is basically impossible to avoid in practice--that is why the Linux kernel forced GCC to add a bunch of flags to "do what I mean", making UB defined in those cases.
UB is basically impossible to avoid in practice--that is why the Linux kernel forced GCC to add a bunch of flags to "do what I mean", making UB defined in those cases.