I wrote the following piece of code in order to test could it modify the constant *c* trough a pointer *a*. I have tested it in Clang, VC and GCC compilers and observed that with both VC and GCC code works as I would expect, it prints 6 to the standard output, while when I compile it with Clang the value is not getting modified, and 5 is printed to the standard output.

```
#include <stdio.h>

int main(void) {
  const int c = 5;
  int* a  = (int*) &c;
  *a = 6;
  printf("%d", c);
  return 0;
}

```

I am wondering is there any well known explanation for this, or it has to do with internals of the compilers and other stuff that would be hard to analyze. Thanks everyone in advance!