From: Johan K. <joh...@id...> - 2001-05-18 19:48:15
|
That's what I meant. Right now it is implemented as \0xhh..hh, instead of \xhh..hh. That's were the thread started (bug report by Berhard). ----- Original Message ----- From: John T. Volpe <jt...@e-...> To: <sdc...@li...> Sent: Friday, May 18, 2001 9:41 PM Subject: Re: [sdcc-devel] BUG: Escape sequences in string constants > 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 > > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/lists/listinfo/sdcc-devel > |