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 libstdc++/58825] New: endless loop compiling nested bind expression


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.


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