This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/27601: ICE with __builtin_offsetof for a static member
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 03 Jun 2006 13:37:37 -0700
- Subject: Re: [patch] Fix PR c++/27601: ICE with __builtin_offsetof for a static member
- References: <tkrat.21dd98037f38c4b7@igpm.rwth-aachen.de>
Volker Reichelt wrote:
> 2006-06-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
>
> PR c++/27601
> * c-common.c (fold_offsetof_1): Handle static members.
>
> ===================================================================
> --- gcc/gcc/c-common.c 2006-06-03 01:27:05 +0200
> +++ gcc/gcc/c-common.c 2006-06-03 01:24:59 +0200
> @@ -5980,6 +5980,10 @@ fold_offsetof_1 (tree expr)
> case ERROR_MARK:
> return expr;
>
> + case VAR_DECL:
> + error ("offset taken of static member %qD", expr);
Let's say "cannot apply %<offsetof%> to static data member %qD".
OK with that change, thanks.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713