diff options
-rw-r--r-- | 001help.cc | 4 | ||||
-rw-r--r-- | makefile | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/001help.cc b/001help.cc index 1b24f217..b8dbe7a6 100644 --- a/001help.cc +++ b/001help.cc @@ -96,8 +96,8 @@ bool is_equal(char* s, const char* lit) { :(before "End Includes") #define SIZE(X) (assert((X).size() < (1LL<<(sizeof(int)*8-2))), static_cast<int>((X).size())) //: -//: 5. Integer overflow is still impossible to guard against. Maybe after -//: reading http://www.cs.utah.edu/~regehr/papers/overflow12.pdf +//: 5. Integer overflow is guarded against at runtime using the -ftrapv flag +//: to the compiler, supported by both GCC and LLVM. //: //: 6. Map's operator[] being non-const is fucking evil. :(before "Globals") // can't generate prototypes for these diff --git a/makefile b/makefile index cc0fd84c..626537d4 100644 --- a/makefile +++ b/makefile @@ -4,7 +4,7 @@ CXX ?= c++ CFLAGS ?= -g -O3 mu_bin: makefile mu.cc termbox/libtermbox.a - ${CXX} ${CFLAGS} -Wall -Wextra -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin + ${CXX} ${CFLAGS} -Wall -Wextra -ftrapv -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin # To see what the program looks like after all layers have been applied, read # mu.cc |