ARM Technical Support Knowledge Articles

CORRECTED SETJMP.H FOR CX51

Applies to: C51 C Compiler

Answer


Information in this article applies to:


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 keilC51INC 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

Article last edited on: 2005-07-15 10:22:39

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential