On Mon, Jan 25, 2016 at 04:03:26PM +0100, Nicolai Stange wrote: > The official constraints on constant expressions [6.6] are insanely > strict in that they do not allow some constructs commonly used in the > wild. > > Relax them by treating > - address constants cast to different pointer type as address constants > again, > - address constants cast to integer type as integer constant > expressions > - conditional expressions whose true and false branches both yield > address constants as address constants, > - and conditional expressions whose condition is an address constant > as an constant expression to the extent their true and false branches > allow. > @@ -2783,14 +2792,30 @@ static struct symbol *evaluate_cast(struct expression *expr) > /* > * Casts of integer literals to pointer type yield > * address constants [6.6(9)]. > + * > + * As an extension, treat address constants cast to a > + * different pointer type as adress constants again. Typo: s/adress/address/ Good otherwise. Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html