Thread View: gnu.gcc.bug
2 messages
2 total messages
Started by Monika Mevenkamp
Wed, 05 Aug 1992 13:05
gcc versus cc
Author: Monika Mevenkamp
Date: Wed, 05 Aug 1992 13:05
Date: Wed, 05 Aug 1992 13:05
34 lines
1417 bytes
1417 bytes
I use gcc Version 1.40 (that's at least what the man-page says)
under 4SunOS Release 4.1.2. The following program is
an almost exact copy from the Pixrect Reference Manual (Fig. 3-2).
When compiled with /bin/cc (cc tst.c -lpixrect) it does what it's
supposed to do. When compiled with gcc (gcc tst.c -lpixrect) it
gets a Segmentation fault inside the pf_ttext function.
Please let me know whether there is a known bug producing this
problem and whether there is a way to get around it.
Monika
--------------------------------------------------------------------
The program:
#include <pixrect/pixrect_hs.h>
main()
{
struct pixrect *screen;
struct pixfont *pix_ft;
struct pr_prpos tpos;
int op = PIX_SET;
screen = pr_open("/dev/fb");
pix_ft = pf_open("/usr/lib/fonts/fixedwidthfonts/screen.r.12");
tpos.pr = screen;
tpos.pos.x = 100;
tpos.pos.y = 100;
pf_ttext(tpos, op, pix_ft, "TST text ...!");
pf_close(pix_ft);
pr_close(screen);
}
Re: gcc versus cc
Author: John Clark
Date: Thu, 06 Aug 1992 17:40
Date: Thu, 06 Aug 1992 17:40
22 lines
1418 bytes
1418 bytes
In article <9208052105.AA12439@enthuse.bellcore.com> monika@enthuse.bellcore.com (Monika Mevenkamp) writes: +I use gcc Version 1.40 (that's at least what the man-page says) +under 4SunOS Release 4.1.2. The following program is +an almost exact copy from the Pixrect Reference Manual (Fig. 3-2). +When compiled with /bin/cc (cc tst.c -lpixrect) it does what it's +supposed to do. When compiled with gcc (gcc tst.c -lpixrect) it +gets a Segmentation fault inside the pf_ttext function. The 1.40 gcc did not have a sun-cc compatible structure return convention. This prohibited the use of gcc in applications which used the sunwindow function libraries. (I think there's mention of that in the manual). GNU gcc-2.xx is supposed to have corrected that, and in a simple window app that I recently compiled with gcc-2.2.2, that appears to be true. Moral, get gcc-2 or greater, current version is 2.2.2 available at prep.ai.mit.edu. -- John Clark jclark@ucsd.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads