Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

long long is not supported by ISO C++03 #11

Closed
jaredhoberock opened this issue Mar 30, 2012 · 2 comments
Closed

long long is not supported by ISO C++03 #11

jaredhoberock opened this issue Mar 30, 2012 · 2 comments

Comments

@jaredhoberock
Copy link
Contributor

Reported here: https://groups.google.com/forum/#!msg/thrust-users/jSujgymfbwM/MckpqfhvcFsJ

Can result in errors like:

/usr/local/cuda/include/thrust/detail/type_traits.h:464: error: ISO C++ does not support ‘long long’

@FilipeMaia
Copy link
Contributor

Boost uses the following to check for long long

//
// look for long long by looking for the appropriate macros in <limits.h>.
// Note that we use limits.h rather than climits for maximal portability,
// remember that since these just declare a bunch of macros, there should be
// no namespace issues from this.
//
#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG)   && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
# include <limits.h>
# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
#   define BOOST_HAS_LONG_LONG
# else
#   define BOOST_NO_LONG_LONG
# endif
#endif

Thrust would probably have to do the same to fix this properly.

@jaredhoberock
Copy link
Contributor Author

Thanks so much for looking into it, Filipe.

Now that I think about it, it's probably not worth addressing. The code in question has been there for years and we've just now heard our first complaint. The WAR is also simple (-Wno-long-long).

I'll leave it open for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants