From -3917731509158865071 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,8fdf6b501ff64059,start X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2002-01-04 09:53:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail From: Michiel Salters Newsgroups: comp.std.c++ Subject: Possible DRs Date: Fri, 4 Jan 2002 17:52:15 GMT Organization: http://www.newsranger.com Approved: Fergus Henderson , moderator of comp.std.c++ Message-ID: X-Trace: mail2news.demon.co.uk 1010166741 mail2news:16873 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-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request NNTP-Posting-Date: Fri, 04 Jan 2002 12:41:29 EST X-Abuse: abuse@jtwis.com X-Added: Message sent through jtwis.com at 2002-01-04 12:41:43 Lines: 64 Xref: archiver1.google.com comp.std.c++:8803 Hi, I ran into some possible DRs today, when looking at appendix J of the C99 standard ( Gert Jan de Vos & I were trying to determine which of those points applies to C++, too ). I'm not sure which deserve an DR, so I'd like some opinions here: 1) What's the use of the access specifier "protected:" in unions ? They can't be base classes anyway ? 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? 3) What prohibits int f( volatile void )? What does it mean, if it doesn't cause a program to be ill-formed? 4) Exactly what clause of the standard outlaws the use of reserved keywords for other purposes ? int for; ? 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 ? 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 ? 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? Is this implementable? Can a class provide protection against this? The usual self-assignment protection fails, because the this-pointers aren't identical. Personally, I think 3) and 6) warrant DRs, but I'm not certain about the others. Regards -- Michiel Salters Consultant Technical Software Engineering CMG Trade, Transport & Industry Michiel.Salters@cmg.nl --- [ 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 ]