From xemacs-m  Mon Sep 15 16:19:45 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id QAA20599
	for <xemacs-beta@xemacs.org>; Mon, 15 Sep 1997 16:19:44 -0500 (CDT)
Received: from Canada.Sun.COM ([129.155.5.101]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id OAA04039; Mon, 15 Sep 1997 14:15:50 -0700
Received: from scooter.canada.sun.com by Canada.Sun.COM (SMI-8.6/SMI-5.3)
	id RAA12296; Mon, 15 Sep 1997 17:15:43 -0400
Received: from verve.canada.sun.com by scooter.canada.sun.com (SMI-8.6/SMI-SVR4)
	id RAA28666; Mon, 15 Sep 1997 17:15:43 -0400
Received: by verve.canada.sun.com (SMI-8.6/SMI-SVR4)
	id RAA24418; Mon, 15 Sep 1997 17:15:43 -0400
Date: Mon, 15 Sep 1997 17:15:43 -0400
Message-Id: <199709152115.RAA24418@verve.canada.sun.com>
From: Georg Nikodym <georgn@Canada.Sun.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Martin Buchholz <mrb@Eng.Sun.COM>
Cc: N J Doye <nic@niss.ac.uk>, xemacs-beta@xemacs.org
Subject: Re: compiler warnings
In-Reply-To: <199709152026.NAA02486@xemacs.eng.sun.com>
References: <E0xAaYZ-0002by-00@hands.niss.ac.uk>
	<199709152026.NAA02486@xemacs.eng.sun.com>
X-Mailer: VM 6.33 under 20.3 "Bratislava" XEmacs  Lucid (beta18)
Reply-To: georgn@Canada.Sun.COM
X-Face:  ,~EI@l7'&P{\d++e`EMjNTNpzsxJPg(H]?Sd_T3xIlq[(PT[.D;A_/k)qfeC@m\/1]A{vZD
 r4&Lme-/M]c'Q>>:VM|L^<ED=j@dG!ld,bQ:IhT53q'x>6wZKH3iCT6Ff1-`*z{vCiT}+%(irA6TOn
 S~pFtml1bL\=kp%0PsLcF3+Q/e${o|S/<NUFDrU@;^o(D+av1g>Ce=ztlPGb$?up%c-*l'wmjw\sw;
 D__0Z;+93I+Kx6Mxdc]+|2V03aE@D8-fMT_v[~~FC9I\*|72QVW,aQ!`hHp_.gE.W&kxla2#)\Cmo

>>>>> "MB" == Martin Buchholz <mrb@Eng> writes:

>>>>> "nic" == N J Doye <nic@niss.ac.uk> writes:
 nic> Nice to see the machine I compile on going so slowly that I can
 nic> see the error messages... These are the only ones that I saw.

 MB> Why not compile in a shell buffer?

Or better, M-x compile

 nic> "/home/hands/ccsnjd/Src/xemacs-20.3-b20/lib-src/../src/regex.c",
 nic> line 2103: warning: trigraph sequence replaced
 nic> "/home/hands/ccsnjd/Src/xemacs-20.3-b20/lib-src/../src/regex.c",
 nic> line 2104: warning: trigraph sequence replaced

ANSI C defines trigraphs (three character strings that map to a single
character for those poor folk running on insanely old terminals that
don't have a complete set of punctuation characters on their
keyboards).  The trigraphs all start with ??.  The most common driver
of this warning was "???" in comments of the sort found in XEmacs
like: What the fuck was XXXX thinking ???  And, yes, the ANSI C spec
does call for the trigraphs to be replaced _prior_ to the removal of
comments.

 nic> cc -c -v -xO4 -I. -DHAVE_CONFIG_H -I/usr/dt/include
 nic> -I/usr/openwin/include lwlib-Xm.c "lwlib-Xm.c", line 1360:
 nic> warning: semantics of "/" change in ANSI C; use explicit cast
 nic> "lwlib-Xm.c", line 1361: warning: semantics of "/" change in
 nic> ANSI C; use explicit cast

This refers to the difference between K&R and ANSI compilers handling
certain arithmetic operations between different kinds of integral
types.

An example from _Expert_C_Programming_ by P. van der Linden:

main() {
	if (-1 < (unsigned char) 1)
		printf("-1 is less than (unsigned char) 1:  ANSI semantics\n");
	else
		printf("-1 NOT less than (unsigned char) 1: K&R\n");
}

 MB> No version of Sunpro C I've got access to does that.  What's the
 MB> version? (cc -V)

Version 2.0.1 did.  Can't speak for 3.x.  The 2.0.1 compiler defaulted 
to -Xt and emitted the above transitional warnings.

 MB> None of these warnings indicate real problems, and so if the
 MB> warnings are fixed by a compiler upgrade, I vote for ignoring
 MB> them.

Problems are in the eye of the beholder ;-)

