On 04/04/14 13:45, Marek Polacek wrote:

I'm sorry, my guess was wrong, it's not about flag_preprocess_only at
all.  But still it's about PCH ;).  In short: we define the builtins,
but PCH then removes the definitions.
Ah.

The thing is, we define the
builtins just fine (via c_common_nodes_and_builtins -> c_define_builtins),
but the problem is that later on we call c_common_read_pch that calls
gt_pch_restore which "reads the state of the compiler back in from
file" -- and as a part of this, it overwrites the table with defined
builtins (builtin_info.decl).  And so we end up with zapped table
and thus it's needed to re-initialize it.  I don't see an easy way
how to tell PCH to not to do the removal.
Presumably when we wrote out the PCH -fsanitize wasn't being used and thus those builtins are not initialized. Right?

Assuming that's correct, your patch is fine with a comment to that effect.

Jeff

Reply via email to