Odd structure "bug"
a_riot42
Posts: 1,624
I noticed the other day that the compiler doesn't care if you declare a structure type without defining it. In define_variable you can put:
and even though there is no _Fubar in define_type, the compiler doesn't care. Rather odd.
Paul
volatile _Fubar fubar
and even though there is no _Fubar in define_type, the compiler doesn't care. Rather odd.
Paul
0
Comments
simply ignore fubar and _Fubar will be an Integer.
volatile _Fubar fubar
compiler interprets to
VOLATILE Integer _Fubar;
There is no structure type involved here.
I don't think that is true.
I think the compiler will see _Fubar as a VOLATILE INTEGER
and
the compiler will see fubar as a NON_VOLATILE INTEGER
Edit:
To further clarify
Will be seen as:
Paul
DEFINE_VARIABLE
volatile _Fubar // defaults to INTEGER
fubar // defaults to NON_VOLATILE INTEGER
Thank you for the clarification.