This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Volatile MEMs in statement expressions and functions inlinedastrees



On Mon, 17 Dec 2001, Jason Merrill wrote:
>
> So it seems that lvalues do always decay to rvalues in C.  Interesting.

Quite frankly, there are almost _never_ any "strange corner cases" in C.

Whether that is because the language is so much simpler, or whether it's
just because it's older and has gone through more review, I don't know.

Expressions always decaying to rvalues helps (note how even the things the
standard mentions as _not_ decaying are actually only fragments of a valid
expression, and the expression itself will always become a rvalue in the
end).

Or maybe it's just because I'm so used to the language that I take the
"strange corner cases" for granted. I don't much like C++, I'd much rather
have a less complicated language that was basically C with some of the
concpetually clearer and simpler stuff lifted from C++.

(This is, obviously, how most C development has happened lately -
cherry-picking the few _clear_ and good ideas from C++. I bet C2005 will
have the notion of C++ classes, but without virtual member functions, for
example, and perhaps explicit pointers instead of subtle "pass by
reference").

Learn from the mistakes of others, I say.

		Linus


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