W8027 Functions containing 'statement' are not expanded inline (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

(Command-line option to suppress warning: -w-inl)

Where:

'statement' can be any of the following:

  • Static variables
  • Aggregate initializers
  • Some return statements
  • Local destructors
  • Some if statements
  • Local classes
  • Missing return statements
  • Disallowed reserved words listed under "Reserved words" below.

Reserved words

Functions containing any of these reserved words can't be expanded inline, even when specified as inline:

asm
except
break
finally
case
for
continue
goto
defaults
switch
do
while



The function is still perfectly legal, but will be treated as an ordinary static (not global) function.

A copy of the function will appear in each compilation unit where it is called.

Description

If an inline function becomes too complex, the compiler is unable to expand it inline. However, because the function is so complex, expanding it inline is unlikely to provide significant performance enhancements.

For local destructors

You've created an inline function for which the compiler turns off inlining. You can ignore this warning; the function will be generated out of line.