public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96687] New: new char[4]{"foo"} doesn't work
@ 2020-08-18 18:41 mpolacek at gcc dot gnu.org
  2020-08-18 18:42 ` [Bug c++/96687] " mpolacek at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-18 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96687
           Summary: new char[4]{"foo"} doesn't work
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

We should accept the following:

char *p = new char[4]{"foo"};

but we reject with:
error: invalid conversion from ‘const char*’ to ‘char’ [-fpermissive]

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

* [Bug c++/96687] new char[4]{"foo"} doesn't work
  2020-08-18 18:41 [Bug c++/96687] New: new char[4]{"foo"} doesn't work mpolacek at gcc dot gnu.org
@ 2020-08-18 18:42 ` mpolacek at gcc dot gnu.org
  2020-08-18 20:06 ` redi at gcc dot gnu.org
  2020-08-18 20:10 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-18 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
   Last reconfirmed|                            |2020-08-18
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

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

* [Bug c++/96687] new char[4]{"foo"} doesn't work
  2020-08-18 18:41 [Bug c++/96687] New: new char[4]{"foo"} doesn't work mpolacek at gcc dot gnu.org
  2020-08-18 18:42 ` [Bug c++/96687] " mpolacek at gcc dot gnu.org
@ 2020-08-18 20:06 ` redi at gcc dot gnu.org
  2020-08-18 20:10 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2020-08-18 20:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is PR 77841

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

* [Bug c++/96687] new char[4]{"foo"} doesn't work
  2020-08-18 18:41 [Bug c++/96687] New: new char[4]{"foo"} doesn't work mpolacek at gcc dot gnu.org
  2020-08-18 18:42 ` [Bug c++/96687] " mpolacek at gcc dot gnu.org
  2020-08-18 20:06 ` redi at gcc dot gnu.org
@ 2020-08-18 20:10 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-18 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Ah, I *knew* there would be an existing report already, but didn't find it.

*** This bug has been marked as a duplicate of bug 77841 ***

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

end of thread, other threads:[~2020-08-18 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18 18:41 [Bug c++/96687] New: new char[4]{"foo"} doesn't work mpolacek at gcc dot gnu.org
2020-08-18 18:42 ` [Bug c++/96687] " mpolacek at gcc dot gnu.org
2020-08-18 20:06 ` redi at gcc dot gnu.org
2020-08-18 20:10 ` 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).