Message ID | 20241222211203.66704-3-hjl.tools@gmail.com |
---|---|
State | Accepted |
Commit | 309225af546609c75663637e40472b4378371078 |
Headers | show |
Series | [v2,1/6] include/sys/cdefs.h: Add __attribute_optimization_barrier__ | expand |
"H.J. Lu" <hjl.tools@gmail.com> writes: > From: Adhemerval Zanella <adhemerval.zanella@linaro.org> > > Since Clang doesn't support > > DIAG_IGNORE_NEEDS_COMMENT (11, "-Wformat="); > > and for unknown reasons, it doesn't warn the %#m specifier, suppress > -Wformat only for gcc in tst-sprintf-errno.c. > > Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> > --- > stdio-common/tst-sprintf-errno.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/stdio-common/tst-sprintf-errno.c b/stdio-common/tst-sprintf-errno.c > index e00c3fb485..2ea1fde2dc 100644 > --- a/stdio-common/tst-sprintf-errno.c > +++ b/stdio-common/tst-sprintf-errno.c > @@ -24,7 +24,7 @@ > > /* GCC does not yet know about the %#m specifier. */ > DIAG_PUSH_NEEDS_COMMENT; > -DIAG_IGNORE_NEEDS_COMMENT (11, "-Wformat="); > +DIAG_IGNORE_NEEDS_COMMENT_GCC (11, "-Wformat="); > > static int > do_test (void) Reviewed-by: Sam James <sam@gentoo.org>
diff --git a/stdio-common/tst-sprintf-errno.c b/stdio-common/tst-sprintf-errno.c index e00c3fb485..2ea1fde2dc 100644 --- a/stdio-common/tst-sprintf-errno.c +++ b/stdio-common/tst-sprintf-errno.c @@ -24,7 +24,7 @@ /* GCC does not yet know about the %#m specifier. */ DIAG_PUSH_NEEDS_COMMENT; -DIAG_IGNORE_NEEDS_COMMENT (11, "-Wformat="); +DIAG_IGNORE_NEEDS_COMMENT_GCC (11, "-Wformat="); static int do_test (void)
From: Adhemerval Zanella <adhemerval.zanella@linaro.org> Since Clang doesn't support DIAG_IGNORE_NEEDS_COMMENT (11, "-Wformat="); and for unknown reasons, it doesn't warn the %#m specifier, suppress -Wformat only for gcc in tst-sprintf-errno.c. Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> --- stdio-common/tst-sprintf-errno.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)