|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
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 |
![]() |
| Viewing: Web Development Archives > FAQs > Programming > Pragma Unreferenced in GNAT GPL 2008 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|