Even though a variable is referenced by (implicit) procedure calls (such as Initialize and Finalize), GCC gives: warning: variable "X" is not referenced This happens especially when using the RAII design pattern. The warning should not be shown when the variable is referenced by a procedure call, even if it is implicit. Sample code attached.
-- Summary: warning: variable "X" is not referenced eventhough it is referenced by (implicit) procedure calls Product: gcc Version: 4.2.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: esigra at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37620