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++/52541] g++ allows definition of const POD


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52541

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-03-09 11:29:04 UTC ---
This behavior changed on purpose, see testcase: g++.dg/init/const8.C.

2011-09-23  Jason Merrill  <jason@redhat.com>

    Core 253 - allow const objects with no initializer or
    user-provided default constructor if the defaulted constructor
    initializes all the subobjects.
    PR c++/20039
    PR c++/42844
    * class.c (default_init_uninitialized_part): New.
    * cp-tree.h: Declare it.
    * decl.c (check_for_uninitialized_const_var): Use it.
    * init.c (perform_member_init): Likewise.
    (build_new_1): Likewise.
    * method.c (walk_field_subobs): Likewise.


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