This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: function returning lvalue instead of rvalue


"Simpson, Kenneth S" <kenneth.s.simpson@intel.com> writes:

| Hi,
|   The following program demonstrates either a bug in gcc or a misconception
| of mine.
| 
|   I believe that case 1 should fail in exactly the same way as case 3,
| meaning that the string returned from the function is not an lvalue.

No, objects of class-type are specila in that you may invoke non
member functions on them.  

-- Gaby
CodeSourcery, LLC                             http://www.codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]