From -8176155428412436399
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,a5e7fc89a8659411
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-07-23 08:36:54 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: gdr@integrable-solutions.net (Gabriel Dos Reis)
Newsgroups: comp.std.c++
Subject: Re: Voided application of indirection operator to pointer-to-void
Date: Wed, 23 Jul 2003 15:36:52 +0000 (UTC)
Organization: Integrable Solutions
Lines: 76
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <m33cgxk21d.fsf@uniton.integrable-solutions.net>
References: <5765b025.0307210232.6c571eff@posting.google.com> <slrnbho5vh.18k.do-not-spam-benh@tin.bwsint.com> <m3smozpw0n.fsf@uniton.integrable-solutions.net> <slrnbhq8d0.18k.do-not-spam-benh@tin.bwsint.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: mail2news.demon.co.uk 1058974612 5392 10.0.0.1 (23 Jul 2003 15:36:52 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 23 Jul 2003 15:36:52 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 19fLff-0001Op-00
	for mail2news@news.news.demon.net; Wed, 23 Jul 2003 15:36:51 +0000
X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU
	id BAA05029; Thu, 24 Jul 2003 01:36:47 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-NNTP-Posting-Date: Wed, 23 Jul 2003 09:53:01 +0000 (UTC)
X-User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1
X-Spam-Status: No, hits=-6.4 required=5.0
	tests=BAYES_01,EMAIL_ATTRIBUTION,REFERENCES,USER_AGENT_GNUS_UA
	version=2.55
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Xref: archiver1.google.com comp.std.c++:20290

do-not-spam-benh@bwsint.com (Ben Hutchings) writes:

| In article <m3smozpw0n.fsf@uniton.integrable-solutions.net>,
| Gabriel Dos Reis wrote:
| > do-not-spam-benh@bwsint.com (Ben Hutchings) writes:
| > 
| >|                                                       (void rvalues do
| >| exist in both C and C++, though.)
| > 
| > C does not have "rvalue".  It, however, has the notion of 'lvalue'.
| 
| I know it uses the term "value of an expression", but it also notes that
| this is sometimes called "rvalue". 

notes are not normative.  Furthermore, "value of an expression" is
used in a greater generality, and the only places where the C standard
uses the phrase "value of an expression" are: 

  1) in the non-normative text that is also the only place where the
     term "rvalue" appears.

  2)  6.5.4/4

       [#4] Preceding an expression by a  parenthesized  type  name
       converts  the  value  of  the  expression to the named type.
       This  construction  is  called  a  cast.85)   A  cast   that
       specifies  no  conversion has no effect on the type or value
       of an expression.86)

Remember that C has a its own definitions for "value" and "expression"

       3.17
       [#1] value
       precise  meaning  of  the  contents  of   an   object   when
       interpreted as having a specific type


       6.5  Expressions

       [#1] An expression is a sequence of operators  and  operands
       that specifies computation of a value, or that designates an
       object or a function, or that  generates  side  effects,  or
       that performs a combination thereof.

| I don't think it's helpful to be
| picky about slight differences of terminology when comparing C and C++.

Well, it is helpful to avoid confusion. 
Clearly, C does not define the notion of "rvalue". 
C++ does provide a definition for "rvalue" but then the whole thing is
messy, see 3.10:
   
 1   Every expression is either an lvalue or an rvalue.

 2   An lvalue refers to an object or function. Some rvalue expressions
     those of class or cv-qualified class type also refer to objects.47) 

Clearly, there is a semantics shift, and comparing two languages based
on semantics shift is not fair neither helpful.

In short, it helps not to confuse matters by entirely avoiding the
term "rvalue" when talking of C, and even more when talking of C on a
C++ group :-)

My note was meant to be  parenthetical, but now I don't know what to
think :-)

-- 
Gabriel Dos Reis,	gdr@integrable-solutions.net

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



