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++/36760] New: Simple std::bind use causes warnings with -Wextra


Consider:

  #include <functional>
  void f() {}
  void g() { std::bind(&f)(); }

Compiling this with g++-svn -c -std=c++0x -Wextra gives:

  In file included from
/home/eelis/soft/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/functional:75,
                 from t.cpp:1:
/home/eelis/soft/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/functional:
In function ?void g()?:
/home/eelis/soft/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/functional:1226:
warning: type qualifiers ignored on function return type
/home/eelis/soft/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/functional:1213:
warning: type qualifiers ignored on function return type
/home/eelis/soft/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/functional:1201:
warning: type qualifiers ignored on function return type


-- 
           Summary: Simple std::bind use causes warnings with -Wextra
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc-bugzilla at contacts dot eelis dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36760


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