'How to allow Ada Big_Numbers in GPS Community 2021

With Ada 2022, Ada.Numerics.Big_Numbers can be enabled by setting -gnatwi somewhere according to the error I get in GPS Community Edition 2021.

warning: "Ada.Numerics.Big_Numbers" is an Ada 2022 unit [-gnatwi]

I assume the flag must be set for the compiler so I modified the Compiler package in my gpr-file like so:

  package Compiler is
      for Default_Switches ("Ada") use
        Compile_Checks_Switches &
        Build_Switches &
        Runtime_Checks_Switches &
        Style_Checks_Switches &
        Contracts_Switches &
        ("-gnatw.X", -- Disable warnings for No_Exception_Propagation
         "-gnatQ", -- Don't quit. Generate ALI and tree files even if illegalities
         "-gnatwi"); -- Big_Numbers
   end Compiler;

Note the -gnatwi flag at the end.

But GPS still complains wenn I try "Build->Check Semantic" on a file where with Ada.Numerics.Big_Numers is set. Restarting GPS also did not help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source