On 1/7/10 5:23 AM, Kevin O'Connor wrote:
I don't think the above is a problem (the pointer foo resides on the stack, but the string contents do not). The following is a problem:
const char foo[]="foobar\n";
(both the pointer and the array contents are on the stack), and indeed this does generate a warning from gcc.
Not with my default 4.3.2 -Wall -Wextra
Stefan