2 Copyright Rene Rivera 2008-2015
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_PREDEF_COMPILER_GCC_H
9 #define BOOST_PREDEF_COMPILER_GCC_H
11 /* Other compilers that emulate this one need to be detected first. */
13 #include <boost/predef/compiler/clang.h>
15 #include <boost/predef/version_number.h>
16 #include <boost/predef/make.h>
19 [heading `BOOST_COMP_GNUC`]
21 [@http://en.wikipedia.org/wiki/GNU_Compiler_Collection Gnu GCC C/C++] compiler.
22 Version number available as major, minor, and patch (if available).
25 [[__predef_symbol__] [__predef_version__]]
27 [[`__GNUC__`] [__predef_detection__]]
29 [[`__GNUC__`, `__GNUC_MINOR__`, `__GNUC_PATCHLEVEL__`] [V.R.P]]
30 [[`__GNUC__`, `__GNUC_MINOR__`] [V.R.0]]
34 #define BOOST_COMP_GNUC BOOST_VERSION_NUMBER_NOT_AVAILABLE
37 # if !defined(BOOST_COMP_GNUC_DETECTION) && defined(__GNUC_PATCHLEVEL__)
38 # define BOOST_COMP_GNUC_DETECTION \
39 BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__)
41 # if !defined(BOOST_COMP_GNUC_DETECTION)
42 # define BOOST_COMP_GNUC_DETECTION \
43 BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,0)
47 #ifdef BOOST_COMP_GNUC_DETECTION
48 # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
49 # define BOOST_COMP_GNUC_EMULATED BOOST_COMP_GNUC_DETECTION
51 # undef BOOST_COMP_GNUC
52 # define BOOST_COMP_GNUC BOOST_COMP_GNUC_DETECTION
54 # define BOOST_COMP_GNUC_AVAILABLE
55 # include <boost/predef/detail/comp_detected.h>
58 #define BOOST_COMP_GNUC_NAME "Gnu GCC C/C++"
62 #include <boost/predef/detail/test.h>
63 BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC,BOOST_COMP_GNUC_NAME)
65 #ifdef BOOST_COMP_GNUC_EMULATED
66 #include <boost/predef/detail/test.h>
67 BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC_EMULATED,BOOST_COMP_GNUC_NAME)