[Bug c++/25973] [4.5/4.6/4.7/4.8 Regression] Wrong warning: control reaches end of non-void function

2012-04-24 Thread ssomers at opnet dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973

ssomers at opnet dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #20 from ssomers at opnet dot com 2012-04-24 09:57:33 UTC ---
I concur with comment 11 that the original problem doesn't occur anymore in
4.4.4 (it still occurred in 4.1.2). Since the variation in comment 4 was also
patched, and being unaware about the protocol, I'll go out on a limp and try to
close this.


[Bug c++/25973] New: Wrong warning: control reaches end of non-void function

2006-01-26 Thread ssomers at opnet dot com
-Wall produces warning on second function, not on slightly simpler first
function.

struct C {
C() { }
~C() {}
};

int fine(int p) {
C c;

if (p) {
if (p == 4) {
return 1;
} else {
return 2;
}
} else {
return 3;
}
}

int foul(int p) {
C c;

int pcopy = p;
if (pcopy && p) {
if (p == 4) {
return 1;
} else {
return 2;
}
} else {
return 3;
}
}

Probably a duplicate of 20624 or so.  I can't access newer version right now.
Occurs in 4.0.1, 4.0.0, not in 3.4.5


-- 
   Summary: Wrong warning: control reaches end of non-void function
   Product: gcc
   Version: 4.0.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: ssomers at opnet dot com
  GCC host triplet: sparc-sun-solaris2.8


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