K
Kelvin Moss
Hi group,
In C++ it's undefined behavior if one tries to un-const the constness
of a const variable with const_cast<>.
I want to know if the same holds good in C too.
E.g.
const char *s = "abc";
Later, is trying to do (char *) s legal ?
I will appreciate any references to the Standard.
Thanks.
In C++ it's undefined behavior if one tries to un-const the constness
of a const variable with const_cast<>.
I want to know if the same holds good in C too.
E.g.
const char *s = "abc";
Later, is trying to do (char *) s legal ?
I will appreciate any references to the Standard.
Thanks.