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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:39:36+00:00 2026-05-20T11:39:36+00:00

This is both a question and a reference and I am hoping that people

  • 0

This is both a question and a reference and I am hoping that people can build upon this so that it can be reused by people with similar questions.

How can we reliably detect a particular version of a C/C++/ObjC compiler? Now I know the answer for Visual Studio and partially know the answer for Xcode.

Now for the Visual Studio compiler we have _MSC_VER which is defined with these values:

Version 1.0    800
Version 2.0    900
Version 2.x    900
Version 4.0    1000
Version 5.0    1100
Version 6.0    1200
Version 7.0    1300
Version 7.1    1310
Version 8.0    1400  (Visual Studio 2005)
Version 9.0    1500  (Visual Studio 2008)
Version 10.0   1600  (Visual Studio 2010)
Version 11.0   1700  (Visual Studio 2012)

Now for the Xcode compiler we have this define:

__APPLE_CC__

But the only values I’ve managed to find via google (Mac docs don’t seem to have these values) are:

Xcode 3.0              5465
Xcode 3.1              5470
Xcode 3.1 (GCC 4.2)    5553
Xcode 3.2.3            5664  (Got this value from my own compiler)

Can anyone complete this list or provide links to a full list? And maybe we can provide information for other compilers too.

  • 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-20T11:39:36+00:00Added an answer on May 20, 2026 at 11:39 am

    As someone who has ported more than his fair share of ‘C’ around, I can see were you are coming from, so here is some to get us started:

    For IBM CL/C++ compiler product:

    __xlc__  - Format is V.R.M.F eg: "9.0.0.0"
    __IBMCPP__ Format is an integer as VRM eg: V9.0 is 900
    __IBMC__ - Format is an integer as VRM, 
               which indicates the level of compiler as VRM as:
    < 200 is C Set/2
    < 300 is C Set++
    otherwise is Visual Age C++ V.M.C
    
               where V=version, M=release, M=modification and F=fix level.
    

    For Borland C:

    ___BORLANDC__ ??
    

    For GNU C:

    __GNUC__ ??
    

    For Watcon C:

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

Sidebar

Related Questions

This question is for the people who know both Haskell (or any other functional
For reference, I would like to note that this question is taken into consideration
I can see that this question has been asked several times, but none of
I've done some research on this question (both via google and on here), but
This is kind of a two part question. But it both relates to the
I believe this question applies equally well to C# as to Java, because both
This is kind of a COM question to do with DirectX. So, both ID3DXSprite
I have tried this both on Ubuntu Linux and on Windows. I can not
(Bonus internets for anyone who can explain how I can do this in both
Why do this Ruby object both a to_s and inspect methods that appear to

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.