tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding %m conversion to the printf(3) family



On 2015-10-23 23:28, Mouse wrote:
Subject: Adding %m conversion to the printf(3) family

Didn't we discuss this recently?  I have a fuzzy memory we did.

*checking*

http://mail-index.netbsd.org/tech-userlevel/2015/08/21/msg009282.html

Yes, we did.  Though the starting point was rather different, we did
discuss adding %m support to printf.  It was just a couple of months
ago, too - starting 2015-08-21.  (You even contributed to the
discussion!)

As a quick summary of my stance there, which hasn't changed: I think
that, ideally, %m should go away entirely; if it exists in printf,
there should be a way to get -Wformat warnings as if it didn't
(preferably defaulted on).

Unless someone says something more than a rehash of stuff from August,
I don't expect to say anything further in this thread.

This is more of a follow on rather than a re-hash.
NetBSD's gcc now spits un-solveable warnings in my code which i find unacceptable.

Christos put forth 3 possible solutions to my problem. Here they are:

Then it works... To do this "right" would require:

    - an additional annotation (I know what I am doing)
or
    - the ability to convert from syslog to printf (weakens the tests)
or
    - make printf understand %m and forget about syslog format

I chose the last option, which is why I'm talking here.

Roy


Home | Main Index | Thread Index | Old Index