Re:Everything you need to know about pointers in C (2010)
by colejohnson66 on Tuesday September 15, 2020 @06:46AM
(#24479747)
That answer does mention that GCC permits it as an extension. If the author uses GCC, maybe that’s where the confusion comes from?
Re:Everything you need to know about pointers in C (2010)
by jwilk on Tuesday September 15, 2020 @09:59AM
(#24481241)
But then he also writes that "sizeof(void) is illegal".
OTOH, GCC documentation says "sizeof is also allowed on void and on function types, and returns 1".
Re:Everything you need to know about pointers in C (2010)
by MaxBarraclough on Tuesday September 15, 2020 @06:30AM
(#24479673)
An unfortunate typo there: void pointer arithmetic is not allowed.
No, void pointer arithmetic is not allowed by the C standard: https://stackoverflow.com/questions/3523145/pointer-arithmet...