D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21178 - It is not explained what is "unknown"
Summary: It is not explained what is "unknown"
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P3 minor
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-08-19 14:45 UTC by Victor Porton
Modified: 2024-12-15 15:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Victor Porton 2020-08-19 14:45:18 UTC
https://dlang.org/spec/enum.html

"An empty enum body (For example enum E;) signifies an opaque enum - the enum members are unknown."

The specification is very unclear here:

What this "unknown" does mean? How does "unknown" differ from "none" in this context?

The specification does not define the meaning of unknown. Formal specifications should not use a word with no clear meaning.
Comment 1 kinke 2020-08-19 16:23:37 UTC
That's very subjective - I find it crystal-clear, especially with the 'opaque' hint - it's just like an opaque `struct S;` declaration. Sometimes, a full declaration isn't needed, e.g.:

extern(C++):
enum E : int;
void foo(E);
Comment 2 Dlang Bot 2023-02-01 18:56:41 UTC
@Mateiuss created dlang/dlang.org pull request #3512 "Fix Issue 21178" fixing this issue:

- Fix Issue 21178

https://github.com/dlang/dlang.org/pull/3512
Comment 3 dlangBugzillaToGithub 2024-12-15 15:26:35 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dlang.org/issues/4110

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