Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scope of Rule #11.2
#2
I think that this rule is intended to apply to any conversion, implicit or explicit. However, the rule doesn't apply to pointers to void (Amplification) and explicitly permits null pointer constants (Exception 2) to be converted. Given this, most implicit conversions that would break this rule are already prohibited by constraints which the standard defines in terms of the constraints on the assignment operator (C99 6.5.16.1 in particular)

I believe that the following is an example of an implicit conversion that is permitted, by C99 at least, but prohibited by this rule:

Code:
struct incomplete *p;
_Bool b = p;
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)