<div dir="ltr"><div><div><div>Hi Aaron,<br><br></div>I know that GCC 4.7 is the minimum support compiler.  However, since the change is limited to the compiler compatibility header (there are even some checks for GCC 3.1 in this header) and this change fixes the build and passes all test cases, I feel it is acceptable in this case.<br>
<br></div>Although I know the code base might be incompatible with GCC 4.6 in the near future, I wish to keep the backward compatibility as long as possible given that only some simple change to compiler compatibility header is required.  I agree that it won't make sense to stick with old syntax or prohibit the usage of new language feature just for the backward compatibility of the unsupported GCC 4.6.<br>
<br></div><div>Sincerely,<br></div>Logan<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 19, 2014 at 11:27 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since our min supported compiler version is 4.7 (as of llvm 3.4), I<br>
don't believe this commit really makes sense. Since we're trying to<br>
make the switch to using C++11 functionality, I don't think we want to<br>
add support for older compilers which will fail in other ways.<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, Feb 19, 2014 at 10:04 AM, Logan Chien <<a href="mailto:tzuhsiang.chien@gmail.com">tzuhsiang.chien@gmail.com</a>> wrote:<br>
> Author: logan<br>
> Date: Wed Feb 19 09:04:29 2014<br>
> New Revision: 201679<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=201679&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=201679&view=rev</a><br>
> Log:<br>
> Disable override and final C++ keyword in gcc 4.6.<br>
><br>
> According to <a href="http://gcc.gnu.org/projects/cxx0x.html" target="_blank">http://gcc.gnu.org/projects/cxx0x.html</a>,<br>
> override and final keyword was added in gcc 4.7.  Thus,<br>
> we should not use these keywords in gcc 4.6 even when<br>
> __GXX_EXPERIMENTAL_CXX0X__ is available.<br>
><br>
> Modified:<br>
>     llvm/trunk/include/llvm/Support/Compiler.h<br>
><br>
> Modified: llvm/trunk/include/llvm/Support/Compiler.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=201679&r1=201678&r2=201679&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=201679&r1=201678&r2=201679&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/include/llvm/Support/Compiler.h (original)<br>
> +++ llvm/trunk/include/llvm/Support/Compiler.h Wed Feb 19 09:04:29 2014<br>
> @@ -152,7 +152,8 @@<br>
>  /// LLVM_FINAL - Expands to 'final' if the compiler supports it.<br>
>  /// Use to mark classes or virtual methods as final.<br>
>  #if __has_feature(cxx_override_control) || \<br>
> -    defined(__GXX_EXPERIMENTAL_CXX0X__) || LLVM_MSC_PREREQ(1700)<br>
> +    (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC_PREREQ(4, 7)) || \<br>
> +    LLVM_MSC_PREREQ(1700)<br>
>  #define LLVM_FINAL final<br>
>  #else<br>
>  #define LLVM_FINAL<br>
> @@ -161,7 +162,8 @@<br>
>  /// LLVM_OVERRIDE - Expands to 'override' if the compiler supports it.<br>
>  /// Use to mark virtual methods as overriding a base class method.<br>
>  #if __has_feature(cxx_override_control) || \<br>
> -    defined(__GXX_EXPERIMENTAL_CXX0X__) || LLVM_MSC_PREREQ(1700)<br>
> +    (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC_PREREQ(4, 7)) || \<br>
> +    LLVM_MSC_PREREQ(1700)<br>
>  #define LLVM_OVERRIDE override<br>
>  #else<br>
>  #define LLVM_OVERRIDE<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>