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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:36:08+00:00 2026-06-07T04:36:08+00:00

I was reading a book on GCC. It said only the standard library is

  • 0

I was reading a book on GCC. It said only the standard library is linked by default for any C program. Since the pow() is not in the standard library, I will have to link to it using the -lm flag. However, when I compiled, I simply used:

gcc hello.c -o hello

and it still worked..

And there is another similar problem, the book also said that if you have printf("%f\n", 4); in your C program and if you compile WITHOUT -Wall option, no warning will be issued. However, I tried compiling it without the -Wall option but I still got a warning:

hello.c:6:2: warning: format ‘%f’ expects argument of type ‘double’,
but argument 2 has type ‘int’ [-Wformat]

Why is this? The book said I have to supply -lm and -Wall in order to make my program compiled and get the warning but I did not use either of them but I still got my program compiled and got the warning?

Thank you!

  • 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-07T04:36:10+00:00Added an answer on June 7, 2026 at 4:36 am

    GCC supplies several standard library functions as built-ins:

    GCC provides a large number of built-in functions other than the ones mentioned above. Some of these are for internal use in the processing of exceptions or variable-length argument lists and will not be documented here because they may change from time to time; we do not recommend general use of these functions.

    The remaining functions are provided for optimization purposes.

    If you look at the list of built-ins, you’ll see that pow is one of them.

    If you add -fno-builtin to your compiler options, you should get the linker error that you’re expecting.

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

Sidebar

Related Questions

I'm reading the book Multithreading Applications in Win32 The book says return node->next will
Just curious. Using gcc/gdb under Ubuntu 9.10. Reading a C book that also often
I am reading book called C++ coding standard By Herb Sutter, Andrei Alexandrescu and
Am reading the book Objective-C Programming by Big Nerd Ranch, and am not sure
Reading some book that said the servlet is singleton from the container side. Is
Reading a book on Entity Framework and they say that LINQ is only available
I'm reading a book on Servlets to review and it states that it will
I'm reading the book 'C# in Depth, 2nd Edition' of Jon Skeet. He said
I was reading a book and came across a program to read entries from
I am reading a book which says (if I am not getting it wrong)

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.