[Mono-list] [PATCH] Const fold for AddressOf/Indirect

Miguel de Icaza miguel@ximian.com
27 Jul 2002 23:55:01 -0400


Hello,

> Here is a trivial patch to fix a crash which I discovered when trying to
> stress the parser.  Unary expressions '& 1' and '* 1' (AddressOf and
> Indirect) currently crash mcs when it tries to perform constant
> folding.  Shall I apply to CVS?  

This patch is actually incorrect, because it is not valid to take the
address of a constant, so this code should emit the corresponding error
instead of silently generating incorrect code.

Miguel.