https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77624
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 39647 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39647&action=edit gcc7-pr77624-alt.patch Alternate untested patch. The problem right now is that because these intrinsics are prototyped, whatever type user used is implicitly cast to const volatile *, and because of the implicit cast it is hard to find out what is implicit and what is explicit conversion. This patch attempts to make the arg non-prototyped, and only checked afterwards. In the quick testing, it seems to work for C, but not for C++, which ignores changes to argarray arguments.