|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] compile fixes for mini-os
> >
> > Hmmm... volatile generally gets sprinkled round like magic dust. I'm
> > not convinced it's usually needed.
>
> Looking closer at the code, it looks like gcc is just being dumb about
> the context. The overhead of using -Wcast-qual and most of the others
> probably isn't worth it. The one that is probably worth having for Xen,
> if only because doing arithmetic on void pointers seems like blatantly
> bad form, is -Wpointer-arith.
Actually, I've looked at and applied your patch just now.
I think that most of the warnings options may be sane for Xen
(especially once the crufty Linux devuce drivers have been moved out
of teh code base).
The only two possible exceptions are -Wcast-qual and
-Wnested-externs. I like being able to make extern declarations in
function scope (it's for when I'm too lazy to place it in a sane
header file, and it indicates that only one function needs to be fixed
up if I ever want to do the declaration properly). I could perhaps
live without that though...
However, -Wcast-qual really sucks. I haven't even added it to the
mini-os! Anything which makes it impossible to implement Standard C
functions (eg. strstr()) without causing compiler warnings is just
plain wrong!
I guess there's a philosophical argument about which is wrong (the
StdC definition of 'const' or the StdC definition of 'strstr') but
basically I'd like to keep the usual prototype for th estring
functions but not have to suffer compile warnings :-) 'const' and
'volatile' are both difficult to use sanely -- I try to avoid them
wherever possible.
-- Keir
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel
|
|
|
|
|