SW500010 Microchip Technology, SW500010 Datasheet - Page 387

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
Error and Warning Messages
(358) illegal conversion of pointer to integer
A pointer has been assigned to or otherwise converted to a integral type. This will usually mean you
have used the wrong variable, but if this is genuinely what you want to do, use a typecast to inform
the compiler that you want the conversion and the warning will be suppressed. This may also mean
you have forgotten the * dereference operator, e.g.:
If you do intend to use an expression like this, then indicate that this is so by a cast:
(359) illegal conversion between pointer types
A pointer of one type (i.e. pointing to a particular kind of object) has been converted into a pointer
of a different type. This will usually mean you have used the wrong variable, but if this is genuinely
what you want to do, use a typecast to inform the compiler that you want the conversion and the
warning will be suppressed, e.g.:
This is common way of accessing bytes within a multi-byte variable. To indicate that this is the
intended operation of the program, use a cast:
This warning may also occur when converting between pointers to objects which have the same type,
but which have different qualifiers, e.g.:
If the default type for string literals is const char * , then this warning is quite valid. This should
be written:
Omitting a qualifier from a pointer type is often disastrous, but almost certainly not what you intend.
int * ip;
int i;
i = ip;
i = (int)ip;
long input;
char * cp;
cp = &input;
cp = (char * )&input;
char * cp;
/ * yes, but what sort of characters? * /
cp = “I am a string of characters”;
const char * cp;
cp = “I am a string of characters”;
/ * oops -- did you mean i = * ip ? * /
/ * is this correct? * /
/ * that’s better * /
/ * that’s better * /
(Parser)
(Parser)
387

Related parts for SW500010