public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/17172] New: missing warning message when not -O3 or when use function call @ 2004-08-24 17:52 wxy at kivera dot com 2004-08-24 18:00 ` [Bug c/17172] " pinskia at gcc dot gnu dot org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: wxy at kivera dot com @ 2004-08-24 17:52 UTC (permalink / raw) To: gcc-bugs source code: #ifdef CALL void set(int *id) { *id = 1; } #endif int main(int argc, char **argv) { int id; if (argc > 1) { #ifdef CALL set(&id); #else id = 1; #endif } return id; } end of source code If compile using gcc -Wall -O3 test.c it will warn about 'id' might be used uninitialized. but compile using gcc -Wall test.c or gcc -Wall -O3 -DCALL test.c then, no such warning is printed. I think as long as -Wall is included, it should always warn you. -- Summary: missing warning message when not -O3 or when use function call Product: gcc Version: 3.4.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wxy at kivera dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: both linux and solaris http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17172 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/17172] missing warning message when not -O3 or when use function call 2004-08-24 17:52 [Bug c/17172] New: missing warning message when not -O3 or when use function call wxy at kivera dot com @ 2004-08-24 18:00 ` pinskia at gcc dot gnu dot org 2004-08-25 21:16 ` pinskia at gcc dot gnu dot org 2004-08-25 21:16 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-08-24 18:00 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-24 18:00 ------- Fixed on the mainline already. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Keywords| |diagnostic Resolution| |FIXED Target Milestone|--- |3.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17172 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/17172] missing warning message when not -O3 or when use function call 2004-08-24 17:52 [Bug c/17172] New: missing warning message when not -O3 or when use function call wxy at kivera dot com 2004-08-24 18:00 ` [Bug c/17172] " pinskia at gcc dot gnu dot org @ 2004-08-25 21:16 ` pinskia at gcc dot gnu dot org 2004-08-25 21:16 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-08-25 21:16 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-25 21:16 ------- Reopening to mark as a dup of .. -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17172 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/17172] missing warning message when not -O3 or when use function call 2004-08-24 17:52 [Bug c/17172] New: missing warning message when not -O3 or when use function call wxy at kivera dot com 2004-08-24 18:00 ` [Bug c/17172] " pinskia at gcc dot gnu dot org 2004-08-25 21:16 ` pinskia at gcc dot gnu dot org @ 2004-08-25 21:16 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-08-25 21:16 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-25 21:16 ------- *** This bug has been marked as a duplicate of 179 *** -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17172 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-25 21:16 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-08-24 17:52 [Bug c/17172] New: missing warning message when not -O3 or when use function call wxy at kivera dot com 2004-08-24 18:00 ` [Bug c/17172] " pinskia at gcc dot gnu dot org 2004-08-25 21:16 ` pinskia at gcc dot gnu dot org 2004-08-25 21:16 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).