VS Optimierungscompiler



  • Hi!

    Mit dem VC++ Express '05 mit boost v1.35.0 stürzt mir ständig der Optimierungscompiler ab. Als Minimalbeispiel:

    #include <boost/bind.hpp>
    
    struct Cl
    {
    	void foo(int*)
    	{
    	}
    };
    
    int main()
    {
    	Cl c;
    	boost::bind( &Cl::foo, &c );
    }
    

    Ist das nur bei mir so oder muss ich einfach nur neu installieren? Klappt das bei irgendwem mit VC++ 05-Express (boost-Version egal)?



  • Auch VC++2005 Express

    -------------- Build: Debug in test ---------------
    
    main.cpp
    E:\boost_1_34_0\boost/bind.hpp(1575) : warning C4180: qualifier applied to function type has no meaning; ignored
            E:\boost_1_34_0\boost/bind.hpp(1609) : see reference to class template instantiation 'boost::_bi::add_cref<Pm,I>' being compiled
            with
            [
                Pm=void (__thiscall Cl::* )(int *),
                I=1
            ]
            main.cpp(13) : see reference to class template instantiation 'boost::_bi::dm_result<Pm,A1>' being compiled
            with
            [
                Pm=void (__thiscall Cl::* )(int *),
                A1=Cl *
            ]
    E:\boost_1_34_0\boost/mem_fn.hpp(318) : warning C4180: qualifier applied to function type has no meaning; ignored
            E:\boost_1_34_0\boost/bind/bind_template.hpp(225) : see reference to class template instantiation 'boost::_mfi::dm<R,T>' being compiled
            with
            [
                R=void (int *),
                T=Cl
            ]
    Internal Compiler Error in E:\Programme\MSVC++\VC\bin\cl.exe.  You will be prompted to send an error report to Microsoft later.
    Process terminated with status 1 (0 minutes, 4 seconds)
    0 errors, 2 warnings
    


  • Geht es darum dass der Compiler statt eine sinnvolle Fehlermeldung zu produzieren abstürzt? Dann ja, passiert hier auch.

    Aber nach Korrektur des Problems kompiliert es:

    #include <boost/bind.hpp>
    
    struct Cl
    {
        void foo(int*)
        {
        }
    };
    
    int main()
    {
        Cl c;
        boost::bind( &Cl::foo, &c, _1 );
    }
    


  • Ok, bin ja froh, dass es da nicht nur mir so geht 🙂

    LordJaxom schrieb:

    Aber nach Korrektur des Problems kompiliert es

    Cool, hatte viel ausprobiert, aber das nicht!

    Danke euch 🙂



  • Stefan schrieb:

    Auch VC++2005 Express

    ....
    

    gleiche Warnungen mit VS 2008 SP1, aber kein Abbruch der Compilierung.
    In diesem Falle bevorzuge ich allerdings ein ICE gegenüber einer unsinnigen Warnung, und fehlerhaftem produziertem Code.


Anmelden zum Antworten