[Bug middle-end/70987] missing -Wuninitialized calling built-in string functions with an uninitialized argument

2020-06-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70987
Bug 70987 depends on bug 10138, which changed state.

Bug 10138 Summary: warn for uninitialized arrays passed as const* arguments
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10138

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug middle-end/70987] missing -Wuninitialized calling built-in string functions with an uninitialized argument

2016-09-06 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70987

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Martin Sebor  ---
I agree this bug can be handled as a duplicate of bug 10138.  It makes sense to
issue a "may be uninitialized" warning when passing the address of a
uninitialized local variable to a function that takes a const pointer (or const
reference in C++) since the called function is most likely going to read the
value of the variable.

It seems that it should be possible to enhance the warn_uninitialized_vars
function in tree-ssa-uninit.c to detect this case.  If I have time I'll try to
look into it.

*** This bug has been marked as a duplicate of bug 10138 ***

[Bug middle-end/70987] missing -Wuninitialized calling built-in string functions with an uninitialized argument

2016-05-08 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70987

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #1 from Manuel López-Ibáñez  ---
This seems to me a duplicate of PR10138 (at least in C++), or closely related.