Opened 10 years ago
Closed 10 years ago
#7841 closed Feature Requests (fixed)
A macro to detect real GCC
Reported by: | Andrey Semashev | Owned by: | John Maddock |
---|---|---|---|
Milestone: | To Be Determined | Component: | config |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Please provide a macro to detect the real GCC. Different compilers try to emulate GCC by defining GNUC and similar macros, which makes it difficult to work around GCC-specific bugs. The macro can expand to the GCC version number, like BOOST_MSVC:
#define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
This macro only has to be defined in compiler/gcc.hpp.
Note:
See TracTickets
for help on using tickets.
(In [83008]) Add new macro BOOST_GCC as per #7841. Refs #7841.