From -1356005981526054714
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,8fdf6b501ff64059
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-01-04 11:26:01 PST
Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Ron Natalie <ron@sensor.com>
Newsgroups: comp.std.c++
Subject: Re: Possible DRs
Date: Fri,  4 Jan 2002 19:25:10 GMT
Organization: Sensor Systems
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3C36019C.32739F68@sensor.com>
References: <dPlZ7.4047$cD4.7483@www.newsranger.com>
X-Trace: mail2news.demon.co.uk 1010172316 mail2news:17514 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Accept-Language: en,pdf
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly.
NNTP-Posting-Date: Fri, 04 Jan 2002 14:21:42 EST
Lines: 83
Xref: archiver1.google.com comp.std.c++:8804



Michiel Salters wrote:

> 
> 1)
> What's the use of the access specifier "protected:" in unions ? They
> can't be base classes anyway ?

Not much, but do you want to add a special case for unions just because
it doesn't have a good use?

> 
> 2)
> Why are the (additional) signatures of main() implementation-defined,
> while their use is undefined? What good is it to know that your
> implementation will accept a signature int main( float ); if you have
> to fear that using it will format your HD?

Where does it say it is undefined?  The idea was to allow additional
implementation defined signatures like the UNIX:
	int main(int argc, char* argv[], char* env[]);
construct.

> 3)
> What prohibits int f( volatile void )? What does it mean, if it
> doesn't cause a program to be ill-formed?

Ill-formed.  8.3.5 permits f(void) as a special case only in that
exact form.

> 
> 4)
> Exactly what clause of the standard outlaws the use of reserved
> keywords for other purposes ? int for; ?

2.11 says "they are unconditionally treated as keywords in phase 7"
which means they can never be resolved gramtically to identifiers
(or any of the other types of tokens).  The same is true of the
alternate operator/punctuatiior names.

> 
> 5)
> Is it legal to compare addresses of objects, if these objects are
> members of different array elements? I.e. is &p[0].a < &p[1].b legal?
> Is it always true ?

unspecified from a literal reading of 5.9.

> 
> 6)
> Pointers to members: Given
> struct A { int a } ;
> struct B : public A { };
> struct C : public A { };
> struct D : public B,C { };
> D now has two members A::a, via B::A and C::A. So logically, pointers
> are unequal. But since neither one is smaller or bigger than the other,
> according to 5.9/2, what should > return ?

D does not have any members.  It has subobjects B::A and C::A each with
a member a.  The results of any such comparison is unspecified (members
of different objects 5.9/2 second bulletted case).

> 
> 7) This one is really obscure. A union can contain two members
> ( with subobjects ) such that these subobjects overlap. Is it legal
> to assign one sucg object to another?

This is a good one.

> 
> Personally, I think 3) and 6) warrant DRs, but I'm not certain
> about the others.

Actually, I think 3 and 6 are fine.  7 is the one I am concerned about.

---
[ 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.research.att.com/~austern/csc/faq.html                ]



