From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Wilson To: Bruce Korb Cc: egcs@cygnus.com Subject: Re: Include Hackery Date: Tue, 02 Sep 1997 15:47:00 -0000 Message-id: <199709022247.PAA13802@cygnus.com> References: <340C5A11.78BE@datadesign.nospam.com> X-SW-Source: 1997-09/msg00069.html 2. The commentary to the right of "#else" and "#endif" used to be stripped. I put it inside "/* */". Trying to modify what fixincludes does is always a risky business. What if this commentary includes a comment? If you have #endif foo /* stuff */ you then get nested comments and we still get a warning with -pedantic. Looking through the ChangeLogs, I see that we did indeed run into a problem with this, though it is not the first case I thought of. Consider this example /* Comment out this stuff #ifdef foo ... #endif foo end of comment. */ If you fix the foo by changing it to /* foo */, then you now have a nested comment. This is worse than what we started with, because this is now a syntax error regardless of what options are used. Thu Jul 1 18:15:17 1993 Paul Eggert (eggert@twinsun.com) * fixinc.svr4: Remove everything after #endif, instead of trying to turn it into comments, which loses inside comments. * fixincludes: Likewise. Remove #endif workarounds for Ultrix 4.[12] and SunOS 4.1, which are no longer needed because of this bug fix. Jim