Why is ptrdiff_t a volatile?

Toby Douglass toby@winterflaw.net
Mon Oct 1 07:24:00 GMT 2018


Good morning/afternoon/evening, all.

I've been writing some position independent data structure code.

As such, I've been using ptrdiff_t.

I've just noticed, while compiling, that my GCC (6.3.0) has ptrdiff_t as 
a volatile long int.

It is not clear to me why this type would be volatile.

I've googled, no luck.

So, why volatile?

Anyone know the rationale?



More information about the Gcc-help mailing list