SW500010 Microchip Technology, SW500010 Datasheet - Page 431

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
will produce code that sets a to 5, then immediately sets b to 6. No code will be produced for the
comparison if(a == 4). If a was a global variable, it may be that other functions (particularly
interrupt functions) may modify it and so tracking the variable cannot be performed.
expression with missing or badly placed parentheses, causing the evaluation to yield a value different
to what you expected.
produce an infinite loop, use for(;;).
In this case the code generator can again pick up that a is assigned the value 0, then immediately
checked to see if it is equal to 10. Because a is modified during the for loop, the comparison
code cannot be removed, but the code generator will adjust the code so that the comparison is not
performed on the first pass of the loop; only on the subsequent passes. This may not reduce code
size, but it will speed program execution.
(758) constant conditional branch: possible use of "=" instead of "=="
There is an expression inside an if or other conditional construct, where a constant is being assigned
to a variable. This may mean you have inadvertently used an assignment = instead of a compare ==,
e.g.:
This warning may indicate more than an optimization made by the compiler. It may indicate an
This warning may also be issued because you have written something like while(1). To
A similar situation arises with for loops, e.g.:
{
{
int a, b;
a = 5;
/ * this can never be false;
if(a == 4)
int a, b;
/ * this loop must iterate at least once * /
for(a=0; a!=10; a++)
int a, b;
/ * this can never be false;
if(a = 4)
b = 6;
b = func(a);
b = 6;
always perform the true statement * /
always perform the true statement * /
(Code Generator)
431

Related parts for SW500010