From owner-freebsd-questions Sun Aug 25 13:19:38 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA01450 for questions-outgoing; Sun, 25 Aug 1996 13:19:38 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA01433 for ; Sun, 25 Aug 1996 13:19:35 -0700 (PDT) From: hoek@freenet.hamilton.on.ca Received: from freenet.hamilton.on.ca (main.freenet.hamilton.on.ca [199.212.94.65]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id MAA25872 for ; Sun, 25 Aug 1996 12:23:09 -0700 (PDT) Received: from james.freenet.hamilton.on.ca (james.freenet.hamilton.on.ca [199.212.94.66]) by freenet.hamilton.on.ca (8.7.5/8.7.3) with ESMTP id PAA04045 for ; Sun, 25 Aug 1996 15:19:41 -0400 (EDT) Received: (from ac199@localhost) by james.freenet.hamilton.on.ca (8.7.5/8.7.3) id PAA01735; Sun, 25 Aug 1996 15:21:24 -0400 (EDT) Date: Sun, 25 Aug 1996 15:21:24 -0400 (EDT) Message-Id: <199608251921.PAA01735@james.freenet.hamilton.on.ca> X-Mailer: slnr v.2.13 as ported to FreeBSD To: questions@FreeBSD.ORG Subject: Programming Question Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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.