The term unspecified behaviour is used to describe areas of the C language which may be implemented legitimately in more than one way. The chosen implementation may not be predictable, may vary according to context and may not be documented. Some examples are:
Unspecified behaviour is not a problem in itself; reliance on unspecified behaviour - which may work in some circumstances but not in others - clearly is. It is more or less inevitable that there will be aspects of any program that include unspecified behaviour. Problems arise only when reliance is placed on a particular behaviour which cannot be assumed. In the statement "x = foo1( ) + foo2( );", the order in which foo1 and foo2 are called is unspecified. This is of no consequence unless foo1 and foo2 are in some way interdependent, for example, because one function updates an object that is referenced by the other.
See also: