public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3795] [Ada] Fix imprecise wording for error on scalar storage order
@ 2021-09-22 15:09 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-09-22 15:09 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c5ff859dc01958f39ba77de6421d774171e3ea09
commit r12-3795-gc5ff859dc01958f39ba77de6421d774171e3ea09
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Jul 13 11:23:38 2021 +0200
[Ada] Fix imprecise wording for error on scalar storage order
gcc/ada/
* freeze.adb (Check_Component_Storage_Order): Give a specific error
message for non-byte-aligned component in the packed case. Replace
"composite" with "record" in both cases.
Diff:
---
gcc/ada/freeze.adb | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 15ce832b1d2..3f57bc50fea 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -1352,9 +1352,15 @@ package body Freeze is
elsif Is_Record_Type (Encl_Base)
and then not Comp_Byte_Aligned
then
- Error_Msg_N
- ("type of non-byte-aligned component must have same scalar "
- & "storage order as enclosing composite", Err_Node);
+ if Present (Component_Clause (Comp)) then
+ Error_Msg_N
+ ("type of non-byte-aligned component must have same scalar"
+ & " storage order as enclosing record", Err_Node);
+ else
+ Error_Msg_N
+ ("type of packed component must have same scalar"
+ & " storage order as enclosing record", Err_Node);
+ end if;
-- Warn if specified only for the outer composite
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-22 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 15:09 [gcc r12-3795] [Ada] Fix imprecise wording for error on scalar storage order 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).