Article View: gnu.g++.help
Article #910Re: double& rd2 = 2.0; // error?
From: Fergus Henderson
Date: Fri, 01 Mar 1996 17:02
Date: Fri, 01 Mar 1996 17:02
34 lines
2049 bytes
2049 bytes
David Bowser-Chao <davechao@cteq07.pa.msu.edu> writes:
>Looking at the April 1995 working draft proposal,
>the fragment:
>
> double& rd2 = 2.0;
>
>is deemed illegal (non-const references are not initialized from
>temporaries)
The draft standard does not use the term "illegal".
It uses the term "ill-formed".
>but the GNU g++ 2.7.2 as well as the DEC VMS compiler
>(current release, don't remember, as well as the version I'm
>field-testing) allow this statement with a mere warning.
According to the draft standard, compilers are not required
to issue errors for ill-formed code; they are allowed to issue
mere warnings.
--
Any mail to me between Feb 24th and 27th may have gone to the bit bucket
(#&$^@$!# mail software silently ignored disk full error). Please resend.
(comp.std.c++ articles were not affected, so no need to resend those.)
Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
---
[ 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:
<4h76s1$79n@mulga.cs.mu.OZ.AU>Path:
arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austernReferences:
<3135D175.87E@cteq07.pa.msu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson) Newsgroups: gnu.g++.help,comp.lang.c++,comp.std.c++ Subject: Re: double& rd2 = 2.0; // error? Date: 01 Mar 1996 09:02:33 PST Organization: Comp Sci, University of Melbourne Approved: austern@isolde.mti.sgi.com Message-ID: <4h76s1$79n@mulga.cs.mu.OZ.AU> References: <3135D175.87E@cteq07.pa.msu.edu> NNTP-Posting-Host: isolde.mti.sgi.com X-Original-Date: 1 Mar 1996 15:58:57 GMT X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBMTctu0y4NqrwXLNJAQHYygIAjqMAxtmhE3jIVbqp15JeKL/u+F8UxrBe 1mbZcCO6J9wQr0+w9DXSWo9xt5YxsnTKGbl3SsVC5LO3kMpd8CCOCw== =AMTH Originator: austern@isolde.mti.sgi.com