WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] compile fixes for mini-os

To: Kip Macy <kmacy@xxxxxxxxxxx>
Subject: Re: [Xen-devel] compile fixes for mini-os
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sun, 25 Jan 2004 03:17:58 +0000
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 25 Jan 2004 03:21:08 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Sat, 24 Jan 2004 18:07:20 PST." <20040124180228.S81692@xxxxxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> >
> > 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