C/C++ Compiler Language Extensions
int i;
for (i=0; p[i]; ++i) {
int d = get(p[i]);
if (!check(d)) goto exit;
process(d);
}
exit:
tot;
})
Statement expressions are not supported in C++ mode.
Statement expressions are an extension to C originally imple-
mented in the GCC compiler. Analog Devices support the
extension primarily to aid porting code written for that compiler.
When writing new code consider using inline functions, which are
compatible with ANSI/ISO standard C++ and C99, and are as effi-
cient as macros when optimization is enabled.
Type Reference Support Keyword (Typeof)
The
typeof( expression )
of expression without actually knowing what that type is. It is useful for
making source code that is interpreted more than once such as macros or
include files more generic.
The
keyword may be used where ever a
typeof
such as in declarations and in casts.
This example,
#define abs(a) ({
typeof(a) __a = a;
if (__a < 0) __a = - __a;
__a;
})
shows
used in conjunction with a statement expression to define a
typeof
"generic" macro with a local variable declaration.
1-140
construct can be used as a name for the type
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
name is permitted
typedef
\
\
\
\
for ADSP-219x DSPs
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers