SW500010 Microchip Technology, SW500010 Datasheet - Page 388

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
(360) array index out of bounds
An array is being indexed with a constant value that is less than zero, or greater than or equal to the
number of elements in the array. This warning will not be issued when accessing an array element
via a pointer variable, e.g.:
(361) function declared implicit int
Where the compiler encounters a function call of a function whose name is presently undefined, the
compiler will automatically declare the function to be of type int, with unspecified (K&R style)
parameters. If a definition of the function is subsequently encountered, it is possible that its type
and arguments will be different from the earlier implicit declaration, causing a compiler error. The
solution is to ensure that all functions are defined or at least declared before use, preferably with
prototyped parameters. If it is necessary to make a forward declaration of a function, it should be
preceded with the keywords extern or static as appropriate. For example:
(362) redundant "&" applied to array
The address operator & has been applied to an array. Since using the name of an array gives its
address anyway, this is unnecessary and has been ignored, e.g.:
388
int i, * ip, input[10];
i = input[-2];
ip = &input[5];
i = ip[-2];
/ * I may prevent an error arising from calls below * /
void set(long a, int b);
void main(void)
{
}
int array[5];
int * ip;
/ * array is a constant, not a variable; the & is redundant. * /
ip = &array;
/ * by here a prototype for set should have seen * /
set(10L, 6);
/ * oops -- this element doesn’t exist * /
/ * this is okay * /
Error and Warning Messages
(Parser)
(Parser)
(Parser)

Related parts for SW500010