<s>
Unspecified	B-Language
behavior	I-Language
is	O
behavior	O
that	O
may	O
vary	O
on	O
different	O
implementations	O
of	O
a	O
programming	O
language	O
.	O
</s>
<s>
A	O
program	B-Application
can	O
be	O
said	O
to	O
contain	O
unspecified	B-Language
behavior	I-Language
when	O
its	O
source	O
code	O
may	O
produce	O
an	O
executable	B-Application
that	O
exhibits	O
different	O
behavior	O
when	O
compiled	B-Language
on	O
a	O
different	O
compiler	B-Language
,	O
or	O
on	O
the	O
same	O
compiler	B-Language
with	O
different	O
settings	O
,	O
or	O
indeed	O
in	O
different	O
parts	O
of	O
the	O
same	O
executable	B-Application
.	O
</s>
<s>
While	O
the	O
respective	O
language	O
standards	O
or	O
specifications	O
may	O
impose	O
a	O
range	O
of	O
possible	O
behaviors	O
,	O
the	O
exact	O
behavior	O
depends	O
on	O
the	O
implementation	O
and	O
may	O
not	O
be	O
completely	O
determined	O
upon	O
examination	O
of	O
the	O
program	B-Application
's	O
source	O
code	O
.	O
</s>
<s>
Unspecified	B-Language
behavior	I-Language
will	O
often	O
not	O
manifest	O
itself	O
in	O
the	O
resulting	O
program	B-Application
's	O
external	O
behavior	O
,	O
but	O
it	O
may	O
sometimes	O
lead	O
to	O
differing	O
outputs	O
or	O
results	O
,	O
potentially	O
causing	O
portability	B-Architecture
problems	O
.	O
</s>
<s>
To	O
enable	O
compilers	B-Language
to	O
produce	O
optimal	O
code	O
for	O
their	O
respective	O
target	O
platforms	O
,	O
programming	O
language	O
standards	O
do	O
not	O
always	O
impose	O
a	O
certain	O
specific	O
behavior	O
for	O
a	O
given	O
source	O
code	O
construct	O
.	O
</s>
<s>
Failing	O
to	O
explicitly	O
define	O
the	O
exact	O
behavior	O
of	O
every	O
possible	O
program	B-Application
is	O
not	O
considered	O
an	O
error	O
or	O
weakness	O
in	O
the	O
language	O
specification	O
,	O
and	O
doing	O
so	O
would	O
be	O
infeasible	O
.	O
</s>
<s>
In	O
the	O
C	B-Language
and	O
C++	B-Language
languages	I-Language
,	O
such	O
non-portable	O
constructs	O
are	O
generally	O
grouped	O
into	O
three	O
categories	O
:	O
Implementation-defined	O
,	O
unspecified	O
,	O
and	O
undefined	B-Language
behavior	I-Language
.	O
</s>
<s>
The	O
exact	O
definition	O
of	O
unspecified	B-Language
behavior	I-Language
varies	O
.	O
</s>
<s>
In	O
C++	B-Language
,	O
it	O
is	O
defined	O
as	O
"	O
behavior	O
,	O
for	O
a	O
well-formed	O
program	B-Application
construct	O
and	O
correct	O
data	O
,	O
that	O
depends	O
on	O
the	O
implementation.	O
"	O
</s>
<s>
The	O
C++	B-Language
Standard	O
also	O
notes	O
that	O
the	O
range	O
of	O
possible	O
behaviors	O
is	O
usually	O
provided	O
.	O
</s>
<s>
Similarly	O
,	O
the	O
C	B-Language
Standard	O
defines	O
it	O
as	O
behavior	O
for	O
which	O
the	O
standard	O
"	O
provides	O
two	O
or	O
more	O
possibilities	O
and	O
imposes	O
no	O
further	O
requirements	O
on	O
which	O
is	O
chosen	O
in	O
any	O
instance	O
"	O
.	O
</s>
<s>
Unspecified	B-Language
behavior	I-Language
is	O
different	O
from	O
undefined	B-Language
behavior	I-Language
.	O
</s>
<s>
The	O
latter	O
is	O
typically	O
a	O
result	O
of	O
an	O
erroneous	O
program	B-Application
construct	O
or	O
data	O
,	O
and	O
no	O
requirements	O
are	O
placed	O
on	O
the	O
translation	O
or	O
execution	O
of	O
such	O
constructs	O
.	O
</s>
<s>
C	B-Language
and	O
C++	B-Language
distinguish	O
implementation-defined	O
behavior	O
from	O
unspecified	B-Language
behavior	I-Language
.	O
</s>
<s>
An	O
example	O
in	O
C/C	O
++	O
is	O
the	O
size	O
of	O
integer	O
data	O
types	O
.	O
</s>
<s>
The	O
choice	O
of	O
behavior	O
must	O
be	O
consistent	O
with	O
the	O
documented	O
behavior	O
within	O
a	O
given	O
execution	O
of	O
the	O
program	B-Application
.	O
</s>
<s>
In	O
the	O
C	B-Language
and	O
C++	B-Language
languages	I-Language
,	O
this	O
also	O
applies	O
to	O
function	O
arguments	O
.	O
</s>
<s>
The	O
resulting	O
program	B-Application
will	O
write	O
its	O
two	O
lines	O
of	O
output	O
in	O
an	O
unspecified	O
order	O
.	O
</s>
<s>
In	O
other	O
languages	O
,	O
such	O
as	O
Java	B-Language
,	O
the	O
order	O
of	O
evaluation	O
of	O
operands	O
and	O
function	O
arguments	O
is	O
explicitly	O
defined	O
.	O
</s>
