[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230403153458.GE12892@google.com>
Date: Tue, 4 Apr 2023 00:34:58 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Jaewon Kim <jaewon31.kim@...il.com>
Cc: Petr Mladek <pmladek@...e.com>,
Jaewon Kim <jaewon31.kim@...sung.com>,
"senozhatsky@...omium.org" <senozhatsky@...omium.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
GyeongHwan Hong <gh21.hong@...sung.com>
Subject: Re: [RFC] vsprintf: compile error on %09pK
On (23/04/03 23:39), Jaewon Kim wrote:
[..]
>
> Okay, then we can't use %09pK. I've just wondered because %9pK works.
This is not per printk / kernel, Wformat warnings come from the
compiler.
Per C11 (7.21.6 6):
0 For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros
(following any indication of sign or base) are used to pad to the field width
rather than performing space padding
...
For other conversions, the behavior is undefined.
So using 0 for p should trigger an undefined behavior as far as the
standard C concerned. Unless I'm missing something.
Powered by blists - more mailing lists