Ask Your Question
0

how to know the version of c compiler

asked 2013-04-04 14:37:11 -0600

python gravatar image

i want to know the version of c compiler that i am using i.e. whether it is c89 or c99....what is the command to know this????i am using fedora18

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-04-05 06:30:45 -0600

FranciscoD_ gravatar image

From the man page:

man gcc
....
       gnu89
           GNU dialect of ISO C90 (including some C99 features). This is the default for C code.

       gnu99
       gnu9x
           GNU dialect of ISO C99.  When ISO C99 is fully implemented in GCC, this will become the default.  The name gnu9x is deprecated.

       gnu11
       gnu1x
           GNU dialect of ISO C11.  Support is incomplete and experimental.  The name gnu1x is deprecated.

       c++98
           The 1998 ISO C++ standard plus amendments. Same as -ansi for C++ code.

       gnu++98
           GNU dialect of -std=c++98.  This is the default for C++ code.
 ....

You really should read the man page. It has most of the answers.

edit flag offensive delete link more
0

answered 2013-04-04 14:43:27 -0600

sgallagh gravatar image

GCC (the GNU compiler collection) on Fedora has both C89 and C99 modes available. You can specify which one you want to use during compilation by running either /usr/bin/c89 or /usr/bin/c99.

edit flag offensive delete link more

Comments

can u tell what is the default version of c compiler that fedora uses

python gravatar imagepython ( 2013-04-04 14:58:56 -0600 )edit

Question Tools

Stats

Asked: 2013-04-04 14:37:11 -0600

Seen: 1,096 times

Last updated: Apr 05 '13