Keil Logo

C51: WARNING 276 (CONSTANT IN CONDITION EXPRESSION)


Information in this article applies to:

  • C51 Version 5.50

QUESTION

When I compile my C source file I get the following warning:

WARNING 276: CONSTANT IN CONDITION EXPRESSION

What causes this?

ANSWER

The compiler detected a conditional expression with a constant value. In most cases this is a typing error. For example:

void test (void)
  {
  int i1, i2, i3;

  if (i1 = 1) i2 = 3;    /* const assigned with = */
  while (i3 = 2);        /* const assigned with = */
  }

MORE INFORMATION

Last Reviewed: Tuesday, October 24, 2006


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.