On 08/28/2014 03:13 PM, Richard Biener wrote:
knowledge of scopes and such, only available in the FE. Is there a generic way of determining if a DECL is in global scope?Via DECL_CONTEXT and the global scope macro predicate. Eventually not enough to detect class scope statics.
!decl_function_context should do the trick. Jason