View Issue Details

IDProjectCategoryView StatusLast Update
0000768Ecere SDKcompiler:templatespublic2016-07-16 20:45
Reporterredj Assigned To 
PriorityimmediateSeverityminorReproducibilityhave not tried
Status confirmedResolutionopen 
Product Version0.44.15 
Target Version0.44.16 
Summary0000768: compiler get confused about types in templates and report bad warnings
Descriptionhaving to use our friend the void * to shut up these annoying template warnings
Steps To Reproducethe following code (last line):
            Array<String> * newStrings = (Array<String>*)((byte *)options + option);
            Array<String> * strings = (Array<String>*)((byte *)output + option);
            if(*strings) { strings->Free(); delete *strings; }
            if(*newStrings && newStrings->count) { *strings = { }; strings->Copy(*newStrings); }

gives this warning:
   src/project/ProjectNode.ec:2229:82: warning: incompatible expression *newStrings (ecere::com::Array<String>); expected ecere::com::Container<T>

and this code (last line):
            Array<String> tempStrings = optionTempStrings[option];
            Array<String> * strings = (Array<String>*)((byte *)output + option);
            if(*strings) { strings->Free(); delete *strings; }
            if(tempStrings && tempStrings.count) { *strings = { }; strings->Copy(tempStrings); }

gives this warning:
   src/project/ProjectNode.ec:2238:82: warning: incompatible expression tempStrings (ecere::com::Array<String>); expected ecere::com::Container<T>
TagsNo tags attached.

Relationships

related to 0000261 closedjerome template args bug producing weird warnings? 

Activities

redj

2012-10-29 20:10

administrator   ~0000650

do we consider this related to that?
http://ecere.com/mantis/view.php?id=261

Issue History

Date Modified Username Field Change
2012-10-29 20:08 redj New Issue
2012-10-29 20:10 redj Note Added: 0000650
2012-10-29 21:34 jerome Relationship added related to 0000261
2013-04-24 20:19 jerome Priority normal => immediate
2016-04-19 05:30 jerome Target Version 0.44.12 Fixes => 0.46 eC II
2016-07-16 20:45 jerome Status new => confirmed
2016-07-16 20:45 jerome Product Version 0.44 Ryoan-ji => 0.44.15
2016-07-16 20:45 jerome Target Version 0.46 eC II => 0.44.16
2016-07-16 20:45 jerome Steps to Reproduce Updated View Revisions