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 956033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:28:48+00:00 2026-05-16T00:28:48+00:00

In section 7.1.1 of the book The C++ Programming Language the author states: inline

  • 0

In section 7.1.1 of the book “The C++ Programming Language” the author states:

“inline function still has a unique address and so do the static variables of an inline function”

I am confused. If I have an inline function then it can’t have address. Does this happen in C also?

  • 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-16T00:28:48+00:00Added an answer on May 16, 2026 at 12:28 am

    The inline attribute is just a hint to the compiler that it should try to inline your function. It’s still possible to take the address of the function, and in that case the compiler will also need to emit a non-inline version.

    For example:

    #include <stdio.h>
    
    inline void f() {
        printf("hello\n");
    }
    
    int main() {
        f();
        void (*g)() = f;
        g();
    }
    

    The above code prints hello twice.

    My gcc compiler (with -O) emits code something like this:

    _main:
            pushl   %ebp
            movl    %esp, %ebp
            pushl   %ebx
            subl    $20, %esp
            call    ___i686.get_pc_thunk.bx
    "L00000000002$pb":
            leal    LC0-"L00000000002$pb"(%ebx), %eax
            movl    %eax, (%esp)
            call    L_puts$stub        ; inlined call to f()
            call    L__Z1fv$stub       ; function pointer call to f() (g is optimised away)
            movl    $0, %eax
            addl    $20, %esp
            popl    %ebx
            popl    %ebp
            ret
    

    As you can see, there is first a call to puts() and then a call to L__Z1fv() (which is the mangled name of f()).

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

Sidebar

Related Questions

I'm reading The Ruby Programming Language. In section 3.2.6.1, Multibyte characters in Ruby 1.9,
Right now I'm reading a beginner-level book called 'Programming Embedded Systems'. It has one
The CakePHP book has a section on Internationalization & Localization. Bascially what it says
I've read this book section about git branches. I have create a branch called
According to a section in this presumably accurate book , A common use of
In section 9.2.1 of Michael Hartl's new Rails Tutorial Book (3.2), there is a
I was reading the section on C portability in the book C Traps and
Now I am read the book Inside The C++ Object Model 's fourth section
I have 3 tables: Book, Section and Content. I want to add many-to-many relation
I've read the Basic Branching and Merging section of the Git Community Book. So

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.