Re: 'long long' problem on VC++7.1
And here's what's missing.... I'm using the /Za switch (Disable Language Extensions). But I'm a bit puzzled. I would have thought that /Za (a more standard compliant mode) would not fail. Nick "Nick Savoiu" <savoiu@ics.uci.edu> wrote in message news:...
That would be a solution but 'long long' appears in quite a few places. So, I think there's something else that I'm missing...
Nick
"Jeff Garland" <jeff@crystalclearsoftware.com> wrote in message news:20031111022332.M81509@crystalclearsoftware.com...
On Mon, 10 Nov 2003 14:14:04 -0800, Nick Savoiu wrote
I'm trying to compile some boost code on VC+7.1 but I get:
e:\users\savoiu\Projects\boost-1.30.2\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal
Do I need any #defines when using Boost with VC++7.1 or should it work right out of the box?
I believe this is an error in the concept_check code. Try changing the 'long long' to boost::int64_t.
Jeff
And here's what's missing.... I'm using the /Za switch (Disable Language Extensions).
But I'm a bit puzzled. I would have thought that /Za (a more standard compliant mode) would not fail.
Nick
"Nick Savoiu" <savoiu@ics.uci.edu> wrote in message news:...
That would be a solution but 'long long' appears in quite a few places. So, I think there's something else that I'm missing...
Nick
"Jeff Garland" <jeff@crystalclearsoftware.com> wrote in message news:20031111022332.M81509@crystalclearsoftware.com...
On Mon, 10 Nov 2003 14:14:04 -0800, Nick Savoiu wrote
I'm trying to compile some boost code on VC+7.1 but I get:
e:\users\savoiu\Projects\boost-1.30.2\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal
Do I need any #defines when using Boost with VC++7.1 or should it work right out of the box?
I believe this is an error in the concept_check code. Try changing
The problem seems to be that BOOST_HAS_LONG_LONG has two different checks to see if should be defined: 1 @ E:\users\savoiu\Projects\boost\boost\config\suffix.hpp(26):#include <limits.h> # if !defined(BOOST_HAS_LONG_LONG) \ && !(defined(BOOST_MSVC) && BOOST_MSVC <=1300) && !defined(__BORLANDC__) \ && (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG #endif 2 @ E:\users\savoiu\Projects\boost\boost\config\compiler\visualc.hpp(77) #if (_MSC_VER >= 1200) && defined(_MSC_EXTENSIONS) # define BOOST_HAS_MS_INT64 #endif #if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS) # define BOOST_HAS_LONG_LONG #endif (2) knows about _MSC_EXTENSIONS but (1) does not. Adding a '(...) || !defined(_MSC_EXTENSIONS)' to the MSVC test in (1) fixes the problem. But it seems to me that BOOST_HAS_LONG_LONG should only be defined in one place to reduce the possibility of things being out of sync. Nick "Nick Savoiu" <savoiu@ics.uci.edu> wrote in message news:bopr9d$cm7$1@sea.gmane.org... the
'long
long' to boost::int64_t.
Jeff
The problem seems to be that BOOST_HAS_LONG_LONG has two different checks to see if should be defined:
1 @ E:\users\savoiu\Projects\boost\boost\config\suffix.hpp(26):#include <limits.h>
# if !defined(BOOST_HAS_LONG_LONG) \ && !(defined(BOOST_MSVC) && BOOST_MSVC <=1300) && !defined(__BORLANDC__) \ && (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG #endif Adding a '(...) || !defined(_MSC_EXTENSIONS)' to the MSVC test in (1) fixes the problem. But it seems to me that BOOST_HAS_LONG_LONG should only be defined in one place to reduce the possibility of things being out of sync.
Can you let me have a test case please: (1) does *not* result in BOOST_HAS_LONG_LONG getting defined - well not for me anyway with vc7.1 and the /Za option. Thanks, John.
Take the code at: http://www.boost.org/libs/graph/example/strong_components.cpp Compile it as is with /W4 and /Za. It compiles albeit with a slew of warnings. Now move #include <iostream> #include <vector> before #include <boost/config.hpp> and recompile. You should get: ...\boost\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal Nick "John Maddock" <john@johnmaddock.co.uk> wrote in message news:006d01c3a9d9$db7e7100$a3880252@fuji...
The problem seems to be that BOOST_HAS_LONG_LONG has two different checks to see if should be defined:
1 @ E:\users\savoiu\Projects\boost\boost\config\suffix.hpp(26):#include <limits.h>
# if !defined(BOOST_HAS_LONG_LONG) \ && !(defined(BOOST_MSVC) && BOOST_MSVC <=1300) && !defined(__BORLANDC__) \ && (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG #endif Adding a '(...) || !defined(_MSC_EXTENSIONS)' to the MSVC test in (1) fixes the problem. But it seems to me that BOOST_HAS_LONG_LONG should only be defined in one place to reduce the possibility of things being out of sync.
Can you let me have a test case please: (1) does *not* result in BOOST_HAS_LONG_LONG getting defined - well not for me anyway with vc7.1 and the /Za option.
Thanks,
John.
Compile it as is with /W4 and /Za. It compiles albeit with a slew of warnings.
OK.
Now move
#include <iostream> #include <vector>
before
#include <boost/config.hpp>
and recompile.
You should get:
...\boost\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal
Nope, compiles OK for me still: this is with the latest cvs, is that what you're using? John.
Hmm.... I'm using the files from boost-1.30.2.zip. Nick "John Maddock" <john@johnmaddock.co.uk> wrote in message news:01aa01c3aaa2$44afc660$4ce86b51@fuji...
Compile it as is with /W4 and /Za. It compiles albeit with a slew of warnings.
OK.
Now move
#include <iostream> #include <vector>
before
#include <boost/config.hpp>
and recompile.
You should get:
...\boost\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal
Nope, compiles OK for me still: this is with the latest cvs, is that what you're using?
John.
participants (2)
-
John Maddock
-
Nick Savoiu