http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47749
--- Comment #6 from Davide Rizzo 2011-02-17
09:03:44 UTC ---
The testcase that shows the problem is:
int main(int argc, char **argv)
{
cout << "fn_bad(true) : " << (fn_bad(true) ? "true" : "false") << endl;
cout << "fn_bad(false) : " <<
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47749
--- Comment #5 from Davide Rizzo 2011-02-15
12:05:58 UTC ---
No, with this testcase it doesn't abort.
I think the return value is random not only with flag=false (that could be
acceptable), but also with flag=true.
I don't use any compiler flag,
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47749
--- Comment #2 from Davide Rizzo 2011-02-15
09:27:24 UTC ---
Yes, but the big problem is that the function return false also if you call
it with flag=true.
2011/2/15 redi at gcc dot gnu.org
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47749
>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47749
Summary: Wrong function return value
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassig...@gcc.gnu.org