[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ePiX-devel] Sample file failure with 1.1.12
From: |
Andrew D. Hwang |
Subject: |
[ePiX-devel] Sample file failure with 1.1.12 |
Date: |
Thu, 23 Aug 2007 18:38:33 -0400 (EDT) |
The sample file R_demo.xp won't compile for me in Version 1.1.12 under
gcc-3.2 or gcc-3.3 on GNU/Linux, but will compile on Mac OS X with
gcc-4.0. Here are the error messages from gcc-3.3.2:
epix-local-17447/R_demo-tmp.cc: In function `int main()':
epix-local-17447/R_demo-tmp.cc:55: error: syntax error before `,' token
epix-local-17447/R_demo-tmp.cc:55: error: no matching function for call to
`ePiX::axis::axis(double&, double)'
/home/hwang/epix/pkg/epix-1.1.13/epix.h:1733: error: candidates are:
ePiX::axis::axis(const ePiX::axis&)
/home/hwang/epix/pkg/epix-1.1.13/epix.h:1736: error: ePiX::axis::axis(const ePiX::P&,
const ePiX::P&, unsigned int, const ePiX::P&, ePiX::epix_label_posn)
epix-local-17447/R_demo-tmp.cc:55: error: syntax error before numeric constant
epix-local-17447/R_demo-tmp.cc:56: error: request for member `subdivide' in
`Ay', which is of non-aggregate type `ePiX::axis ()(...)'
epix-local-17447/R_demo-tmp.cc:58: error: no match for call to `(ePiX::axis)
(double&, double)'
epix-local-17447/R_demo-tmp.cc:58: error: no match for call to `(ePiX::axis)
(int, int)'
Line 55
axis Ay(P(xmin(), 0), P(xmin(), 0.4), 4, P(-4,0), l);
is definitely the problem; removing everything else in the file preserves
the error message. The following *fix* the problem:
1. Replacing the *first* call to xmin() with a double literal,
2. Replacing P(xmin(), 0) with a separately-constructed P, as in
P tmp(xmin(), 0);
axis(tmp, ...);
The call
axis(P(0, ymin()), ...);
elsewhere in the file compiles fine, but fails with the same error if the
components are switched. (It looks suspiciously like xmin() is returning
an uninitialized reference, but the value is correct at the first call.)
The file works with Version 1.1.11. None of the recent changes seem
obviously relevant to this snippet, but clearly at least one of them is.
If necessary, I'll comb through change by change to see where the breakage
occurred, but does anyone see why this call might suddenly start to fail?
Specifically, have I made a coding gaff, or does this look like a compiler
bug?
--
Andy
Andrew D. Hwang address@hidden
Department of Math and CS http://mathcs.holycross.edu/~ahwang
College of the Holy Cross (508) 793-2458 (Office: 320 Swords)
Worcester, MA, 01610-2395 (508) 793-3530 (fax)
- [ePiX-devel] Sample file failure with 1.1.12,
Andrew D. Hwang <=