This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch fixes an incorrect warning suggesting use of Unreferenced instead of Warnings (Off), when in fact Unreferenced was incorrect. For the following m.adb should compile clean with no warnings: generic package D is type Handle_Type is private; function Create_Handle return Handle_Type; private type Handle_Type is record Initialised : Boolean; end record; end D; with D; generic with package My_D is new D; with procedure Method (Client : in out My_D.Handle_Type); package M is private procedure Call_Method; end M; package body D is function Create_Handle return Handle_Type is begin return (Initialised => False); end Create_Handle; end D; package body M is procedure Call_Method is Handle : My_D.Handle_Type := My_D.Create_Handle; pragma Warnings (Off, Handle); begin Method(Client => Handle); end Call_Method; end M; Tested on x86_64-pc-linux-gnu, committed on trunk 2010-06-18 Robert Dewar <dewar@adacore.com> * lib-xref.adb (Generate_Reference): Fix bad reference to Has_Pragma_Unreferenced (clients should always use Has_Unreferenced).
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |