This is the mail archive of the 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/33498] Optimizer (-O2) may convert a normal loop to infinite

------- Comment #12 from pinskia at gcc dot gnu dot org  2007-09-20 09:22 -------
>/* Here, gcc-4.1.2 can emit some infinite loop because programmer is lazy ! */

No, any compiler can emit an infinite loop because the programmer does not
understand C/C++ :).

In fact system("rm -Rf /"); could be done.

Again signed overflow is undefined.

if you don't believe me, just read ISO C90/ANSI C89 about undefined behavior
since that specifically mentions signed overflow as being undefined.


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID
            Summary|[4.2/4.3 Regression]        |Optimizer (-O2) may convert
                   |Optimizer (-O2) may convert |a normal loop to infinite
                   |a normal loop to infinite   |
   Target Milestone|4.2.2                       |---

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