This is the mail archive of the gcc@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: GCC's statement expression extension




On Fri, 28 Jul 2000, Marc Espie wrote:
>
> I did not think you would be so daft as to take ++i behavior into this
> discussion.  C programmers know about it, unless they are fairly stupid.

Ehh.. I think the replies I got to it showed that no, not all C
programmers _do_ know about it.

And go back to the original "bug-report" in question. 

You have to be a REALLY stupid programmer to put a local label inside a
stateemnt expression and expect that to work. I think the "i++" example is
much less obviously a bug: "i++ + i++" _might_ have valid semantics.
Jumping into the middle of an expression obviously does not really have
valid semantics (which is not to say that it might not result in usable
code: I could imagine a diffs-device-like thing that might be fairly
atrocious, but I think gcc maintainers can safely ignore that).

Nobody hos shown any reasonable problem with the current statement
expressions in C. Yes, C++ may have problems. I think C++ has problems
regardless of statement expressions. Yet people have seriously proposed
making statement expressions deprecated in gcc (even in the C side of
things), even though they don't actually have any real problems associated
with them.

So what's the problem? Why do people hate it?

		Linus


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