https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86053
--- Comment #2 from olivier at wuillemin dot fr --- Resolved ? I find your answer a little bit short. Concerning the nonnull attribute, in glibc manual i didn't find any requirement concerning pointer arguments neither in glibc doc : size_t fwrite(const void *data, size_t size, size_t count, FILE *stream) Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt | See Section 1.2.2.1 [POSIX Safety Concepts], page 2. This function writes up to count objects of size size from the array data, to the stream stream. The return value is normally count, if the call succeeds. Any other value indicates some sort of error, such as running out of space. Neither in glibc's stdio.h source : /* Write chunks of generic data to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); For information VS studio indicates that function generate a runtime parameter error in case of null pointer. And if non null pointers are mandatorty for fwrite why they are not mandatory for fread ? Also, this doesn't explain why local declaration of a function is overloaded with built-in declaration.