<div dir="ltr"><div>Cary,</div><div><br></div><div>it is comments like this which push me back toward the notion that the semantics of what a accessibility means is not a universal concept that can be captured within DWARF. It is contained within the language itself and is an agreement between the producer and the consumer. DWARF just has to convey, opaquely, the information from producer to consumer. I think this how it is going to have to be because there are so many nuances in the world of computer languages, that we cannot capture those if we try to give universal semantic meaning to them.</div><div><br></div><div>With that being the case, I think that my write up of the proposal is as it should be, We add 3 new accessibility specifications. It is up to Martin and other implementers of FreePascal in his compiler and the consumer to map those accessibility attributes to the source language keywords in their producer and consumer. A direct mapping of private to DW_ACCESS_private makes sense.</div><div><br></div><div>I think that the best that we can really do is give a suggested semantic meaning to DW_ACCESS_private and protected referencing C++. Then FreePascal and other can map the keyword "strict private" to DW_ACCESS_private and then the proposal would have to be changed to add DW_ACCESS_module_private and protected as you suggested. </div><div><br></div><div>I'm fine going either way. It is an epistemology, question and I just think language specific relative truth is going to be the best that we are ever going to achieve. </div><div><br></div><div>-ben</div><div><br></div><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Sep 28, 2026 at 2:24 AM Martin via Dwarf-discuss <<a href="mailto:dwarf-discuss@lists.dwarfstd.org">dwarf-discuss@lists.dwarfstd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 25/09/2026 19:12, Ben Woodard via Dwarf-discuss wrote:<br>
> <br>
> However, one thing that I am not really clear about in DWARF is does <br>
> DW_ACCESS_private have a specific semantic meaning independent of the <br>
> language. If it does, then it is not specified. I can see it two <br>
> different ways:<br>
> <br>
> DW_ACCESS_private has a semantic meaning in DWARF separate from the <br>
> language. In that case because the FreePascal concept of "strict <br>
> private" maps more closely to C++'s concept of "private" which is <br>
> translated in DWARF into DW_ACCESS_private, "strict private" should map <br>
> to DW_ACCESS_private.<br>
> <br>
> If we do this then I think we need to more clearly define what the <br>
> implied semantics of the Accessibility codes mean and do it in such a <br>
> way that it is independent of any language.<br>
> <br>
> The other way that I can see it is DWARF acts as a mapping between the <br>
> source language and the machine language and is interpreted by the <br>
> consumer only in the context of the the language that the code was <br>
> written in. In that case, it is the language that provides the semantic <br>
> meaning of what the Accessibility Declaration means. That would lead to <br>
> DW_ACCESS_private mapping to the (module) private keyword in the <br>
> language. Strict private mapping to "DW_OP_strict_private"...<br>
> <br>
> This would require more of the consumers. For example: libabigail would <br>
> have to understand the difference between "DW_ACCESS_private" as it <br>
> applies to C++ and how it applies to FreePascal.<br>
> <br>
Just to add some info, in case it may help with that decision.<br>
<br>
There likely will be some need of knowing the language to get the <br>
correct mapping.<br>
<br>
E.g. Delphi/FreePascal has "type/class helpers". Those are kind-of <br>
dataless classes, that can be used to<br>
- provide methods for another class<br>
- access protected (but not private) data across unit boundaries.<br>
<br>
They aren't an inherited class, more like a combination of interface and <br>
friend.<br>
<br>
But unlike (afaik?) a C++ friend, it only has (cross unit) access to <br>
protected, not private methods/data.<br>
<br>
So, if FPC where to declare them as friend, then the rules of what is <br>
accessible would be different from C++.<br>
<br>
-- <br>
Dwarf-discuss mailing list<br>
<a href="mailto:Dwarf-discuss@lists.dwarfstd.org" target="_blank">Dwarf-discuss@lists.dwarfstd.org</a><br>
<a href="https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss" rel="noreferrer" target="_blank">https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss</a><br>
<br>
</blockquote></div></div>