From 59719c15d2b5c3b6e894d9f04deb826f196c8912 Mon Sep 17 00:00:00 2001 From: sandeep Date: Tue, 20 Feb 2001 16:45:42 +0000 Subject: [PATCH] Fixed const pointer problem with arrays git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@641 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- device/lib/ds390/Makefile | 2 +- src/SDCCast.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/device/lib/ds390/Makefile b/device/lib/ds390/Makefile index 1ea1235e..fb7d3c6d 100755 --- a/device/lib/ds390/Makefile +++ b/device/lib/ds390/Makefile @@ -2,7 +2,7 @@ CC = ../../../bin/sdcc #VERBOSE = --verbose -OBJECTS = tinibios.rel memcpyx.rel rtc390.rel lcd390.rel i2c390.rel +OBJECTS = tinibios.rel memcpyx.rel lcd390.rel i2c390.rel SOURCES = $(patsubst %.rel,%.c,$(OBJECTS)) diff --git a/src/SDCCast.c b/src/SDCCast.c index 46f95a36..f846c98f 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -1913,6 +1913,9 @@ decorateType (ast * tree) } RRVAL (tree) = 1; COPYTYPE (TTYPE (tree), TETYPE (tree), LTYPE (tree)->next); + if (IS_PTR(LTYPE(tree))) { + SPEC_CONST (TETYPE (tree)) = DCL_PTR_CONST (LTYPE(tree)); + } return tree; /*------------------------------------------------------------------*/ -- 2.47.2