octave-maintainers
[Top][All Lists]
Advanced

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

[patch] Building Octave with GCC 3.1


From: John W. Eaton
Subject: [patch] Building Octave with GCC 3.1
Date: Fri, 17 May 2002 19:10:13 -0500

On 17-May-2002, Mumit Khan <address@hidden> wrote:

| Simple changes to support gcc-3.1. The only perhaps not so obvious change
| is in Array<T>::resize_fill_value -- the old method of initializing the
| return object using T(0) causes ambiguities, especially so when T is
| octave_value (look at the octave_value::octave_value constructors to
| see the reason for ambiguities), and so I've used the T() form.

I was trying to avoid creating objects that might not have a value.
What happens if you create a double this way, for example?  But I
don't suppose it matters too much for Octave, since the derived
classes that are actually used provide their own resize_fill_value
functions that do the right thing.  Is there any way to automatically
do this "correctly" so that numeric types are automatically
initialized to zero, and others have the default constructor applied?

| Patch against CVS sources updated around 3pm, 5/17/2002. Build tested
| against gcc-3.0.2 and gcc-3.1, both on i686-pc-linux-gnu. Could someone
| please check against 2.95.x (and possibly against RedHat 7.x's gcc-2.96)?
| I'll check Sun Workshop over the weekend.

I've applied your changes and compiled with 2.95 (that's still my
default compiler, which explains the lack of std:: qualifiers).

Thanks,

jwe



reply via email to

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