Skip to content

Commit 9790e09

Browse files
committed
Work around clang pretending to be GCC 4.2. Require clang 2.9
1 parent 0db50dc commit 9790e09

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cli/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,13 @@ int main(int argc, char* argv[])
9999

100100

101101
// Warn about deprecated compilers
102-
#ifdef __GNUC__
102+
#ifdef __clang
103+
# if ( __clang_major__ < 2 || ( __clang_major__ == 2 && __clang_minor__ < 9))
104+
# warning "Using Clang 2.8 or earlier. Support for this version will be removed soon."
105+
# endif
106+
#elif defined(__GNUC__)
103107
# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
104-
# warning "Using GCC 4.4 or earlier. Support for this version will be removed soon."
108+
# warning "Using GCC 4.3 or earlier. Support for this version will be removed soon."
105109
# endif
106110
#elif defined(_MSC_VER)
107111
# if (_MSC_VER < 1600)

0 commit comments

Comments
 (0)