Echelon NodeBuilder Errors 3120 User Manual Page 44

  • Download
  • Add to my manuals
  • Print
  • Page
    / 123
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 43
5-24 Neuron C Compiler Errors (NCC)
NCC# Description
179 Incorrect use of ‘void’ in function prototype [NCC#179]
The void type has no size. It cannot be used as an argument of the
sizeof operator, nor can it be used to declare a variable. Its only
legal uses are in declaring function return types, declaring that a
function has no parameters, and in combination with * to define a
type void * (a wildcard pointer type).
180
Function parameter may not be ‘struct’ or ‘union’ type
[NCC#180]
Neuron C does not support passing struct or union types by value
as function parameters. You may use a pointer to the structure or
union as a function parameter.
181 Function declarations must use prototypes [NCC#181]
Neuron C is more restrictive than ANSI C in this area. The Neuron
Chip's
stack machine architecture does not permit calling undeclared
functions with unknown numbers of parameters.
182 No declaration for formal parameter - int assumed [NCC#182]
The definition of ANSI C permits a declaration at file scope without a
type. Likewise, functions may be declared without a return type.
Also, it is possible to construct a typecast that does not actually
contain a type. Such declarations must default to int, by the ANSI C
definition. However, such declarations are poor programming
practice, and may even indicate an error, thus the compiler issues a
warning diagnostic.
Consider the following example:
unsigned long x1, x2; x3;
Note the semicolon following x2. This is most likely a typo, however,
ANSI C permits this and results in x3 being declared by default as
an int. Due to white space rules, this appears the same to the
compiler as the following declaration:
unsigned long x1, x2;
x3;
This is almost certainly not what the programmer intended, yet most
C compilers do not issue a warning in these circumstances.
183
Mixing function prototypes and old-style parameter list not
allowed [NCC#183]
This diagnostic results from a declaration of the form:
void f(int a, b) int b; { <fn body> }
Use only new-style ANSI C function declaration syntax:
void f(int a, int b) { <fn body> }
or old-style (traditional) C function declaration syntax:
void f(a,b) int a; int b; { <fn body> }
Do not intermix these two styles within a single function definition.
Page view 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 122 123

Comments to this Manuals

No comments