4

While working on a project we were having 4000+ warnings. To remove some of those I found one compiler Directive as NEXTGEN.

After Using this directive I found that there is a much more minimize in the warnings to 257.

I want to know if we have any issues in using the compiler directive. Are there any drawback of this directive for my windows application. I am using Delphi 10.

on Site of Embarcadero I found very less information.

Can anyone tell me something about the same?

Jeroen Wiert Pluimers
  • 23,965
  • 9
  • 74
  • 154
A B
  • 1,461
  • 2
  • 19
  • 54

2 Answers2

8

Delphi's NEXTGEN conditional symbol marks the next-generation ARC compilers. The Windows and OSX compilers are not NEXTGEN compilers. The iOS and Android compilers are NEXTGEN. Initial release of Linux compiler in 10.2 Tokyo had NEXTGEN defined, but since 10.3 Rio it does not.

Any code compiled for Windows that is marked with NEXTGEN will be ignored in current compilers.

See Conditional symbols:

Defined for compilers (such as the Delphi mobile compilers) that use "next-generation" language features, such as 0-based strings. New in XE4/iOS

Update: 10.4 Sydney

NEXTGEN symbol has been removed from all compilers, along with AUTOREFCOUNT and WEAKINSTREF symbols.

Dalija Prasnikar
  • 27,212
  • 44
  • 82
  • 159
  • 2
    Minor nit: Directives are commands to the compiler such as {$D+} or {$WARN xxxx OFF}. Compiler defined conditionals are not "directives", rather they're used for conditional directives {$IF Defined(xxxx)} or {$IFDEF xxxx}, where xxxx can be NEXTGEN – Allen Bauer Mar 14 '17 at 15:23
  • From 10.3 NEXTGEN is not defined for Linux anymore. – Toon Krijthe Sep 26 '19 at 14:29
  • 1
    @ToonKrijthe Thanks for the reminder. I updated the answer. – Dalija Prasnikar Sep 26 '19 at 14:46
  • 1
    In 10.4, NEXTGEN is no longer defined for the iOS and Android compilers. Embarcadero has decided to go with a "unified" model for all of its compilers, so all of the NEXTGEN features have been turned off, and all of the pre-NEXTGEN features that were turned off for mobile have been turned back on. – Remy Lebeau Jul 12 '20 at 17:49
3

The NEXTGEN conditional symbol is defined by the compiler. It is defined, for instance, for the mobile compilers that use ARC. It is not defined for the traditional Windows and Mac OS compilers.

You must not define it in your code. You are compiling your code with a traditional compiler, not a NEXTGEN compiler. Whatever is responsible for these compiler warnings, defining NEXTGEN is not the solution.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490