making library calls inline w/ and w/o optimization ebabled
Aaron Case
aaron.case@dynazign.com
Thu Aug 28 14:45:00 GMT 2003
Hello,
I am porting code from MSVC v5.1 to gcc.
The application code contains the pragma directive intrinsic as such.
#pragma intrinsic(memset)
This, as expected, is not recognized with GCC as it does not contain this
pragma directive(see warning below).
xyztask.c:56: warning: ignoring #pragma intrinsic
GCC does however have an attribute __always_inline, and says this in the
manual.
always_inline
Generally, functions are not inlined unless optimization is specified. For
functions declared inline, this attribute inlines the function even if no
optimization level was specified.
However, memset is a library function. So if the optimization is turned off
and I declare it as inline and apply this attribute the compiler will
compile the code in-line.
Since this is a library function how do you force the compiler to make it
inline(redeclare, overload...?), or does GCC have a mechanism to force
inline compilation of library calls.
Thanks in advance
Aaron
More information about the Gcc-help
mailing list