https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81009
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
const qualification doesn't mean anything to the middle-end and it would be
dangerous to interpret it that way given we support more than just C as input
language. So the C FE would have to communicate this in a more explict way.
Anyway, doesn't this even apply to
void f (int *);
void g (const int* restrict p)
{
int x = *p;
f ((int *)p); // f() cannot modify *p here
if (x != *p) // cannot be true
__builtin_abort ();
}
?