[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 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - templatetypename X, typename Y struct same { enum { n = -1 }; }; templatetypename X struct sameX,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 [ - ::samex,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
[Bug c++/27787] New: Qualified lookup fails to find inherited class template
// The code has been tested with GCC 3.4.2, 4.1.1 and 4.2.0 (alpha) and fails. // It compiles successfully with Comeau (= 4.2) and VisualC++ (=7.1). templatetypename X struct x { templatetypename Y struct y { typedef Y type; }; }; templatetypename A struct a : xA { // supposed to fail (unqualified lookup does not look into dependent base) // [ 14.6.2-3 ] // //templatetypename B //typename yB::type f(B); // // qualified lookup should find inherited class template 'y', however templatetypename B typename a::template yB::type f(B); }; -- Summary: Qualified lookup fails to find inherited class template Product: gcc Version: 4.2.0 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=27787
[Bug c++/27787] Qualified lookup fails to find inherited class template
--- Comment #4 from tschwinger at neoscientists dot org 2006-05-28 21:47 --- It seems my report is missing some detail. Here's my apology and an attempt to outline my standard interpretation that makes me think it is a bug. (In reply to comment #0) templatetypename X struct x { templatetypename Y struct y { typedef Y type; }; }; templatetypename A struct a : xA { //templatetypename B //typename yB::type f(B); // ill-formed - the base class 'xA' is obviously dependent (since it depends on 'A'), so GCC validly detects an ill-formed program trying to find 'y' (and so does Comeau) // qualified lookup should find inherited class template 'y', however templatetypename B typename a::template yB::type f(B); - the injected class name 'a' refers to the class template specialization (same as 'aA' in this context) and should be found even by unqualified lookup (works correctly, so far) - qualified lookup applies to 'template y' because it's qualified by 'a', 14.6.2-3 only applies to unqualified lookup so there is no reason for 'template y' not to be found -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27787
[Bug c++/20439] New: Dropped attributes on class members
//== // Dropped attributes on class member //== // $ g++ -ansi -pedantic -Wall -c file // Output: // ... 'ASSERTION_FAILED_IN_LINE_42' ... // Known to fail with: // 3.4.3 (linux) // 3.4.2 (linux) // 3.4.2 (mingw) // 3.3.4 (linux) // 3.2.3 (mingw) // Known to work with: // 4.0.0-beta (linux) //== //-- // Simple compile time assertion facility to check the identity of two types // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - templatetypename X, typename Y struct same { enum { n = -1 }; }; templatetypename X struct sameX,X { enum { n = 1 }; }; #define ASSERT_SAME_TYPE(x,y) ASSERT_SAME_TYPE_IMPL_I(__LINE__,x,y) #define ASSERT_SAME_TYPE_IMPL_I(i,x,y) ASSERT_SAME_TYPE_IMPL_II(i,x,y) #define ASSERT_SAME_TYPE_IMPL_II(i,x,y) \ bool ASSERTION_FAILED_IN_LINE_ ## i [ ::samex,y::n ] //-- // The problem // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #define CC __attribute__((__stdcall__)) typedef void CC type(); ASSERT_SAME_TYPE(type,void CC ()); // ok struct X { typedef void CC type(); }; ASSERT_SAME_TYPE(X::type,void CC ()); // - here //-- -- Summary: Dropped attributes on class members Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tschwinger at neoscientists dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20439
[Bug c++/20439] Dropped attributes on class members
-- What|Removed |Added Known to fail||3.2.3 3.3.4 3.4.2 3.4.3 Known to work||4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20439