Author Topic: VS2017 Slick-C deprecation  (Read 620 times)

Marcel

  • Senior Community Member
  • Posts: 173
  • Hero Points: 14
VS2017 Slick-C deprecation
« on: August 06, 2017, 04:28:00 pm »
I have a bunch of macros that I don't have time to upgrade right now. They won't load because of deprecation warnings, mainly the use of the boolean type instead of the new bool.  Is there a way to convince the compiler to look the other way, at least until 2017 is out. After all, deprecation is only a precursor to actually yanking the support.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2496
  • Hero Points: 362
Re: VS2017 Slick-C deprecation
« Reply #1 on: August 07, 2017, 02:07:33 pm »
Use:
#pragma option(strict,on)

Instead of:
#pragma option(pedantic,on)

You can also disable deprecation using:
#pragma option(deprecation,off)

As it says in the docs, pedantic warnings can change across versions, so if you use it, you are subject to fixing your code potentially in each release.

jporkkahtc

  • Senior Community Member
  • Posts: 1658
  • Hero Points: 154
  • Text
Re: VS2017 Slick-C deprecation
« Reply #2 on: August 07, 2017, 05:01:00 pm »
Maybe, Slick could do

#pragma option(pedantic, Vxx)
To make Slick enable all existing syntax and deprecation as of Vxx.


jporkkahtc

  • Senior Community Member
  • Posts: 1658
  • Hero Points: 154
  • Text
Re: VS2017 Slick-C deprecation
« Reply #3 on: August 07, 2017, 05:44:17 pm »
With:
#pragma option(pedantic,on)
#pragma option(deprecation,off)


Slick still complains The 'boolean' keyword is deprecated, use 'bool'.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2496
  • Hero Points: 362
Re: VS2017 Slick-C deprecation
« Reply #4 on: August 07, 2017, 05:50:46 pm »
It's better to use #pragma option(strict,on)

While the message does use the word "deprecated", the "bool" keyword change is more of a language change than a traditional deprecation, so that is why the check is intentionally not disabled by the deprecation pragma.

Version-specific pedantic would be nice, but that would be a large matrix of options to create for only a small benefit.  Simpler solution is to use "strict" for macros you want to be forward compatible.  Use pedantic only when developing macros to get the best error checking.