Since C does not have namespaces, these libraries use internal linkage to avoid symbol conflicts. However, in C++, especially when writing modules, this is entirely unnecessary. These libraries can detect __cplusplus or some specific macro and drop static accordingly, without breaking existing code.


From: Std-Proposals <std-proposals-bounces@lists.isocpp.org> on behalf of Rainer Deyke via Std-Proposals <std-proposals@lists.isocpp.org>
Sent: Monday, June 22, 2026 20:04
To: std-proposals@lists.isocpp.org <std-proposals@lists.isocpp.org>
Cc: Rainer Deyke <rainerd@eldwood.com>
Subject: Re: [std-proposals] Proposal: Deprecate namespace-scope declarations that are declared both static and inline
 


On 6/22/26 13:23, Yexuan Xiao via Std-Proposals wrote:
> It seems that some C code likes to use static inline to indicate that a function should be inlined, but this is inconsistent with C++ conventions.

Given that the C code already exists and is already used from C++,
wouldn't it make more sense to give the C code C-like semantics in C++?


--
Rainer Deyke - rainerd@eldwood.com
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals