From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71171f53c22d92b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-26 20:22:26 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail From: Dave Thompson Newsgroups: comp.lang.ada Subject: Re: C's trikery semantic opens up backdoor in new Linux kernel Message-ID: References: <3FB1A63C.9080200@nowhere.com> <7uqlrv4l846co3ear20eotlkaj2t6aioho@4ax.com> <27427869.cO6lCOVPY8@linux1.krischik.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 27 Nov 2003 04:22:25 GMT NNTP-Posting-Host: 12.76.17.184 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1069906945 12.76.17.184 (Thu, 27 Nov 2003 04:22:25 GMT) NNTP-Posting-Date: Thu, 27 Nov 2003 04:22:25 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:2976 Date: 2003-11-27T04:22:25+00:00 List-Id: On Fri, 21 Nov 2003 16:34:17 +0100, Martin Krischik wrote: > Dave Thompson wrote: > > > There's nothing you can do with the C preprocessor that can't be done > > directly in source -- because the preprocessor is a source-to-source > > Well you can redefine keywords: > > #define private public > #define protected public > #include <....> > > Well it is a C++ hack - but I guess you get the drift. > If you do that for a *standard* header, as the <> implies but does not require, it's technically illegal: C 7.1.2, C++ 17.4.3.1.1p2. But even where it works anyway, or for a header where it's legal, you can accomplish the same thing by writing out (desired declarations etc. from) the contents of the include-d file changed as specified. That's (one case of) what I meant by "directly in [your] source". - David.Thompson1 at worldnet.att.net