Hi, does anyone know why the following peace of code compiles without warning?: int& max(int x, int y) { return (x < y)? y: x; } I would expect a warning message like "warning: reference to local variable... returned", but there isn't any warning. I can only guess that it is a runtime decision which reference to which variable should be returned. But why can't gcc take care of it and doesn't print a warning message like the above one? Thanks in advance, Steve
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature