[modernization][skelly] Surprising changes
I was going through recent Boost.Spirit changes and I was surprised to see this code: #if (defined(BOOST_MSVC) && (BOOST_MSVC < 1310)) \ || (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) \ || (defined(__GNUC__) && (__GNUC__ < 3)) \ || (defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ < 1)) # error "Compiler not supported. See note in <boost/spirit/core/config.hpp>" #else // Pass... Compiler supported. #endif modified into this code: #if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) # error "Compiler not supported. See note in <boost/spirit/core/config.hpp>" #else // Pass... Compiler supported. #endif The whole point of the check is to detect unsupported compilers. It seems the modernization changes do not take into account the context in which they are done. To Stephen Kelly: I would like to suggest going over your modernization commits looking for unwanted changes like this one, and reverting them. I have already revisited your modifications to Boost.Spirit and found all changes but the one I mentioned to be valid ones (thank you for those!). Regards, -- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com
On 10/22/2013 02:29 AM, Agustín K-ballo Bergé wrote:
I was going through recent Boost.Spirit changes and I was surprised to see this code:
#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1310)) \ || (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) \ || (defined(__GNUC__) && (__GNUC__ < 3)) \ || (defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ < 1)) # error "Compiler not supported. See note in <boost/spirit/core/config.hpp>" #else // Pass... Compiler supported. #endif
modified into this code:
#if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) # error "Compiler not supported. See note in <boost/spirit/core/config.hpp>" #else // Pass... Compiler supported. #endif
The whole point of the check is to detect unsupported compilers. It seems the modernization changes do not take into account the context in which they are done.
I made that change deliberately. The checks I removed are redundant. Earlier in that file, boost/config.hpp is included, so if an unsupported compiler is used, it will fail already. Thanks, Steve.
participants (2)
-
Agustín K-ballo Bergé
-
Stephen Kelly