Messages in this thread | | | Date | Mon, 7 Jul 2014 13:18:43 +0100 (BST) | From | "Maciej W. Rozycki" <> | Subject | Re: [PATCH v2] declance: Fix 64-bit compilation warnings |
| |
On Mon, 7 Jul 2014, Grant Likely wrote:
> > > > I don't think %#p is valid so it > > > > shouldn't have been set by #. > > > > > > Huh? As recently as last Wednesday you pointed me at the specific commit > > > from Grant that made it valid (GCC format complaints aside). > > > > Those gcc complaints are precisely the thing > > that makes it invalid. > > That's the most inane reason ever for saying something is invalid. "The > tool doesn't recognise it, there for it is invalid?" Seriously? > > Tools are just tools. They aren't the source of what is valid/invalid, > they only report on what we as engineers have told them to do, because > *we* define what should be valid/invalid. > > If you've got a real reason that explains *why* the tool rejects that > construct, then I'd be happy to hear it, but otherwise that argument > makes no sense.
GCC rejects it, because its `printf' format attribute expects format specifiers according to ISO C and its formatted input/output functions. The syntax of our `printk' is however different, not only for %#p, so I agree it's GCC that acts incompatibly and not our design being wrong. I have therefore offered a solution (though not an implementation right now, sorry; I'm not even set up to start such development right away) to introduce a `linux_printk' format attribute to GCC that would match our requirements.
FAOD I'm in favour to retaining `#' with %p, but then making it consistent across variants such as %pad vs %#pad. This does not preclude or require adding `linux_printk' to GCC in the future.
Maciej
| |