[Pyrex] Pyrex and C++

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Nov 17 05:36:18 CET 2003


Michael JasonSmith <mpj17 at student.canterbury.ac.nz>:

> C (well, gcc...) allows you to assign to a "non l-value", as so
> 	foo - 3 = bar;

Er... no, not even C is mad enough to allow *that*!
(I tried it, just to be sure, and gcc complains.)

The problem only occurs with casts, and it's because in C you can cast
an lvalue and the result (in some cases, at least) is still considered
an lvalue. In C++, on the other hand, it apparently isn't.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list