Errors in OSLibSupport.X.c.X

Timothy Baldwin tim at reinhouse.freeserve.co.uk
Sun Jul 22 18:50:48 BST 2001


In OSLibSupport.X.c.X there is:

/* synchronisation error */
x_LOCAL_ERROR( Error_Sync, 1 + 1U<<30, "Try/Catch Synchronisation Error" );

/* exception stack overflow */
x_LOCAL_ERROR( Error_XStack, 2 + 1U<<30, "Too many nested x_TRY blocks" );

which would define a couple of serious errors.

Addition has higher precedence than shifts, so should that not be:

/* synchronisation error */
x_LOCAL_ERROR( Error_Sync, 1 + (1U<<30), "Try/Catch Synchronisation Error" );

/* exception stack overflow */
x_LOCAL_ERROR( Error_XStack, 2 + (1U<<30), "Too many nested x_TRY blocks" );


i.e. with brackets around 1U<<30

PS. spotted this with gcc-Wall




More information about the oslib-user mailing list