diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2024-10-15 10:01:32 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-11-04 16:57:59 +0100 |
commit | 023a5dd187b1b08979bc0654334e75e7b2c15eaa (patch) | |
tree | af091987e0007f1e99172ae422bbec5ca27d04a7 /gcc/ada/gcc-interface | |
parent | bffba3d2d33d4d324149df08ce0df07f85b0e1ae (diff) | |
download | gcc-023a5dd187b1b08979bc0654334e75e7b2c15eaa.zip gcc-023a5dd187b1b08979bc0654334e75e7b2c15eaa.tar.gz gcc-023a5dd187b1b08979bc0654334e75e7b2c15eaa.tar.bz2 |
ada: Remove special case for the size of a string literal subtype
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.
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r-- | gcc/ada/gcc-interface/decl.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 3404b74..f5188dd 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 &" : "&"; |