beautypg.com

Echelon Neuron User Manual

Page 74

background image

66

Neuron C Compiler Errors (NCC)

NCC#

Description

170

Cannot have ‘io_changes’ & ‘io_update_occurs’ on same I/O object [NCC#170]

The Neuron C event expressions for io_update_occurs and io_changes (with

its various options) only apply to I/O objects that are inputs. Furthermore,
some events are not applicable to some input object types. Only one form of

event expression can be used per I/O object. A maximum of 15 I/O objects

can have io_update_occurs and io_changes events. The syntax of all the
event expressions requires the event type to be followed by the object name,

in parentheses.

171

Improper context for ‘continue’ statement [NCC#171]

A continue statement can only occur inside a do, for, or while statement. It
causes execution to immediately branch back to the first statement of the

loop statement that contains the continue statement.

172

Function definition does not allow return value [NCC#172]

The function, whose declared return data type is void, has a statement of

the form return

expression

.

173

Expression has no effect - discarded [NCC#173]

The compiler outputs this warning diagnostic when the optimizer discards
an expression. Examples of such expressions are:

x = y-1, z;

/* y-1 is discarded */

a+3;

/* a+3 is discarded */

x == 1? y: z;

/* z is discarded */

174

Return value of function was ignored [NCC#174]

A function that has a return type (other than void) is used in an expression,

but the caller discards the return value without it being used or stored.
The warning can be removed by casting the return of the function to void.

Example:


int f(void) {return 0;}
when (reset) {

(void)f();

}

175

This event will never be reached [NCC#175]

This message warns of the use of a specific, qualified event following a

generic, unqualified event in the same class. As the generic one will catch

the event first, the specific one will never evaluate to TRUE. This condition
can only occur when using the scheduler_reset feature. (Failure to use the

scheduler_reset feature with multiple event expressions that are not
exclusive can result in unstable behavior.)