Boost logo

Boost :

Subject: Re: [boost] [predef] Status and review results?
From: Ioannis Papadopoulos (ipapadop_at_[hidden])
Date: 2013-05-02 14:37:19


On 04/27/2013 11:20 AM, Rene Rivera wrote:
> On Sat, Apr 27, 2013 at 1:32 AM, Ioannis Papadopoulos <ipapadop_at_[hidden]
>> wrote:
>
>> On 04/21/2013 04:00 PM, Rene Rivera wrote:
>>
>>> Just a quick message to mention that I've finished all the review related
>>> changes to the Predef library. And done some of the future tasks on the
>>> library. In particular the addition of endianness definitions and the
>>> moving of MinGW as a platform instead of a compiler (and hence the
>>> addition
>>> of BOOST_PLAT category of macros.
>>>
>>> And the one question I have is.. When will the review results of the
>>> library be decided on? I ask for two reasons. One, the obvious, is just to
>>> know if it's accepted or not. And to know if it's not accepted and hence
>>> that I should spend time to recreate a "boost/detail/endian.hpp" header
>>> that implements the Predef logic for endian detection.
>>>
>>> Note the project move to Github earlier this year (in preparation for the
>>> Boost git move). You can find the project at <
>>> https://github.com/**grafikrobot/boost-predef>>,
>>> and browse the current
>>> documentation at <
http://tinyurl.com/cqqhhev>.
>>>
>>>
>> Can I suggest some additions?
>>
>> 1) Cray compiler:
>>
>> The cray compiler defines _CRAYC to detect the compiler, _RELEASE for the
>> major release level, _RELEASE_MINOR for the minor release level and
>> _RELEASE_STRING the above as a string.
>>
>> From: http://docs.cray.com/cgi-bin/**craydoc.cgi?mode=View;id=S-**
>> 2179-81;idx=books_search;this_**sort=title;q=;type=books;**
>> title=Cray%20C%20and%20C%2b%**2b%20Reference%20Manual<http://docs.cray.com/cgi-bin/craydoc.cgi?mode=View;id=S-2179-81;idx=books_search;this_sort=title;q=;type=books;title=Cray%20C%20and%20C%2b%2b%20Reference%20Manual>
>
>
> OK.. Added an issues <https://github.com/grafikrobot/boost-predef/issues/8>.
>
> 2) Cray platforms and IBM Blue Gene:
>>
>> A good set of their macros is here (I have used those with success):
>> https://wiki.alcf.anl.gov/**parts/index.php/Preprocessor_**Macros>
>>
>> I can provide patches in 1-2 weeks if you prefer that.
>
>
> Patches are certainly welcome.. Especially since that way the code will be
> tested ahead of time. I'll work on formalizing the PLAT defs <
>
https://github.com/grafikrobot/boost-predef/issues/5> to make it easier for
> those patches though. I added issues for those platforms also <
> https://github.com/grafikrobot/boost-predef/issues/7>, <
> https://github.com/grafikrobot/boost-predef/issues/6>.
>
>

While making the patches for I noticed the following (using
test/info_as_cpp.cpp) :

For Intel 13:

** Detected **
BOOST_ARCH_X86 = 1 (0,0,1) | Intel x86
BOOST_ARCH_X86_32 = 60000000 (6,0,0) | Intel x86-32
BOOST_ARCH_X86_64 = 1 (0,0,1) | Intel x86-64
BOOST_COMP_EDG = 40400000 (4,4,0) | EDG C++ Frontend
BOOST_COMP_GNUC = 40700000 (4,7,0) | Gnu GCC C/C++
BOOST_COMP_INTEL = 30100000 (3,1,0) | Intel C/C++
BOOST_ENDIAN_LITTLE_BYTE = 1 (0,0,1) | Byte-Swapped Little-Endian
BOOST_LANG_STDC = 1 (0,0,1) | Standard C
BOOST_LANG_STDCPP = 271100001 (27,11,1) | Standard C++
BOOST_LIB_C_GNU = 21500000 (2,15,0) | GNU
BOOST_LIB_STD_GNU = 420900021 (42,9,21) | GNU
BOOST_OS_LINUX = 1 (0,0,1) | Linux
BOOST_OS_UNIX = 1 (0,0,1) | Unix Environment

It detects three different architectures (but it does not say which one
I am using).

It also incorrectly says that it is GCC compiler. This is because Intel
likes to do that for compatibility with GCC (I believe clang also
defines __GNUC_).

This leads to the question that if another macro is required that says
that the compiler may identify itself as a GCC (or whatever else).


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