MantisBT - Ecere SDK
View Issue Details
0000316Ecere SDKcompilerpublic2010-02-23 19:382014-08-08 18:17
jerome 
jerome 
immediatemajoralways
closedfixed 
 
0.44.10 640.44.10 64 
0000316: Issues with opaque structure parameters
import "ecere"

Point dummy;

void TestPoint(struct Point v0)
{
   TestPoint(v0);
}

void Bla()
{
   TestPoint(Point { 0, 10 });
}
error: incompatible type for argument 1 of 'TestPoint'


TestPoint(&__simpleStruct0);

* Shouldn't be adding reference operator here.
v0.44d2
Issue History
2010-02-23 19:38jeromeNew Issue
2010-02-23 19:41jeromeNote Added: 0000149
2010-02-23 19:41jeromeAssigned To => jerome
2010-02-23 19:41jeromePrioritynormal => immediate
2010-02-23 19:41jeromeReproducibilityhave not tried => always
2010-02-23 19:41jeromeStatusnew => assigned
2010-02-23 19:41jeromeAdditional Information Updated
2010-02-23 19:41jeromeNote Edited: 0000149
2010-07-07 02:59redjTarget Version => 0.44d2
2010-07-07 04:10redjTag Attached: v0.44d2
2010-07-25 20:33redjRelationship addedchild of 0000429
2010-07-26 19:10thexa4Target Version0.44d2 => 0.44 draft 2
2012-03-08 15:43redjTarget Versionold 0.44.pre2 => 0.45 Ginkakuji
2012-03-08 17:18redjRelationship deletedchild of 0000429
2012-03-29 07:50redjCategory => eC Compiling Tools
2012-03-29 07:50redjProject@2@ => Ecere SDK
2013-04-24 03:57jeromeTarget Version0.45 Ginkakuji => 0.44.1 64
2013-04-24 20:22jeromeAssigned Tojerome =>
2013-04-27 06:08redjStatusassigned => new
2014-07-10 23:02jeromeAssigned To => jerome
2014-07-10 23:02jeromeStatusnew => assigned
2014-07-10 23:02jeromeTarget Version0.44.12 Fixes => 0.44.10 64
2014-07-10 23:03jeromeNote Added: 0001367
2014-07-10 23:19jeromeNote Added: 0001368
2014-07-10 23:19jeromeStatusassigned => resolved
2014-07-10 23:19jeromeFixed in Version => 0.44.10 64
2014-07-10 23:19jeromeResolutionopen => fixed
2014-08-08 18:17jeromeStatusresolved => closed

Notes
(0000149)
jerome   
2010-02-23 19:41   
Tao Example is broken!!!
--------------------------

struct InventoryItem
{
   int code;
   float price;
};
void FillItem(InventoryItem item)
{
   item.code = 1234;
   item.price = 45.0f;
}
void DontModifyItem(struct InventoryItem item)
{
   // This only modifies a local copy
   item.code = 1234;
   item.price = 45.0f;
}
void Test()
{
   InventoryItem item1 { };
   DontModifyItem(item1);
   // item1 still contain zero values
}

--------------------------------------
error: invalid type argument of '->' (have 'struct InventoryItem')
error: invalid type argument of '->' (have 'struct InventoryItem')
error: incompatible type for argument 1 of 'DontModifyItem'

(0001367)
jerome   
2014-07-10 23:03   
Both original issues seem fixed, but now the first example suffer from a missing topological edge causing warnings and an error. Fix so we can close this issue.
(0001368)
jerome   
2014-07-10 23:19   
The remaining topo edge issue was resolved by:
https://github.com/ecere/ecere-sdk/commit/d7fc5db067ba90852ed35fac4b15001a3e679092 [^]

Both the code in the description and Tao example in the note now build fine.