Author Topic: VS 2019 16.8.1 BIG issues  (Read 48 times)

jcfuller

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
VS 2019 16.8.1 BIG issues
« on: November 14, 2020, 11:02:25 AM »
I just updated Visual Studio 2019 to build 16.8.1 and I can't build the BCX translator anymore.
I thought it built with 16.8 ?? but not sure.
These are not warnings that can be hidden they are errors.

James


Code: [Select]
Using Visual Studio BuildTools 2019
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.8.1
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Compiling "bc.cpp" To " a Windows Console App"
bc.cpp
bc.cpp(1796): error C2440: 'initializing': cannot convert from 'const char [5]' to 'PCHAR'
bc.cpp(1796): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1797): error C2440: 'initializing': cannot convert from 'const char [5]' to 'PCHAR'
bc.cpp(1797): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1798): error C2440: 'initializing': cannot convert from 'const char [8]' to 'PCHAR'
bc.cpp(1798): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1799): error C2440: 'initializing': cannot convert from 'const char [8]' to 'PCHAR'
bc.cpp(1799): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1800): error C2440: 'initializing': cannot convert from 'const char [6]' to 'PCHAR'
bc.cpp(1800): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1801): error C2440: 'initializing': cannot convert from 'const char [5]' to 'PCHAR'
bc.cpp(1801): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1802): error C2440: 'initializing': cannot convert from 'const char [6]' to 'PCHAR'
bc.cpp(1802): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1803): error C2440: 'initializing': cannot convert from 'const char [5]' to 'PCHAR'
bc.cpp(1803): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1804): error C2440: 'initializing': cannot convert from 'const char [7]' to 'PCHAR'
bc.cpp(1804): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1805): error C2440: 'initializing': cannot convert from 'const char [7]' to 'PCHAR'
bc.cpp(1805): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1806): error C2440: 'initializing': cannot convert from 'const char [5]' to 'PCHAR'
bc.cpp(1806): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1807): error C2440: 'initializing': cannot convert from 'const char [7]' to 'PCHAR'
bc.cpp(1807): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1808): error C2440: 'initializing': cannot convert from 'const char [5]' to 'PCHAR'
bc.cpp(1808): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
bc.cpp(1809): error C2440: 'initializing': cannot convert from 'const char [6]' to 'PCHAR'

[/cdoe]

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 680
    • View Profile
Re: VS 2019 16.8.1 BIG issues
« Reply #1 on: November 14, 2020, 11:23:35 AM »
Untested but maybe helpful ...

The /Zc:strictStrings option is off by default. (Maybe VS19 changed this???)

The /permissive- compiler option implicitly sets this option, but it can be overridden by using /Zc:strictStrings-

( The above wording is confusing to me )

https://docs.microsoft.com/en-us/cpp/build/reference/zc-strictstrings-disable-string-literal-type-conversion?view=msvc-160


jcfuller

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: VS 2019 16.8.1 BIG issues
« Reply #2 on: November 14, 2020, 11:38:06 AM »
Kevin,
  I found the same error in one of my sources and tried /Zc:strictStrings- but still got the error.

James

jcfuller

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: VS 2019 16.8.1 BIG issues
« Reply #3 on: November 14, 2020, 11:46:19 AM »
I think I tracked it down.
I was using
/std:c++latest
changed to
/std:c++14

Seems to be OK

Update: Also OK with /std:c++17

James
« Last Edit: November 14, 2020, 11:50:30 AM by jcfuller »