-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/07/11 18:24, Xinliang David Li wrote:
> Hi,
> 
> the following patch implements the option to fine control the emitted
> warnings --
> 1) allow suppressing warnings for use of values that may be
> uninitialized.  Definitely uninitialized values that may be used
> warning is not affected
> 2) allow fine grain control on promotion of warnings to errors:
> -Wno-error=maybe-uninitialized
> 
> This is useful for users who only care about definite uninitialized
> variable warnings.
I'm definitely in favor of having the ability for the user to be able to
fine tune the warnings they want.  However, I have some concerns.

First, I'm not sure how reconcile the may vs must inconsistency.  We can
have an object which is used in a real statement in the IL, which we
currently would classify as must-be-uninitialized, even if the path
leading to the statement is unexecutable.    I guess I want to find
better ways to describe this kind of stuff in our documentation and
switch names

Second, I'm concerned about changing the default behaviour of
- -Wuninitialized.  I don't think we ever reached a consensus on that
issue last time we tried to hash through this stuff.  Maybe I missed
something, but it appears to me your patch makes -Wuninitialized only
warn about real uses and ignore uses in PHIs.

Given the lack of consensus (and I believe there will never be a
consensus), I believe we should keep -Wuninitialized behavior as-is and
use -Wno-maybe-uninitialized to override -Wuninitialized.

If we can come up with better switch name than -Wno-maybe-uninitialized,
that would be a good step as well.  However, I'm not offhand sure what
name to use given the issues surrounding may vs must be used uninitialized.

jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNsGecAAoJEBRtltQi2kC7BugH/01X2ppdVUONq2fBzztxF+YR
Qn85yccwI45iizNG1dlmyZlYpATYcfTGwDkBYTjiVllhOJa64Ri6bIP3ErySPllk
OrSAbwFT96TK9/h1eGfVj45mZS3MO0Pa+sxp93noGnxIMWWOt+7LiyrfJEHHLaUK
rPhREXodzLnN0KpXTD8+RS2uzTV+YODAuiWQDkiyQ0XpjCw5w2ccc7dWnrzgvEn5
6x/baTqQxunV8t3/ezUlHiMcUNyMigXccFgIeRRsvMengY/reLxy7eg1i+vdeets
DyWR/Hg3HewLAQidL3SAJLLGuqTrNUZ0wswgqghqh9VllAFoUdKn0xk8GFt0wbk=
=4aA4
-----END PGP SIGNATURE-----

Reply via email to