This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/58689] Enhance returns_nonnull
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 Oct 2013 16:50:11 +0000
- Subject: [Bug tree-optimization/58689] Enhance returns_nonnull
- Auto-submitted: auto-generated
- References: <bug-58689-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58689
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, guess the warning could have many false positives.
Anyway, if you code for such warning, you could as well just assume the
attribute on the functions and if you set it before IPA, perhaps you could even
propagate it during IPA, then functions can make use of those.
Though, such implicit attributes unlike explicit ones could be used (or even
set) only if decl_binds_to_current_def_p (decl), otherwise you can very well
have
void *foo (void) { return "abc"; } in current CU and foo be preempted during
dynamic linking and the preempted foo could return NULL.