Ideone使用的C ++编译器

时间:2014-09-11 23:49:06

标签: c++

编译器是否使用Ideone来编译C ++代码?

我试图快速google并且似乎应该是GCC,但没有明确提到任何来源。

3 个答案:

答案 0 :(得分:6)

是gcc-4.8.1

enter image description here

来自ideone faq page

The following programming languages are supported:
name    version id (for api)
Ada gnat-4.6    7
Assembler   nasm-2.10.01    13
Assembler   gcc-4.8.1   45
AWK (gawk)  gawk-3.1.6  104
AWK (mawk)  mawk-1.3.3  105
Bash    bash 4.0.35 28
bc  bc-1.06.95  110
Brainf**k   bff-1.0.3.1 12
C   gcc-4.8.1   11
C#  mono-2.8    27
C++ 4.3.2   gcc-4.3.2   41
C++ 4.8.1   gcc-4.8.1   1
C++11   gcc-4.8.1   44
C99 strict  gcc-4.8.1   34
CLIPS   clips 6.24  14
Clojure clojure 1.5.0-RC2   111
COBOL   open-cobol-1.0  118
COBOL 85    tinycobol-0.65.9    106
Common Lisp (clisp) clisp 2.47  32
D (dmd) dmd-2.042   102
Erlang  erl-5.7.3   36
F#  fsharp-2.0.0    124
Factor  factor-0.93 123
Falcon  falcon-0.9.6.6  125
Forth   gforth-0.7.0    107
Fortran gfortran-4.8    5
Go  1.0.3   114
Groovy  groovy-2.1.6    121
Haskell ghc-7.6.3   21
Icon    iconc 9.4.3 16
Intercal    c-intercal 28.0-r1  9
Java    sun-jdk-1.7.0_25    10
Java7   sun-jdk-1.7.0_10    55
JavaScript (rhino)  rhino-1.7R4 35
JavaScript (spidermonkey)   spidermonkey-1.7    112
Lua luac 5.1.4  26
Nemerle ncc 0.9.3   30
Nice    nicec 0.9.6 25
Nimrod  nimrod-0.8.8    122
Node.js 0.8.11  56
Objective-C gcc-4.5.1   43
Ocaml   ocamlopt 3.10.2 8
Octave  3.6.2   127
Oz  mozart-1.4.0    119
PARI/GP 2.5.1   57
Pascal (fpc)    fpc 2.6.2   22
Pascal (gpc)    gpc 20070904    2
Perl    perl 5.16.2 3
Perl 6  rakudo-2010.08  54
PHP php 5.4.4   29
Pike    pike 7.6.86 19
Prolog (gnu)    gprolog-1.3.1   108
Prolog (swi)    swipl 5.6.64    15
Python  python 2.7.3    4
Python 3    python-3.2.3    116
R   R-2.11.1    117
Ruby    ruby-1.9.3  17
Scala   scala-2.10.2    39
Scheme (guile)  guile 1.8.5 33
Smalltalk   gst 3.1 23
SQL sqlite3-3.7.3   40
Tcl tclsh 8.5.7 38
Text    text 6.10   62
Unlambda    unlambda-2.0.0  115
VB.NET  mono-2.4.2.3    101
Whitespace  wspace 0.3  6

答案 1 :(得分:4)

当您在Ideone上选择语言时,会显示有关确切版本的工具提示。对于两个C ++编译器(名为C ++ 4.8.1和C ++ 11),都会显示包含(gcc 4.8.1)的工具提示。

列表的其他部分还有C ++ 4.3.2,工具提示中包含(gcc 4.3.2)

答案 2 :(得分:2)

经过一些调查后(幸运的是,第一次尝试是正确的尝试):

#include <iostream>

#if defined(__GNUC__)
  #define COMPILER "GCC"
  #define VERSION __GNUC__
  #define MINOR __GNUC_MINOR__
#else
  #define COMPILER "try another"
  #define VERSION "unkown"
  #define MINOR  0
#endif

int main() {
  using namespace std;

  cout<<COMPILER<<" "<<VERSION<<"."<<MINOR<<endl;
  return 0;
}

目前的输出是:

Stdout: GCC 4.8