🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #4063

Re: references and ellipsis

#4063
From: Fergus Henderson
Date: Tue, 16 Apr 1996 20:14
39 lines
2706 bytes
kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) writes:

>fjh@munta.cs.mu.OZ.AU (Fergus Henderson) writes:
>
>|> clamage@Eng.Sun.COM (Steve Clamage) writes:
>
>|> >According the draft standard, the results of using a reference
>|> >type as the last pararmeter before the ellipsis (...) are
>|> >undefined. See section 18.7 "Other runtime support" [lib.support.runtime].
>
>|> Is there any good reason why this has undefined behaviour rather than
>|> being ill-formed code?  Surely this should be very easy for
>|> implementations to detect and diagnose.
>
>Hysterica^H^H^H^H^H^H^Horical reasons, no doubt.  Declare the last
>parameter a char in C, and you also get undefined behavior.
>
>And it's surely no more difficult to diagnose a double underscore (and
>at least one compiler does), which is also `undefined behavior'.

No, I think providing useful diagnostics for use of references before
an elipsis is indeed less difficult than providing useful diagnostics
for use of double underscores.  It's difficult (though by no means
impossible, of course) for implementations to issue diagnostics for
uses of the implementation's part of the namespace without also issuing
diagnostics for definitions in the system header files or in code which
merely references macros defined in the system header files.

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]
Technical Details
Message-ID: <4kvnid$rg5@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern
References: <4kop8j$ino@vishnu.jussieu.fr> <4kpd3v$2fb@engnews1.Eng.Sun.COM> <4kr1p3$67g@mulga.cs.mu.OZ.AU> <KANZE.96Apr15211326@slsvgqt.lts.sel.alcatel.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern
From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Newsgroups: comp.std.c++
Subject: Re: references and ellipsis
Date: 16 Apr 1996 13:14:16 PDT
Organization: Comp Sci, University of Melbourne
Approved: austern@isolde.mti.sgi.com
Message-ID: <4kvnid$rg5@mulga.cs.mu.OZ.AU>
References: <4kop8j$ino@vishnu.jussieu.fr> <4kpd3v$2fb@engnews1.Eng.Sun.COM> <4kr1p3$67g@mulga.cs.mu.OZ.AU> <KANZE.96Apr15211326@slsvgqt.lts.sel.alcatel.de>
NNTP-Posting-Host: isolde.mti.sgi.com
X-Original-Date: 16 Apr 1996 08:59:57 GMT
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBVAwUBMXP/mUy4NqrwXLNJAQH8JQIAzG3IJLKyr5Lim2N+7IxukVDI7jDHGd5U
 PvSwWeA5bqdfIkX46U5m5L/jZMvbmHcAoIi7pQABvTXPwBI9LKPgaw==
 =qQ8r
Originator: austern@isolde.mti.sgi.com