fix bugs in mac-64 bit xcode clang++ compiler and gcc compiler.