> also we should check -Ox without -g . I know in the past this > combination was explicitly noted as possibly dangerous By whom? -Ox with -g, as Jim Wilson writes, generates exactly the same code as -Ox without -g. The worst that can happen is that debugging can be confusing.