Opened 21 months ago

#262 new defect

Extra declaration of deleted autogen routines

Reported by: Thierry Delisle Owned by:
Priority: minor Component: cfa-cc
Version: 1.0 Keywords: Warning


Given a struct that can't be assigned, i.e.:

struct Fi {
	int i;
struct Fi ?=?(struct Fi &, struct Fi) = void;

struct Fo {
	struct Fi fi;

In this example, the resolver will attempt to resolve the assignment operator for Fo and fail to resolved it. It will then mark that operator as deleted, which means code gen will skip it.

However, this process does not remove any forward declaration of the autogenerated routine. This results in a warning of the form : "warning: ‘_X16_operator_assignFS2Fo_S2FoS2Fo_autogen_1’ declared ‘static’ but never defined [-Wunused-function]"

Change History (0)

Note: See TracTickets for help on using tickets.