This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: need help with patch to check asm_fprintf format specifiers
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 22 May 2003 19:50:15 +0100 (BST)
- Subject: Re: RFC: need help with patch to check asm_fprintf format specifiers
- References: <200305221609.MAA21265@caip.rutgers.edu>
On Thu, 22 May 2003, Kaveh R. Ghazi wrote:
> Some day we'll have a nice way of defining custom format specifier
> checks. Until then, I think it would be useful to add hard-wired
> checks for gcc's own custom formats so that we catch more bugs.
I don't like having such application-specific formats hardwired (even with
full docs and testcases), but feel free to maintain your own patch and fix
GCC bugs found with it.
> Anyway I'm still stuck on the %wd thing. I think basically I need a
> way to tell the host compiler at runtime what type %wd should check
> for. But then we get back into the extensible feature which is beyond
> the scope of what I want to do. Is there a middle ground between
> complete extensibility and no extensibility where we could add some
> sort of pragma or hook for just this minor issue?
When not trying to get a patch suitable for inclusion in GCC, you can add
kludges such as looking at the definition of the HOST_WIDE_INT macro at
runtime and adapting the format definitions accordingly.
--
Joseph S. Myers
jsm28@cam.ac.uk