SW500010 Microchip Technology, SW500010 Datasheet - Page 389

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
(363) redundant "&" or "*" applied to function address
The address operator "&" has been applied to a function. Since using the name of a function gives
its address anyway, this is unnecessary and has been ignored, e.g.:
(364) attempt to modify object qualified *
Objects declared const or code may not be assigned to or modified in any other way by your
program. The effect of attempting to modify such an object is compiler-specific.
(365) pointer to non-static object returned
This function returns a pointer to a non-static (e.g. auto) variable. This is likely to be an error,
since the storage associated with automatic variables becomes invalid when the function returns,
e.g.:
(366) operands of "*" not same pointer type
The operands of this operator are of different pointer types. This probably means you have used
the wrong pointer, but if the code is actually what you intended, use a typecast to suppress the error
message.
extern void foo(void);
void main(void)
{
}
const int out = 1234;
out = 0;
char * get_addr(void)
{
}
char c;
/ * returning this is dangerous;
return &c;
void( * bar)(void);
/ * both assignments are equivalent * /
bar = &foo;
bar = foo;
the pointer could be dereferenced * /
/ * the & is redundant * /
/ * “out” is read only * /
/ * oops --
writing to a read-only object * /
(Parser)
(Parser)
(Parser)
(Parser)
389

Related parts for SW500010