From: Piotr Trojanek <troja...@adacore.com>

Apparently we no longer need to ignore string literal subtypes case
when validating size of a type entity.

Code cleanup; behavior appears to be unaffected.

gcc/ada/ChangeLog:

        * gcc-interface/decl.cc (gnat_to_gnu_entity): Remove special
        case for string literal subtypes.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 3404b747ddf..f5188ddc8bc 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -4457,12 +4457,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree 
gnu_expr, bool definition)
       process_attributes (&gnu_type, &attr_list, false, gnat_entity);
 
       /* See if a size was specified, by means of either an Object_Size or
-         a regular Size clause, and validate it if so.
-
-        ??? Don't set the size for a String_Literal since it is either
-        confirming or we don't handle it properly (if the low bound is
-        non-constant).  */
-      if (!gnu_size && kind != E_String_Literal_Subtype)
+         a regular Size clause, and validate it if so.  */
+      if (!gnu_size)
        {
          const char *size_s = "size for %s too small{, minimum allowed is ^}";
          const char *type_s = is_by_ref ? "by-reference type &" : "&";
-- 
2.43.0

Reply via email to