This is the mail archive of the gcc-patches@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]

Re: [patch] Fix PR c++/27601: ICE with __builtin_offsetof for a static member


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


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