Bug 37618 - parameter used for dispatching gives warning: formal parameter "X" is not referenced
Summary: parameter used for dispatching gives warning: formal parameter "X" is not ref...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.2.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-23 09:37 UTC by esigra
Modified: 2015-12-05 17:05 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Makefile (78 bytes, text/plain)
2008-09-23 09:38 UTC, esigra
Details
specification (187 bytes, text/plain)
2008-09-23 09:39 UTC, esigra
Details
implementation (518 bytes, text/plain)
2008-09-23 09:39 UTC, esigra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esigra 2008-09-23 09:37:15 UTC
A parameter of a type without actual data components, that is only used for dispatching, gives:
   warning: formal parameter "X" is not referenced

But the type is a null record, so there is nothing that could be referenced. And the parameter is actually used to select which function to call. Sample code will be attached.
Comment 1 esigra 2008-09-23 09:38:47 UTC
Created attachment 16383 [details]
Makefile
Comment 2 esigra 2008-09-23 09:39:16 UTC
Created attachment 16384 [details]
specification
Comment 3 esigra 2008-09-23 09:39:58 UTC
Created attachment 16385 [details]
implementation
Comment 4 Eric Botcazou 2015-12-05 17:05:36 UTC
Use pragma Unreferenced then.