This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/29328] New: CC attributes not encoded in member function pointer


// Tested with 4.1.1 and 4.2.0-alpha20060520

//------------------------------------------------------------------------------
// Simple compile time assertion facility to check the identity of two types
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

template<typename X, typename Y> struct same      { enum { n = -1 }; };
template<typename X>             struct same<X,X> { enum { n = 1 }; };
#define ASSERT_DIFFERENT_TYPE(x,y) ASSERT_DIFFERENT_TYPE_IMPL_I(__LINE__,x,y)
#define ASSERT_DIFFERENT_TYPE_IMPL_I(i,x,y)
ASSERT_DIFFERENT_TYPE_IMPL_II(i,x,y)
#define ASSERT_DIFFERENT_TYPE_IMPL_II(i,x,y) \
    bool ASSERTION_FAILED_IN_LINE_ ## i  [ - ::same<x,y>::n ]


//------------------------------------------------------------------------------
// The problem
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

ASSERT_DIFFERENT_TYPE(void(*)(),void(__attribute((stdcall)) *)()); // OK

class X;
ASSERT_DIFFERENT_TYPE(void(X::*)(),void(__attribute((stdcall)) X::*)()); //
FAIL


-- 
           Summary: CC attributes not encoded in member function pointer
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tschwinger at neoscientists dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]