This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/60765] Function attributes ignored for pointer-to-member-function parameters


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)));
                                                    ^

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]