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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:28:02+00:00 2026-05-27T01:28:02+00:00

Is a C compiler allowed to add functions to standard headers and still conform

  • 0

Is a C compiler allowed to add functions to standard headers and still conform to the C standard?

I read this somewhere, but I can’t find any reference in the standard, except in annex J.5:

The inclusion of any extension that may cause a strictly conforming
program to become invalid renders an implementation nonconforming.
Examples of such extensions are new keywords, extra library functions
declared in standard headers
, or predefined macros with names that do
not begin with an underscore.

However, Annex J is informative and not normative… so it isn’t helping.

So I wonder if it is okay or not for a conforming compiler to add additional functions in standard headers?

For example, lets say it adds non-standard itoa to stdlib.h.

  • 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-27T01:28:02+00:00Added an answer on May 27, 2026 at 1:28 am

    In 4. “Conformance” §6, there is:

    A conforming implementation may have extensions (including additional
    library functions), provided they do not alter the behavior of any strictly conforming
    program.

    with the immediate conclusion in a footnote:

    This implies that a conforming implementation reserves no identifiers other than those explicitly
    reserved in this International Standard.

    The reserved identifiers are described in 7.1.3. Basically, it is everything starting with an underscore and everything explicitly listed as used for the standard libraries.

    So, yes the compiler is allowed to add extensions. But they have to have a name starting with an underscore or one of the prefixes reserved for libraries.

    itoa is not a reserved identifier and a compiler defining it in a standard header is not conforming.

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

Sidebar

Related Questions

Compiler Error Keyword 'this' is not available in the current context delegate void CallBack(int
The compiler complains about this, after I activated all kind of warnings: For MyApp_Prefix.pch
I do not understand why the compiler does not allow this: Callable callable =
With a piece of code like this, the compiler complains on c.MyProperty : MyClass
Can the C++ compiler assume a 'const bool &' value will not change? For
I can not compile, this program is giving me errors. I have already spend
This may be a silly question about inheritance, but it does not make much
In the following code Vector v = new Vector(); v.add('c'); v.add('c') is allowed in
I've have read a lot trying to find a way to cleanly consume lists
The compiler gives me the error 'void' type not allowed here...<= operator cannot be

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.