This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/83194] Possibly missed simplification with strcmp(s, t) == strcmp(t, s)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83194

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
You definitely cannot assume strcmp (s, t) == -strcmp (t, s), only that 
the result has the correct sign in each case.

There should be no need to preserve the exact return value (of the correct 
sign) chosen by the implementation in a particular case.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]