From 6ab3ed0ca051e8e7f5231a7042ae898853cb2154 Mon Sep 17 00:00:00 2001 From: johanknol Date: Mon, 29 Oct 2001 14:07:37 +0000 Subject: [PATCH] fixed bug #475852 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1463 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCast.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; -- 2.47.2