-11

I stumbled upon a question on Stack Overflow which concerns a specific, but common enough field of knowledge to have an own tag. It is this one:

How to solve the Misra Warning about applying bitwise operators ~ and << for underlying type

The field of knowledge here is the MISRA standard, which is unarguably somewhat specific, the standard isn't even open. However the question is properly tagged as such, has okay wording, and as it revealed to me looking the matter up in my copy of MISRA-2012 it is completely valid.

The poster couldn't really explain his problem any better in my opinion (he is asking it the first place since he doesn't understand why it happens), and it is sufficient for people having a knowledge of the standard. It is also a good question in my opinion as the related C behavior which the MISRA standard is guarding against is now very well understood (neither the way MISRA is guarding against it).

I would seriously like to flag those close votes in such cases, this attitude feels rather ignorant to me: If you don't understand a specific field, don't meddle with a related question. Is there a way to do this?

14
  • 12
    Be very careful with calling close voters ignorant. If you're wrong (can't we all be?) you accused users wrongly. – rene Jun 28 '18 at 8:46
  • 4
    I'm one of the close-voters and the CV is well justified. I would prefer people calling others ignorant do their homework beforehand. It is not the close-voters who are wrong. You might know the MISRA norm (it's not a standard!), but you seem to lack knowledge of the underlying C ISO standard). I left a reply to your comment at the answer (which is just an elaborate version of the close-reason). – too honest for this site Jun 28 '18 at 10:22
  • 2
    A word of advice: following industry norms like MISRA blindly is always a bad idea. Expecaially MISRA requires detailed knowledge about the C language and standard to fully understand the complaints. Even MISRA authors make clear the most relevant thing about this norm are the reasonings for the rules. In fact they are just a way to provide structured assistance for C pitfalls expert programmers are well aware already. Plus a lot of rules which could result in problems if the language is not really understood. The one in the question is one of them. – too honest for this site Jun 28 '18 at 10:41
  • @Olaf Seems like it all got moot as someone deleted the particular question. If you told that the literal in fact was not uint8_t typed by the C standard, that's fine since it isn't. It's essential type by MISRA-C 2012 however is equivalent to uint8_t, and that was the whole point of the question, why it became a problem the first place. which should have been explained as an answer. It is not something which could be Googled, neither something apparent at a glance, it requires actually understanding MISRA fairly well. – Jubatian Jun 28 '18 at 10:53
  • @rene Well, that's nice then that someone deleted the particular question altogether... – Jubatian Jun 28 '18 at 10:57
  • @Jubatian: Somethree actually. You were already told to be careful with blaming. You are so very wrong. I have no idea if you are confusing things, or what other reason, Feel free to provide a reference to the C standard or maybe MISRA requiring an integer constant (not literal) with U suffix having uint8_t, even under certain conditions (e.g. range). MISRA does not change the behaviour of the C compiler/(semantics of C code. That would be diametrically to it's purpose. – too honest for this site Jun 28 '18 at 10:58
  • @Olaf: D.6, The essential type of literal constants, pg. 198 of MISRA 2012. – Jubatian Jun 28 '18 at 11:00
  • 2
    I have flagged the question for mod review. Whatever the problem is technically, that question looks like a fine question and had an answer. If you disagree about whether that answer is correct or not, SO is about explaining that , not deleting content. – nvoigt Jun 28 '18 at 11:01
  • 2
    @nvoigt: It is not about the quality of the question, but the fact it cannot be reproduced. Please read the close-reason. It requires understanding the C language very well. And the fact there is an answer does not mean a question is on-topic. – too honest for this site Jun 28 '18 at 11:04
  • @Jubatian: Can you provide the number/name of the rule? I don't have the norm available here, but might be able to search the web for a particular rule/requirement. Such a requirement would clearly contradict the C standard. – too honest for this site Jun 28 '18 at 11:10
  • You already have a few options. 1. Vote to reopen the question. 2. Make a post on meta convincing users to cast reopen votes. 3. Edit the question to remove the problem that led to the closure. One of those or sometimes a combination of those helps to get an "inappropriately" closed question reopened. Any specific reason you want to add another option of flagging the close? – Masked Man Jun 29 '18 at 3:06
  • @Olaf It is not a rule, it is appendix D for Rule 8.10, the Essential type model. In D.6, it has this line: "If the standard type of an integer constant is unsigned int then its essential type is the UTLR". UTLR (D.3) stands for "Unsigned Type of Lowest Rank", which means the "...unsigned type having the lowest rank required to represent the value of the integer constant expression...". For 0x00000001U (this was in the question), this is uint8_t. It has nothing to do with the C standard, it is set by MISRA to guard against errors when porting between compilers with different int sizes. – Jubatian Jun 29 '18 at 4:16
  • @Thanos So posting on Meta is appropriate then. It is still ridiculous that the question just gets deleted (at least became invisible both for me and the original poster, probably scaring him away from the site - I am accused for calling people having the power of putting on hold ignorant, but what about those who get such an unfair treatment? Don't they have rights?). – Jubatian Jun 29 '18 at 4:23
  • @Olaf "It requires understanding the C language very well" - and that's a valid reason for putting on hold? What's the purpose of the site then? That it can not be reproduced is also dubious for me, I dunno if the poster identified the tool (since it is deleted, I can no longer check), however understanding the situation it is clearly valid, any MISRA tool could be producing that sort of warning for the construct the poster asked about. – Jubatian Jun 29 '18 at 4:28
12

There's no direct way to flag a close vote.

You could, however, vote to reopen the question (provided you have at least 3000 rep). This will send the question to the Reopen Votes review queue to be peer-reviewed, and if enough users vote to reopen it, it will be reopened. I also recommend that you add a comment to the question explaining why you think it should be reopened, to make the reviewer's job easier.

If you think the question was closed for non-professional reasons (such as someone holding a grudge against the OP), you can raise a custom moderator flag and explain your concerns.

3
  • 4
    Single edit will also send the question to reopen review queue, without any vote to reopen, so even 1 rep user or anonymous visitor can do that. – Shadow The Vaccinated Wizard Jun 28 '18 at 9:11
  • @ShadowWizard Note, however, that there are some requirements for the edit to put the question in the Reopen Votes queue: The edit must not be from a user who has voted to close, or flagged, the question and it must be an edit to the question's body, not just the title or tags. – Makyen Jun 28 '18 at 19:06
  • @ShadowWizard Thanks, so at least I know what I could be doing next time I see such. In this case I didn't really see anything to edit, the question appeared clearly valid. As an afterthought by the debate here, I could possibly have used my own MISRA checker to reproduce it, and add that (to address the complaints of being nonreproductible, in fact, as it turned out, any MISRA checker should be producing the sort of warning the poster experienced). – Jubatian Jun 29 '18 at 4:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .