compile error

Eljay Love-Jensen eljay@adobe.com
Sat Oct 4 02:34:00 GMT 2003


Hi Yamin,

As per <http://www.geocrawler.com/archives/3/254/2003/2/6100/10311290/>, your code is probably doing something naughty, like this:

int i;
struct s { ~s() { i++; } };

int main(int a)
{
  switch(a)
  {
    case 0: s b;
    case 1: s c = b;
  }
  return 0;
}

The fix is:  don't do that.  It's not legal C++.

HTH,
--Eljay 



More information about the Gcc-help mailing list