Talk:c/language/functions
From cppreference.com
Could someone please clarify the following sentence?
"Each function that is *actually called* must be defined only once in a program..."
I think this is saying that identifiers appearing in unevaluated expressions are exempt from the one definition rule, but the current wording makes it seem like the one definition rule only applies to functions that are called.
Link to C11 6.9(5): https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf#page=173
Newb (talk) 21:29, 17 November 2022 (PST)
- yes, given that "actually called" links to description of unevaluated expressions, this was an attempt to compress the standard's "used in an expression other than as a part of the operand of a sizeof or _Alignof". I'll reword --Cubbi (talk) 09:11, 18 November 2022 (PST)
- Also, what about the case where the function is *not* used in an expression? It seems even such functions shall be defined no more than once (see [footnote 161](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf#page=173)). --Newb (talk) 17:47, 18 November 2022 (PST)