Re: [PATCH] warning: explain restrictness difference in error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 18, 2018 at 01:15:38AM +0100, Ramsay Jones wrote:
> 
> 
> On 17/06/18 11:17, Luc Van Oostenryck wrote:
> > For sparse, a difference of restrictness (__bitwise) is reported
> > as a difference of base types. That's correct but for the user it
> > may be more informative to know if teh error is one concerning
> > the normal C rules or one related to sparse's extensions.
> > 
> > Change this by using "different restrictness" or "different
> > restricted types", depending if one or both types is a concerned.
> 
> "different restrictness" sounds absolutely awful! :)
> 
> [Also, I don't think 'restrictness' is actually a word].

Well, let say I granted myself some artistic licenses but sounding
awful (to a native speaker) is annoying. However, googling for it
reports some usages, including in scientific books.
 
> Hmm, I think "different restricted types" or "different restricted
> base types" would work for all messages.

There is two different cases:
1) '__be32' vs. 'int'
2) '__be32' vs. '__le32'

In 1), __be32 is restricted while int is not. In 2) both types are
restricted but are different restricted types. I would have a distinct
error message for them.

BTW, I'm not at all found of the use of the word 'restricted' in the
error message (and sparse's code) while the corresponding attribute
is 'bitwise' and 'restrict' is an unrelated keyword since C99.
So maybe we should use instead "different bitwise types" and ...
"different bitwiseness"? ;)

Suggestions are more than welcome.

-- Luc 
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux