]> _ Git - alire.git/commit
Amend style switches (expand -gnatyg). (#1497)
authorSimon Wright <simon@pushface.org>
Tue, 14 Nov 2023 13:05:36 +0000 (13:05 +0000)
committerGitHub <noreply@github.com>
Tue, 14 Nov 2023 13:05:36 +0000 (14:05 +0100)
commit04273a8dbbd2eebed18975bb39eb6457e66ff2ef
tree3d28449c682acc901ee544df77935eee5a6d0fa6
parent88385f5b03e3fea3541641fedd47102109ee4c4d
Amend style switches (expand -gnatyg). (#1497)

-gnatyg is "check standard GNAT style rules, same as ydISux", but in
GCC 14 it will include a new switch, -gnatyz (check parentheses not
required by operator precedence rules) which will mean that use of
extra parens to clarify intent without deep knowledge of the rules
will trigger fatal warnings; for example in alire-conditional_trees.adb

   function Contains_ORs (This : Tree) return Boolean is
      ((not This.Is_Empty) and then This.Root.Contains_ORs);
       ^

Refer GCC Bugzilla PR 112446.

  * alire_common.gpr (Style_Check_Switches): Remove -gnatyg and replace
    by the pre-GCC 14 equivalent.
alire_common.gpr