public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/110471] New: d: Don't generate code that throws exceptions when compiling with `-fno-exceptions'
@ 2023-06-28 21:24 ibuclaw at gcc dot gnu.org
2023-07-01 15:49 ` [Bug d/110471] " cvs-commit at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ibuclaw at gcc dot gnu.org @ 2023-06-28 21:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110471
Bug ID: 110471
Summary: d: Don't generate code that throws exceptions when
compiling with `-fno-exceptions'
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: ibuclaw at gcc dot gnu.org
Target Milestone: ---
The predefined version conditions D_ModuleInfo, D_Exceptions, and D_TypeInfo
were added in r9-7112. However individual feature flags do not turn off these
versions.
For example. this should succeed compilation.
// { dg-options "-fno-exceptions" }
version (D_Exceptions)
static assert(false); // expected to never trigger.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug d/110471] d: Don't generate code that throws exceptions when compiling with `-fno-exceptions'
2023-06-28 21:24 [Bug d/110471] New: d: Don't generate code that throws exceptions when compiling with `-fno-exceptions' ibuclaw at gcc dot gnu.org
@ 2023-07-01 15:49 ` cvs-commit at gcc dot gnu.org
2023-07-01 15:50 ` cvs-commit at gcc dot gnu.org
2023-07-01 15:57 ` ibuclaw at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-01 15:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110471
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:
https://gcc.gnu.org/g:da108c75ad386b3f1f47abb2265296e4b61d578a
commit r14-2232-gda108c75ad386b3f1f47abb2265296e4b61d578a
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Sat Jul 1 17:01:30 2023 +0200
d: Don't generate code that throws exceptions when compiling with
`-fno-exceptions'
The version flags for RTMI, RTTI, and exceptions was unconditionally
predefined. These are now only predefined if the feature flag is
enabled. It was noticed that there was no `-fexceptions' definition
inside d/lang.opt, so the detection of the exceptions option flag was
only partially working. Once that was fixed, a few places in the
front-end implementation were found to fall fowl of `nothrow' rules,
these have been fixed upstream and backported here as well.
Reviewed-on: https://github.com/dlang/dmd/pull/15357
https://github.com/dlang/dmd/pull/15360
PR d/110471
gcc/d/ChangeLog:
* d-builtins.cc (d_init_versions): Predefine D_ModuleInfo,
D_Exceptions, and D_TypeInfo only if feature is enabled.
* lang.opt: Add -fexceptions.
gcc/testsuite/ChangeLog:
* gdc.dg/pr110471a.d: New test.
* gdc.dg/pr110471b.d: New test.
* gdc.dg/pr110471c.d: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug d/110471] d: Don't generate code that throws exceptions when compiling with `-fno-exceptions'
2023-06-28 21:24 [Bug d/110471] New: d: Don't generate code that throws exceptions when compiling with `-fno-exceptions' ibuclaw at gcc dot gnu.org
2023-07-01 15:49 ` [Bug d/110471] " cvs-commit at gcc dot gnu.org
@ 2023-07-01 15:50 ` cvs-commit at gcc dot gnu.org
2023-07-01 15:57 ` ibuclaw at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-01 15:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110471
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:
https://gcc.gnu.org/g:6e7909191ada316a426739eab88139d63194e05a
commit r13-7518-g6e7909191ada316a426739eab88139d63194e05a
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Sat Jul 1 17:01:30 2023 +0200
d: Don't generate code that throws exceptions when compiling with
`-fno-exceptions'
The version flags for RTMI, RTTI, and exceptions was unconditionally
predefined. These are now only predefined if the feature flag is
enabled. It was noticed that there was no `-fexceptions' definition
inside d/lang.opt, so the detection of the exceptions option flag was
only partially working. Once that was fixed, a few places in the
front-end implementation were found to fall fowl of `nothrow' rules,
these have been fixed upstream and backported here as well.
Reviewed-on: https://github.com/dlang/dmd/pull/15357
https://github.com/dlang/dmd/pull/15360
PR d/110471
gcc/d/ChangeLog:
* d-builtins.cc (d_init_versions): Predefine D_ModuleInfo,
D_Exceptions, and D_TypeInfo only if feature is enabled.
* lang.opt: Add -fexceptions.
gcc/testsuite/ChangeLog:
* gdc.dg/pr110471a.d: New test.
* gdc.dg/pr110471b.d: New test.
* gdc.dg/pr110471c.d: New test.
(cherry picked from commit da108c75ad386b3f1f47abb2265296e4b61d578a)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug d/110471] d: Don't generate code that throws exceptions when compiling with `-fno-exceptions'
2023-06-28 21:24 [Bug d/110471] New: d: Don't generate code that throws exceptions when compiling with `-fno-exceptions' ibuclaw at gcc dot gnu.org
2023-07-01 15:49 ` [Bug d/110471] " cvs-commit at gcc dot gnu.org
2023-07-01 15:50 ` cvs-commit at gcc dot gnu.org
@ 2023-07-01 15:57 ` ibuclaw at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ibuclaw at gcc dot gnu.org @ 2023-07-01 15:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110471
ibuclaw at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from ibuclaw at gcc dot gnu.org ---
Fix committed and backported to gcc-13.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-01 15:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 21:24 [Bug d/110471] New: d: Don't generate code that throws exceptions when compiling with `-fno-exceptions' ibuclaw at gcc dot gnu.org
2023-07-01 15:49 ` [Bug d/110471] " cvs-commit at gcc dot gnu.org
2023-07-01 15:50 ` cvs-commit at gcc dot gnu.org
2023-07-01 15:57 ` ibuclaw 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).