From: <no...@so...> - 2001-06-27 21:47:59
|
Bugs item #436868, was opened at 2001-06-27 14:47 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=100599&aid=436868&group_id=599 Category: msc51(8051) target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bernhard Held (bernhardheld) Assigned to: Nobody/Anonymous (nobody) Summary: Local, static variables and mem-modifier Initial Comment: f2 (char c) { c; } f () reentrant { code char c1 = 'J'; static code char c2 = 'K'; static idata char c3; static xdata char c4; static data char c5; f2 (c1); f2 (c2); f2 (c3); f2 (c4); f2 (c5); } warning *** storage class not allowed for automatic variable 'c1' in reentrant function warning *** storage class not allowed for automatic variable 'c2' in reentrant function warning *** storage class not allowed for automatic variable 'c3' in reentrant function warning *** storage class not allowed for automatic variable 'c4' in reentrant function warning *** storage class not allowed for automatic variable 'c5' in reentrant function warning *** 'auto' variable 'c1' may be used before initialization at 1. It should be possible to assign any storage class to a static variable. 2. IMHO "code" should imply "static", so that it's not an auto variable. 3. the last warning is wrong: c1 is initialized. 4. c1 is allocate in a register 5. c2...c4 are allocated in DSEG Bernhard ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=100599&aid=436868&group_id=599 |
From: Johan K. <joh...@id...> - 2001-06-28 01:23:57
|
I think this makes sense and can be easely done. Sandeep? > Initial Comment: > f2 (char c) { c; } > > f () reentrant > { > code char c1 = 'J'; > static code char c2 = 'K'; > static idata char c3; > static xdata char c4; > static data char c5; > > f2 (c1); > f2 (c2); > f2 (c3); > f2 (c4); > f2 (c5); > } > > warning *** storage class not allowed for automatic > variable 'c1' in reentrant function > warning *** storage class not allowed for automatic > variable 'c2' in reentrant function > warning *** storage class not allowed for automatic > variable 'c3' in reentrant function > warning *** storage class not allowed for automatic > variable 'c4' in reentrant function > warning *** storage class not allowed for automatic > variable 'c5' in reentrant function > warning *** 'auto' variable 'c1' may be used before > initialization at > > 1. It should be possible to assign any storage class > to a static variable. > 2. IMHO "code" should imply "static", so that it's not > an auto variable. > 3. the last warning is wrong: c1 is initialized. > 4. c1 is allocate in a register > 5. c2...c4 are allocated in DSEG > > Bernhard > > ---------------------------------------------------------------------- > > You can respond by visiting: > http://sourceforge.net/tracker/?func=detail&atid=100599&aid=436868&group_id= 599 > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/lists/listinfo/sdcc-devel > |
From: Sandeep D. <sa...@dd...> - 2001-06-28 02:34:02
|
Sounds good, only for static variables, "code" should not imply static. Sandeep > -----Original Message----- > From: sdc...@li... > [mailto:sdc...@li...]On Behalf Of Johan Knol > Sent: Wednesday, June 27, 2001 6:24 PM > To: sdc...@li... > Subject: Re: [sdcc-devel] [ sdcc-Bugs-436868 ] Local, static variables > and mem-modifier > > > I think this makes sense and can be easely done. > > Sandeep? > > > > Initial Comment: > > f2 (char c) { c; } > > > > f () reentrant > > { > > code char c1 = 'J'; > > static code char c2 = 'K'; > > static idata char c3; > > static xdata char c4; > > static data char c5; > > > > f2 (c1); > > f2 (c2); > > f2 (c3); > > f2 (c4); > > f2 (c5); > > } > > > > warning *** storage class not allowed for automatic > > variable 'c1' in reentrant function > > warning *** storage class not allowed for automatic > > variable 'c2' in reentrant function > > warning *** storage class not allowed for automatic > > variable 'c3' in reentrant function > > warning *** storage class not allowed for automatic > > variable 'c4' in reentrant function > > warning *** storage class not allowed for automatic > > variable 'c5' in reentrant function > > warning *** 'auto' variable 'c1' may be used before > > initialization at > > > > 1. It should be possible to assign any storage class > > to a static variable. > > 2. IMHO "code" should imply "static", so that it's not > > an auto variable. > > 3. the last warning is wrong: c1 is initialized. > > 4. c1 is allocate in a register > > 5. c2...c4 are allocated in DSEG > > > > Bernhard > > > > > ---------------------------------------------------------------------- > > > > You can respond by visiting: > > > http://sourceforge.net/tracker/?func=detail&atid=100599&aid=43 6868&group_id= 599 > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/lists/listinfo/sdcc-devel > _______________________________________________ sdcc-devel mailing list sdc...@li... http://lists.sourceforge.net/lists/listinfo/sdcc-devel |
From: Johan K. <joh...@id...> - 2001-06-28 11:42:00
|
Done. Johan > Sounds good, only for static variables, "code" should not imply static. > Sandeep > > > -----Original Message----- > > From: sdc...@li... > > [mailto:sdc...@li...]On Behalf Of Johan Knol > > Sent: Wednesday, June 27, 2001 6:24 PM > > To: sdc...@li... > > Subject: Re: [sdcc-devel] [ sdcc-Bugs-436868 ] Local, static variables > > and mem-modifier > > > > > > I think this makes sense and can be easely done. > > > > Sandeep? > > > > > > > Initial Comment: > > > f2 (char c) { c; } > > > > > > f () reentrant > > > { > > > code char c1 = 'J'; > > > static code char c2 = 'K'; > > > static idata char c3; > > > static xdata char c4; > > > static data char c5; > > > > > > f2 (c1); > > > f2 (c2); > > > f2 (c3); > > > f2 (c4); > > > f2 (c5); > > > } > > > > > > warning *** storage class not allowed for automatic > > > variable 'c1' in reentrant function > > > warning *** storage class not allowed for automatic > > > variable 'c2' in reentrant function > > > warning *** storage class not allowed for automatic > > > variable 'c3' in reentrant function > > > warning *** storage class not allowed for automatic > > > variable 'c4' in reentrant function > > > warning *** storage class not allowed for automatic > > > variable 'c5' in reentrant function > > > warning *** 'auto' variable 'c1' may be used before > > > initialization at > > > > > > 1. It should be possible to assign any storage class > > > to a static variable. > > > 2. IMHO "code" should imply "static", so that it's not > > > an auto variable. > > > 3. the last warning is wrong: c1 is initialized. > > > 4. c1 is allocate in a register > > > 5. c2...c4 are allocated in DSEG > > > > > > Bernhard > > > > > > > > ---------------------------------------------------------------------- > > > > > > You can respond by visiting: > > > > > http://sourceforge.net/tracker/?func=detail&atid=100599&aid=43 > 6868&group_id= > 599 > > > > _______________________________________________ > > sdcc-devel mailing list > > sdc...@li... > > http://lists.sourceforge.net/lists/listinfo/sdcc-devel > > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/lists/listinfo/sdcc-devel > > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/lists/listinfo/sdcc-devel > |