This is the mail archive of the gcc-bugs@gcc.gnu.org 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 c++/71885] Incorrect code generated with -01, memset() function call is missing


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!).

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