add compiler flag check macro
use compiler flag check macro