[7171] in Athena Bugs

home help back first fref pref prev next nref lref last post

rt 7.1H: hcc flames unnecessarily

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Fri Feb 22 22:42:52 1991

From: tytso@MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Fri, 22 Feb 91 22:42:33 EST

System name:		delwin
Type and version:	RTPC-ROMPC 7.1H
Display type:		apa16

What were you trying to do?
	Compile a program

What's wrong:

	Hcc complained with the following error message:

	w "page.c",L784/C37:    0: Expression has no side-effects.

	Where line 784 contained:

	    sigaddset(&set, SIGHUP);

	and sigaddset is defined to be

	#define	sigaddset(set,signo)	(*(set) |= sigmask(signo), 0)

	It's not realizing that while '0' has no side effects, the entire  
	expression has a side effect, and it should have kept it's big mouth
	shut.

What should have happened:
	It shouldn't have issued this warning.

Please describe any relevant documentation references:
	K&R
	

home help back first fref pref prev next nref lref last post