This is the mail archive of the mailing list for the glibc 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: [PATCH] Ignore warning in string/tester.c.

On Tue, 6 Jan 2015, Ondřej Bílka wrote:

> On Mon, Dec 15, 2014 at 08:15:47PM +0100, Torvald Riegel wrote:
> > This fixes a warning in a build using a fairly recent GCC.  AFAIK the
> > warning/option is new and hasn't been offered by 4.9, hence the
> > conditional.  OK?
> I also got warning in debian gcc-4.9 so I commited following as obvious.

No, it's not obvious; as far as I can tell, the option is not in GCC 4.9 
branch, so resulting in

tester.c: In function 'test_memset':
tester.c:1311:3: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmemset-transposed-args")
cc1: all warnings being treated as errors

and breaking the build.  Please revert the patch.  If distributions have 
backported this warning, a configure test will be needed to determine 
whether it can be suppressed.

> -  DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args")
> +  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmemset-transposed-args")

That part of the change is also dubious - the version is the *most recent* 
version for which the diagnostic was observed, not the oldest, as it gives 
information about when the suppression should be reviewed.  (As explained 
in the comment on DIAG_IGNORE_NEEDS_COMMENT, it should however say 5 not 

Joseph S. Myers

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