Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!novavax!proxftl!bill From: bill@proxftl.UUCP (T. William Wells) Newsgroups: comp.lang.c Subject: Re: #pragma does only half the job (was Re: Pragma and noalias) Keywords: Pragma Message-ID: <437@proxftl.UUCP> Date: 8 Jul 88 09:46:46 GMT References: <381@proxftl.UUCP> <8176@brl-smoke.ARPA> <423@proxftl.UUCP> <23349@think.UUCP> Organization: Proximity Technology, Ft. Lauderdale Lines: 29 In article <23349@think.UUCP>, barmar@think.COM (Barry Margolin) writes: > In article <423@proxftl.UUCP> bill@proxftl.UUCP (T. William Wells) writes: > > A PRAGMA CAN NOT GIVE INFORMATION ABOUT THE PROGRAM THAT > > THE COMPILER CAN'T FIGURE OUT FOR ITSELF. > > How does this restriction follow from what the standard says? Because implementation defined means that you can change only a very limited subset of things, i.e., those things labeled as implementation defined in the standard. For example, the effect of right shifting a signed number is implementation defined. This means that you could write #pragmas like: #pragma right_shift zero_fill #pragma right_shift sign_fill #pragma right_shift generate_abort which would cause the interpretation of the right shift to change. (By the way, since the standard says only that the effect is implementation defined, any behaviour is allowable. Thus my final example, where the compiler is being instructed to create an abort instruction. This is a defect in the standard; I sent in a nitpick about it, we'll see if it gets fixed.) [B.T.W., another, possibly loose, interpretation of what the standard says is that the existence of #pragma widens the range of implementation-defined to include whatever you might want to dream up. This ambiguity is the cause of the debate about what can be done with #pragma.]