public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41672] New: missing diagnostic on an ill-formed rvalue reference initialization
@ 2009-10-10 21:56 msebor at gmail dot com
2009-10-10 22:37 ` [Bug c++/41672] " paolo dot carlini at oracle dot com
2009-11-03 16:22 ` [Bug c++/41672] [C++0x] " jason at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: msebor at gmail dot com @ 2009-10-10 21:56 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]
According to [dcl.init.ref], p5 of the latest working paper (N2960),
A reference to type cv1 T1 is initialized by an expression of type
cv2 T2 as follows:
...
...the reference shall be an lvalue reference to a non-volatile const
type (i.e., cv1 shall be const), or the reference shall be an rvalue
reference and the initializer expression shall be an rvalue.
The following ill-formed program is accepted by gcc 4.4.1:
$ cat u.cpp && gcc -dumpversion \
&& gcc -W -Wall -c -std=c++0x u.cpp && echo FAIL
extern int &ir;
int &&irr = ir; // ill-formed
4.4.1
FAIL
--
Summary: missing diagnostic on an ill-formed rvalue reference
initialization
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: msebor at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41672
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/41672] missing diagnostic on an ill-formed rvalue reference initialization
2009-10-10 21:56 [Bug c++/41672] New: missing diagnostic on an ill-formed rvalue reference initialization msebor at gmail dot com
@ 2009-10-10 22:37 ` paolo dot carlini at oracle dot com
2009-11-03 16:22 ` [Bug c++/41672] [C++0x] " jason at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-10-10 22:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2009-10-10 22:36 -------
This is already fixed in mainline, I don't know whether there are plans to back
port to 4_4-branch...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41672
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/41672] [C++0x] missing diagnostic on an ill-formed rvalue reference initialization
2009-10-10 21:56 [Bug c++/41672] New: missing diagnostic on an ill-formed rvalue reference initialization msebor at gmail dot com
2009-10-10 22:37 ` [Bug c++/41672] " paolo dot carlini at oracle dot com
@ 2009-11-03 16:22 ` jason at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-03 16:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jason at gcc dot gnu dot org 2009-11-03 16:21 -------
No, I'm not planning to fix this in 4.4.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41672
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-03 16:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-10 21:56 [Bug c++/41672] New: missing diagnostic on an ill-formed rvalue reference initialization msebor at gmail dot com
2009-10-10 22:37 ` [Bug c++/41672] " paolo dot carlini at oracle dot com
2009-11-03 16:22 ` [Bug c++/41672] [C++0x] " jason at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).