[Top][All Lists]

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

ISO C++ and Octave

From: John W. Eaton
Subject: ISO C++ and Octave
Date: Tue, 30 Jan 2001 13:06:35 -0600

On 30-Jan-2001, Mumit Khan <address@hidden> wrote:

| 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.

OK, if you have a patch, please send it on.

| 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.

I'd also be willing to rename those functions to be mx_XXX to avoid
this kind of problem.

| 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. 

If I can build a current snapshot of gcc 3.0 maybe I can get an idea
of how hard this would be to fix.

Do you think it would be possible to write code that would work with
both old and new compilers in these cases?  If not, then the idea of
using a macro seems OK, or we can hide the details in some function(s).


reply via email to

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