Re: Is it time to take the middle-end stringop/array warnings out of -Wall?
Arsen Arsenović <[email protected]>
| Newsgroups | gmane.comp.gcc.devel |
|---|---|
| Organization | BayLibre |
| Message-ID | <[email protected]> |
Joseph Myers <[email protected]> writes: > On Wed, 20 May 2026, Richard Biener via Gcc wrote: > >> I'm OK with that that though moving the diagnostics earlier might be another >> option. But once they are no longer in -Wall I fear nobody will enable them >> and so we can as well eliminate the then unused (and actually unmaintained >> for large parts) code ... > > You could put them in -Wextra. -Wall is supposed to be "all the > warnings about constructions that some users consider questionable, > and that are easy to avoid (or modify to prevent the warning), even in > conjunction with macros", while -Wextra includes some warnings for > "constructions that are necessary or hard to avoid in some cases, and > there is no simple way to modify the code to suppress the warning" > (which seems like a reasonable match for the issues with false > positives for these warnings). A lot of people use -Wextra, so moving the warning into -Wextra alone would have insufficient effect IMO. Even if they do get moved into -Wextra, they should have output that makes it clearer that the error may be (and perhaps even is likely to be) a false positive. As Jonathan said, saying there "is" an overflow is a hefty statement. IMO, +1 on the original suggestion, though. These being in -Wall, and them being worded in such a strong manner, makes it so that this is a common cause of confusion. -- Arsen Arsenović
signature.asc
(application/pgp-signature, 430 B)
-----BEGIN PGP SIGNATURE----- iQEKBAEWCgCyFiEE/uKz0RP8AKMWLWBhUsKUMB6ixJMFAmoN5ssbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGRUUyQjNEMTEzRkMwMEEzMTYyRDYw NjE1MkMyOTQzMDFFQTJDNDkzGBxhYXJzZW5vdmljQGJheWxpYnJlLmNvbQAKCRBS wpQwHqLEk1RWAQCI+cniOmRscFkHM6RVq96V5jqx/8BdZjfPO1m3F1126gEA5Jkm hiJIHfS62neHVchW1xS2KWG6bmTwYYvHyU7a+QQ= =F1JW -----END PGP SIGNATURE-----