[Bug c++/60764] New: Bogus -Wnonnull warning against constructors declared with __attribute__ ((nonnull(1)))
patrick at parcs dot ath.cx
gcc-bugzilla@gcc.gnu.org
Fri Apr 4 23:05:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60764
Bug ID: 60764
Summary: Bogus -Wnonnull warning against constructors declared
with __attribute__ ((nonnull(1)))
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: patrick at parcs dot ath.cx
$ cat this.cc
struct Foo
{
Foo () __attribute__ ((nonnull(1)));
};
void
foo ()
{
Foo ();
}
$ g++ -Wnonnull -c this.cc
this.cc: In function ‘void foo()’:
this.cc:9:8: warning: null argument where non-null required (argument 1)
[-Wnonnull]
Foo ();
^
More information about the Gcc-bugs
mailing list