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.
Code example: -------------------- #define FBC_CTL_FENCENO (1<<0) #define FBC_COMMAND 0x0320c #define FBC_CMD_COMPRESS (1<<0) #define FBC_STATUS 0x03210 -------------------- Expected: - error highlighting in code. Actual: - Logger error: SEVERE [org.netbeans.modules.cnd.apt]: line 33: # is not followed by a macro parameter INCORRECT #define directive: in welcome.cc for: TOKEN{["#define ",<13>,line=32,col=1],offset=1623,file=null} MACRO{["FBC_CTL_FENCENO",<205>,line=32,col=11],offset=1633,file=null}BODY{["(",<138>,line=32,col=33],offset=1655,file=null ["1",<10>,line=32,col=34],offset=1656,file=null ["<<",<164>,line=32,col=35],offset=1657,file=null ["0",<9>,line=32,col=37],offset=1659,file=null [")",<139>,line=32,col=38],offset=1660,file=null ["#",<183>,line=32,col=40],offset=1662,file=null ["define",<205>,line=32,col=41],offset=1663,file=null}INCORRECT #define directive: in welcome.cc for: TOKEN{["#define ",<13>,line=33,col=1],offset=1702,file=null} MACRO{["FBC_CMD_COMPRESS",<205>,line=33,col=11],offset=1712,file=null}BODY{["(",<138>,line=33,col=33],offset=1734,file=null ["1",<10>,line=33,col=34],offset=1735,file=null ["<<",<164>,line=33,col=35],offset=1736,file=null ["0",<9>,line=33,col=37],offset=1738,file=null [")",<139>,line=33,col=38],offset=1739,file=null ["#",<183>,line=33,col=40],offset=1741,file=null ["define",<205>,line=33,col=41],offset=1742,file=null}
Sunstudio and gnu preprocessors don't say anything about such macros. So it's OK to have such code. It's not an error, so it should not be highlighted. The only problem appears if we use such macro in code. But we highlight such usages as errors.