This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71885] Incorrect code generated with -01, memset() function call is missing
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 14 Aug 2016 15:40:51 +0000
- Subject: [Bug c++/71885] Incorrect code generated with -01, memset() function call is missing
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-71885-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71885
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #16 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I think the relevant part of the standard may be:
C++98 [class.cdtor]:
For an object of non-POD class type ... before the constructor
begins execution ... referring to any non-static member or base
class of the object results in undefined behavior
https://gcc.gnu.org/ml/gcc/2016-02/msg00207.html
But neither the manual nor the porting_to guide are very clear regarding this.
Would it be hard to diagnose such uses? (since any use is forbidden!).