This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: need help with patch to check asm_fprintf format specifiers

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]