This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60765] Function attributes ignored for pointer-to-member-function parameters
- From: "patrick at parcs dot ath.cx" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Apr 2014 23:18:06 +0000
- Subject: [Bug c++/60765] Function attributes ignored for pointer-to-member-function parameters
- Auto-submitted: auto-generated
- References: <bug-60765-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60765
--- Comment #1 from patrick at parcs dot ath.cx ---
Oops, that warning is because I am currently compiling with G++ 4.8, which
doesn't implement returns_nonnull. Here's a better test case:
$ cat this.cc
struct Foo;
void foo (void (Foo::*) () __attribute__ ((nonnull)));
void bar (void (*) () __attribute__ ((nonnull)));
$ g++ this.cc c
this.cc:3:52: warning: ânonnullâ attribute only applies to function types
[-Wattributes]
void foo (void (Foo::*) () __attribute__ ((nonnull)));
^