Keil Logo

C51: CORRECTED SETJMP.H FOR CX51


Information in this article applies to:

  • C51 Version 7.00

QUESTION

I am using the SETJMP.H header file and use the CX51 compiler for the Philips 80C51MA. When I compile I get a Compiler error C316 "Undetermined Conditional list". What is wrong?

ANSWER

The SETJMP.H file included in the \keil\C51\INC for v7.0 has two misplaced #endif statements.

RESOLUTION

The new SETJMP.H below has been corrected for both the C51 and the CX51 compiler.

/*--------------------------------------------------------------------------
SETJMP.H

Prototypes for longjmp facility.
Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
All rights reserved.
--------------------------------------------------------------------------*/

/* define the buffer type for holding the state information */
#ifndef _JMP_BUF_DEFINED
 #ifdef __CX51__
  #define _JBLEN        9  /* SP, SPE, ?C_XBP, ?C_IBP, ?C_PBP, RET-ADDR */
 #else
  #define _JBLEN        7  /* RET-ADDR, ?C_XBP, ?C_IBP, ?C_PBP, SP */
 #endif

typedef  char jmp_buf[_JBLEN];
#define _JMP_BUF_DEFINED

/* function prototypes */
extern int  setjmp  (jmp_buf);
extern void longjmp (jmp_buf, int);
#endif

MORE INFORMATION

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.