1dSyuY9L hereThe standard(s) state very clear that it is UB if you try to write to a string literal.However some extensions allow it.It's not the 'case' with GCC; it's the 'case' with every compiler that allows it.