public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/113868] New: error: expression function must be enclosed in parentheses.
@ 2024-02-10 19:06 p.p11 at orange dot fr
2024-02-14 15:02 ` [Bug ada/113868] bogus error for delta aggregate as expression function ebotcazou at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: p.p11 at orange dot fr @ 2024-02-10 19:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113868
Bug ID: 113868
Summary: error: expression function must be enclosed in
parentheses.
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: p.p11 at orange dot fr
CC: dkm at gcc dot gnu.org
Target Milestone: ---
Created attachment 57383
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57383&action=edit
Reproducer.
$ gcc -c -gnat2022 -gnatl 2020/test_20200521_expr.adb
GNAT 13.2.0
1. procedure Test_20200521_expr is
2.
3. type Real is digits 8;
4. type Point is tagged record
5. X, Y : Real := 0.0;
6. end record;
7.
8. -- Section_4.3.4_Paragraph_30
9. function Translate (P : Point'Class; X, Y : Real) return Point'Class
is
10. (P with delta X => P.X + X,
|
>>> error: expression function must be enclosed in parentheses
11. Y => P.Y + Y);
12.
13. begin
14. null;
15. end;
It is weird as this code comes from AARM 2022 Section_4.3.4_Paragraph_30.
See full source code in attachement.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug ada/113868] bogus error for delta aggregate as expression function
2024-02-10 19:06 [Bug ada/113868] New: error: expression function must be enclosed in parentheses p.p11 at orange dot fr
@ 2024-02-14 15:02 ` ebotcazou at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-02-14 15:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113868
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org
Last reconfirmed| |2024-02-14
Ever confirmed|0 |1
Summary|error: expression function |bogus error for delta
|must be enclosed in |aggregate as expression
|parentheses. |function
Status|UNCONFIRMED |NEW
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Confirmed. The syntax of expression functions is rather irregular and thus
needs special casing, so I guess there is a loophole for delta aggregates.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-14 15:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-10 19:06 [Bug ada/113868] New: error: expression function must be enclosed in parentheses p.p11 at orange dot fr
2024-02-14 15:02 ` [Bug ada/113868] bogus error for delta aggregate as expression function 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).