Jump to page: 1 2
Thread overview
[Issue 4541] Intrinsic functions do not have pointers
Jul 08, 2015
Marc Schütz
Aug 29, 2015
yebblies
Jun 17, 2016
Mathias Lang
Jun 17, 2016
Mathias Lang
Jul 12, 2017
RazvanN
Jul 12, 2017
Mathias Lang
Oct 25, 2017
Walter Bright
Oct 25, 2017
Mathias Lang
Dec 17, 2022
Iain Buclaw
Oct 16, 2023
Dlang Bot
June 09, 2015
https://issues.dlang.org/show_bug.cgi?id=4541

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|D1 & D2                     |D2

--
July 08, 2015
https://issues.dlang.org/show_bug.cgi?id=4541

Marc Schütz <schuetzm@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schuetzm@gmx.net

--- Comment #4 from Marc Schütz <schuetzm@gmx.net> ---
Still in DMD master. See http://forum.dlang.org/post/fyywzedmhacyyaqvglwa@forum.dlang.org

--
August 22, 2015
https://issues.dlang.org/show_bug.cgi?id=4541

hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh@quickfur.ath.cx

--- Comment #5 from hsteoh@quickfur.ath.cx ---
Perhaps a possible workaround is to have the compiler emit a wrapper function when the address of an intrinsic is asked for, and return the pointer to the wrapper?

--
August 29, 2015
https://issues.dlang.org/show_bug.cgi?id=4541

yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies@gmail.com
           Hardware|Other                       |All
                 OS|Windows                     |All

--
June 17, 2016
https://issues.dlang.org/show_bug.cgi?id=4541

Mathias Lang <mathias.lang@sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mathias.lang@sociomantic.co
                   |                            |m

--- Comment #6 from Mathias Lang <mathias.lang@sociomantic.com> ---
intrinsic have been moved to `core.math` and `std.math` nowadays (since 2.069 / https://github.com/dlang/phobos/pull/3599 ) provide wrappers around it to mitigate the issue.

In order to reproduce this, one can use:

import core.math;
void main() {
    real function(real) c = &sin;
}

instead of the op's code.

--
June 17, 2016
https://issues.dlang.org/show_bug.cgi?id=4541

Mathias Lang <mathias.lang@sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b.helyer@gmail.com

--- Comment #7 from Mathias Lang <mathias.lang@sociomantic.com> ---
*** Issue 5305 has been marked as a duplicate of this issue. ***

--
July 12, 2017
https://issues.dlang.org/show_bug.cgi?id=4541

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |FIXED

--- Comment #8 from RazvanN <razvan.nitu1305@gmail.com> ---
I think that this issue is no longer valid since using the std.math wrappers
results in successful compilation. Even though using core.math results in link
failure, I do not think this is a problem since that is the runtime library and
who uses it should know that the functions declared there are intrinsics.
Anyway, this is not a phobos bug anymore and I don't think it is a druntime one
either. Closing
as fixed.

--
July 12, 2017
https://issues.dlang.org/show_bug.cgi?id=4541

Mathias Lang <mathias.lang@sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
          Component|phobos                      |dmd
         Resolution|FIXED                       |---

--- Comment #9 from Mathias Lang <mathias.lang@sociomantic.com> ---
I strongly disagree with closing this bug.

> Even though using core.math results in link failure, I do not think this is a problem since that is the runtime library and who uses it should know that the functions declared there are intrinsics.

Relying on user knowing of internal details is not a solution. Moreover, this doesn't take into account generic code. If one write a template that accept a static function via a template this argument, do you really expect this person to handle the case of someone passing an intrinsic explicitly ?

Intrinsics shouldn't differ from regular functions.

> Anyway, this is not a phobos bug anymore and I don't think it is a druntime one either. Closing as fixed.

The correct course of action would be to properly tag the bug as being within DMD.

--
October 25, 2017
https://issues.dlang.org/show_bug.cgi?id=4541

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|---                         |WORKSFORME

--- Comment #10 from Walter Bright <bugzilla@digitalmars.com> ---
It works fine when I try it with the latest.

--
October 25, 2017
https://issues.dlang.org/show_bug.cgi?id=4541

Mathias Lang <mathias.lang@sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |---

--- Comment #11 from Mathias Lang <mathias.lang@sociomantic.com> ---
@Walter: Did you read the comments ?

The test case nowadays is:
```
import core.math;
void main() {
    real function(real) c = &sin;
}
```

And it still fails:
```
test.o: In function `_Dmain':
test.d:(.text._Dmain[_Dmain]+0x7): undefined reference to
`_D4core4math3sinFNaNbNiNfeZe'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
```

Tested with both 2.076.1 and HEAD (51bc2fb42)

--
« First   ‹ Prev
1 2