[comp.lang.c] MSC comment problem

david@wubios.wustl.edu (David J. Camp) (04/26/89)

I suppose I did not really learn what I wanted to know, that is, were
the missing comments intentional?  Since they occurred on related lines,
that seemed likely.  Anyway, I am posting this response since it was
requested.

By the way, I cannot read comp.lang.c, so please reply yo me directly.
-David-

Received: by sq.sq.com id 2575; Tue, 18 Apr 89 20:45:57 EDT
From: Mark Brader <sq.sq.com!msb@uunet>
To: david@wubios
Subject: Lint Errors in MSC 5.1 Include Files
Date: 	Tue, 18 Apr 89 20:45:46 EDT

> #define DBL_MIN_EXP     -1021                   /* min binary exponent */
> c:\msc\h\float.h(29) : Warning 602: Comment within comment

> ... but the first two (602) seem serious.  I looked at
> the header files in question, and the previous line has no closing
> comment delimiter where one would expect it.

Either it's an error or it was a fancy way that someone chose to
intentionally remove the #define lines in question from the input;
I can't say which.

What I *can* say is that the definition given is definitely wrong.
I don't know what the numerical value should be; but assuming that
-1021 is the correct value, then the line should be written:

#define DBL_MIN_EXP     (-1021)                  /* min binary exponent */

If the reason for this isn't obvious, see any decent book on C, where it
talks about how to write macros safely.  For example, in K&R 1st edition,
see the example square() on page 87 and consider i-DBL_MAX_EXP.

Probably someone else will mention this in a followup, but if they don't,
please do.


-- 
Mark Brader, SoftQuad Inc., Toronto, utzoo!sq!msb, msb@sq.com
#define	MSB(type)	(~(((unsigned type)-1)>>1))

-- 
Bitnet:   david@wubios.wustl                ^      Mr. David J. Camp
Internet: david%wubios@wucs1.wustl.edu    < * >    Box 8067, Biostatistics
uucp:     uunet!wucs1!wubios!david          v      660 South Euclid
Washington University (314) 36-23635               Saint Louis, MO 63110