...
Some compilers generate a diagnostic message when a pointer to an object with automatic storage duration is returned from a function, as in this example. Programmers should compile code at high warning levels and resolve any diagnostic messages. (see See MSC00-C. Compile cleanly at high warning levels.).
Compliant Solution (Return Values)
...