digitalmars.D - [Request for ABI Breakage]: Ambiguity between extern(Pascal) vs.
- Iain Buclaw (14/14) May 16 2015 In this small snippet:
- Daniel Murphy (2/7) May 16 2015 Why do we even have extern(Pascal) ?
- Iain Buclaw via Digitalmars-d (3/9) May 16 2015 No idea. D has never supported 16-bit systems. Walter?
- Kagamin (2/2) May 16 2015 AFAIK, pascal calling convention exists for 32-bit systems too:
- Iain Buclaw (7/24) May 16 2015 This is blocking me with improving demangling support in
- weaselcat (5/30) May 16 2015 Sorry for the noise, but since you're here
- Iain Buclaw (2/35) May 16 2015 Binutils. Other tools may need similarly to be updated.
- Iain Buclaw (3/39) May 16 2015 By the way, "doesn't actually work" may need some explaining.
- Walter Bright (2/14) May 16 2015 Windows API calls used it.
- Steven Schveighoffer (6/25) May 18 2015 So would it make sense to use extern(Pascal) to only deal with Windows
- Walter Bright (2/3) May 18 2015 It's called "pascal" on the extensions to the C/C++ compilers.
- Steven Schveighoffer (5/9) May 18 2015 I meant call it something else, so it's not confused with the original
- Daniel Murphy (6/9) May 19 2015 It's not used for the Windows API, it _was_ used for the Windows API. T...
- Martin Nowak (3/5) May 18 2015 Well, change it to whatever letter works, if that resolves
In this small snippet: TS4html3dom4NodeVnnZ How am I supposed to know the difference between an extern(Pascal) function: html.dom.Node(none, none) And a template parameter list: html.dom.Node, null Since use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers. Regards Iain
May 16 2015
"Iain Buclaw" wrote in message news:uzmzjndohsiaewkjmchu forum.dlang.org...Once use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Why do we even have extern(Pascal) ?
May 16 2015
On 16 May 2015 at 16:34, Daniel Murphy via Digitalmars-d <digitalmars-d puremagic.com> wrote:"Iain Buclaw" wrote in message news:uzmzjndohsiaewkjmchu forum.dlang.org...No idea. D has never supported 16-bit systems. Walter?Once use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Why do we even have extern(Pascal) ?
May 16 2015
AFAIK, pascal calling convention exists for 32-bit systems too: http://www.freepascal.org/docs-html/prog/progse22.html
May 16 2015
On Saturday, 16 May 2015 at 15:46:20 UTC, Iain Buclaw wrote:On 16 May 2015 at 16:34, Daniel Murphy via Digitalmars-d <digitalmars-d puremagic.com> wrote:This is blocking me with improving demangling support in gdb/binutils. https://issues.dlang.org/show_bug.cgi?id=14591 https://github.com/D-Programming-Language/dmd/pull/4658 I may just drop support for recognising extern(Pascal) functions completely on my side."Iain Buclaw" wrote in message news:uzmzjndohsiaewkjmchu forum.dlang.org...No idea. D has never supported 16-bit systems. Walter?Once use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Why do we even have extern(Pascal) ?
May 16 2015
On Saturday, 16 May 2015 at 19:11:26 UTC, Iain Buclaw wrote:On Saturday, 16 May 2015 at 15:46:20 UTC, Iain Buclaw wrote:Sorry for the noise, but since you're here C++filt in binutils lists dlang support in the help but it doesn't actually work. Do I report this on binutils issue tracker, or gdc's?On 16 May 2015 at 16:34, Daniel Murphy via Digitalmars-d <digitalmars-d puremagic.com> wrote:This is blocking me with improving demangling support in gdb/binutils. https://issues.dlang.org/show_bug.cgi?id=14591 https://github.com/D-Programming-Language/dmd/pull/4658 I may just drop support for recognising extern(Pascal) functions completely on my side."Iain Buclaw" wrote in message news:uzmzjndohsiaewkjmchu forum.dlang.org...No idea. D has never supported 16-bit systems. Walter?Once use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Why do we even have extern(Pascal) ?
May 16 2015
On Saturday, 16 May 2015 at 19:16:04 UTC, weaselcat wrote:On Saturday, 16 May 2015 at 19:11:26 UTC, Iain Buclaw wrote:Binutils. Other tools may need similarly to be updated.On Saturday, 16 May 2015 at 15:46:20 UTC, Iain Buclaw wrote:Sorry for the noise, but since you're here C++filt in binutils lists dlang support in the help but it doesn't actually work. Do I report this on binutils issue tracker, or gdc's?On 16 May 2015 at 16:34, Daniel Murphy via Digitalmars-d <digitalmars-d puremagic.com> wrote:This is blocking me with improving demangling support in gdb/binutils. https://issues.dlang.org/show_bug.cgi?id=14591 https://github.com/D-Programming-Language/dmd/pull/4658 I may just drop support for recognising extern(Pascal) functions completely on my side."Iain Buclaw" wrote in message news:uzmzjndohsiaewkjmchu forum.dlang.org...No idea. D has never supported 16-bit systems. Walter?Once use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Why do we even have extern(Pascal) ?
May 16 2015
On Saturday, 16 May 2015 at 19:21:31 UTC, Iain Buclaw wrote:On Saturday, 16 May 2015 at 19:16:04 UTC, weaselcat wrote:By the way, "doesn't actually work" may need some explaining. (It works for me, for instance).On Saturday, 16 May 2015 at 19:11:26 UTC, Iain Buclaw wrote:Binutils. Other tools may need similarly to be updated.On Saturday, 16 May 2015 at 15:46:20 UTC, Iain Buclaw wrote:Sorry for the noise, but since you're here C++filt in binutils lists dlang support in the help but it doesn't actually work. Do I report this on binutils issue tracker, or gdc's?On 16 May 2015 at 16:34, Daniel Murphy via Digitalmars-d <digitalmars-d puremagic.com> wrote:This is blocking me with improving demangling support in gdb/binutils. https://issues.dlang.org/show_bug.cgi?id=14591 https://github.com/D-Programming-Language/dmd/pull/4658 I may just drop support for recognising extern(Pascal) functions completely on my side."Iain Buclaw" wrote in message news:uzmzjndohsiaewkjmchu forum.dlang.org...No idea. D has never supported 16-bit systems. Walter?Once use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Why do we even have extern(Pascal) ?
May 16 2015
On 5/16/2015 8:46 AM, Iain Buclaw via Digitalmars-d wrote:On 16 May 2015 at 16:34, Daniel Murphy via Digitalmars-d <digitalmars-d puremagic.com> wrote:Windows API calls used it."Iain Buclaw" wrote in message news:uzmzjndohsiaewkjmchu forum.dlang.org...No idea. D has never supported 16-bit systems. Walter?Once use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Why do we even have extern(Pascal) ?
May 16 2015
On 5/16/15 10:36 PM, Walter Bright wrote:On 5/16/2015 8:46 AM, Iain Buclaw via Digitalmars-d wrote:So would it make sense to use extern(Pascal) to only deal with Windows API calls? I can't see the OP's case html.dom.Node(none, none) being a Windows call. I'd also call it something else besides extern(Pascal) to avoid confusion. -SteveOn 16 May 2015 at 16:34, Daniel Murphy via Digitalmars-d <digitalmars-d puremagic.com> wrote:Windows API calls used it."Iain Buclaw" wrote in message news:uzmzjndohsiaewkjmchu forum.dlang.org...No idea. D has never supported 16-bit systems. Walter?Once use of extern(Pascal) should be exceedingly rare (I don't think I ever followed ABI convention in GDC) I'd either request that extern(Pascal) be removed completely, or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Why do we even have extern(Pascal) ?
May 18 2015
On 5/18/2015 6:51 AM, Steven Schveighoffer wrote:I'd also call it something else besides extern(Pascal) to avoid confusion.It's called "pascal" on the extensions to the C/C++ compilers.
May 18 2015
On 5/18/15 3:48 PM, Walter Bright wrote:On 5/18/2015 6:51 AM, Steven Schveighoffer wrote:I meant call it something else, so it's not confused with the original meaning of extern(Pascal). If you decided to limit it to only Windows API or similar functions. -SteveI'd also call it something else besides extern(Pascal) to avoid confusion.It's called "pascal" on the extensions to the C/C++ compilers.
May 18 2015
"Steven Schveighoffer" wrote in message news:mjdgdk$15c4$1 digitalmars.com...I meant call it something else, so it's not confused with the original meaning of extern(Pascal). If you decided to limit it to only Windows API or similar functions.It's not used for the Windows API, it _was_ used for the Windows API. The current calling convention is extern(Windows) which is IIRC the same thing with the argument push order reversed. It might still survive in a few dark corners, not sure.
May 19 2015
On Saturday, 16 May 2015 at 09:07:57 UTC, Iain Buclaw wrote:or have it's mangled symbol be renamed to something other than a 'V' that does not clash with other types/identifiers.Well, change it to whatever letter works, if that resolves mangling ambiguities.
May 18 2015