Summary: | while and (type *&)variable++ causes never ending loop | ||
---|---|---|---|
Product: | gcc | Reporter: | kalas <kalas> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | adruab, Andreas.Glowatz, andreg, bobm75, boris, c.pop, cdfrey, charles, christophe.guillon, cxl, czang, d.bonekaemper, danfuzz, davids, davmac, devin, djk, dmeggy, duraid, evgeny, ezharkov, fabdouze, fm, gcc-bugs, gcc, ghouston, gino, gopalv82, grigory_zagorodnev, hayim, horst.lehser, hurbain, ja2morri, jason.elbaum, jfran, jochang, larschri, lindsayd, linuxadmin, lucho, l_heldt, micis, mike, mor_gopal, noaml, pgonzalez, pierre.chatelier, pjh, rarob, renzo, rick.ju, spelis, steffen.zimmermann, steger, strasbur, sumii, thomas.anders, warp, zengpan, zybi |
Priority: | P3 | ||
Version: | 4.0.2 | ||
Target Milestone: | --- | ||
Host: | cygwin | Target: | arm-elf |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
kalas
2006-04-25 11:47:50 UTC
This is not a valid testcase, or even expression. I guess it's invalid anyway because of operator precedence. It's a valid C++ fragment. However, this code accesses "ptr", which is of type void*, via an lvalue of type U16*. This is undefined behavior, so there is no gcc bug here. Oh, this is just an aliasing issue. Reopening... |