[Bug tree-optimization/102329] pointer "maybe uninitialized" right after assignment

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 15 15:44:58 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102329

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
The text of the warning should be adjusted to make it clear that it's the
object the pointer points to that may be used uninitialized by the function. 
For functions like pthread_getspecific() and pthread_setspecific() that do not
access the object GCC provides attribute access none to suppress the warning:

  extern __attribute__ ((access (none, 1))) void f1 (const void *pointer);


More information about the Gcc-bugs mailing list