Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify meaning of "has an interface dependency [...] prior to X" #3502

Open
zygoloid opened this issue Nov 20, 2019 · 1 comment
Open

clarify meaning of "has an interface dependency [...] prior to X" #3502

zygoloid opened this issue Nov 20, 2019 · 1 comment

Comments

@zygoloid
Copy link
Member

The phrase "has an interface dependency [...] prior to X" appears in [module.reach]p1 and [basic.start.dynamic]p1, but isn't defined. Per [module.import]p7, "has an interface dependency on" is a relation between translation units, with no associated "location" to be prior to.

It's obvious what it means: the interface dependency is caused by some construct (in this case, a module-declaration or module-import-declaration) that appears prior to X. But we should say that!

@RedBeard0531
Copy link
Contributor

Related #4032

http://eel.is/c++draft/module#reach-2 uses a similar construction "translation units on which the point within the program has an interface dependency". With the current definition of "has an interface dependency on" it is ambiguous whether the intent was to allow a later import is allowed to make a TU incidentally reachable as of an earlier point in the program. Because that paragraph is a relaxation of the strict necessarily reachable rule intended to simplify implementations, that seems like a reasonable interpretation because it would allow eagerly loading all referenced BMIs at the start of compiling a TU, rather than lazily loading them as they are imported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants