Invalid use of 'void'
Florian Weimer
fweimer@redhat.com
Tue May 19 11:07:24 GMT 2020
* Jonathan Wakely via Gcc-help:
> And G++ does allow arithmetic involving a void* and an integer, e.g.
> p1 - 32 or p2 + 64, it doesn't allow subtracting one void* from the
> other. So the extension is only partially supported for C++. We should
> probably document that.
And it's a regression, GCC 2.7.2.3 can compile it, but GCC 2.95.2
cannot. (Of course, I'm only half-serious here.)
The problem I see with such extensions in C++ is that they could alter
SFINAE outcomes. But maybe that's less important these days because
people don't write custom type traits anymore.
Thanks,
Florian
More information about the Gcc-help
mailing list