This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81824] Warn for missing attributes with function aliases
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Aug 2017 22:32:59 +0000
- Subject: [Bug c/81824] Warn for missing attributes with function aliases
- Auto-submitted: auto-generated
- References: <bug-81824-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81824
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=81854
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
The challenge here is that the alias target may not be in scope at the point of
the alias declaration, so while the test case in comment #0 could be detected
by enhancing the handle_alias_attribute function in c-family/c-attribs.c, one
where the declaration order is reversed as in the following could not be:
void foo (void) __attribute__ ((nothrow, weak, alias ("__foo")));
void __foo (void) { }
Bug 81854 suggests that there is a way to detect this in handle_alias_pairs()
in cgraphunit.c.