diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-27 21:23:46 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-01-07 15:31:38 -0800 |
commit | c080e504e4d74027b985b1ed675c172c083cea76 (patch) | |
tree | ac084d16d9d40c0a0c950b66eb62a0e16795d486 /src/common/sanity.hpp | |
parent | ae30173d71d3bfc8514dbe70b6c90c9a3324b8fc (diff) | |
download | tmwa-c080e504e4d74027b985b1ed675c172c083cea76.tar.gz tmwa-c080e504e4d74027b985b1ed675c172c083cea76.tar.bz2 tmwa-c080e504e4d74027b985b1ed675c172c083cea76.tar.xz tmwa-c080e504e4d74027b985b1ed675c172c083cea76.zip |
Use cxxstdio
Diffstat (limited to 'src/common/sanity.hpp')
-rw-r--r-- | src/common/sanity.hpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/common/sanity.hpp b/src/common/sanity.hpp index c4f75e0..9bad464 100644 --- a/src/common/sanity.hpp +++ b/src/common/sanity.hpp @@ -1,20 +1,35 @@ /// return wrappers for unexpected NULL pointers #ifndef SANITY_HPP #define SANITY_HPP + # ifndef __cplusplus # error "Please compile in C++ mode" # endif -# if __GNUC__ < 3 -// I don't specifically know what version this requires, -// but GCC 3 was the beginning of modern GCC -# error "Please upgrade your compiler to at least GCC 3" + +# if __GNUC__ < 4 +# error "Your compiler is absolutely ancient. You have no chance ..." +# endif + +# if __GNUC__ == 4 +// clang identifies as GCC 4.2, but is mostly okay. +// Until a bug-free release of it happens, though, I won't recommend it. +// (patched) clang 3.1 would be the requirement +# if __GNUC_MINOR__ < 6 && !defined(__clang__) +# error "Please upgrade to at least GCC 4.6" +# endif +# if __GNUC_MINOR__ == 6 +# warning "Working around some annoying bugs in GCC 4.6 ..." +# define ANNOYING_GCC46_WORKAROUNDS +# endif # endif + # ifndef __i386__ // Known platform dependencies: // endianness for the [RW]FIFO.* macros // possibly, some signal-handling # error "Unsupported platform" # endif + # ifdef __x86_64__ // I'm working on it - I know there are some pointer-size assumptions. # error "Sorry, this code is believed not to be 64-bit safe" |