Sujet : Re: __func__ is not a keyword
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 16. Mar 2025, 21:35:36
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vr7cmo$2fpma$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
On 3/16/25 15:05, Kaz Kylheku wrote:
On 2025-03-16, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
...
It's not a conformance issue, since __func__ is a reserved identifier
and any code that can tell whether it's a keyword has undefined
behavior.
But __func__ is not a reserved identifier!
Footnote 79 disagrees: "79) Since the name __func__ is reserved for any
use by the implementation (7.1.3), if any other identifier is explicitly
declared using the name __func__, the behavior is undefined."
Actually, I don't see how 7.1.3 applies. I think the conclusion is
correct, but the relevant citation should be 6.2.4.1p7: "All identifiers
that begin with a double underscore (__) ... are reserved for any use.
...". That wording used to be in 7.1.3. That wording was moved from
7.3.1 in n2573.pdf (2020-10-01) to 6.2.4.1 in n2596.pdf (2020-12-11).