GNU bug report logs - #36788
26.1; ada-mode 6.0.0 should support function expressions returning aggregates directly

Previous Next

Packages: ada-mode, emacs;

Reported by: Ludovic Brenta <ludovic <at> ludovic-brenta.org>

Date: Wed, 24 Jul 2019 16:15:01 UTC

Severity: minor

Found in version 26.1

Done: Stephen Leake <stephen_leake <at> stephe-leake.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stephen Leake <stephen_leake <at> stephe-leake.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#36788: closed (26.1; ada-mode 6.0.0 should support function
 expressions returning aggregates directly)
Date: Sat, 14 Dec 2019 18:03:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 14 Dec 2019 10:02:30 -0800
with message-id <86a77ukcp5.fsf <at> stephe-leake.org>
and subject line closed by ada-mode 6.2.1
has caused the debbugs.gnu.org bug report #36788,
regarding 26.1; ada-mode 6.0.0 should support function expressions returning aggregates directly
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
36788: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36788
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Brenta <ludovic <at> ludovic-brenta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; ada-mode 6.0.0 should support function expressions returning
 aggregates directly
Date: Wed, 24 Jul 2019 18:13:56 +0200
Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users <at> nongnu.org
Severity: minor

Hello,

ada_mode_wisi_lr1_parse.exe does not follow AI12-0157[1], which allows
a function expression to return an aggregate directly as opposed to
an aggregate enclosed in an extra pair of parentheses:

package P is
   type T is null record;
   function F return T is (null record);
end P;

ada-mode 6.0 and later (checked with 6.1.1) show red exclamation marks
in the margin at function F.  C-c C-f says:

p.adb:3:51: syntax error: expecting BEGIN, ENTRY, FOR, FUNCTION, 
GENERIC, NOT, OVERRIDING, PACKAGE, PRAGMA, PROCEDURE, PROTECTED, 
SUBTYPE, TASK, TYPE, USE, IDENTIFIER, found 'LEFT_PAREN'

Changing the line to

   function F return T is ((null record));

removes the parsing error.

I know that GNAT Pro has had support for AI12-0157 for at least
a couple of years and I'm pretty sure the latest GNAT GPL Edition
has it too.

[1] 
http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0157-1.txt?rev=1.6

-- 
Ludovic Brenta.


[Message part 3 (message/rfc822, inline)]
From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: 36788-close <at> debbugs.gnu.org
Subject: closed by ada-mode 6.2.1
Date: Sat, 14 Dec 2019 10:02:30 -0800
-- 
-- Stephe


This bug report was last modified 5 years and 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.