i down loaded 24 c++ programs from the MIT ( Massachusets institute of technology) web site. when i compiled the programs all the programs are giving the same warning messages " functions containing for, while, switch are not expanded inline". if i remove the word inline from the programs will the errors be corrected and give the correct results. or is there any other way.

2 Years
Discussion Span
Last Post by rproffitt

The inline keyword isn't a guarantee, it's a hint. If the compiler determines that inlining would produce worse code, it doesn't honor the hint. Some compilers just straight up reject the inline hint if there's a loop or troublesome lookup (ie. switch).


Welcome to the forum.

I want to broach something here. Warnings are not errors. You should look at them and decide if it's an issue or not. In this case, deceptikon is right on. But I want to broach the fact that a warning is just that and may not be an error.


@rubberman. Me, overseas at a supplier and this gem.

"Errors and warnings are costly to fix so we just test our software more."

Yup, big savings. We had a dozen folk from our company travel 6 thousand miles for this. My favorite was uninitilized variables. Found way too many of that one. Since when was that OK?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.