Philip Ashmore writes:
> "reference to a char *" should read "reference to a char * on the stack"
gcc does warn about obvious instances of this; do you know why it
doesn't in this case?
For instance in this case:
#include
char *f ()
{
char a[10];
return strcpy (a, "hello");
"reference to a char *" should read "reference to a char * on the stack"
--
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4e7d6c7a.1070...@philipashmore.com
Hi there.
It turns out that the problem was in the debug version - it shouldn't have
worked.
Further, the compiler should have noticed a reference to a stack variable being
returned,
but that didn't happen either.
It's still my bad though. Sorry if I've wasted your time.
Maybe this problem ca
3 matches
Mail list logo