octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patches to enable MSVC compilation


From: Jaroslav Hajek
Subject: Re: Patches to enable MSVC compilation
Date: Tue, 8 Dec 2009 21:38:31 +0100

On Tue, Dec 8, 2009 at 9:13 PM, Michael Goffioul
<address@hidden> wrote:
> On Tue, Dec 8, 2009 at 1:02 PM, Jaroslav Hajek <address@hidden> wrote:
>> I applied those bits that are actually fixes and should be applied
>> regardless, plus the one workaround in oct-stream.cc that simplifies
>> code.
>>
>> Regarding the remaining workaround in dbleQR.h, this is a bug in MSVC
>> and slightly "downgrades" the code: with this change, the QR::
>> constants can't be used in integral constant exprs, like regular enums
>> can. OTOH, this doesn't seem to be currently needed anywhere.
>> So if this is to be applied, I think it should be clearly marked as a
>> workaround for certain MSVC version, so that it can be reverted when
>> no longer needed.
>
> IIRC, the problem I had here is that because of the OCTAVE_API
> decorator, you end up with mutliple symbol definition.
>

Hmmm, that is weird. The C++ standard says that for static const
members of integral and enum types, the initializer can appear in
declaration instead of definition, and the only difference is that the
constants can then be used in compile-time integral constants (array
bounds etc). So I think that both versions should work.

>> I oppose this one as this goes against the logic of my recent changes
>> in mx-inlines and the change is distributed across number of files and
>> hence not easy to revert. mx-inlines defines "loops" and "appliers",
>> with loops separated from the appliers.
> [snip]
>> I'd suggest you keep the patch as an extra for MSVC and report the bug
>> to Microsoft (unless you already did).
>
> Fair enough. I knew you'd reject it anyway.
>
> I didn't report the bug, but a similar problem was reported recently
> to MS. The report says that it won't be fixed in the coming version of
> MSVC. Given the release rate, it probably won't be fixed before
> 2012/2013.
>
> I don't think it make sense to continue submitting patches to
> maintain MSVC compatibility. Though I'll probably continue to
> maintain a patch for my own purpose. So if anybody wants
> to compile octave with MSVC, you can still contact me (this
> last sentence it just for reference, if anybody searches the mailing
> list).
>

I 've been doing the same for Intel's C++ for Linux (and I can offer
useful hints there too). I guess it only makes sense to include
workarounds for bugs in GCC (given that it's part of GNU), and only in
the newest one or two series.

I think the only curently left workaround for GCC 4 is
http://hg.savannah.gnu.org/hgweb/octave/rev/ab4db66e286f

due to the bug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39270

but unfortunately there seems to be no progress on the bug yet.
Anyway, the code is only used if long double is not available.

best regards

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]