|
From: Patrick J. L. <lop...@gm...> - 2015-04-19 14:58:04
|
On Sat, Apr 18, 2015 at 3:47 AM, Florian Krohm <fl...@ei...> wrote: > > What you describe would work but require additional configury. And that > is something I would like to avoid. We already have 3000 lines of it. > If will be less work to simply modify the test to not pass these values > as function arguments. Assuming that is possible, I agree. Although even that demands cluttering the source with a long comment if the needed approach is unnatural. When it is impossible or inconvenient to modify the source, the approach I have seen is to place all such warning suppressions in one header file. And then dispatch on the compiler version in that header (not in the configure script). Something like <http://stackoverflow.com/a/18463996/768469>. This approach keeps the source uncluttered, and it adds little to the testing burden since (a) it is simple enough to get right every time and (b) these are just warning suppressions. This is part of the cost of keeping everything "-Wall clean" across multiple platforms. But it is not a large cost compared to the benefits. - Pat |