- Why should a "c" programmer learn c++ ? (V2) - 2 Updates
- Ridiculously high standards? - 1 Update
Juha Nieminen <nospam@thanks.invalid>: Oct 05 05:56AM >> the function implementation. [...] > There is no reason the same thing couldn't happen with non-static > inline functions, when compiled under C rules. I don't think the compiler is allowed to do that with non-static inline functions, else you would get a linker error for duplicate symbols. > Can you first explain why I should want to spend my time and > effort to help educate someone who can't be bothered to try > to discover some answers for himself? Nice and amicable attitude. |
James Kuyper <jameskuyper@alumni.caltech.edu>: Oct 05 10:23AM -0400 On 10/5/20 1:56 AM, Juha Nieminen wrote: >> inline functions, when compiled under C rules. > I don't think the compiler is allowed to do that with non-static inline > functions, else you would get a linker error for duplicate symbols. When "compiled under C rules", there's two different cases where you could have a "non-static inline function". It could have external linkage because the first declaration of that function which is visible in a given scope explicitly uses "extern". However, it could also have external linkage simply because that declaration doesn't use the static keyword (C2011 6.2.2p5). If so, "If all of the file scope declarations for a function in a translation unit include the inline function specifier without extern, then the definition in that translation unit is an inline definition. An inline definition does not provide an external definition for the function, and does not forbid an external definition in another translation unit." (C2011 6.7.4p7). An "unwanted duplication of the function implementation" has no need to involve the linker, if it is an inline definition. >> Can you first explain why I should want to spend my time and >> effort to help educate someone who can't be bothered to try >> to discover some answers for himself? For, me, the reason is that I often need his help locating the clauses that he thinks prove his case, because I can't find them. On those rare occasions where he bothers actually identifying them, I often find that I disagree with him about whether those clauses prove his case, which is why my search failed to locate them. The time I wasted failing to locate them, and the time he wasted telling me to look harder, could have been more productively spent exploring the differences in our interpretations of those clauses, if he would simply identify them from the start. From past experience, such an exploration is unlikely to make either of us change our minds, but it might help other people make up theirs. |
Ben Bacarisse <ben.usenet@bsb.me.uk>: Oct 05 04:10AM +0100 > On Saturday, October 3, 2020 at 11:41:48 PM UTC-5, Chris M. Thomasson wrote: >> On 10/3/2020 7:47 PM, Brian Wood wrote: <cut> >> https://webebenezer.net/about.html >> right? > The only difference I see is you didn't capitalize a letter. Which (as you probably know) makes no difference in a domain name. But you typed H-M-T-L not H-T-M-L as well. -- Ben. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment