https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62189

            Bug ID: 62189
           Summary: Different result between 4.6 and 4.9.1
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pangbw at gmail dot com

For this program, I get different result for G++ 4.6.3 and G++ 4.9.1, and I
have a C++ test suite which thinks 4.6.3 is right:

#include <functional>                                                          
               #include <iostream>                                             
                              int (*pfb_)() = nullptr;                         
                                             int main()                         
{   
  std::function< int() > e (pfb_);
  std::cout << !!e << std::endl;
  return 0;                                                                     
}

For 4.6.3 the output is 1 but for 4.9.1 the output is 0.

Reply via email to