public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-357] [Ada] Remove redundant guard against Any_String
@ 2022-05-12 12:40 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-12 12:40 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f7fc84d6fff3c6cb7e6a421c8cae4de145d09dfe

commit r13-357-gf7fc84d6fff3c6cb7e6a421c8cae4de145d09dfe
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Wed Feb 9 17:40:48 2022 +0100

    [Ada] Remove redundant guard against Any_String
    
    A sequence of checks for a valid Boolean argument fails when applied to
    Any_String because its component is not of a Boolean type. The explicit
    guard was unnecessary; it was only needed when a First_Index applied to
    Any_String would crash, but this was fixed soon after this guard was
    added.
    
    Cleanup related to recent fixes for resolution of Boolean operators.
    
    gcc/ada/
    
            * sem_type.adb (Valid_Boolean_Arg): Remove redundant guard.

Diff:
---
 gcc/ada/sem_type.adb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
index e947296c9a2..2fc82d14016 100644
--- a/gcc/ada/sem_type.adb
+++ b/gcc/ada/sem_type.adb
@@ -3512,7 +3512,6 @@ package body Sem_Type is
          return True;
 
       elsif Is_Array_Type (T)
-        and then T /= Any_String
         and then Number_Dimensions (T) = 1
         and then Is_Boolean_Type (Component_Type (T))
         and then


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-12 12:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 12:40 [gcc r13-357] [Ada] Remove redundant guard against Any_String Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).