This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/37620] warning: variable "X" is not referenced eventhough it is referenced by (implicit) procedure calls
- From: "sam at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Sep 2008 11:32:35 -0000
- Subject: [Bug ada/37620] warning: variable "X" is not referenced eventhough it is referenced by (implicit) procedure calls
- References: <bug-37620-315@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from sam at gcc dot gnu dot org 2008-09-23 11:32 -------
I don't agree with your reasoning: X is not referenced. The fact that it has a
constructor should not change anything. For example, access types are
initialized to Null as well, so you could count that as a reference.
You can suppress the warning by using
pragma Unreferenced (X);
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37620