Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: How ANSI is Apollo's cc 6.7 (SR 10.2) Message-ID: <17963@haddock.ima.isc.com> Date: 11 Sep 90 23:43:30 GMT References: <15434@reed.UUCP> <13798@smoke.BRL.MIL> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 28 In article <13798@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: >In article <15434@reed.UUCP> minar@reed.bitnet (Nelson Minar) writes: >>[someone's stdio says:] unsigned char *_ptr #attribute[aligned(1)]; >>Just what is '#attribute' supposed to mean? I assume it is supposed to be >>picked up by the preprocessor, but isn't that what #pragma is for? > >Apparently Apollo thought they needed finer-grained control than the >statement-oriented #pragma directive provides. [It's legal, unless it >collides with the ANSI `#' stringizing operator.] A safer solution would have been to use a double-underscore keyword instead. Gcc does this. (And the documentation notes that since they are equally legal but `__' is more flexible, there's no reason to support any `#pragma's.) >>(from string.h - this is wrapped inside of an '#ifdef __STDC__') >>extern char *strcpyn(...); > >Actually, this should be EXCLUDED when __STDC__ is in effect, since >the C standard prohibits inclusion of arbitrary junk in standard >headers for a conforming (__STDC__) implementation. But it isn't arbitrary junk: `str*' is part of the reserved namespace associated with , so this would seem to be legal. I'd guess this is probably the equivalent of the `vstrcat' function in the FAQ, and the vendor declared it with zero fixed arguments to avoid having to special-case the first string in the actual implementation. Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint