[Bug libstdc++/58825] New: endless loop compiling nested bind expression

joerg.richter@pdv-fs.de gcc-bugzilla@gcc.gnu.org
Mon Oct 21 12:08:00 GMT 2013


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

            Bug ID: 58825
           Summary: endless loop compiling nested bind expression
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joerg.richter@pdv-fs.de

g++ -std=c++11 -x c++ -c - <<EOF
#include <functional>
using namespace std;
struct Win
{
    void setMini( bool );
    bool isMini();
};
bool neg( bool val );
void foo( Win* w )
{
  function<void()> a = bind( &Win::setMini, w, bind( neg, bind( &Win::isMini, w
) ) );
}
EOF


####################

Works with GCC 4.7.3

IMHO there are two bugs. One in libstdc++ that valid code is rejected. The
other one that the error reporting does not stop.



More information about the Gcc-bugs mailing list