public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/57419] New: Access control doesn't stop referring to a deleted function @ 2013-05-26 7:04 potswa at mac dot com 2013-05-28 10:06 ` [Bug c++/57419] " redi at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: potswa at mac dot com @ 2013-05-26 7:04 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57419 Bug ID: 57419 Summary: Access control doesn't stop referring to a deleted function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: potswa at mac dot com Using reference-to-member syntax on a private, deleted function in a SFINAE context fails as a hard error as a use of a deleted function. But it can't be accessed in the first place due to the access control. Calling the function instead produces the desired result. Clang 3.2 accepts this TU but GCC 4.9 rejects: template< typename q > decltype( &q::f ) t( q ) {} char t( ... ) { return {}; } class c { void f() = delete; }; class d { static void f() = delete; }; static_assert( sizeof( t( c() ) ), "c" ); static_assert( sizeof( t( d() ) ), "d" ); ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57419] Access control doesn't stop referring to a deleted function 2013-05-26 7:04 [Bug c++/57419] New: Access control doesn't stop referring to a deleted function potswa at mac dot com @ 2013-05-28 10:06 ` redi at gcc dot gnu.org 2013-06-02 23:04 ` paolo.carlini at oracle dot com ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: redi at gcc dot gnu.org @ 2013-05-28 10:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57419 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-05-28 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to David Krauss from comment #0) > Using reference-to-member syntax You mean taking its address, right? Access control shouldn't stop it being referred to, but it should result in substitution failure rather than an error. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57419] Access control doesn't stop referring to a deleted function 2013-05-26 7:04 [Bug c++/57419] New: Access control doesn't stop referring to a deleted function potswa at mac dot com 2013-05-28 10:06 ` [Bug c++/57419] " redi at gcc dot gnu.org @ 2013-06-02 23:04 ` paolo.carlini at oracle dot com 2013-06-03 20:40 ` paolo.carlini at oracle dot com ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: paolo.carlini at oracle dot com @ 2013-06-02 23:04 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57419 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com Target Milestone|--- |4.9.0 --- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> --- finish_qualified_id_expr gets a complain == 0 and then just calls mark_used which has naked error calls. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57419] Access control doesn't stop referring to a deleted function 2013-05-26 7:04 [Bug c++/57419] New: Access control doesn't stop referring to a deleted function potswa at mac dot com 2013-05-28 10:06 ` [Bug c++/57419] " redi at gcc dot gnu.org 2013-06-02 23:04 ` paolo.carlini at oracle dot com @ 2013-06-03 20:40 ` paolo.carlini at oracle dot com 2013-06-04 2:35 ` potswa at mac dot com 2013-06-04 8:36 ` paolo.carlini at oracle dot com 4 siblings, 0 replies; 6+ messages in thread From: paolo.carlini at oracle dot com @ 2013-06-03 20:40 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57419 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> --- Fixed. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57419] Access control doesn't stop referring to a deleted function 2013-05-26 7:04 [Bug c++/57419] New: Access control doesn't stop referring to a deleted function potswa at mac dot com ` (2 preceding siblings ...) 2013-06-03 20:40 ` paolo.carlini at oracle dot com @ 2013-06-04 2:35 ` potswa at mac dot com 2013-06-04 8:36 ` paolo.carlini at oracle dot com 4 siblings, 0 replies; 6+ messages in thread From: potswa at mac dot com @ 2013-06-04 2:35 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57419 --- Comment #5 from David Krauss <potswa at mac dot com> --- Does this also fix #57429? ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57419] Access control doesn't stop referring to a deleted function 2013-05-26 7:04 [Bug c++/57419] New: Access control doesn't stop referring to a deleted function potswa at mac dot com ` (3 preceding siblings ...) 2013-06-04 2:35 ` potswa at mac dot com @ 2013-06-04 8:36 ` paolo.carlini at oracle dot com 4 siblings, 0 replies; 6+ messages in thread From: paolo.carlini at oracle dot com @ 2013-06-04 8:36 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57419 --- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> --- No, rather different issues. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-06-04 8:36 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-05-26 7:04 [Bug c++/57419] New: Access control doesn't stop referring to a deleted function potswa at mac dot com 2013-05-28 10:06 ` [Bug c++/57419] " redi at gcc dot gnu.org 2013-06-02 23:04 ` paolo.carlini at oracle dot com 2013-06-03 20:40 ` paolo.carlini at oracle dot com 2013-06-04 2:35 ` potswa at mac dot com 2013-06-04 8:36 ` 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).