This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17310] New: __builtin_offsetof doesn't check dependent expressions
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2004 20:20:02 -0000
- Subject: [Bug c++/17310] New: __builtin_offsetof doesn't check dependent expressions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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