The cppbuiltin.c and c-common.c changes are OK. I'm not sure what the best approach is for a proper hook conversion of POINTER_SIZE, but I don't think this patch makes things any worse. (The things that need considering together in a hook conversion are how the modes for both Pmode and ptr_mode are defined, as well as the POINTER_SIZE macro - and I'm not sure why Pmode is a macro but ptr_mode a global variable. I suspect it should be necessary to define just the two modes and not a separate POINTER_SIZE, but this may be one of the trickier and riskier hook conversions, and a wrapper pointer_size function, such as in this patch, probably does make sense for use in front-end code rather than front ends using the modes and target hooks directly. Maybe things should be turned around so that the pointer_mode and address_mode hooks are what are used to define ptr_mode and Pmode, rather than being defined in terms of those modes.)
-- Joseph S. Myers jos...@codesourcery.com