9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a
@ 2021-06-21  8:20 Anthony Martin
  2021-06-21 12:37 ` Noam Preil
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Anthony Martin @ 2021-06-21  8:20 UTC (permalink / raw)
  To: 9front

> kencc: clarify warning for unused assignments
>
> [...]
>
> - warn(Z, "set and not used: %B", bit);
> + warn(Z, "assignment not used: %B", bit);

What is unclear about "set and not used"?

This looks to me like change for change's sake.
Now it's even more tedious to compare the various
compiler forks, the symmetry with "used and not
set" is gone, and the reference to this specific
warning in /sys/doc/comp.ms is stale.

For what gain?

  Anthony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a
  2021-06-21  8:20 [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a Anthony Martin
@ 2021-06-21 12:37 ` Noam Preil
  2021-06-21 15:20 ` Noam Preil
  2021-06-21 17:53 ` theinicke
  2 siblings, 0 replies; 5+ messages in thread
From: Noam Preil @ 2021-06-21 12:37 UTC (permalink / raw)
  To: Anthony Martin

"set and not used: foo" heavily implies that the variable is not used. 
This is not necessarily true.

int a = 0;
a = bar();
...

This would produce "set and not used: a" with the line number of the 
declaration, even if the subsequent assignment is used. "assignment not 
used" clarifies the actual warning.

In other words, the warning was changed because the prior form was simply 
wrong.

- Noam Preil

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a
  2021-06-21  8:20 [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a Anthony Martin
  2021-06-21 12:37 ` Noam Preil
@ 2021-06-21 15:20 ` Noam Preil
  2021-06-21 18:27   ` hiro
  2021-06-21 17:53 ` theinicke
  2 siblings, 1 reply; 5+ messages in thread
From: Noam Preil @ 2021-06-21 15:20 UTC (permalink / raw)
  To: Anthony Martin

Ah whoops, missed the point about the docs - will fix that.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a
  2021-06-21  8:20 [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a Anthony Martin
  2021-06-21 12:37 ` Noam Preil
  2021-06-21 15:20 ` Noam Preil
@ 2021-06-21 17:53 ` theinicke
  2 siblings, 0 replies; 5+ messages in thread
From: theinicke @ 2021-06-21 17:53 UTC (permalink / raw)
  To: 9front

Quoth Anthony Martin <ality@pbrane.org>:
> > kencc: clarify warning for unused assignments
> >
> > [...]
> >
> > - warn(Z, "set and not used: %B", bit);
> > + warn(Z, "assignment not used: %B", bit);
> 
> What is unclear about "set and not used"?
> 
> This looks to me like change for change's sake.
> Now it's even more tedious to compare the various
> compiler forks, the symmetry with "used and not
> set" is gone, and the reference to this specific
> warning in /sys/doc/comp.ms is stale.
> 
> For what gain?
> 
>   Anthony

I totally agree with what Anthony wrote;
also in addition to all of this the change is half-assed:

Just looking at the diff one can see that there is
still the line with the typo "set an not used".

s/set an not used/set and not used/ would have been a
better substitution!

--
Tobias Heinicke


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a
  2021-06-21 15:20 ` Noam Preil
@ 2021-06-21 18:27   ` hiro
  0 siblings, 0 replies; 5+ messages in thread
From: hiro @ 2021-06-21 18:27 UTC (permalink / raw)
  To: 9front

since you still wrote "used" it's just as unclear as before IMO.

maybe you want something like

assigned value is never read

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-21 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21  8:20 [9front] commit 1a09421f7db897e1d2e2a9210f79ca4389362c3a Anthony Martin
2021-06-21 12:37 ` Noam Preil
2021-06-21 15:20 ` Noam Preil
2021-06-21 18:27   ` hiro
2021-06-21 17:53 ` theinicke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).