Sorry, but you may see this twice.  The moderator hasn't let this through,
yet, and I am leaving work, so I joined the mailing list from work and
resent it.

Jonathan Polley

---------------------- Forwarded by Jonathan W
Polley/CedarRapids/RockwellCollins on 03/24/2002 02:42 PM
---------------------------


Jonathan W Polley
03/24/2002 01:50 PM

To:    [EMAIL PROTECTED]
cc:

Subject:    [Flightgear-devel] Problems Building JSBSim using MSVC 6.0

>>> Adding an ugly cast fixes the problem:
>>>
>>>   PropertyManager->Tie("forces/fbx-aero-lbs", this,1,
>>>     (double (FGAerodynamics::*)(int) const)
&FGAerodynamics::GetForces);
>>
>> I'll roll that change into my copy until it gets made permanently.
While
>
>
>We'll do a little investigating, first. I want to understand why MSVC is
>having problems, first, when no other compiler appears to be complaining.
We
>want to remain as cross-platform/cross-compiler compatible as possible,
but
>as a matter of policy, I am extremely hesitant to make crutches in our
code
>to fix a crippled compiler - if, indeed, it turns out to be a problem with
>MSVC. Do you have any explanatory backup for why MSVC isn't working with
>this? I know this sounds rude of me, but I hope you can see where I am
>coming from.
>
>Jon

I'm sending this from work, since I am filling some process documentation
holes and need a break.  I know that MSVC can be quite strict about what is
consider to be 'valid' C.  The one thing that struck me when you asked your
question is that some compilers are very strict about matching parameter
types.  What would happen if the class that defines 'PropertyManager->Tie'
did not take a 'const' as the last parameter?  Since I am at work, I don't
have access to CVS and can not give it a try.

This behavior with 'const' is not new, but it is one that I keep
forgetting.  Other compilers (i.e., Rational Apex's C compiler) seen to
take the approach that the parameter is 'close enough' and don't raise an
error.  Does specifying '--pedantic' on the gcc command line cause any
other warnings?

Thanks,

Jonathan Polley





_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to