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

[Bug middle-end/19430] taking address of a var causes missing uninitialized warning



http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19430

--- Comment #26 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Manuel López-Ibáñez from comment #25)
> I don't see any reason for -Wuninitialized to not enable
> -Wmaybe-uninitialized.

I can see 3 kinds of use:

1. Users who are interested in neither: they just don't use these options (if
they want to use -Wall, they need the -Wno- version).

2. Users interested in -Wuninitialized but not in -Wmaybe-uninitialized (to
avoid potential many false positives). Because -Wuninitialized enables
-Wmaybe-uninitialized, they need 2 options: -Wuninitialized
-Wno-maybe-uninitialized. If -Wuninitialized did not enable
-Wmaybe-uninitialized, only one option would be needed: -Wuninitialized.

3. Users interested in both. I think that -Wmaybe-uninitialized should enable
-Wuninitialized because it makes no sense to have -Wmaybe-uninitialized but not
-Wuninitialized. Indeed, if some variable is uninitialized, then it may be
uninitialized. So, only one option should be needed in this case:
-Wmaybe-uninitialized.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply to: