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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:45:10+00:00 2026-06-01T18:45:10+00:00

I am developing in C using gcc in Linux. I am organizing my small

  • 0

I am developing in C using gcc in Linux.

I am organizing my small functions in .H and .C files in the following way

      // .H file
      extern int my_function( int val );

      // .C file
      inline int my_function( int val ){
          // my job..very short!
      }

These functions are small so they are very good candidates to be inlined but I don’t know if they will be for sure.

I have doubt about the way I cam organizing my file and I was thinking that probably it would be better to have all my functions inlined directly into the .h file without .C file.
Can you help me a bit in clarifying my doubt?

  • 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-01T18:45:13+00:00Added an answer on June 1, 2026 at 6:45 pm

    First of all, note that you can tell gcc to try and inline small functions into their callers by adding the -finline-functions option.

    If you have any doubt that your function will actually be inlined, you can ask gcc to warn you about uninlinable function, by using -Winline

    Here, as your functions are declared both extern and inline, they will be inlined as the inline definition will only be used for inlining. In this particular situation the function will not be compiled on its own at all.

    Read http://gcc.gnu.org/onlinedocs/gcc/Inline.html for further details.

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

Sidebar

Related Questions

Recently I am developing using 'C in Linux platforms, the tools like gcc are
I'm developing a Android app using Phonegap - Is there any way in which
I have a C program that I'm developing using Ubuntu 11.10 (Linux version 3.0.0-12-generic-pae
I'm developing an embedded application using GCC/G++ compiled for arm-eabi. Due to resource constraints,
I have the following table in an application I am developing using ruby on
There is a small advancement in my app, developing using ASP.Net and C# on
I'm developing using JDE 4.5 which doesn't contain the PERMISSION_RECORDING, and it's denied by
I am developing using 3.0 and VS 2008. The problem is my build server
I've got two applications I'm developing using Qt on windows. I want the user
I am trying to get started developing using the .NET Micro Framework but appear

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.