Date: Sun, 25 Aug 1996 15:21:24 -0400 (EDT) From: hoek@freenet.hamilton.on.ca To: questions@FreeBSD.ORG Subject: Programming Question Message-ID: <199608251921.PAA01735@james.freenet.hamilton.on.ca>
next in thread | raw e-mail | index | archive | help
It's been suggested before that this area is as good as any for asking questions WRT to a certain aspect of one of the supplied compilers. While I'm not certain I agree, here goes... Is there any way to make the C compiler use much stronger typing. For example, I would really like it to warn about assigning signed variables to unsigned ones. (I say this after spending way too much time hunting down an unnecessary bug caused by the lack of such a warning). Heck, optimally, I sure wouldn't mind if it were to give me a warning when assigning a variable of type TYPDEF to another identical variable declared without the TYPDEF'd definition. For example, -- signed int a; unsigned int b; typedef int AT; AT aa; int bb; void main () { a = b; aa = bb; } -- would yield two warnings. I've tried just about every -W option listed, but none of them seem to even come close. Is there anyway to massage the compiler into complaining about these things? -- -- tIM...HOEk The opinions expressed above are mine, and if my employer shares them, that's his hard luck.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608251921.PAA01735>