Warning proposal: inline non static

Akim Demaille demaille@inf.enst.fr
Wed Feb 18 05:20:00 GMT 1998


There are some compilers (SGI's native for instance) that choke when a
prototype of an inlined function is given, but that very function is
not defined in the sequel of the file.

In other words, inline functions should be static.

On alpha's cc, it is only a warning:

cc: Warning: ../lib/common.h, line 48: There is no function named a2ps_common_reset defined in this compilation unit.
inline void a2ps_common_reset PARAMS ((struct a2ps_common_s * common));

GCC/EGCS seem to be perfectly happy with that.  Nevertheless, being
used to have the maximum level of -W to avoid these problems, I'd like
to have a -W to warn me about such constructs.  What do you think?

Best regards,
	Akim

-- 
P-mail: Akim Demaille, 107 rue Bobillot, F-75013 Paris, France
E-mail: demaille@inf.enst.fr
V-mail: +33 (1) 45-81-78-68



More information about the Gcc mailing list