mirror of https://github.com/microsoft/clang.git
update the doc to compare with gcc 4.9 instead of 4.2
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342212 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
44383fe7b4
commit
2cf9113b81
|
@ -95,8 +95,11 @@ and making the wording as clear as possible.</p>
|
||||||
GCC and Clang diagnostic:</p>
|
GCC and Clang diagnostic:</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
$ <b>gcc-4.2 -fsyntax-only t.c</b>
|
$ <b>gcc-4.9 -fsyntax-only t.c</b>
|
||||||
t.c:7: error: invalid operands to binary + (have 'int' and 'struct A')
|
t.c: In function 'int f(int, int)':
|
||||||
|
t.c:7:39: error: invalid operands to binary + (have 'int' and 'struct A')
|
||||||
|
return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X);
|
||||||
|
^
|
||||||
$ <b>clang -fsyntax-only t.c</b>
|
$ <b>clang -fsyntax-only t.c</b>
|
||||||
t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A')
|
t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A')
|
||||||
<span style="color:darkgreen"> return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X);</span>
|
<span style="color:darkgreen"> return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X);</span>
|
||||||
|
|
Loading…
Reference in New Issue