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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux