public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115645] New: [11/12/13/14/15 Regression] new S[1][1]() requires non-explicit default ctor since r11-3092
@ 2024-06-25 13:02 redi at gcc dot gnu.org
  2024-06-25 13:06 ` [Bug c++/115645] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2024-06-25 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115645
           Summary: [11/12/13/14/15 Regression] new S[1][1]() requires
                    non-explicit default ctor since r11-3092
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
                CC: mpolacek at gcc dot gnu.org
  Target Milestone: ---

struct S {
  explicit S() { }
};

auto p = new S[1][1]();

expl.cc:5:22: error: converting to ‘S’ from initializer list would use explicit
constructor ‘S::S()’
    5 | auto p = new S[1][1]();
      |                      ^


Clang and EDG accept this.

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

end of thread, other threads:[~2024-06-25 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-25 13:02 [Bug c++/115645] New: [11/12/13/14/15 Regression] new S[1][1]() requires non-explicit default ctor since r11-3092 redi at gcc dot gnu.org
2024-06-25 13:06 ` [Bug c++/115645] " redi at gcc dot gnu.org
2024-06-25 13:07 ` redi at gcc dot gnu.org
2024-06-25 14:14 ` rguenth at gcc dot gnu.org
2024-06-25 14:58 ` mpolacek 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).