Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 412635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:06:17+00:00 2026-05-12T18:06:17+00:00

In the problems of inline functions in wikipedia : http://en.wikipedia.org/wiki/Inline_expansion#Problems it says : #

  • 0

In the problems of inline functions in wikipedia :
http://en.wikipedia.org/wiki/Inline_expansion#Problems

it says : “# A language specification may allow a program to make additional assumptions about arguments to procedures that it can no longer make after the procedure is inlined.”

Could somebody elaborate this point?

How do you prevent the GCC from inlining a C++ function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:06:17+00:00Added an answer on May 12, 2026 at 6:06 pm

    In C++, the inline keyword really only has one required meaning: that the One-Definition Rule is suspended for that function (e.g., the function can be defined in several translation units, and the code still conforms).

    Specifically, using the inline keyword does not ensure that the code for that function will be generated inline. Defining a function inside a class definition also makes it an inline function — but, again, that doesn’t ensure that its code will be generated inline either.

    Conversely, a function that is defined outside a class definition, without the inline keyword can and may still have its code generated inline. The only difference is that in this case multiple definitions of the function renders the code non-conforming.

    The bottom line is that portable code cannot assure that code either is or is not generated inline. If you don’t mind making your code non-portable, however, you can use __attribute__(noinline).

    I would not, however, do this on the basis of the cited quote from Wikipedia. Wikipedia is hardly an authoritative source, and even if it was, what you’re quoting is just a vague statement about what could happen with some hypothetical language on some hypothetical compiler under some hypothetical conditions. You’re generally better off writing your code to be clear and readable, and letting the compiler worry about generating good results from that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use inline assembly massively in a project where I need to call functions
I'm having a problem using CSS's display:inline property with the list-style-image: property on <li>
What problems does MEF (Managed Extensibility Framework) solves that cannot be solved by existing
any problems with doing this? int i = new StreamReader(file.txt).ReadToEnd().Split(new char[] {'\n'}).Length
I'm having problems using textures that are larger than the OpenGL window or the
What kind of programming problems are state machines most suited for? I have read
I'm having problems deciding on what is the best way is to handle and
I am having problems getting text within a table to appear centered in IE.
One of the problems I have come across having complex tasks on the browser
I am having problems manually looping through xml data that is received via an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.