https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91107

--- Comment #2 from Alejandro Colomar <colomar.6.4.3 at gmail dot com> ---
Technically it can modify globals as long as that doesn't affect the state of
the program, but in this case it is affecting the state of the program, so it
isn't a pure function.

Fair enough, then the bug claim is that GCC shouldn't allow functions accepting
non-const pointers.

--- Comment #3 from Alejandro Colomar <colomar.6.4.3 at gmail dot com> ---
Technically it can modify globals as long as that doesn't affect the state of
the program, but in this case it is affecting the state of the program, so it
isn't a pure function.

Fair enough, then the bug claim is that GCC shouldn't allow functions accepting
non-const pointers.

Reply via email to