dotgnu-pnet
[Top][All Lists]
Advanced

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

[Pnet-developers] [bug #6121] Code calling sscanf is compiled incorrectl


From: nobody
Subject: [Pnet-developers] [bug #6121] Code calling sscanf is compiled incorrectly by cscc
Date: Thu, 23 Oct 2003 17:14:56 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

=================== BUG #6121: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6121&group_id=353

Changes by: Rhys Weatherley <address@hidden>
Date: Thu 10/23/2003 at 21:14 (GMT)

------------------ Additional Follow-up Comments ----------------------------
Looks correct to me.  All values that are passed via a
vararg list must be first converted to their "natural
passing type".  In the case of pointers, the natural
passing type is "int64".  See the ABI specification in
"pnet/doc/c_language_abi.html" for more details.



=================== BUG #6121: FULL BUG SNAPSHOT ===================


Submitted by: None                    Project: DotGNU Portable.NET          
Submitted on: Thu 10/23/2003 at 11:57
Category:  None                       Severity:  5 - Major                  
Bug Group:  None                      Resolution:  None                     
Assigned to:  None                    Status:  Open                         

Summary:  Code calling sscanf is compiled incorrectly by cscc

Original Submission:  The code is 

int i;
sscanf("320","%d",&i);

but it compiled as 

ldsflda valuetype '$strings'/'type4' '$strings'::'str0'
        ldsflda valuetype '$strings'/'type3' '$strings'::'str1'
        ldloca.s        0
        conv.i8
        call    vararg int32 'sscanf'(int8 
modopt(['OpenSystem.C']'OpenSystem.C'.'IsConst') *, int8 
modopt(['OpenSystem.C']'OpenSystem.C'.'IsConst') *, ..., int64)
        pop

Which is wrong (obviously).

Follow-up Comments
*******************

-------------------------------------------------------
Date: Thu 10/23/2003 at 21:14       By: rweather
Looks correct to me.  All values that are passed via a
vararg list must be first converted to their "natural
passing type".  In the case of pointers, the natural
passing type is "int64".  See the ABI specification in
"pnet/doc/c_language_abi.html" for more details.


CC list is empty


File Attachments
****************

-------------------------------------------------------
Date: Thu 10/23/2003 at 11:58  Name: test2.il  Size: 1KB   By: None
IL Code generated
http://savannah.gnu.org/bugs/download.php?group_id=353&amp;bug_id=6121&amp;bug_file_id=746

-------------------------------------------------------
Date: Thu 10/23/2003 at 11:57  Name: test2.c  Size: 0KB   By: None
The source code for test
http://savannah.gnu.org/bugs/download.php?group_id=353&amp;bug_id=6121&amp;bug_file_id=745


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6121&group_id=353

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



reply via email to

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