[cfe-dev] macro '__OPTIMIZE__' and PCH

Sebastian Redl sebastian.redl at getdesigned.at
Thu Nov 4 05:29:17 PDT 2010


On 04.11.2010 12:58, Luc Bourhis wrote:
> Hi,
>
> if I build a pch with let's say -O3 and then later use it for a compilation without any -O option, then clang stops with the error
>
> error: the macro '__OPTIMIZE__' was defined in the PCH file but is currently undefined
>
> I thought that clang pch were, contrary to gcc's ones, only pre-tokenised headers. I must be wrong obviously. Could somebody elaborate on this issue?
Clang has pretokenized headers (PTH), but nowadays it also has 
precompiled headers.

Sebastian



More information about the cfe-dev mailing list