[Bug bootstrap/78859] profiledbootstrap failure caused by -Werror=nonnull
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 19 13:46:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78859
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #0)
> There are 2 (so far) errors reported:
>
> 1) gengtype.c:
>
> ../../gcc/gengtype.c: In function ‘const char*
> get_file_srcdir_relative_path(const input_file*)’:
> ../../gcc/gengtype.c:1760:14: error: argument 1 null where non-null expected
> [-Werror=nonnull]
> if (strlen (f) > srcdir_len
> ~~~~~~~^~~
>
> This is real bug, following patch fixes that:
Only iff get_file_srcdir_relative_path is ever called with NULL inpf. If not,
it is a false positive. As strlen would crash if it is called with NULL and it
has not been reported yet, it clearly is not.
More information about the Gcc-bugs
mailing list