https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65712
--- Comment #2 from Albert Netymk ---
@Andrew Pinski Could you provide the ref for const and pure attribute? It's not
mentioned in the
[spec](http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_self.html),
or the source code of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65712
--- Comment #1 from Andrew Pinski ---
I think this is invalid as pthread_self is marked as const or pure which means
it does not change with respect of function calls.
If anything is a deficiency in POSIX.