Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Question: Why is compiler package on yaml.gpr defined as it is? #17

@pjljvandelaar

Description

@pjljvandelaar

In yaml.gpr I read

package Compiler is
      for Default_Switches ("ada") use
        ("-gnat12", "-gnatwa", "-gnatwl", "-gnata",  "-gnaty3abcefhiklmNprt", "-fstack-check");

      case Mode is
      when "debug" =>
         for Default_Switches ("ada") use Compiler'Default_Switches ("ada") &
         ("-gnata", "-gnateE", "-E",  "-g");
      when "release" =>
         for Default_Switches ("ada") use
           ("-O3" );
      end case;
   end Compiler;

Why does the release alternative on

("-O3" );

not contain
Compiler'Default_Switches ("ada") &?

If it is done on purpose, why isn't it written as

package Compiler is
      case Mode is
      when "debug" =>
         for Default_Switches ("ada") use 
        ("-gnat12", "-gnatwa", "-gnatwl", "-gnata",  "-gnaty3abcefhiklmNprt", "-fstack-check")  &
         ("-gnata", "-gnateE", "-E",  "-g");
      when "release" =>
         for Default_Switches ("ada") use
           ("-O3" );
      end case;
   end Compiler;

Thanks in advance for your explanation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions