You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getRef1, getRef2::Ivoryeff (Refsa)
ref3 = ifte c getRef1 getRef2
This is safe but Ivory use 0 initialized variable internally, and references can't be initialized with zero, so Ivory doesn't allow this.
So I have to use pointers instead of references and assert they are valid. Assertions, assertions everywhere!
Meanwhile, MISRA says:
Rule 9.1 (required):
All automatic variables shall have been assigned a value before being used.
The intent of this rule is that all variables shall have been written to before they are read. This does not necessarily require initialization at declaration.
So you don't need to zeroify local variable before an if statement. You don't need to initialize it at all.
Currently, Ivory internal representation requires local variables be initialized. So we need to relax this requirement, only internally, without exposure to the user.
I can do this, but I need an advice on how to do this. Extend Init type? XInit? local representation?
The text was updated successfully, but these errors were encountered:
I want to select a ref value by some condition.
This is safe but Ivory use 0 initialized variable internally, and references can't be initialized with zero, so Ivory doesn't allow this.
So I have to use pointers instead of references and assert they are valid. Assertions, assertions everywhere!
Meanwhile, MISRA says:
So you don't need to zeroify local variable before an
if
statement. You don't need to initialize it at all.Currently, Ivory internal representation requires local variables be initialized. So we need to relax this requirement, only internally, without exposure to the user.
I can do this, but I need an advice on how to do this. Extend
Init
type?XInit
?local
representation?The text was updated successfully, but these errors were encountered: