>>>> "Jerry" == Jerry James
<james(a)xemacs.org> writes:
> (I wonder if catching CURCHARSIZE but not CURSIZE should be
> considered a bug in the static checker?)
Jerry> First, note that window_char_height is called directly
Jerry> (i.e., without the macro) in both redisplay.c and window.c,
Jerry> so the abstraction is already broken.
Sure, but this is a very local abstraction: only for that function, in
fact.
Jerry> Second, it was *after* I expanded CURCHARSIZE that the
Jerry> static checker then complained about CHARSIZE. Weird, huh?
Jerry> I guess it was working its way backward up the dataflow
Jerry> path and complained about the first item it saw that seemed
Jerry> wrong to it.
OK. I just thought that if this was one of the tools the shop you're
visiting is developing, they might like to know about the anomoly.
Jerry> If you would like me to put those macros back, that's fine.
Jerry> As you note, a good optimizing compiler should do the job,
Jerry> anyway.
I think it's a good idea. The original author (Ben, I suppose)
thought that all those "things" were somehow "the same". IMO we
should either change none or change all.
Jerry> And that CURSIZE macro is bizarre. Would you object to me
Jerry> "fixing" it to be an rvalue? As it stands, it's violating
Jerry> the C99 aliasing rules, apparently for no reason.
Please do! I spent about 5 minutes checking to make sure that the
lvalue-ness was bogus. Let's not put anybody else through that. If
lvalue-ness becomes useful, surely that person will know how to
rewrite the macro for lvalue-ness.
I wonder if that might not confuse checkers and optimizers, too,
although they can probably do what I did, just in 4 nanoseconds. :-)
--
School of Systems and Information Engineering
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.