public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance
       [not found] <bug-44267-4@http.gcc.gnu.org/bugzilla/>
@ 2011-09-23 21:45 ` paolo.carlini at oracle dot com
  2011-09-23 23:06 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-23 21:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44267

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-23 21:38:33 UTC ---
Jason, can you help me triaging this PR? Thanks..


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance
       [not found] <bug-44267-4@http.gcc.gnu.org/bugzilla/>
  2011-09-23 21:45 ` [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance paolo.carlini at oracle dot com
@ 2011-09-23 23:06 ` jason at gcc dot gnu.org
  2011-09-23 23:50 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2011-09-23 23:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44267

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-09-23 22:50:50 UTC ---
Looks like we need to pass complain down into build_base_path.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance
       [not found] <bug-44267-4@http.gcc.gnu.org/bugzilla/>
  2011-09-23 21:45 ` [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance paolo.carlini at oracle dot com
  2011-09-23 23:06 ` jason at gcc dot gnu.org
@ 2011-09-23 23:50 ` paolo.carlini at oracle dot com
  2011-09-24 10:05 ` paolo at gcc dot gnu.org
  2011-09-24 10:39 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-23 23:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44267

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-09-23
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
     Ever Confirmed|0                           |1

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-23 22:53:19 UTC ---
Great, can do that.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance
       [not found] <bug-44267-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-09-23 23:50 ` paolo.carlini at oracle dot com
@ 2011-09-24 10:05 ` paolo at gcc dot gnu.org
  2011-09-24 10:39 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-09-24 10:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44267

--- Comment #6 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-09-24 09:55:06 UTC ---
Author: paolo
Date: Sat Sep 24 09:55:01 2011
New Revision: 179141

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179141
Log:
/cp
2011-09-24  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/44267
    * class.c (build_base_path): Add a tsubst_flags_t parameter.
    (convert_to_base): Adjust call.
    * typeck.c (build_class_member_access_expr,
    get_member_function_from_ptrfunc, build_static_cast_1): Likewise.
    * init.c (dfs_initialize_vtbl_ptrs, emit_mem_initializers): Likewise.
    * method.c (do_build_copy_constructor, do_build_copy_assign): Likewise.
    * rtti.c (build_dynamic_cast_1): Likewise.
    * typeck2.c (build_scoped_ref, build_m_component_ref): Likewise.
    * call.c (build_over_call, build_special_member_call): Likewise.
    * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
    build_up_reference): Likewise.
    * cp-tree.h (build_base_path): Adjust declaration.

/testsuite
2011-09-24  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/44267
    * g++.dg/template/sfinae28.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/template/sfinae28.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/class.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/cvt.c
    trunk/gcc/cp/init.c
    trunk/gcc/cp/method.c
    trunk/gcc/cp/rtti.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/cp/typeck2.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance
       [not found] <bug-44267-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-09-24 10:05 ` paolo at gcc dot gnu.org
@ 2011-09-24 10:39 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-24 10:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44267

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-24 09:56:45 UTC ---
Fixed for 4.7.0.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance
  2010-05-25  5:42 [Bug c++/44267] New: " cjoldfield at gmail dot com
  2010-05-25  9:28 ` [Bug c++/44267] " paolo dot carlini at oracle dot com
@ 2010-05-25 17:09 ` cjoldfield at gmail dot com
  1 sibling, 0 replies; 7+ messages in thread
From: cjoldfield at gmail dot com @ 2010-05-25 17:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from cjoldfield at gmail dot com  2010-05-25 17:09 -------
Intel 11.1 accepts it, but it doesn't even try to instantiate "one &f(...)". 
To see what I mean, try replacing main with:

#include <iostream>
int main()
{
   std::cout << sizeof(f<D*, int>(0)) << std::endl;
   std::cout << sizeof(f<D*, B*>(0)) << std::endl;
   std::cout << sizeof(f<VD*, B*>(0)) <<std::endl;
}

Also for intel, if one forces it to try to instantiate "one &f(...)" by
removing "two &f(...)", it will complain that there is no matching call to
f<...>(0) for all three calls (it should match the second).  In this situation,
gcc only complains about the first and the last, which is the expected
behavior.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44267


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance
  2010-05-25  5:42 [Bug c++/44267] New: " cjoldfield at gmail dot com
@ 2010-05-25  9:28 ` paolo dot carlini at oracle dot com
  2010-05-25 17:09 ` cjoldfield at gmail dot com
  1 sibling, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-05-25  9:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2010-05-25 09:28 -------
For the record, both Intel and Comeau accept this. Let's CC Jason... 


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
            Summary|SFINAE does not handle down |SFINAE does not handle down
                   |static_cast over virtual    |static_cast over virtual
                   |inheritance                 |inheritance


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44267


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-09-24  9:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-44267-4@http.gcc.gnu.org/bugzilla/>
2011-09-23 21:45 ` [Bug c++/44267] SFINAE does not handle down static_cast over virtual inheritance paolo.carlini at oracle dot com
2011-09-23 23:06 ` jason at gcc dot gnu.org
2011-09-23 23:50 ` paolo.carlini at oracle dot com
2011-09-24 10:05 ` paolo at gcc dot gnu.org
2011-09-24 10:39 ` paolo.carlini at oracle dot com
2010-05-25  5:42 [Bug c++/44267] New: " cjoldfield at gmail dot com
2010-05-25  9:28 ` [Bug c++/44267] " paolo dot carlini at oracle dot com
2010-05-25 17:09 ` cjoldfield at gmail 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).