|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [patch] add byteordered types |
Date: | Wed, 27 Aug 2008 12:57:19 -0500 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080723) |
Gerd Hoffmann wrote:
Anthony Liguori wrote:Personally, I dislike the whole struct thing. I even further dislike having multiple sets of conversion functions that are used in different places in the code. Are we sure that this is something that we want to do?As far I know this struct trick is the only way to have gcc check access to variables with an specific byteorder is done the correct way. Avi sguuested that and I also think this checking would be useful. I could live without that though if there is an agreement that we'll just stick with the current, unchecked cpu_to_<order><size> functions.
Yeah, AFAIK, it's the only way to enforce this sort of thing but it's also ugly. If we were starting from scratch, I could see the value in it but there's already a ton of code that's not going to be using this mechanism that noone is going to convert. That makes me think there isn't going to be a lot of value in it and will lead to a lot of overall confusion.
Regards, Anthony Liguori
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |