Re: CHARACTER in C
"Frederic Merizen" <[email protected]> Mon, 4 Dec 2006 14:52:26 +0100
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <003101c717ab$6f0a4920$91405198@KIMIKO> |
I fixed the problem with string inspects (in the repository - the fix should also be present in the latest snapshot). If there are more problems with the signedness of chars, please open a SmartZilla bug to track them. Thanks -- Frederic Merizen ----- Original Message ----- From: "Guillaume Lemaître" <[email protected]> To: "SmartEiffel Mailing List" <[email protected]> Sent: Monday, November 27, 2006 10:54 PM Subject: CHARACTER in C > Hi > > Why CHARACTER is mapped to an 'unsigned char' and not a 'char' ? This > leads to a problem when I write, for example > > inspect my_string > when "août" then > -- ... > end > > I have gcc warnings at compile-time and I never enter in the problematic > case. > > In C, there are three types of char : > - 'char' is for character entries (part of strings) > - 'signed char' is for smallest signed integer available > - 'unsigned char' is for smallest unsigned integer available > > So I'll found logical that > - CHARACTER become a 'char' > - INTEGER_8 become a 'signed char' > > Guillaume > > >