_Region_Get and strict aliasing
Steven Johnson
sjohnson at sakuraindustries.com
Fri Dec 15 07:12:32 UTC 2006
_Region_Get does this:
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
Unfortunately (Region_Control*) is not returned by
_Objects_Get_no_protection (it returns a Objects_Control *) and so is an
illegal alias under C99.
I Don't know how this could be "fixed".
As I come across any other "invalid" C99 aliases I will be sure to
report them. I do not know if they cause problems or not, but that is
hardly the test for if something is an illegal alias or not under C99.
It seems to us that anything with "Object" in it in the rtems core is
probably suspect. But how one is supposed to rationally subclass and
superclass structures in an extensible way in C99 is beyond me.
Steven J
More information about the users
mailing list