From: John T. V. <jt...@e-...> - 2001-05-18 19:40:26
|
Addendum : Note also that the hex constants are specified as \xhh...hh not= \0xhh...hh *********** REPLY SEPARATOR *********** On 5/18/01 at 21:22 Johan Knol wrote: >From: John T. Volpe <jt...@e-...> > > >> According to the ANSI spec I have, hexidecimal character constants are= of >undefined length. That is any valid hex constant is allowed in a string. >My interpretation of that is that a hex constant larger than a byte will= be >truncated to a byte when stored. However, a longer hex constant, would >allow for double byte character constants and I assume unicode type >character constants. Likewise octal constants are also specified as being >of undefined length. This brings up the potential misunderstanding with >the >following code segments : >> >> "\x1234" would be stored as 0x34,0x00 and "\x12""34" would be stored as >0x12,0x33,0x34,0x00 (Assuming single byte character constants) > >I don't understand the 0x33 > >> Maybe we would want a warning about a character constant larger than a >byte so code ported from another compiler which allows or uses double byte >character constants and strings would be flagged for manual review. > >That seems a more than reasonable alternative for the proposal I just= made. > >Johan > > >_______________________________________________ >sdcc-devel mailing list >sdc...@li... >http://lists.sourceforge.net/lists/listinfo/sdcc-devel |