Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!ucbvax!MASIG2.OCEAN.FSU.EDU!davis From: davis@MASIG2.OCEAN.FSU.EDU (Alan Davis) Newsgroups: comp.sys.sgi Subject: C compiler bug ? Message-ID: <9010171720.AA08451@masig2.ocean.fsu.edu> Date: 17 Oct 90 17:20:54 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 67 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 #include #include /* Now located in Xaw (athena widgets) subdir, ACD */ #include #include #include #define XAW_BC /* Needed for backwards compatability, ACD */ #include #define ATHENA_TOOLS #include 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 #include #include /* Now located in Xaw (athena widgets) subdir, ACD */ #include #include #include #include #define ATHENA_TOOLS #include 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@masig1.ocean.fsu.edu Florida State University | SPAN scri1::davis Tallahassee, FL 32306-3041 | (904) 644-3798 | _______________________________________________________________________________