Bug 115558 - Trivial noexcept(false) default constructor does not make value initialization potentially throwing
Summary: Trivial noexcept(false) default constructor does not make value initializatio...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 15.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2024-06-20 14:09 UTC by Mital Ashok
Modified: 2024-06-24 17:08 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2024-06-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mital Ashok 2024-06-20 14:09:51 UTC
This is related to DR2820 https://cplusplus.github.io/CWG/issues/2820.html

struct X {
    X() noexcept(false) = default;
};
static_assert(!noexcept(X()));  // Should pass, but does not

Similar to Bug 114844 and https://cplusplus.github.io/CWG/issues/2886.html
Comment 2 Andrew Pinski 2024-06-20 14:41:04 UTC
I see this was just accepted as a defect report this year even:
[Accepted as a DR at the March, 2024 meeting.]
Comment 3 Marek Polacek 2024-06-24 17:08:43 UTC
Probably mine then; thanks for the report.