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/15240] sizeof() doesn't work on struct fields


------- Additional Comments From bangerth at dealii dot org  2004-05-03 03:40 -------
One possible answer is that contrary to Java, in C and C++ you cannot 
access members of _types_ using type.member. If anything, then this should 
be type::member (in C++), which would fail in your case since the 
member is non-static, though. The dot-operator can only be used to 
access members of _variables_, not _types_. 
 
W. 

-- 


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


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