This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55148] wrong compilation of chars: overlapped memory areas
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 31 Oct 2012 12:16:51 +0000
- Subject: [Bug c++/55148] wrong compilation of chars: overlapped memory areas
- Auto-submitted: auto-generated
- References: <bug-55148-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55148
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-31 12:16:51 UTC ---
As the docs for the Statement Expressions extension
(http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html) say:
"Any temporaries created within a statement within a statement expression will
be destroyed at the statement's end."
so GLOBAL_str_intermediate_buf[] is no longer valid after p is initialized and
the memory can be reused.