[Bug c/97274] Need ability to ensure no warning about tmpnam

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 2 19:06:30 GMT 2020


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |MOVED

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Eyal Rozenberg from comment #2)
> (In reply to Jonathan Wakely from comment #1)
> > The linker issues the warning, because the symbol in glibc is annotated to
> > cause a warning. It has nothing to do with GCC.
> 
> Hmm. There's still a question of responsibility:
> 
> * Supposing at least some part of GCC is aware that a symbol used is

It's not aware, and can't be aware. GCC never sees the contents of libc.so
where the .gnu.warning section is.

> annotated in the library to cause a warning - should it not offer some
> mechanism for circumventing that warning? Seeing how it's a "legitimate"
> standard library function?

GCC has no way to know that, so your supposition is false.

> * Otherwise, would this be a bug to file against the linker, or against the
> library?

If you want a way to tell the linker not to issue such warnings, you need to
request that from the linker. There's no way to provide an option to glibc to
tell it to remove the annotation from the libc.so binary before you link to it. 

This is not a GCC issue.


More information about the Gcc-bugs mailing list