From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada reference manual rule for doubled parentheses around if_expression?
Date: Mon, 3 Aug 2015 17:56:19 -0500
Date: 2015-08-03T17:56:19-05:00 [thread overview]
Message-ID: <mporj0$7l4$1@loke.gir.dk> (raw)
In-Reply-To: 87mvybktvt.fsf@theworld.com
"Bob Duff" <bobduff@theworld.com> wrote in message
news:87mvybktvt.fsf@theworld.com...
> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>
...
>> GNAT also accepts this:
>>
>> function Expression_Function_1 (V : Integer) return Boolean
>> is (V = V and then True)
>> or else True;
>>
>> I think that's a bug, because there are no parens surrounding the
>> entire expression.
>
> I agree that's a bug. It doesn't seem to have anything to do with the
> special rules about conditional/quantified expressions. Or does it?
>
> If you report this to report@adacore.com, it will get fixed.
Looks like a bug to me, too. I remembered that we had changed something
about these, but what it was was to accept an aggregate as well as a
parenthesized expression:
function Expression_Function_1 (V : Integer) return Rec is (A => 1, B =>
V);
rather than
function Expression_Function_1 (V : Integer) return Rec is ((A => 1, B
=> V));
This was another case of double paren elimination. But of course we don't
have any rules that eliminate all parens!
Randy.
next prev parent reply other threads:[~2015-08-03 22:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 17:00 Ada reference manual rule for doubled parentheses around if_expression? Stephen Leake
2015-07-31 18:29 ` Bob Duff
2015-08-01 7:36 ` Simon Wright
2015-08-01 9:11 ` Stephen Leake
2015-08-01 13:42 ` Bob Duff
2015-08-03 22:56 ` Randy Brukardt [this message]
2015-07-31 20:07 ` EGarrulo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox