[intel-9.0] --arg_dep_lookup, BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL and __EDG_VERSION__=304

A bit of context: * Intel 9.0 has __EDG_VERSION__==304 (under Win32/Linux), whereas prior versions of the compiler have lower values of this macro. * BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL is defined for __EDG_VERSION__<=303, that is, for all Intel compilers up to (and including) 8.1, under Win32/Linux. * Under Win32, all Intel toolset .jams define the compiler option --arg_dep_lookup, which explicitly enables ADL (disabled by default.) I don't know what the situation of ADL is for Intel under Linux, but in any case this switch is *not* used for that OS. Current RC tests for Intel 9.0 under Linux show the problem listed at http://tinyurl.com/8f5g6 One piece of code where the error pops up is like this #if defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) ::boost::multi_index::detail::swap(i1,get<1>(es2)); #else using std::swap; swap(i1,get<1>(es2)); #endif Given the __EDG_VERSION__ number of this compiler, it is the second preprocessor branch that is compiled, and it fails to use the user-supplied global swap() in favor of std::swap(), hence the error. However, this same tests succesfully passes for Intel 9.0 under Win32 (same __EDG_VERSION__ as the Linux case)!! My conclusions: * The fact that the test passes under Intel 9.0 for Win32, for which BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL is *not* defined, suggests that __EDG_VERSION__<=303 is the right check for setting this macro. * But the same test fails under Intel 9.0 for Linux, which hints at an ADL problem other than that controlled by BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL. Could it be that Intel compilers under Linux also necessitate the --arg_dep_lookup compiler switch (which is currently not set)? This looks like the only sensible conslusion from the facts described. Thanks and sorry for the long post, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Could it be that Intel compilers under Linux also necessitate the --arg_dep_lookup compiler switch (which is currently not set)? This looks like the only sensible conslusion from the facts described.
Unfortunately *not* setting that switch has no effect on the Win32 compiler (at least not as far as this bug is concerned). I have a test case for this bug sitting in my "bug-reports" directory so it looks this has been submitted to Intel before, as soon as I can boot up Linux again, I'll verify that I can reproduce it and have a play around with the command line switches. John.

Based on feedback from Intel, they are intending to emulate a gcc bug, when the gcc emulation version is 3.2 or less. However there is a bug in Intel 8 and 9 that means the bug emulation is always on, no matter what the gcc emulation version is. At some point Intel will probably patch this, but in the mean time can you test the following patch? Thanks, John. Index: boost/config/compiler/intel.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/config/compiler/intel.hpp,v retrieving revision 1.39 diff -r1.39 intel.hpp 90a91,99
#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAK S_ADL) // // Figure out when Intel is emulating this gcc bug: // # if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL <= 900) # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # endif #endif

Based on feedback from Intel, they are intending to emulate a gcc bug, when the gcc emulation version is 3.2 or less. However there is a bug in Intel 8 and 9 that means the bug emulation is always on, no matter what the gcc emulation version is. At some point Intel will probably patch this, but in the mean time can you test the following patch?
Never mind, I've had a chance to test it here, so it's committed to cvs, John.

John Maddock <john <at> johnmaddock.co.uk> writes:
Based on feedback from Intel, they are intending to emulate a gcc bug, when the gcc emulation version is 3.2 or less. However there is a bug in Intel 8 and 9 that means the bug emulation is always on, no matter what the gcc emulation version is. At some point Intel will probably patch this, but in the mean time can you test the following patch?
Never mind, I've had a chance to test it here, so it's committed to cvs,
John, it'd be great if this change is also merged to the RC_1_33_0 branch for the 1.33.1 release. Thanks, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (3)
-
JOAQUIN LOPEZ MU?Z
-
Joaquin M Lopez Munoz
-
John Maddock