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

Reply via email to