I am using a switch case statement in my code. The case condition checks for a "class object.value". This is throwing an error saying error: `.' cannot appear in a constant-expression The same code works fine in other versions of gcc (i.e. 2.96 ). But I encounter this problem in gcc 3.4.2 version. Can u help me with a fix for this issue?