http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50593
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-15 21:16:47 UTC --- Seems like it's a matter of changing check_format_arg to call a more general front-end interface than decl_constant_value, one that could accept an arbitrary expression rather than just a decl, and would call maybe_constant_value.