bug-gnulib
[Top][All Lists]
Advanced

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

Re: warnings in unit tests


From: Paul Eggert
Subject: Re: warnings in unit tests
Date: Tue, 8 Jun 2021 09:42:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

For what it's worth I'm more with Bruno on this. For the tests, the cost of these warnings outweighs the benefit.

It'd be OK with me to disable the troublesome warnings globally for the tests subdirectory, using -Wno-missing-prototypes or whatever.

For the -Wnull-dereference issue it may be worthwhile to use a circumlocution that fools GCC into not issuing the warning. After all, a compiler smart enough to warn about '*(volatile int *) 0 = 42' might also be smart enough to see that it's undefined behavior and therefore omit the assignment's effect entirely. Perhaps something like the attached (untested) patch?

Attachment: gnulib.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]