Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives FAQs Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 5th, 2008, 12:31 AM
Wilhelm Spickermann
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Pragma Unreferenced in GNAT GPL 2008

After installing GNAT GPL 2008 I get unexpected warnings on
unreferenced variables:


entry Wait (S : Event_State) when True is
begin
if S = then
requeue W with abort;
else
requeue W with abort;
end if;
end Wait;

entry W (S : Event_State) when Value = is
pragma Unreferenced (S);
begin
null;
end W;

"pragma Unreferenced (S);" is honoured by GNAT GPL 2007 and seems
to be ignored by GNAT GPL 2008.

Is this a compiler bug?

Wilhelm Spickermann


Reply With Quote
  #2  
Old July 5th, 2008, 07:30 AM
Wilhelm Spickermann
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Pragma Unreferenced in GNAT GPL 2008

Dmitry A. Kazakov wrote:

But W need no parameters. It is K to requeue to a
parameterless entry (9.5.4(3))

, I missed that one and the family-solution.

Thanks,
Wilhelm



Reply With Quote
  #3  
Old July 9th, 2008, 06:10 AM
Wilhelm Spickermann
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Pragma Unreferenced in GNAT GPL 2008

Alex R. Mosteo wrote:

And I'm being warned that a variable is not referenced when it
indeed is (and it's not a very cornerish case, although it is
within a quite large hierarchy of objects). That seems the
contrary, but maybe something has changed in that area of the
compiler.
>


I didn't check it again, but IIRC there have been some changes in
that area:

- Warnings about variables which are accessed only by
initializing or finalizing have been changed. (Additional
compiler options?)

- Variables may be called unused, even if only their contents is
potentially unused. (potentially overwriting the contents of an
in out parameter before using the contents)

(But I don't have the list of changes within reach.)
Wilhelm


Reply With Quote
  #4  
Old July 9th, 2008, 06:10 AM
Wilhelm Spickermann
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Pragma Unreferenced in GNAT GPL 2008

anon wrote:

A quick patch is just to comment out the line. That way the
file still maintains all original statements.

That won't help, as the pragma is already ignored. :-)

It's not a problem of getting things compiled -- it's just an
old "finger excercise" used to check the new compiler and I
wondered, if this new behaviour is to be expected.

Thanks,
Wilhelm


Reply With Quote
  #5  
Old July 9th, 2008, 06:10 AM
Wilhelm Spickermann
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Pragma Unreferenced in GNAT GPL 2008

Simon Wright wrote:

It isn't ignored by gcc-4.3.0. I couldn't build GNAT GPL 2008
for Intel Mac, so can't help there.

Thanks anyway. Installation on my PC (Suse Linux 11.0) was easier
than with GNAT GPL 2007 (Suse 10.3), as some installation script
errors were gone. But I'm not sure if I prefer it over the 2007
one, since distributed programming support seems to be gone too.

Wilhelm


Reply With Quote
Reply

Viewing: Web Development Archives FAQs Programming > Pragma Unreferenced in GNAT GPL 2008


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway