Dear Hackers,
gcc 3.3.1 seems to have changed its behaviour, revealing broken code
in the contrib directories:
/bin/sh /home/keving/MOZART/scratch/build/platform/emulator/oztool.sh c++ -O3 -I/home/keving/MOZART/scratch/mozart/platform/emulator -I/home/keving/MOZART/scratch/mozart/contrib/ri -I/home/keving/MOZART/scratch/build/platform/emulator -I/home/keving/MOZART/scratch/install//include -I/home/keving/sw/lp_solve_2.3_mozart -I/usr/local/oz/include -I/home/keving/MOZART/scratch/mozart/contrib/lp/../ri -Wall -Wno-unused -Wno-reorder -Wno-uninitialized -c /home/keving/MOZART/scratch/mozart/contrib/lp/builtins.cc -o builtins.o
/home/keving/MOZART/scratch/mozart/contrib/lp/builtins.cc: In function `OZ_Return ri_lpsolve_conf(OZ_Term**)':
/home/keving/MOZART/scratch/mozart/contrib/lp/builtins.cc:93: error: brace-enclosed initializer used to initialize `OZ_Term'
/home/keving/MOZART/scratch/mozart/contrib/lp/builtins.cc:93: error: brace-enclosed initializer used to initialize `OZ_Term'
/home/keving/MOZART/scratch/mozart/contrib/lp/builtins.cc:93: error: brace-enclosed initializer used to initialize `OZ_Term'
/home/keving/MOZART/scratch/mozart/contrib/lp/builtins.cc:93: error: brace-enclosed initializer used to initialize `OZ_Term'
The offending code is:
OZ_Term arity_def[] = {
{OZ_pair2(atom_solver, RILPSolve::getSolverAtom())},
{OZ_pair2(atom_mode, RILPSolve::getModeAtom())},
{OZ_pair2(atom_avail, solver_list)},
{(OZ_Term) 0}
};
And all is well (well, it compiles!) if I reqrite this as
OZ_Term arity_def[] = {
OZ_pair2(atom_solver, RILPSolve::getSolverAtom()),
OZ_pair2(atom_mode, RILPSolve::getModeAtom()),
OZ_pair2(atom_avail, solver_list),
(OZ_Term) 0
};
(i.e., remove the braces that re enclosing the initializer). This is
accepted by gcc 2.95.4 and gcc 3.3.1, but I don't understand the
significance, and I haven't tested the result (affects code in lp and
reflect).
Does anyone know if this change is harmless/harmful? And why it has
started to fail?
thanks
k
PS.
My gcc version
[keving@quaver build]$ gcc --version
gcc (GCC) 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
-
Please send submissions to [email protected]
and administriva mail to [email protected].
The Mozart Oz web site is at http://www.mozart-oz.org/.