This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27306] while and (type *&)variable++ causes never ending loop
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2006 12:19:49 -0000
- Subject: [Bug c++/27306] while and (type *&)variable++ causes never ending loop
- References: <bug-27306-12591@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from falk at debian dot org 2006-04-25 12:19 -------
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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27306