comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Eachus <rieachus@comcast.net>
Subject: Re: Strict aliasing, is it OK?
Date: Sat, 8 Jul 2017 10:29:30 -0700 (PDT)
Date: 2017-07-08T10:29:30-07:00	[thread overview]
Message-ID: <c9b2aa75-2368-49ba-afcd-a410d870ade6@googlegroups.com> (raw)
In-Reply-To: <ojh91a$3dp$1@gioia.aioe.org>

On Tuesday, July 4, 2017 at 7:40:31 PM UTC-4, Victor Porton wrote:
> 
> But my question about my old code remains valid. Is that old code erroneous 
> or isn't?

You are probably too new to Ada to remember Norm Cohen preaching about reasoning from erroneousness.

But to limit myself to the case at hand:  Is your code erroneous?  Can't tell from the excerpts provided, but who cares?  The GNAT compiler is nicely telling you that use of C_Raptor_Parser_Get_Description may lead to erroneousness, and offering a nice way to tell the compiler that reasoning from erroneousness here is bad, and must not be done.

From a software engineering standpoint, the best answer is fix the code now, so the issue doesn't come up. The second best is to put in the pragma so that even if your program is fine, some maintenance change won't cause erroneousness and then the compiler commit evil by reasoning either from erroneousness, or from assuming the lack of it.

      parent reply	other threads:[~2017-07-08 17:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04 17:49 Strict aliasing, is it OK? Victor Porton
2017-07-04 17:50 ` Victor Porton
2017-07-04 18:06 ` Victor Porton
2017-07-04 18:15 ` Niklas Holsti
2017-07-04 18:30   ` Victor Porton
2017-07-04 19:29     ` Niklas Holsti
2017-07-04 20:11       ` Victor Porton
2017-07-04 20:13         ` Victor Porton
2017-07-04 21:41 ` Simon Wright
2017-07-04 23:39   ` Victor Porton
2017-07-05  9:49     ` Simon Wright
2017-07-08 17:29     ` Robert Eachus [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox