🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.rt
Article #353

Re: New hc compiler available IBM/4.3

#353
From: Larry Breed
Date: Sat, 16 Sep 1989 04:46
30 lines
1909 bytes
In article <15356@dartvax.Dartmouth.EDU> kriso@northstar5.dartmouth.edu (Kris Olander) writes:
>
>The new compiler also finds alot of "...Expression has no side effects",
>and "...Result of comparison never varies" comments when compiling the 
>Magic program from the Berkeley VLSI tools.  We usually jump ship and switch
>to hc1.4 when we see these kinds of errors.
>
Kris, did you look at the source code that caused those warnings? 
We have found many of errors in BSD source with the help of the hc
warnings.  "result of comparison never varies" usually occurs on an if
statement like
		if (c<0) ...
where c has an unsigned type.  This is usually a porting problem, coming
from a default-signed-char environment. 

A statement like
		x+0;
will cause the "expression has no side-effects" warning.  Maybe someone
typed '+' where they meant '='.  Maybe they meant to declare x as volatile.
Or maybe it's deliberate -- but worth checking out, no?  

If you don't like to be warned, well, that's what -w is for.

Speaking of porting problems, if you suspect that an assumption of chars
being signed is causing trouble, try recompiling with
	-Hoff=char_default_unsigned .  "plain" chars will be signed and
you can see if the problem goes away.
Disclaimer: Don't blame my employer, blame:
Larry Breed			(415) 855-4460
uucp: uunet!ibmsupt!lmb		inet: ibmsupt!lmb@uunet.uu.net
Technical Details
Message-ID: <2152@ibmpa.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!aplcen!ginosko!uunet!ibmpa!ghoti!lmb
References: <1830@ibmpa.UUCP> <15356@dartvax.Dartmouth.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!aplcen!ginosko!uunet!ibmpa!ghoti!lmb
From: lmb@ghoti.uucp (Larry Breed)
Newsgroups: comp.sys.ibm.pc.rt
Subject: Re: New hc compiler available IBM/4.3
Keywords: V1.13 compiler hc IBM/4.3
Message-ID: <2152@ibmpa.UUCP>
Date: 16 Sep 89 04:46:57 GMT
References: <1830@ibmpa.UUCP> <15356@dartvax.Dartmouth.EDU>
Sender: news@ibmpa.UUCP
Reply-To: lmb@ibmsupt.UUCP (Larry Breed)
Organization: IBM AWD Palo Alto
Lines: 30