This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Defining a static variable on a function is not recognized by the editor and an error is issued: "unexpected token static". ie: void func() { static int localstatic; }
Bug is not reproduced on your code example. It seems error is appeared in previous lines. Please provide minimal code that has such error.
Actually, the error was something else. The real erroneous code is "static var" instead of "static int var". It is the absence of "int" that triggers the error message. void func() { static catchme = 0; } Apologies for having missed this; gcc accepts the code as default "int" type hence I didn't realise the missing keyword.
CSS 4.5.2 says: main.cpp:14:13: error: ‘catchme’ does not name a type