home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gcc.bug
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!mtholyoke.EDU!jbotz
- From: jbotz@mtholyoke.EDU (Jurgen Botz)
- Subject: Bug in gcc-2.3.3 found while compiling Tk-3.0
- Message-ID: <BzzHI7.HIr@mtholyoke.edu>
- Sender: gnulists@ai.mit.edu
- Organization: Mount Holyoke College
- Distribution: gnu
- Date: Mon, 28 Dec 1992 19:15:41 GMT
- Approved: bug-gcc@prep.ai.mit.edu
- Lines: 41
-
- I was just compiling the latest release of John Ousterhout's Tcl/Tk
- with gcc-2.3.3 when I got the following error in tkTrig.c:
-
- tkTrig.c: In function 'TkBezierScreenPoint':
- tkTric.c:798: fp_offset (16) or end_offset (-4) is less than zero.
-
- gcc-2.3.2 compiles the same file without complaining. I don't have
- the know-how or time to try to track this down right now, but I thought
- I'd report it at least. In case it might be helpful, here's the
- function...
-
-
- void
- TkBezierScreenPoints(canvasPtr, control, numSteps, xPointPtr)
- Tk_Canvas *canvasPtr; /* Canvas in which curve is to be
- * drawn. */
- double control[]; /* Array of coordinates for four
- * control points: x0, y0, x1, y1,
- * ... x3 y3. */
- int numSteps; /* Number of curve points to
- * generate. */
- register XPoint *xPointPtr; /* Where to put new points. */
- {
- int i;
- double u, u2, u3, t, t2, t3;
-
- for (i = 1; i <= numSteps; i++, xPointPtr++) {
- t = ((double) i)/((double) numSteps);
- t2 = t*t;
- t3 = t2*t;
- u = 1.0 - t;
- u2 = u*u;
- u3 = u2*u;
- xPointPtr->x = SCREEN_X(canvasPtr, (control[0]*u3
- + 3.0 * (control[2]*t*u2 + control[4]*t2*u) + control[6]*t3));
- xPointPtr->y = SCREEN_Y(canvasPtr, (control[1]*u3
- + 3.0 * (control[3]*t*u2 + control[5]*t2*u) + control[7]*t3));
- }
- }
-
-
-