V
vl106
char* foo () {
return "abc";
}
I compiled the above code both with MSVC and GCC for PPC. The string
"abc" is generated as a global entity. Thus (1) foo doesn't return a
temporary
and (2) no deallocation is necessary.
What does the standard say about this? Is this a "feature" I can rely on on
every
platform?
return "abc";
}
I compiled the above code both with MSVC and GCC for PPC. The string
"abc" is generated as a global entity. Thus (1) foo doesn't return a
temporary
and (2) no deallocation is necessary.
What does the standard say about this? Is this a "feature" I can rely on on
every
platform?