------- Additional Comments From jsm28 at gcc dot gnu dot org 2005-06-13 23:18 ------- There is a case the multiple static inline definitions of the same function in a translation unit violate the constraint of 6.9#3 (no more than one external definition of an identifier with internal linkage in the same translation unit), if you take the definition of "inline definition" in 6.7.4#6 as only applying to functions with external linkage.
In general C99 presumes there is no more than one definition of a function in a translation unit (in 6.7.4#6) but has no constraint requiring this to be diagnosed. I think it would be reasonable in C99 mode, as part of an implementation of C99 inline semantics, to prohibit all such cases. inline in gnu89 mode should remain compatible with traditional GCC semantics, which in the case of the present bug means rejecting the problem code but in some cases may mean accepting it (in particular where one definition is extern inline). -- What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm28 at gcc dot gnu dot org OtherBugsDependingO| |16989 nThis| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22052