Does "Return value optimization" cause undefined behavior?
Posted
by 6pack kid
on Stack Overflow
See other posts from Stack Overflow
or by 6pack kid
Published on 2010-02-24T05:42:31Z
Indexed on
2010/05/17
5:30 UTC
Read the original article
Hit count: 178
c++
|returnvalueoptimization
Reading this Wikipedia article pointed by one of the repliers to the following question:
http://stackoverflow.com/questions/2323225/c-copy-constructor-temporaries-and-copy-semantics
I came across this line
Depending on the compiler, and the compiler's settings, the resulting program may display any of the following outputs:
Doesn't this qualify for undefined behavior? I know the article says Depending on the compiler and settings
but I just want to clear this.
© Stack Overflow or respective owner