View Issue Details

IDProjectCategoryView StatusLast Update
0001021Ecere SDKcompilerpublic2014-05-19 01:33
Reporterjerome Assigned Tojerome  
PriorityimmediateSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.44.09 
Target Version0.44.10 64Fixed in Version0.44.10 64 
Summary0001021: Declarations inside case statements
DescriptionWe now support declarations in the middle of statements with warnings, but have not handled case statements for this yet
TagsNo tags attached.

Activities

jerome

2014-02-04 17:40

administrator   ~0001162

Interestingly, whereas this worked:

void Test()
{
   int a;
   switch(a)
   {
      case 3:
         PrintLn("hmm?");
         int c;
         break;
   }
}

This did not:

void Test()
{
   int a;
   switch(a)
   {
      case 3:
         int c;
         PrintLn("hmm?");
         break;
   }
}

jerome

2014-02-04 19:00

administrator   ~0001163

Fixed by:
https://github.com/ecere/ecere-sdk/commit/e02a3fa281acebdba2bbacacf868c688a1c8fb39

This is actually not valid C, a dummy ';' statement has to be added to generated C code.

Opted to support this as it's a common pitfall users ran into, and C++ supports it.

jerome

2014-02-20 03:51

administrator   ~0001191

Fixed identifiers declared within case statement being unresolved:
https://github.com/ecere/ecere-sdk/commit/032076ce47cda80b5b105ae66310b31934f6a498

Issue History

Date Modified Username Field Change
2013-10-04 23:57 jerome New Issue
2013-10-04 23:57 jerome Status new => assigned
2013-10-04 23:57 jerome Assigned To => jerome
2014-02-04 17:40 jerome Note Added: 0001162
2014-02-04 19:00 jerome Status assigned => resolved
2014-02-04 19:00 jerome Fixed in Version => 0.44.10 64
2014-02-04 19:00 jerome Resolution open => fixed
2014-02-04 19:00 jerome Note Added: 0001163
2014-02-20 03:51 jerome Note Added: 0001191
2014-05-19 01:33 jerome Status resolved => closed