public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61105] New: [constexpr] accepts-invalid with new-expression in constant expression
@ 2014-05-07 22:04 richard-gccbugzilla at metafoo dot co.uk
  2014-09-16 16:35 ` [Bug c++/61105] " paolo.carlini at oracle dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2014-05-07 22:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61105
           Summary: [constexpr] accepts-invalid with new-expression in
                    constant expression
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: richard-gccbugzilla at metafoo dot co.uk

G++ accepts this ill-formed code:

using size_t = decltype(sizeof(0));
constexpr void *operator new(size_t, int*) noexcept { return nullptr; }
constexpr int *p = new (nullptr) int;

This is invalid because a constant expression cannot contain an (evaluated)
new-expression.


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

end of thread, other threads:[~2021-08-20  9:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07 22:04 [Bug c++/61105] New: [constexpr] accepts-invalid with new-expression in constant expression richard-gccbugzilla at metafoo dot co.uk
2014-09-16 16:35 ` [Bug c++/61105] " paolo.carlini at oracle dot com
2015-04-22 12:01 ` jakub at gcc dot gnu.org
2015-07-16  9:18 ` rguenth at gcc dot gnu.org
2021-08-19 21:55 ` pinskia at gcc dot gnu.org
2021-08-20  9:07 ` redi 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).