Quantcast

[smart_ptr][thread] Build failures

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[smart_ptr][thread] Build failures

Boost - Dev mailing list
Hi all,

I have the following compilation issues on master and develop, failing
the VS2008, VS2012, VS2013 builds for boost.test (VS2015 ok):


01-Mar-2017 09:57:43 common.mkdir ..\..\..\bin.v2\libs\thread
01-Mar-2017 09:57:43 common.mkdir ..\..\..\bin.v2\libs\thread\build
01-Mar-2017 09:57:43 common.mkdir ..\..\..\bin.v2\libs\thread\build\msvc-11
01-Mar-2017 09:57:43 common.mkdir
..\..\..\bin.v2\libs\thread\build\msvc-11\debug
01-Mar-2017 09:57:43 common.mkdir
..\..\..\bin.v2\libs\thread\build\msvc-11\debug\link-static
01-Mar-2017 09:57:43 common.mkdir
..\..\..\bin.v2\libs\thread\build\msvc-11\debug\link-static\threading-multi
01-Mar-2017 09:57:43 common.mkdir
..\..\..\bin.v2\libs\thread\build\msvc-11\debug\link-static\threading-multi\win32
01-Mar-2017 09:57:45 compile-c-c++
..\..\..\bin.v2\libs\thread\build\msvc-11\debug\link-static\threading-multi\win32\thread.obj
01-Mar-2017 09:57:45 thread.cpp
01-Mar-2017 09:57:45
D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/thread/detail/thread.hpp(486)
: warning C4067: unexpected tokens following preprocessor directive -
expected a newline
01-Mar-2017 09:57:45
D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(355)
: error C2059: syntax error : ')'
01-Mar-2017 09:57:45
D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(358)
: see reference to class template instantiation
'boost::detail::sp_less_align<T,U>' being compiled
01-Mar-2017 09:57:45
D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(357)
: error C2143: syntax error : missing ')' before ';'
01-Mar-2017 09:57:45
D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(357)
: error C2143: syntax error : missing '}' before ')'
01-Mar-2017 09:57:45
D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(357)
: error C2059: syntax error : ')'
01-Mar-2017 09:57:45
D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(357)
: error C2238: unexpected token(s) preceding ';'


Can those be quickly fixed?
Thanks,
Raffi


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [smart_ptr][thread] Build failures

Boost - Dev mailing list
On 03/01/17 12:02, Raffi Enficiaud via Boost wrote:

> Hi all,
>
> I have the following compilation issues on master and develop, failing
> the VS2008, VS2012, VS2013 builds for boost.test (VS2015 ok):
>
>
> 01-Mar-2017 09:57:43    common.mkdir ..\..\..\bin.v2\libs\thread
> 01-Mar-2017 09:57:43    common.mkdir ..\..\..\bin.v2\libs\thread\build
> 01-Mar-2017 09:57:43    common.mkdir
> ..\..\..\bin.v2\libs\thread\build\msvc-11
> 01-Mar-2017 09:57:43    common.mkdir
> ..\..\..\bin.v2\libs\thread\build\msvc-11\debug
> 01-Mar-2017 09:57:43    common.mkdir
> ..\..\..\bin.v2\libs\thread\build\msvc-11\debug\link-static
> 01-Mar-2017 09:57:43    common.mkdir
> ..\..\..\bin.v2\libs\thread\build\msvc-11\debug\link-static\threading-multi
> 01-Mar-2017 09:57:43    common.mkdir
> ..\..\..\bin.v2\libs\thread\build\msvc-11\debug\link-static\threading-multi\win32
>
> 01-Mar-2017 09:57:45    compile-c-c++
> ..\..\..\bin.v2\libs\thread\build\msvc-11\debug\link-static\threading-multi\win32\thread.obj
>
> 01-Mar-2017 09:57:45    thread.cpp
> 01-Mar-2017 09:57:45
> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/thread/detail/thread.hpp(486)
> : warning C4067: unexpected tokens following preprocessor directive -
> expected a newline

Looks like the compiler doesn't recognize alternative spelling of
boolean operators (`and` in this case), which should be keywords. The
workaround is simple: replace it with the primary spelling `&&`.

> 01-Mar-2017 09:57:45
> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(355)
> : error C2059: syntax error : ')'
> 01-Mar-2017 09:57:45
> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(358)
> : see reference to class template instantiation
> 'boost::detail::sp_less_align<T,U>' being compiled
> 01-Mar-2017 09:57:45
> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(357)
> : error C2143: syntax error : missing ')' before ';'
> 01-Mar-2017 09:57:45
> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(357)
> : error C2143: syntax error : missing '}' before ')'
> 01-Mar-2017 09:57:45
> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(357)
> : error C2059: syntax error : ')'
> 01-Mar-2017 09:57:45
> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(357)
> : error C2238: unexpected token(s) preceding ';'

This code looks correct to me. I can only guess what the compiler is
complaining about. Maybe it thinks the operator `<` is an opening angle
brace for template parameters. Can you try wrapping
`boost::alignment_of<T>::value` and `boost::alignment_of<U>::value` in
parenthesis?

In any case, I think both these issues should be reported to MS Connect.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [smart_ptr][thread] Build failures

Boost - Dev mailing list
Andrey Semashev wrote:
> > D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(355)
> > : error C2059: syntax error : ')'

> This code looks correct to me. I can only guess what the compiler is
> complaining about. Maybe it thinks the operator `<` is an opening angle
> brace for template parameters.

That's it. This is the minimal test:

template<class T> struct value
{
};

#include <boost/make_shared.hpp>

int main()
{
}

MSVC is fun.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [smart_ptr][thread] Build failures

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
Raffi Enficiaud wrote:

> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(355)
> : error C2059: syntax error : ')'

This should be fixed now.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [smart_ptr][thread] Build failures

Boost - Dev mailing list
Le 01/03/2017 à 11:09, Peter Dimov via Boost a écrit :
> Raffi Enficiaud wrote:
>
>> D:\bamboo_build_dir\SW-BCB108-VC2012W64\library\boost/smart_ptr/allocate_shared_array.hpp(355)
>> : error C2059: syntax error : ')'
>
> This should be fixed now.

works! Thanks for the light speed fix!

Raffi





_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Loading...