Re: Bug#630441: g++-4.6 miscompilation

2011-09-23 Thread Miles Bader
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");

Bug#630441: g++-4.6 miscompilation

2011-09-23 Thread Philip Ashmore
"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

Bug#630441: g++-4.6 miscompilation

2011-09-23 Thread Philip Ashmore
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