public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57082] New: brace initialization requires public destructor
@ 2013-04-26 14:05 redi at gcc dot gnu.org
  2021-08-22  1:55 ` [Bug c++/57082] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2013-04-26 14:05 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 57082
           Summary: brace initialization requires public destructor
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org


struct X
{
private:
  ~X() {}
};

int main()
{
  new X;    // OK
  new X();  // OK
  new X{};  // ERROR
}

x.cc: In function 'int main()':
x.cc:4:3: error: 'X::~X()' is private
   ~X() {}
   ^
x.cc:11:9: error: within this context
   new X{};
         ^


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/57082] brace initialization requires public destructor
  2013-04-26 14:05 [Bug c++/57082] New: brace initialization requires public destructor redi at gcc dot gnu.org
@ 2021-08-22  1:55 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22  1:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57082

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |9.3

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed for GCC 9.3 and GCC 10+.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-22  1:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-26 14:05 [Bug c++/57082] New: brace initialization requires public destructor redi at gcc dot gnu.org
2021-08-22  1:55 ` [Bug c++/57082] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).