Opened 13 years ago

Closed 13 years ago

#3047 closed Patches (fixed)

Potential redifinitions in visualc of BOOST_DISABLE_WIN32 and BOOST_NO_RTTI

Reported by: nstewart@… Owned by: John Maddock
Milestone: Boost 1.40.0 Component: config
Version: Boost 1.38.0 Severity: Cosmetic
Keywords: define, redefinition, BOOST_DISABLE_WIN32, BOOST_NO_RTTI Cc:

Description

There is some auto-detection logic in boost-1.38.0/boost/config/compiler/visualc.hpp to define BOOST_DISABLE_WIN32 and BOOST_NO_RTTI, depending on the environment.

In our setup BOOST_NO_RTTI is already defined across all platform toolchains, and the logic results in a warning:

.../boost-1.38.0\boost/config/compiler/visualc.hpp(136) : warning C4005: 'BOOST_NO_RTTI' : macro redefinition

304 command-line arguments : see previous definition of 'BOOST_NO_RTTI'

This proposes patch will prevent the redefinition of these defines, if they are already defined.

The issue appears to be unresolved in 1.39.0

The suggested patch w.r.t. 1.38.0:

132c132 < #ifndef _MSC_EXTENSIONS ---

#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)

135c135 < #ifndef _CPPRTTI ---

#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)

Attachments (2)

visualc.hpp (6.7 KB ) - added by anonymous 13 years ago.
boost_config_compiler_visualc.patch (194 bytes ) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (3)

by anonymous, 13 years ago

Attachment: visualc.hpp added

by anonymous, 13 years ago

comment:1 by John Maddock, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in revision #53107.

Note: See TracTickets for help on using tickets.