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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> One possible improvement can be decoration of the filename
> with non-null argument (in Glibc).

Agreed (unless Glibc wants to support nulls here, in which case it should
document it as an extension).  Another improvement is to declare fopen and
other functions that expect string arguments with attribute access read_only
(so for fopen both the file and mode arguments).  That would let GCC diagnose
calls that pass in valid pointers that don't point to strings (e.g., just
past-the-end pointers).  This would be a useful follow-up on
https://sourceware.org/bugzilla/show_bug.cgi?id=25219.

Reply via email to