Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!brutus.cs.uiuc.edu!jarthur!uci-ics!rfg From: rfg@ics.uci.edu (Ronald Guilmette) Newsgroups: gnu.g++ Subject: Re: predefined macros Message-ID: <25D3E068.18268@paris.ics.uci.edu> Date: 10 Feb 90 09:35:36 GMT References: <900209124736.20205279@SSCVX1.SSC.GOV> Reply-To: rfg@ics.uci.edu (Ronald Guilmette) Distribution: gnu Organization: UC Irvine Department of ICS Lines: 17 In article <900209124736.20205279@SSCVX1.SSC.GOV> ALLEN@SSCVX1.SSC.GOV writes: >I want to use the same header file for both c and c++, so >with cfront 1.2 I did "#ifdef c_plusplus". I am using g++-1.36.4 >based on gcc-1.36.94, which defines __GNUG__, but not c_plusplus. >Is there a better sol'n than cheking for __GNUG__ and putting >off the problem of a different c++ compiler till I actually >have a different c++ compiler? What's wrong with: #if defined(c_plusplus) || defined(__GNUG__) Actually, the "right" way to do this nowadays is: #if defined (__cplusplus) // rfg