Den 2010-09-21 12:46 skrev Stefano Lattarini: > Hi Peter. > > On Tuesday 21 September 2010, Peter Rosin wrote: >> Den 2010-09-17 11:58 skrev Stefano Lattarini: >>> Or what about doing somethins similar to what gcc does, and add a >>> new `-Wextra' category whose warnings are *not* enabled by >>> `-Wall', but which, when enabled, still causes `automake >>> -Werror' to fail? This (assuming your warning will become an >>> "extra" one) would also have the positive collateral effect of >>> not forcing you to change *any* existing test. WDYT? >> >> I'm not too thrilled if there would be no sign of a needed >> AM_PROG_AR when "automake -Wall" is used. > The fact is, IIUC (and please correct me if I don't), the ar-lib > wrapper is required only when building on Windows with Microsoft > developement tools.
Correct. > Now, many projects might not care at all to support this building > environment, while still wanting to use `-Wall' to catch common > pitfalls; in this scenario, a warning triggered by `-Wall' about > missing AM_PROG_AR would be just an annoyance. Worse again, the > use of `-Wall -Werror' would *force* the use of AM_PROG_AR and > ar-lib, and the developers of aforementioned projects might see > this forced additions as useless bloat. Aha, but now you are taking the position that the only way to not have it invisible is if it doesn't show up with -Wall and that it doesn't trip up -Wall -Werror. What is the problem with inventing a new warning class that prints an informational messages but that doesn't trigger -Werror? Then you could have the -Wextra option that turns the informational messages into "real" warnings that trigger -Werror (and -Wno-extra would silence the messages altogether). Or something. I.e. four states: silence, info, warning, error. > On the other hand, if we add a new warning class (say `-Wwin32' > or `-Wwindows-portability') we'd allow the developers interested > in porting to Windows to enable the relevant warnings (for now > only the warning about missing AM_PROG_AR, but new ones can be > added in the future), without hassling the developers interested > in supporting only "true" Unix platforms. I don't like the special casing of Windows at all. Would you have suggested it for any other platform? -Wextra is much better. >> I'm not sure if anybody will ever add AM_PROG_AR without a >> poke if it's that invisible. > Hmmm... you have a point here, but I still hold my position. > Maybe we should point clearly to the new `-Wwindows-portability' > warning class in key places of the Automake manual (with proper > examples)? Or even add a whole new section about "building on > Windows"? I'm not sure in what manual that section should be in though. I don't think having it spread out in all of autotools is the most helpful way to do it. Cheers, Peter