Better handling of pragmas within legacy macros