MISRA Discussion Forums

Full Version: Rule 7.0.5 Example potential typo
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
```c
constexpr int32_t fn( int32_t i )
{
  return i * i;
}

u8 + fn( 10 )   // Compliant by exception #1
```

Is u8 a typo? Reasonable one might be 'u32 + fn(10)'?

u8 << 2 is non-compliant, so should u8 + f(10), this should be a typo.
Yes, you're right - we'll correct the example to:  u32 + fn(10)  in the next version