public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55335] New: [DR 5] cv-qualifiers of destination type in copy-initialization
@ 2012-11-15 4:46 ai.azuma at gmail dot com
2015-03-25 17:15 ` [Bug c++/55335] " paolo.carlini at oracle dot com
0 siblings, 1 reply; 2+ messages in thread
From: ai.azuma at gmail dot com @ 2012-11-15 4:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55335
Bug #: 55335
Summary: [DR 5] cv-qualifiers of destination type in
copy-initialization
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ai.azuma@gmail.com
Created attachment 28694
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28694
Output of -v option and preprocessed file with GCC 4.8.0 20121111
The following valid code is rejected by GCC 4.6.4 20121109, 4.7.3 20121110 and
4.8.0 20121111.
/////////////////////////
struct C{};
struct A {
A(const A&){};
A(const C&){};
};
int main()
{
C c;
const volatile A a = c;
}
/////////////////////////
For the above code, GCC 4.8.0 20121111 complains as follows;
main.cpp: In function 'int main()':
main.cpp:11:24: error: no matching function for call to 'A::A(const volatile
A)'
const volatile A a = c;
^
main.cpp:11:24: note: candidates are:
main.cpp:5:3: note: A::A(const C&)
A(const C&){};
^
main.cpp:5:3: note: no known conversion for argument 1 from 'const volatile
A' to 'const C&'
main.cpp:4:3: note: A::A(const A&)
A(const A&){};
^
main.cpp:4:3: note: no known conversion for argument 1 from 'const volatile
A' to 'const A&'
As far as I can guess from the error message, GCC does not seem to implement
the proposed resolution of DR 5.
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/55335] [DR 5] cv-qualifiers of destination type in copy-initialization
2012-11-15 4:46 [Bug c++/55335] New: [DR 5] cv-qualifiers of destination type in copy-initialization ai.azuma at gmail dot com
@ 2015-03-25 17:15 ` paolo.carlini at oracle dot com
0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-25 17:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55335
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
Target Milestone|--- |4.9.1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This is fixed in 4.9.1.
*** This bug has been marked as a duplicate of bug 60019 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-25 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 4:46 [Bug c++/55335] New: [DR 5] cv-qualifiers of destination type in copy-initialization ai.azuma at gmail dot com
2015-03-25 17:15 ` [Bug c++/55335] " paolo.carlini at oracle dot com
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).