Boost logo

Boost :

Subject: Re: [boost] [predef] Using predef-check on 'develop' problem
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-05-25 22:22:26


On 5/25/2015 9:43 PM, Aparna Kumta wrote:
> On 05/25/15 18:25, Edward Diener wrote:
>> On 5/18/2015 10:57 PM, Rene Rivera wrote:
>>> On Mon, May 18, 2015 at 9:38 PM, Rene Rivera <grafikrobot_at_[hidden]>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Mon, May 18, 2015 at 8:57 PM, Edward Diener
>>>> <eldiener_at_[hidden]>
>>>> wrote:
>>>>
>>>>> On 5/15/2015 4:38 PM, Rene Rivera wrote:
>>>>>
>>>>>> On Fri, May 15, 2015 at 3:31 PM, Edward Diener
>>>>>> <eldiener_at_[hidden]>
>>>>>> wrote:
>>>>>>
>>>>>> In a jam file I have for a run test a predef-check which looks
>>>>>> like:
>>>>>>>
>>>>>>> run test_variadic_macro.cpp : : : [ predef-check "BOOST_COMP_GNUC >=
>>>>>>> 4.3"
>>>>>>> "BOOST_OS_QNX == 0" : : <cxxflags>-std=c++0x ] ;
>>>>>>>
>>>>>>> When running on QNX with the gcc version greater than 4.3 I would
>>>>>>> expect
>>>>>>> that -std=c++0x would not be added as a C++ compile parameter to the
>>>>>>> run.
>>>>>>> Yet it is being added to the run.
>>>>>>>
>>>>>>> Another test confirms that BOOST_OS_QNX is indeed being set to a
>>>>>>> non-zero
>>>>>>> value.
>>>>>>>
>>>>>>> Is there a bug in predef-check ? Am I using it incorrectly ?
>>>>>>>
>>>>>>>
>>>>>> It looks like a bug to me.. I'll investigate further tonight.
>>>>>>
>>>>>>
>>>>> What I am also seeing, besides the QNX problem, is that for the
>>>>> Android
>>>>> OS 'develop' tests, using the same predef-check as above, both
>>>>> conditions
>>>>> are true, yet the -std=c++0x is not on the command line of the tests.
>>>>
>>>>
>>>> FYI.. I haven't stopped working on fixing this. And I have an almost
>>>> working resolution.
>>>>
>>>
>>> And it's done, and checked into the predef develop branch. I need to
>>> update
>>> and regenerate docs before I can merge to master though. So things will
>>> only start working on the develop super-project.
>>
>> I have discovered a problem with predef in the 'develop' regression
>> tests at
>> http://www.boost.org/development/tests/develop/developer/summary.html
>> for the SunOS operating system and Oracle ( aka Sun ) C++.
>>
>> If you look at the predef info_as_cpp tests, such as at
>> http://www.boost.org/development/tests/develop/developer/output/NA-QNX650-SP1-ARM-boost-bin-v2-libs-predef-test-info_as_cpp-test-qcc-4-4-2_arm-debug-debug-symbols-off.html,
>> you will see that no compiler is being detected.
>>
>> Yet if you look at my VMD test, called test_variadic_macro, at
>> http://www.boost.org/development/tests/develop/developer/output/oracle-intel-S2-stlport4-boost-bin-v2-libs-vmd-test-test_variadic_macro-test-sun-stlport4-release-threading-multi.html,
>> you can see that I am picking up that '__SUNPRO_CC' is defined.
> The error I see in this case is
>
> ../libs/vmd/test/test_variadic_macro.cxx(25): No variadic macro support:
> __SUNPRO_CC defined. in function '(unknown)'
>
> Oracle Solaris Studio does support variadic macros.
> In libs/preprocessor/include/boost/preprocessor/config/config.hpp
> line# 73-77, seems incorrect for SUNPRO_CC and
> BOOST_PP_VARIADICS should be set to 1.
>
> 73 # define BOOST_PP_VARIADICS_MSVC 0
> 74 # if !defined BOOST_PP_VARIADICS
> 75 # /* variadic support explicitly disabled for all untested
> compilers */
> 76 # if defined __GCCXML__ || defined __CUDACC__ || defined
> __PATHSCALE__ || defined __DMC__ || de
> fined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ ||
> defined __SUNPRO_CC || defined __HP_a
> CC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined
> __IBMCPP__ || defined __PGI
> 77 # define BOOST_PP_VARIADICS 0
>
> Should I submit a PR for this change?

No need. I am aware of it. I need to determine the value of __SUNPRO_CC
or above which can support variadic macros, and then I will make the
change and update it in the preprocessor library. I am pretty sure it is
version 12.3 and above, and I know the __SUNPRO_CC value for that
version (0x5120).


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk