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++/17221] New: C++ offsetof regression


This should compile but I am told it does not compile anymore:

---------------------------------------
#include <stddef.h>

template <int N> struct Bar;
template <> struct Bar<3> {};

template <class T>
struct Foo {
   Bar<offsetof(T, a) + 3> k;
};

struct A { int a; };

template struct Foo<A>;
---------------------------------------

-- 
           Summary: C++ offsetof regression
           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: giovannibajo at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org


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


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