Subject: Re: EWG Requests feedback/suggestions on Core Issue 1555
From: Ville Voutilainen (ville.voutilainen_at_[hidden])
Date: 2020-05-14 00:22:13
On Thu, 14 May 2020 at 01:35, Richard Smith via SG12
>>> The status quo in the standard is:
>>> 1) Language linkage is part of the function type.
>>> 2) Initializing a function pointer with a wrong-language-linkage function (pointer) is a type error.
>>> 3) Explicitly casting a function pointer to the wrong type and calling it is UB.
>>> (a) the status quo: the standard continues to say the same thing and vendors continue to ignore it,
>>> (b) we remove point (1) above and break the targets relying on it, or
>>> (c) we remove point (2) above.
> Wow, this is embarrassing, that's still wrong. Should be:
> To me it seems like (a) and (b) are not acceptable resolutions, and EWG didn't like conditionally-supported-(c). So maybe we should be considering conditionally-supported-(b) (which would simply be standardizing existing practice).
Funny. From a programmer perspective, I would prefer removing all of
points 1, 2, and 3. I may be wrong,
but removing point 1 seems to result in points 2 and 3 being removed.
If I program with the false hope that 1/2/3 don't exist, what target
platforms is my code currently not portable to?
What platforms is it portable to?
SG12 list run by herb.sutter at gmail.com