:On Thu, 28 Jan 1999, Matthew Dillon wrote:
:
:OK I understand now..
:theoretically I guess you should have two types of SYSINIT,
:however you are already not able to check the TYPE of the argument due to
:it being passed through the void form, so losing the 'const'-ness is not
:that much of a loss. The pragmetic answer may just be to 'cast' in the
:macro.
I'd kinda like to keep the const-ness because I can see device drivers
putting static structures in const ( i.e. read-only TEXT ) space and
would like to have the safety factor of knowing that they aren't actually
modified - not just not modified by the initialization routine, but also
not modified later on in the device driver code.
But I also want to eventually quiet the warning -- I agree that for
SYSINIT's, loosing const is not a huge issue. Quieting the warning
without fixing the problem with -Wcast-qual enabled is not pretty, though.
I think -Wcast-qual is pretty important if we intend to fix the volatile
conversion mess.
-Matt
Matthew Dillon
<[email protected]>
To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-current" in the body of the message