This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Is the result of offsetof an integral constant expression?
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: c++std-core at research dot att dot com
- Cc: gcc-bugs at gcc dot gnu dot org, bangerth at ices dot utexas dot edu
- Date: 03 Jun 2003 18:40:50 +0200
- Subject: Re: Is the result of offsetof an integral constant expression?
- Organization: Integrable Solutions
- References: <200306031627.JAA21559@ha2mpk-mail.Eng.Sun.COM>
Steve Clamage <stephen.clamage@sun.com> writes:
| To: C++ core language mailing list
| Message c++std-core-9966
|
| >Message c++std-core-9965, David Abrahams
| >
| >The title says it all. Well, the following link provides some color:
| >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11072
|
| I don't follow the argument in bugzilla that says the wording in the
| C standard doesn't apply. Why doesn't it apply? The C++ standard
| just lists restrictions on applying offsetof to C++ features that
| don't exist in C.
I think the argument in the bugzilla is just wrong. The compiler is
indeed defectuous and the PR is a valid one.
Wolfgang, there is no dispute that offsetof should yield a constant
integral expression. That GCC fails to provide a correct definition
is a bug.
-- Gaby