[llvm] r258687 - Reapplying r256836 with a fix for MSVC 14 support.

Ismail Donmez via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 00:29:27 PST 2016


Hi,

On Tue, Jan 26, 2016 at 10:19 AM, Ismail Donmez <ismail at i10z.com> wrote:
> This breaks OpenMP code:
>
> ..\projects\openmp\runtime\src\kmp_settings.c(5257): error C2440: '=':
> cannot convert from 'const char [5]' to 'char *'
> ..\projects\openmp\runtime\src\kmp_settings.c(5257): note: Conversion
> from string literal loses const qualifier (see /Zc:strictStrings)
>
> which is:
>
> char *str = NULL;
> switch ( __kmp_affinity_gran ) {
>     case affinity_gran_core: str = "core"; break;
>     case affinity_gran_package: str = "package"; break;
>     case affinity_gran_node: str = "node"; break;
>    default: KMP_DEBUG_ASSERT( 0 );
> }
>
> Marking str as const fixes the issue but not sure if it's the right fix.

After discussing on IRC this seems to be the right fix. Applied in 258797.

Thanks.


More information about the llvm-commits mailing list