This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51676] -Wsuggest-attribute={pure,const} should give line number of declaration, not definition
- From: "b.r.longbons at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 02 Jan 2012 20:27:41 +0000
- Subject: [Bug c/51676] -Wsuggest-attribute={pure,const} should give line number of declaration, not definition
- Auto-submitted: auto-generated
- References: <bug-51676-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51676
--- Comment #3 from Ben Longbons <b.r.longbons at gmail dot com> 2012-01-02 20:27:41 UTC ---
I'm not familiar with GCC internals, but would it be as easy as adding and
using a second field for "first declaration"?
If the first (possibly only) declaration is the definition, then just remember
it.
If there are one or more declarations before the definition, then just remember
the first one.