Am Donnerstag, 27. Juli 2006 23:55 schrieb João Lopes: > Hi, > > I am trying to understand what "versions" of C and C++ exists, and what > are supported by GCC. > > *Language Standards Supported by GCC* > http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Standards.html#Standards > *Options Controlling C Dialect* > http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/C-Dialect-Options.html > > > For example, i can say "At project X we will use PHP 5.1, or JAVA 1.5", > but if i use C++ what can i say ? Saying you use JAVA 1.5 means that you don't use a standard but sun's java machine at version 1.5. The same for PHP, since you use a php installation of the 5.1 release from the php.net group. Both aren't standardized by some industrie standard commitee but are as-is standards from a production and management group. When you use a ANSI C Compiler, as GCC is as described at the first link, you can say you implement your project X with (ANSI X3.159-1989) which is the correct reference to the ANSI standard document also known as 'c89' (which referes to the UNIX System Command as described here: http://www.opengroup.org/onlinepubs/007908799/xcu/c89.html ). Later ISO took over the standardization of C, taken C89 and moved that to C90, which is a shortcut for ISO/IEC 9899:1990 (see the arguments to the -std option with gcc). Of course if you don't want to use the standard specifications you can do the same as you did with java and php telling: We make project X with PHP5.1, Java 1.5 and GCC 4. But you can also say: We make project X with PHP5.1, Java 1.5 and any ISO/IEC 9899:1990 conforming C Compiler (i.e. GCC 3,4). See also the wikipedia articles to the C and C++ languages, describing also several compilers at the market and the standards that apply to the languages. C++03 isn't currently implemented by any compiler, as far as I know, since the standard specification is in development itself. See also: http://www.research.att.com/~bs/C++.html > Google tells me about two C++ Standards ( C++98 / C++03 ) / /and two C > Standards ( C89 / C99 ), so i can say this : > > "I will use C++ ISO98 on project X, by using GCC with *-std=**c++98*" > "I will use C ISO99 on project X, by using GCC with *-std=**c99*" > > Thanks, > João Lopes