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.

Bug 76430

Summary: lexer failed in assert macro
Product: cnd Reporter: Vladimir Voskresensky <vv159170>
Component: -- Other --Assignee: Vladimir Voskresensky <vv159170>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Voskresensky 2006-05-16 12:52:38 UTC
Lexer failed on following example:
=========
#define _ASSERT_VOID_CAST(x) (void)(x)

#define likely(x) (x)
#define unlikely(x) (x)

void ddd_assert_fail (const char *assertion, const char *file,
		      unsigned int line, const char *function);


#define _assert_fn ""


#define assert(ex) \
_ASSERT_VOID_CAST(unlikely(ex) ? \
  0 : \
  (ddd_assert_fail (#ex, __FILE__, __LINE__, _assert_fn), 0) \
  )

void subtype_getweakref(int i, void *context)
{
	assert(1 + 3 <=
	       6);
}
=========

The main problem is absent of whitespace after "<=" if space after "<=" exists
=> no lexer exceptions.
Comment 1 Vladimir Voskresensky 2006-05-16 22:56:52 UTC
fixed in MacroExpander