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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:58:04+00:00 2026-06-05T12:58:04+00:00

I’m working in the C language and modifying code previously written by someone else.

  • 0

I’m working in the C language and modifying code previously written by someone else. I’m struggling with a few things and I’m trying to understand as much as I can about what is going on as I can. So, as my question stated, what is the difference between static inline void and void when creating a function? I apologize in advance for the long post, but I wanted you to know I did do some research, but don’t understand what I’ve found.

I found an explanation of static that confuses me:

The static specifier signifies that the function cannot be referenced
from other files; that is, the name is not exported by the linker.

By reading this, I’m assuming referencing a function is different than calling a function? I assume that because this function is called from another .c file. If that is the case, what is referencing a function?

Through the same website, they explain inline functions and I don’t understand what it means.

The __inline keyword tells the compiler to substitute the code within
the function definition for every instance of a function call.
However, substitution occurs only at the compiler’s discretion. For
example, the compiler does not inline a function if its address is
taken or if it is too large to inline.

Huh???

Any help is greatly appreciated, and I once again apologize for the terribly long post.

The following is located in file1.c (Using generic names as I don’t think it matters)

COMPLEX cNoiseSample;
CGauss( &cNoiseSample, loopbackRadio->pState );

The following is located in file2.c

static inline void CGauss( COMPLEX * pcGauss, P_OS_UNIFORM_RAND_STATE pState )
{
    //code
}
  • 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-06-05T12:58:06+00:00Added an answer on June 5, 2026 at 12:58 pm

    static means it can’t be referenced from another compilation unit (source file). “Referenced” means called, or otherwise referred to by name, e.g. assigned to a function pointer.

    inline is a hint to the compiler that the function’s code should be generated inline at the place it is called, rather than generated as a separate function to be branched to. This is normally done for performance reasons. To deal with Microsoft’s quote:

    the compiler does not inline a function if its address is taken or if it is
    too large to inline.

    An inlined function has no address, since it doesn’t exist as a separate entity. Its code is just intertwined seamlessly with the code it’s called from. So, if you take the address of a function (e.g. to assign to a pointer) then the compiler has to generate it as a real function, and cannot inline it.

    void means the function does not return a value.


    Having looked at your code sample, I’d guess that there is a separate definition of CGauss() somewhere, which is being called from file1.c, whereas file2.c is calling its own private version. Either that, or file1.c is #includeing file2.c. Which would be nasty.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.