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++/17310] New: __builtin_offsetof doesn't check dependent expressions


This should be accepted:
                                                                                
struct S { int i; };
                                                                                
template <unsigned int I> struct A;
template <> struct A<0> { typedef int T; };
                                                                                
template <typename T>
void f() {
  A<offsetof (S, i)>::T x
}

-- 
           Summary: __builtin_offsetof doesn't check dependent expressions
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: rth at gcc dot gnu dot org
        ReportedBy: rth at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com


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


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