Thread overview
[Issue 12715] _compare_fp_t/qsort/bsearch C functions should be nothrow
May 09, 2014
Walter Bright
May 09, 2014
Denis Shelomovskij
May 09, 2014
Martin Nowak
May 09, 2014
Martin Nowak
Dec 17, 2022
Iain Buclaw
May 09, 2014
https://issues.dlang.org/show_bug.cgi?id=12715

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
This is deliberate. The reason is to not break existing code. People shouldn't have to go back and annotate code with 'nothrow' that was already working.

--
May 09, 2014
https://issues.dlang.org/show_bug.cgi?id=12715

Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|regression                  |normal

--- Comment #2 from Denis Shelomovskij <verylonglogin.reg@gmail.com> ---
(In reply to Walter Bright from comment #1)
> This is deliberate. The reason is to not break existing code. People shouldn't have to go back and annotate code with 'nothrow' that was already working.

But this code isn't "working". It's wrong and is a source of heisenbugs like every other code throwing exceptions across language boundaries. I see no excuse to have incorrect C library bindings and thus force D users to pay on-going cost of fixing heisenbugs because of it.

And yes, it isn't a regression.

--
May 09, 2014
https://issues.dlang.org/show_bug.cgi?id=12715

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |code@dawg.eu
           Severity|normal                      |regression

--- Comment #3 from Martin Nowak <code@dawg.eu> ---
(In reply to Walter Bright from comment #1)
> This is deliberate. The reason is to not break existing code. People shouldn't have to go back and annotate code with 'nothrow' that was already working.

Those callbacks were annotated nothrow 4 years ago so the code breaking
argument doesn't make sense.
https://github.com/WalterBright/druntime/commit/370ffd8d6da3978f742fd17572b418aaf85db355

Pull: https://github.com/D-Programming-Language/druntime/pull/787

--
May 09, 2014
https://issues.dlang.org/show_bug.cgi?id=12715

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|regression                  |normal

--- Comment #4 from Martin Nowak <code@dawg.eu> ---
(In reply to Martin Nowak from comment #3)
> (In reply to Walter Bright from comment #1)
> > This is deliberate. The reason is to not break existing code. People shouldn't have to go back and annotate code with 'nothrow' that was already working.
> 
> Those callbacks were annotated nothrow 4 years ago so the code breaking argument doesn't make sense. https://github.com/WalterBright/druntime/commit/ 370ffd8d6da3978f742fd17572b418aaf85db355

Sorry for the noise, global attributes do not affect function types in function signatures, so you were right about the code breakage.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=12715

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
December 07
https://issues.dlang.org/show_bug.cgi?id=12715

--- Comment #5 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17276

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--