C compiler bug ?
Alan Davis
davis at MASIG2.OCEAN.FSU.EDU
Thu Oct 18 03:20:54 AEST 1990
I am proting the NCAR graphics code to a 320 vgx running 3.3.1 and ran into the
following compiler bug when trying to compile some X11 code. I needed to
include some old X11 defs for this version, so added the following line to
the code.
/***********************************************************************
* *
* Copyright (C) 1989 *
* University Corporation for Atmospheric Research *
* All Rights Reserved *
* *
* NCAR View V3.00 - UNIX Release *
* *
***********************************************************************/
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
/* Now located in Xaw (athena widgets) subdir, ACD */
#include <X11/Xaw/Dialog.h>
#include <X11/Xaw/AsciiText.h>
#include <X11/Xaw/Viewport.h>
#define XAW_BC /* Needed for backwards compatability, ACD */
#include <X11/Xaw/Text.h>
#define ATHENA_TOOLS
#include <athena.h>
However, when I ran the compiler, the needed lines from Text.h were not
included. After fooling around a bit, I discovered that it would work if I
moved the define to the front of all the includes.
/***********************************************************************
* *
* Copyright (C) 1989 *
* University Corporation for Atmospheric Research *
* All Rights Reserved *
* *
* NCAR View V3.00 - UNIX Release *
* *
***********************************************************************/
#define XAW_BC /* Needed for backwards compatability, ACD */
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
/* Now located in Xaw (athena widgets) subdir, ACD */
#include <X11/Xaw/Dialog.h>
#include <X11/Xaw/AsciiText.h>
#include <X11/Xaw/Viewport.h>
#include <X11/Xaw/Text.h>
#define ATHENA_TOOLS
#include <athena.h>
Has anyone else porting X11 code experienced a similar problem? Does anyone
from SGI know if this is a bug in cpp?
--
Alan Davis |
MS B-174, Love 008A |
Mesoscale Air-Sea Interaction Group | INTERNET davis at masig1.ocean.fsu.edu
Florida State University | SPAN scri1::davis
Tallahassee, FL 32306-3041 |
(904) 644-3798 |
_______________________________________________________________________________
More information about the Comp.sys.sgi
mailing list