[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coteries: a clarification

There seems some confusion about "licensing the compiler". There are three cases of interest"

1) When the program controls the coterie of all data, by declaration and by explicit rules for intermediates. This is portable.
2) When the compiler chooses (some of) the coteries for declared variables, but the points at which coteries are changed in expressions are controlled by the explicit rules. With care the standard can be written so that the coteries chosen will be consistent and predictable for any given platform and so are (indirectly) under programmer control. This is not portable to other platforms but will give consistent results within any single platform.
3) Where the compiler chooses the points at which coteries are changed in expressions, whether or not it chose the coteries of declared variables. This is not in general portable to other platforms or even consistent within a single platform, and apparently minor source changes may affect result of operations remote from the change. However, it will usually give the most performant and may give the most precise results.

All three of these possibilities are meaningful and may be desirable for certain applications, and it is reasonable to support them in the standard. However, there has been some idea that it is possible to achieve the benefit of case #3 while retaining the benefits of case #2 (or case #1) by suitable constraining (probably by source annotation) the scope within which the compiler is licensed. This idea is false, however much to be hoped. It is in general impossible to define such a constraint mechanism without also so constraining other compiler activities that the compiler will in fact ignore its license and give you case #1 throughout. Or give you case #3 throughout, and standard be damned.


754 | revision | FAQ | references | list archive