------- Additional Comments From gdr at integrable-solutions dot net 2005-05-20 00:12 ------- Subject: Re: Loses temporary in complex expression
"igodard at pacbell dot net" <[EMAIL PROTECTED]> writes: | In particular, once you get all the template armwaving out of it: | | int& foo(int i) { return i; } | | should warn and does not. It does with my compiler: % cat a.C && g++ -c -Wall a.C int& f(int i) { return i; } a.C: In function 'int& f(int)': a.C:2: warning: reference to local variable 'i' returned -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21672