According to One Definition Rule (ODR) I can\'t have a function
void function()
{
}
defined more than once in one executable - linker will
Yes, it is UB for inline functions with external linkage (I think that's what the OP intends).
$3.2/5-
There can be more than one definition of a class type (clause 9), enumeration type (7.2), inline function with external linkage (7.1.2), class template (clause 14), non-static function template (14.5.5), static data member of a class template (14.5.1.3), member function of a class template (14.5.1.1), or template specialization for which some template parameters are not specified (14.7, 14.5.4) in a program provided that each definition appears in a different translation unit, and provided the definitions satisfy the following requirements.
Given such an entity named D defined in more than one translation unit, then
— each definition of D shall consist of the same sequence of tokens; and
The same paragraph at the end states that failure to meet these requirements leads to UB