Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053A-page 34
 2012 Microchip Technology Inc.
2.5.11.3
MIGRATION TO THE CCI
No migration is required for XC8.
For 16- and 32-bit compilers, change any occurrence of the packed attribute, as in the 
following example:
struct DOT
{
char a;
int x[2] __attribute__ ((packed));
};
to:
struct DOT
{
char a;
__pack int x[2];
};
Alternatively, you may pack the entire structure, if required.
2.5.11.4
CAVEATS
None.
2.5.12
Indicating Antiquated Objects
The __deprecate specifier may be used to indicate that an object has limited longev-
ity and should not be used in new designs. It is commonly used by the compiler vendor 
to indicate that compiler extensions or features may become obsolete, or that better 
features have been developed and which should be used in preference.
Use the native keywords discussed in the Differences section to look up information on 
the semantics of this specifier.
2.5.12.1
EXAMPLE
The following shows a function which uses the __deprecate keyword.
void __deprecate getValue(int mode)
{
//...
}
2.5.12.2
DIFFERENCES
No deprecate feature was implemented on 8-bit compilers.
The 16- and 32-bit compilers have used the deprecated attribute (note different spell-
ing) to indicate that objects should be avoided if possible.
2.5.12.3
MIGRATION TO THE CCI
For 16- and 32-bit compilers, change any occurrence of the deprecated attribute, as 
in the following example:
int __attribute__(deprecated) intMask;
to:
int __deprecate intMask;
2.5.12.4
CAVEATS
None.