public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/47851] New: [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator @ 2011-02-22 18:31 mimomorin at gmail dot com 2011-02-22 19:17 ` [Bug c++/47851] " paolo.carlini at oracle dot com ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: mimomorin at gmail dot com @ 2011-02-22 18:31 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47851 Summary: [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: mimomorin@gmail.com Created attachment 23436 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23436 Test case Suppose we have a code struct Type {}; typedef Type const ConstType; struct ConvertibleToType { operator Type&() { return *reinterpret_cast<Type*>(this); } }; Then expression `true ? ConvertibleToType() : ConstType()` has type `Type`. But `decltype(true ? ConvertibleToType() : ConstType())` is `Type const`. Note that, in gcc 4.5, both the type of the expression and its `decltype` are `Type`. (In clang TOT, both are `Type const`.) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/47851] [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator 2011-02-22 18:31 [Bug c++/47851] New: [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator mimomorin at gmail dot com @ 2011-02-22 19:17 ` paolo.carlini at oracle dot com 2011-03-01 22:44 ` jason at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: paolo.carlini at oracle dot com @ 2011-02-22 19:17 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47851 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-02-22 18:04:47 UTC --- Let's ask Jason to have a look. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/47851] [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator 2011-02-22 18:31 [Bug c++/47851] New: [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator mimomorin at gmail dot com 2011-02-22 19:17 ` [Bug c++/47851] " paolo.carlini at oracle dot com @ 2011-03-01 22:44 ` jason at gcc dot gnu.org 2011-03-01 22:48 ` jason at gcc dot gnu.org 2011-03-01 23:29 ` paolo.carlini at oracle dot com 3 siblings, 0 replies; 5+ messages in thread From: jason at gcc dot gnu.org @ 2011-03-01 22:44 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47851 --- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-01 22:44:41 UTC --- Author: jason Date: Tue Mar 1 22:44:35 2011 New Revision: 170601 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170601 Log: PR c++/47851 * call.c (standard_conversion): Provide requested cv-quals on class rvalue conversion. Added: trunk/gcc/testsuite/g++.dg/cpp0x/decltype25.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/47851] [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator 2011-02-22 18:31 [Bug c++/47851] New: [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator mimomorin at gmail dot com 2011-02-22 19:17 ` [Bug c++/47851] " paolo.carlini at oracle dot com 2011-03-01 22:44 ` jason at gcc dot gnu.org @ 2011-03-01 22:48 ` jason at gcc dot gnu.org 2011-03-01 23:29 ` paolo.carlini at oracle dot com 3 siblings, 0 replies; 5+ messages in thread From: jason at gcc dot gnu.org @ 2011-03-01 22:48 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47851 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-01 22:47:47 UTC --- Fixed (so that both are Type const). ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/47851] [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator 2011-02-22 18:31 [Bug c++/47851] New: [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator mimomorin at gmail dot com ` (2 preceding siblings ...) 2011-03-01 22:48 ` jason at gcc dot gnu.org @ 2011-03-01 23:29 ` paolo.carlini at oracle dot com 3 siblings, 0 replies; 5+ messages in thread From: paolo.carlini at oracle dot com @ 2011-03-01 23:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47851 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.6.0 --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-03-01 23:28:45 UTC --- Thanks! ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-01 23:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-02-22 18:31 [Bug c++/47851] New: [4.6 Regression] [C++0x] Incorrect decltype result for conditional operator mimomorin at gmail dot com 2011-02-22 19:17 ` [Bug c++/47851] " paolo.carlini at oracle dot com 2011-03-01 22:44 ` jason at gcc dot gnu.org 2011-03-01 22:48 ` jason at gcc dot gnu.org 2011-03-01 23:29 ` 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).