comp.lang.ada
 help / color / mirror / Atom feed
From: "Steven Deller" <deller@smsail.com>
Subject: RE: Apex 4.2 question about records
Date: Thu, 24 Oct 2002 22:30:14 -0400
Date: 2002-10-24T22:30:14-04:00	[thread overview]
Message-ID: <mailman.1035512942.15869.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <H4IBt8.KM5@news.boeing.com>

Nelson,
Yes, I agree that having it all the time is annoying.  I have sent an
independent "complaint" to Rational.  I suggest you do the same.
Normally when a particular compiler is doing something strange, it is
probably best to contact their customer support.  I'm sure Rational's
support would tell you the same thing I describe below (it actually is
just a summary from the Apex 4.2 release notes).

What the message is is saying it quite clear if you read it carefully.
There are record types (up to 3 scalars) that are now passed efficiently
in registers (by value) rather than in memory with a pointer (by
reference).  Properly written programs won't care, but it is not
uncommon for customers to write code that depends on the "by reference"
implementation.  Since Ada leaves the passing mechanism for records
unspecified (specifically to allow such optimizations), those programs
are erroneous.

The message is Rational being over-protective of their customers.
Unfortunately, this is one case where there are so many false positives,
that the message gets tuned out anyway.  I suggested they add a switch
that would turn off this warning if users wanted (without turning off
other warnings).

By the way, the optimization makes things like complex arithmetic
extremely fast, even without inlining.  That was the primary reason for
Rational adding this particular optimization.

Note -- I am not a Rational employee but was for many years.  I know
about this particular issue because it is showing up in an upgrade to
Apex 4.2 that I am helping with at a customer site.

Regards,
Steve

> -----Original Message-----
> From: comp.lang.ada-admin@ada.eu.org 
> [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Nelson Chandler
> Sent: Thursday, October 24, 2002 6:30 PM
> To: comp.lang.ada@ada.eu.org
> Subject: Apex 4.2 question about records
> 
> Hi.  I'm using Apex 4.2. When I compile and it reaches a 
> record type, I get this warning:
> 
> "<record name> is passed by copy, but it was passed by 
> reference in releases prior to Apex 4.2; this may cause 
> incompatibilities"
> 
> What does this mean and why is it telling me.  It seems like 
> record types would be fairly common and its extreemly 
> annoying getting this message all the time.
> 
> Thanks,
> Nelson
> 
> 
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org 
> http://ada.eu.org/mailman/listinfo/comp.lang.ad> a
> 




  reply	other threads:[~2002-10-25  2:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-24 22:29 Apex 4.2 question about records Nelson Chandler
2002-10-25  2:30 ` Steven Deller [this message]
2002-11-15 21:43 ` Hartmut Schaefer
2002-11-17 23:04   ` Greg Bek
replies disabled

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