🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++
Article #498

contravariance violation

#498
From: David Callahan
Date: Mon, 05 Feb 1990 17:44
36 lines
1455 bytes
I get the following warning 4 times:  
dom.w:155: warning: contravariance violation for method types ignored

Could some kind soul provide a definition of
 ``contravariance violation for method types''?

Here is dom.w:155:
    	g->dump(node_setup, edge_setup, node_dump, edge_dump);
Here are relevant definitions:
	static void node_setup();
	static void edge_setup();
	static void node_dump(CfgNodeP const n);
	static void edge_dump(CfgEdgeP const e);
	...
	typedef void (*PFV)();
	typedef void (*PFVGnodeP)(GnodeP const);
	typedef void (*PFVGedgeP)(GedgeP const);
	class Graph {
		...
	    void dump(PFV n_setup,
		      PFV e_setup,
		      PFVGnodeP n_dump,
		      PFVGedgeP e_dump);
	}
	class CfgNode : public Gnode { ...
	class CfgEdge : public Gedge { ...


I see that there is a slight type problem involving "node_dump" and 
"edge_dump". Is this the source of the error message. If so, why didi
I get it 4 times?

Thanks,

David Callahan  				       david@tera.com
Tera Computer Co. 400 North 34th Street, Suite 300  Seattle WA, 98103
Technical Details
Message-ID: <9002051749.AA01511@tera.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!TERA.COM!david

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!TERA.COM!david
From: david@TERA.COM (David Callahan)
Newsgroups: gnu.g++
Subject: contravariance violation
Message-ID: <9002051749.AA01511@tera.com>
Date: 5 Feb 90 17:44:42 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36