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.

Change History (3)

comment:1 by John Maddock, 10 years ago

(In [83008]) Add new macro BOOST_GCC as per #7841. Refs #7841.

comment:2 by John Maddock, 10 years ago

(In [83012]) Fix Int128 support on CUDA. Exclude BOOST_GCC from getting defined on CUDA. Refs #8048. Refs #7841.

comment:3 by John Maddock, 10 years ago

Resolution: fixed
Status: newclosed

(In [83139]) Merge changes from Trunk. Fixes #6013. Fixes #7151. Fixes #7359. Fixes #7389. Fixes #7452. Fixes #7528. Fixes #7703. Fixes #7841. Fixes #7898. Fixes #7938. Fixes #8048.

Note: See TracTickets for help on using tickets.