Topic: Allow attributes on template explicit instantiations
Author: Matthew Woehlke <mwoehlke.floss@gmail.com>
Date: Tue, 23 Aug 2016 15:21:13 -0400
Raw View
Consider the following code which exports an explicit instantiation of a
template (e.g. imagine this is in a .cpp file of a library):
template <typename T> T foo(T*)
{
// ...
}
template FOO_EXPORT int foo<int>(int*);
Modern C++ allows FOO_EXPORT on ELF platforms using GCC and Clang to be
defined as `[[gnu::visibility("default")]]`... right?
Alas, no. Attributes on explicit instantiations are explicitly forbidden
([dcl.attr.grammar]/5). (Despite that, GCC is happy to DTRT here. Clang,
however, enforces the standard, even though this particular prohibition
- especially for the attribute in this example - seems to be of
questionable value.)
This is obviously unfortunate. Is there any reason for this restriction
to be in place? If not, I propose to remove it.
--
Matthew
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/npi7n9%24ccj%241%40blaine.gmane.org.
.
Author: Matthew Woehlke <mwoehlke.floss@gmail.com>
Date: Fri, 26 Aug 2016 10:32:02 -0400
Raw View
This is a multi-part message in MIME format.
--------------030901000002000307080307
Content-Type: text/plain; charset=UTF-8
On 2016-08-23 15:21, Matthew Woehlke wrote:
> Consider the following code which exports an explicit instantiation of a
> template (e.g. imagine this is in a .cpp file of a library):
>
> template <typename T> T foo(T*)
> {
> // ...
> }
> template FOO_EXPORT int foo<int>(int*);
>
> Modern C++ allows FOO_EXPORT on ELF platforms using GCC and Clang to be
> defined as `[[gnu::visibility("default")]]`... right?
>
> Alas, no. Attributes on explicit instantiations are explicitly forbidden
> ([dcl.attr.grammar]/5). (Despite that, GCC is happy to DTRT here. Clang,
> however, enforces the standard, even though this particular prohibition
> - especially for the attribute in this example - seems to be of
> questionable value.)
>
> This is obviously unfortunate. Is there any reason for this restriction
> to be in place? If not, I propose to remove it.
That exciting, huh?
Well, here's a paper. Comments appreciated!
--
Matthew
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/57C052E2.8020704%40gmail.com.
--------------030901000002000307080307
Content-Type: text/html; charset=UTF-8;
name="dxxxx-instantiation-attributes.html"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="dxxxx-instantiation-attributes.html"
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiID8+CjwhRE9DVFlQRSBodG1s
IFBVQkxJQyAiLS8vVzNDLy9EVEQgWEhUTUwgMS4wIFRyYW5zaXRpb25hbC8vRU4iICJodHRw
Oi8vd3d3LnczLm9yZy9UUi94aHRtbDEvRFREL3hodG1sMS10cmFuc2l0aW9uYWwuZHRkIj4K
PGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiIHhtbDpsYW5nPSJl
biIgbGFuZz0iZW4iPgo8aGVhZD4KPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBj
b250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9dXRmLTgiIC8+CjxtZXRhIG5hbWU9ImdlbmVy
YXRvciIgY29udGVudD0iRG9jdXRpbHMgMC4xMjogaHR0cDovL2RvY3V0aWxzLnNvdXJjZWZv
cmdlLm5ldC8iIC8+Cjx0aXRsZT5BbGxvdyBBdHRyaWJ1dGVzIG9uIFRlbXBsYXRlIEV4cGxp
Y2l0IEluc3RhbnRpYXRpb25zPC90aXRsZT4KPG1ldGEgbmFtZT0iZGF0ZSIgY29udGVudD0i
MjAxNi0wOC0yMyIgLz4KPG1ldGEgbmFtZT0iYXV0aG9yIiBjb250ZW50PSJNYXR0aGV3IFdv
ZWhsa2UgKG13b2VobGtlLmZ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jQ2MDYucGRmIj5odHRwOi8vd3d3Lm9wZW4t
c3RkLm9yZy9qdGMxL3NjMjIvd2cyMS9kb2NzL3BhcGVycy8yMDE2L240NjA2LnBkZjwvYT48
L3A+CjwvbGk+CjwvdWw+CjwhLS0gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4g
Li4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLi4gLS0+CjwhLS0ga2F0
ZTogaGwgcmVTdHJ1Y3R1cmVkVGV4dCAtLT4KPC9kaXY+CjwvZGl2Pgo8L2JvZHk+CjwvaHRt
bD4K
--------------030901000002000307080307
Content-Type: text/prs.fallenstein.rst;
name="dxxxx-instantiation-attributes.rst"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="dxxxx-instantiation-attributes.rst"
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
Allow Attributes on Template Explicit Instantiations
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
:Document: Dxxxx
:Date: 2016-08-23
:Project: ISO/IEC JTC1 SC22 WG21 Programming Language C++
:Audience: Evolution Working Group
:Author: Matthew Woehlke (mwoehlke.floss@gmail.com)
=2E. raw:: html
<style>
html { color: black; background: white; }
table.docinfo { margin: 2em 0; }
.literal-block { background: #eee; border: 1px solid #ddd; padding: 0=
=2E5em; }
.addition { color: #2c2; text-decoration: underline; }
.removal { color: #e22; text-decoration: line-through; }
.literal-block .literal-block { background: none; border: none; }
.block-addition { background: #cfc; text-decoration: underline; }
</style>
=2E. role:: add
:class: addition
=2E. role:: del
:class: removal
Abstract
=3D=3D=3D=3D=3D=3D=3D=3D
This proposal recommends to remove the prohibition against attributes on =
a template explicit instantiation.
(Note: references made to the existing draft standard are made against N4=
606_.)
=2E. contents::
Problem
=3D=3D=3D=3D=3D=3D=3D
When creating a C++ library, it is typically necessary to annotate in som=
e manner those functions which should be made available to consumers of t=
he library (as opposed to being internal to the library itself). On Windo=
ws, this takes the form of ``__declspec(dllexport)``. On ELF platforms, w=
hen using hidden visibility, this may look like ``__attribute__((visibili=
ty("default")))``. Since the proper decoration is dependent on multiple f=
actors |--| target platform being the most obvious, but in the case of ``=
__declspec``, the decoration must differ depending on whether the library=
is being built or consumed |--| most libraries will define a preprocesso=
r "export decoration symbol" to simplify 'decorating' functions to be exp=
orted.
Combined with templates, where the definition of a template function may =
be internal, but certain instantiations need to be made available to user=
s of the library, one can image code like so:
=2E. code:: c++
// A template function
template <typename T> T foo(T*)
{
// ...
}
// An exported explicit instantiation
template FOO_EXPORT int foo<int>(int*);
Since attributes were introduced in C++11, there has been activity toward=
standardizing the mechanisms for export decoration. In particular, GCC a=
nd Clang support the use of ``[[gnu::visibility("default")]]`` as a repla=
cement for ``__attribute__((visibility("default")))``. This is an obvious=
improvement: it is shorter to write, and compilers that don't understand=
the C++11 attribute may ignore it, rather than raising a syntax error as=
would be the case if the old form were used with a compiler that does no=
t support it.
Astute readers may have spotted the problem by now: *explicit instantiati=
ons forbid attributes* ([dcl.attr.grammar]\ |para|\ 5). This means that t=
he above example cannot use a C++11 attribute on a conforming compiler; i=
ndeed, there is no way to write strictly conforming code that also specif=
ies that the instantiation should be exported.
Proposal
=3D=3D=3D=3D=3D=3D=3D=3D
Presently, C++ forbids attributes on template explicit instantiations. We=
suspect that this limitation was imposed in the belief that there are no=
reasonable attributes that might be applied to such. However, as we have=
shown above, this is not the case.
We propose to remove this restriction. The standard already allows that a=
n unreasonable attribute may be rejected, so this change by itself does n=
ot introduce the ability to do undesirable things. However, it would add =
freedom to compiler vendors, by allowing them to accept reasonable attrib=
utes (e.g. vendor-specific attributes such as export annotation) applied =
to explicit instantiations. In particular, this change addresses an issue=
which prevents authors from fully switching to C++11 attributes for expo=
rt decoration.
We believe that the utility of this change is self evident, as exemplifie=
d above, and that it matches programmer expectations. We are also not awa=
re of any serious reasons for the restriction to exist.
Proposed Wording
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Proposed changes are specified relative to N4606_.)
In [dcl.attr.grammar]\ |para|\ 5, make the following change:
=2E. compound::
:class: literal-block
Each *attribute-specifier-seq* is said to *appertain* to some entity or=
statement, identified by the syntactic context where it appears (Clause =
6, Clause 7, Clause 8).
If an *attribute-specifier-seq* that appertains to some entity or state=
ment contains an *attribute* that is not allowed to apply to that entity =
or statement, the program is ill-formed.
If an *attribute-specifier-seq* appertains to a friend declaration (11.=
3), that declaration shall be a definition. :del:`No *attribute-specifier=
-seq* shall appertain to an explicit instantiation (14.7.2).`
Implementation
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
At least GCC 4.8 and 6.1 (and presumably all intervening versions) do not=
implement this restriction and allow attributes |--| at least the ``gnu:=
:visibility`` attribute |--| to be applied to explicit instantiations.
Acknowledgments
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
We wish to thank Richard Smith for pointing out this prohibition.
References
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=2E. _N4606: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n460=
6.pdf
* N4606_ Working Draft, Standard for Programming Language C++
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4606.pdf
=2E. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..=
.. ..
=2E. |--| unicode:: U+02014 .. em dash
=2E. |para| unicode:: U+00B6 .. paragraph sign
=2E. kate: hl reStructuredText
--------------030901000002000307080307--
.