Comment Comment by VorpalWay It makes no sense to me that C and C++ didn't require a diagnostic for this, rather you hit UB.I know that at least modern GCC and Clang will warn and/or error for this (not sure which as I use -Werror), but still, this is pointless UB to have.And no, in this case I don't buy that a C90 compiler would have been unable to check this. parent VorpalWay 1 month ago
I know that at least modern GCC and Clang will warn and/or error for this (not sure which as I use -Werror), but still, this is pointless UB to have.
And no, in this case I don't buy that a C90 compiler would have been unable to check this.