From: johanknol Date: Mon, 29 Oct 2001 14:07:37 +0000 (+0000) Subject: fixed bug #475852 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=6ab3ed0ca051e8e7f5231a7042ae898853cb2154;p=fw%2Fsdcc fixed bug #475852 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1463 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index aa992710..38b94995 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -2127,7 +2127,7 @@ decorateType (ast * tree) /* if bit field then error */ if (IS_BITVAR (tree->left->etype)) { - werror (E_ILLEGAL_ADDR, "addrress of bit variable"); + werror (E_ILLEGAL_ADDR, "address of bit variable"); goto errorTreeReturn; } @@ -2143,7 +2143,13 @@ decorateType (ast * tree) goto errorTreeReturn; } - if (LRVAL (tree)) + if (IS_LITERAL(LTYPE(tree))) + { + werror (E_ILLEGAL_ADDR, "address of literal"); + goto errorTreeReturn; + } + + if (LRVAL (tree)) { werror (E_LVALUE_REQUIRED, "address of"); goto errorTreeReturn;