This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

making library calls inline w/ and w/o optimization ebabled


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]