I like this idea, although I'd prefer a different phrasing of the warning message. How about: warning: optimization level '-O20' is unsupported; using '-O3' instead. http://llvm-reviews.chandlerc.com/D2125