SW500009 Microchip Technology, SW500009 Datasheet - Page 378

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
(755) divide by zero
A constant expression that was being evaluated involved a division by zero, e.g.:
(757) constant conditional branch
A conditional branch (generated by an if, for, while statement etc.) always follows the same path.
This will be some sort of comparison involving a variable and a constant expression. For the code
generator to issue this message, the variable must have local scope (either auto or static local) and
the global optimizer must be enabled, possibly at higher level than 1, and the warning level threshold
may need to be lower than the default level of 0.
a function. For C code that compares these variables to constants, the result of the comparison can
be deduced at compile time and the output code hard coded to avoid the comparison, e.g.:
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.
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
364
The global optimizer keeps track of the contents of local variables for as long as is possible during
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 produce
A similar situation arises with for loops, e.g.:
a /= 0; /* divide by 0: was this what you were intending */
{
{
int a, b;
a = 5;
/* this can never be false; always perform the true statement */
if(a == 4)
int a, b;
for(a=0; a!=10; a++) /* this loop must iterate at least once */
b = 6;
b = func(a);
Error and Warning Messages
(Code Generator)
(Code Generator)

Related parts for SW500009