tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] RE :Re: RE :Re: Another ARM (RPi) compiler bug


From: Christian JULLIEN
Subject: [Tinycc-devel] RE :Re: RE :Re: Another ARM (RPi) compiler bug
Date: Mon, 4 Feb 2013 13:47:46 +0100 (CET)

Hi, here is an isolated bug,
Whether I pass a first buffer or not, wchar value is altererd;
  before bug (70)
  bug (162)
  nobug (70)


#include <stdio.h>                                                                                                                                                                                                                     
                                                                                                                                                                                                                                       
typedef unsigned char LCHAR;                                                                                                                                                                                                           
                                                                                                                                                                                                                                       
int                                                                                                                                                                                                                                    
nobug(LCHAR wchar )                                                                                                                                                                                                                    
{                                                                                                                                                                                                                                      
        printf("  nobug (%d)\n\r", wchar);                                                                                                                                                                                             
}                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                       
int                                                                                                                                                                                                                                    
bug(char *mbchar, LCHAR wchar )                                                                                                                                                                                                        
{                                                                                                                                                                                                                                      
        (void)mbchar;                                                                                                                                                                                                                  
        printf("  bug (%d)\n\r", wchar);                                                                                                                                                                                               
}                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       
int                                                                                                                                                                                                                                    
main()                                                                                                                                                                                                                                 
{                                                                                                                                                                                                                                      
        char    wbuf[ 10 ];                                                                                                                                                                                                            
        LCHAR c = (LCHAR)70;                                                                                                                                                                                                           
        printf("  before bug (%d)\n\r", c);                                                                                                                                                                                            
        bug(&wbuf[0], c);                                                                                                                                                                                                              
        nobug((LCHAR)c);                                                                                                                                                                                                               
}                          


----- Message d'origine -----
De : "Daniel Glöckner" <address@hidden>
Date lun. 04/02/2013 11:27 (GMT +01:00)
À : "Christian JULLIEN" <address@hidden>, "address@hidden" <address@hidden>
Objet : Re: [Tinycc-devel] RE :Re: Another ARM (RPi) compiler bug

Hi,

On Mon, Feb 04, 2013 at 09:51:04AM +0100, Christian JULLIEN wrote:
> Now my complete OpenLisp shows only ONE bug related to utf8 conversion
> (probably signed/unsigned char/int issue).

keep in mind that on ARM plain char is unsigned.

Daniel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]