On Mon, Feb 24, 2014 at 7:28 PM, Georg Zotti <georg.zo...@univie.ac.at> wrote:
> Is there a test program that simply tests sizeof(Star3) and similarly all
> components for all star structs?

If not, it could be a good idea to add it.  Or even some asserts when
the stars module loads.  I am not sure if gcc static asserts are
supported by all compilers, but if so it would be even better, raising
an error during compilation.

>
> G.
>
> On Mo, 24.02.2014, 11:15, Fabien Chéreau wrote:
>> On Mon, Feb 24, 2014 at 10:55 AM, Georg Zotti
>> <georg.zo...@univie.ac.at>wrote:
>>
>>> >> The logfile has a few error messages though, maybe
>>> >> concerning the bitfields in the star data that MSVC doesn't like?
>>> >
>>> > About this: if it starts to be an issue, it wouldn't be too hard to
>>> > change the code not to use bitfields anymore. Maybe I should make a
>>> > branch to test that.
>>>
>>> Maybe MSVC just wants a different syntax? Or some different compilation
>>> flag? But I am not sure if it's really a bitfield problem, the cause for
>>> the "Access denied" error message is rather cryptic for me. Just that I
>>> think I remember once this was an issue.
>>>
>>>
>> Suppressing the bitfields would also be probably much slower. It used to
>> be
>> like that a very long time ago (using masks). So we'd rather find the
>> reason (probably packing) causing troubles on MSVC.

It would also make the code less readable, since we would need to
resort to using  macros to hide the mask operations.  That being said,
trying to specify an exact memory layout using bitfield is not a good
practice, as the standard does not say anything about the layout.

I found this discussion about bitfield use in general on the linux
kernel mailing list archive. They only support gcc, and still they run
into troubles with different packing rules on different architectures:

    http://yarchive.net/comp/linux/bitfields.html

All in all, I think we should keep the code as it is now, add some
asserts, and just play with compiler options to make it work for now.

    gui

>>
>>
>
>
>
> ------------------------------------------------------------------------------
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> _______________________________________________
> Stellarium-pubdevel mailing list
> Stellarium-pubdevel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel



-- 
Guillaume
guillaume.cher...@gmail.com
+886 970422910

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Stellarium-pubdevel mailing list
Stellarium-pubdevel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel

Reply via email to