octave-maintainers
[Top][All Lists]
Advanced

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

ISO C++ and Octave


From: Mumit Khan
Subject: ISO C++ and Octave
Date: Tue, 30 Jan 2001 12:32:14 -0600 (CST)

[ I'm not on the Octave Maintainers list, so please Cc me if appropriate ]

The issue of getting Octave sources to build under a reasonably
ISO C++ compliant compiler (which includes language + runtime
library) was raised a while back, and lots of little fixes went
in the code (std:: etc). Now that GCC 3.0 is inching closer, albeit
at a very slow pace, it is probably a good time to revisit the 
issue.

>From a quick look at 2.1.33, here're the remaining issues:

1. Just a few remaining missing namespace qualifiers, a minutes fixed
those.

2. The code for equal (src/mx-inlines.cc) currently causes a problem 
for gcc-2.97/libstdc++-v3, but I haven't been able to reduce the testcase 
yet. Easy workarounds: (1) use std::equal, which works with older 
compilers as well, (2) explicitly use ::equal. It is not a problem in
Octave code as far as I can see.

3. This is the sticky one - the interface to the streams has changed
significantly and so we do need to update anything built on top of
std::filebuf. 

(1) is obviously trivial, and (2) may very well be fixed by the time
the release comes around. (3) needs to be done, and unless someone is
working on it, or better yet, already done it, here's what I propose:

1. Autoconf to see if we're using standard compliant library. I have
a rudimentary one that at the very least checks all the standard mandated
includes, without the backward compat stuff offered by most compilers,
and also checks a few random things. Define CXX_ISO_COMPLIANT_LIBRARY if
so.

2. Use the macro to essentially write two versions of the places where
there is conflict.

I hope to look at this during the next two weeks or so, and hopefully be
able to submit patches that will work with both the current releases as
well as upcoming 3.0.

Regards,
Mumit




reply via email to

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