SW500009 Microchip Technology, SW500009 Datasheet - Page 333

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
Error and Warning Messages
(347) external declaration inside function
A function contains an extern declaration. This is legal but is invariably not desirable as it restricts
the scope of the function declaration to the function body. This means that if the compiler encounters
another declaration, use or definition of the extern object later in the same file, it will no longer have
the earlier declaration and thus will be unable to check that the declarations are consistent. This
can lead to strange behaviour of your program or signature errors at link time. It will also hide any
previous declarations of the same thing, again subverting the compiler’s type checking. As a general
rule, always declare extern variables and functions outside any other functions. For example:
(348) auto variable "*" should not be qualified
An auto variable should not have qualifiers such as near or far associated with it. Its storage class
is implicitly defined by the stack organization. An auto variable may be qualified with static, but
it is then no longer auto.
(349) non-prototyped function declaration for "*"
A function has been declared using old-style (K&R) arguments. It is preferable to use prototype
declarations for all functions, e.g.:
This would be better written:
{
int process(int a)
{
}
int process(input)
int input;
{
}
int process(int input)
{
}
int input;
a = input;
extern int away; /* this would be better outside the function */
return away + a;
/* local blockscope input */
/* this will use the local variable. Is this right? */
/* warning flagged here */
(Parser)
(Parser)
(Parser)
319

Related parts for SW500009