public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/106168] New: Errors with empty array aggregate.
@ 2022-07-02 11:36 p.p11 at orange dot fr
2023-05-11 16:21 ` [Bug ada/106168] " ebotcazou at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: p.p11 at orange dot fr @ 2022-07-02 11:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106168
Bug ID: 106168
Summary: Errors with empty array aggregate.
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: p.p11 at orange dot fr
Target Milestone: ---
Created attachment 53239
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53239&action=edit
Full source code
Following the example section of RM Ada 2022 § 4.3.3 Array Aggregate, the empty
aggregate is line 8:
3. type Real is digits 8;
4. type Matrix is array (Integer range <>, Integer range <>) of Real;
5.
6. -- AARM (Draft 22) Section_4_3_3_Paragraph_47
7.
8. Empty_Matrix : constant Matrix := []; -- A matrix without elements
GNAT 12.1.0 issues the following errors:
% gcc -c -gnat2022 2022/test_20220702_array_agg.adb
test_20220702_array_agg.adb:8:38: error: value not in range of type
"Standard.Integer"
test_20220702_array_agg.adb:8:38: error: static expression fails
Constraint_Check
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/106168] Errors with empty array aggregate.
2022-07-02 11:36 [Bug ada/106168] New: Errors with empty array aggregate p.p11 at orange dot fr
@ 2023-05-11 16:21 ` ebotcazou at gcc dot gnu.org
2023-05-11 17:47 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-05-11 16:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106168
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-05-11
CC| |ebotcazou at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
GCC 13 gives a different message:
p.adb:8:38: warning: Pred of "Integer'First" [enabled by default]
p.adb:8:38: warning: Constraint_Error will be raised at run time [enabled by
default]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/106168] Errors with empty array aggregate.
2022-07-02 11:36 [Bug ada/106168] New: Errors with empty array aggregate p.p11 at orange dot fr
2023-05-11 16:21 ` [Bug ada/106168] " ebotcazou at gcc dot gnu.org
@ 2023-05-11 17:47 ` ebotcazou at gcc dot gnu.org
2023-05-12 19:27 ` p.p11 at orange dot fr
2023-05-12 20:22 ` ebotcazou at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-05-11 17:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106168
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |13.0
Status|NEW |RESOLVED
--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
That's expected, you need to replace Integer with Positive for example.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/106168] Errors with empty array aggregate.
2022-07-02 11:36 [Bug ada/106168] New: Errors with empty array aggregate p.p11 at orange dot fr
2023-05-11 16:21 ` [Bug ada/106168] " ebotcazou at gcc dot gnu.org
2023-05-11 17:47 ` ebotcazou at gcc dot gnu.org
@ 2023-05-12 19:27 ` p.p11 at orange dot fr
2023-05-12 20:22 ` ebotcazou at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: p.p11 at orange dot fr @ 2023-05-12 19:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106168
Pascal Pignard <p.p11 at orange dot fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #4 from Pascal Pignard <p.p11 at orange dot fr> ---
That's suppress the warnings.
But it remains strange as the example came from the Ada 2022 standard, see 3.6
Array Types, Examples at §26 and 4.3.3 Array Aggregates, Examples at § 47/5.
Is it correct?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/106168] Errors with empty array aggregate.
2022-07-02 11:36 [Bug ada/106168] New: Errors with empty array aggregate p.p11 at orange dot fr
` (2 preceding siblings ...)
2023-05-12 19:27 ` p.p11 at orange dot fr
@ 2023-05-12 20:22 ` ebotcazou at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-05-12 20:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106168
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |SUSPENDED
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Probably not, but I'm not sure we can do better for now.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-12 20:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-02 11:36 [Bug ada/106168] New: Errors with empty array aggregate p.p11 at orange dot fr
2023-05-11 16:21 ` [Bug ada/106168] " ebotcazou at gcc dot gnu.org
2023-05-11 17:47 ` ebotcazou at gcc dot gnu.org
2023-05-12 19:27 ` p.p11 at orange dot fr
2023-05-12 20:22 ` ebotcazou at gcc dot gnu.org
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).