Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Pragmas Message-ID: <6920@brl-smoke.ARPA> Date: 5 Jan 88 23:24:43 GMT References: <17196@topaz.rutgers.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 21 In article <17196@topaz.rutgers.edu> mccarrol@topaz.rutgers.edu () writes: > What is a pragma, and what is the function of #pragma in C? A "pragma" is some advice to the compiler outside the scope of the language proper. Ada has these. Typically, pragmas are interpreted in an implementation-specific way. Typical usages include specifying various optimization preferences, producing listings, aiding debugging, etc. The proposed ANSI C provides a #pragma preprocessing directive but leaves the definition of its effects up to the implementation. My version of the Reiser C preprocessor accepts #pragma but ignores it. The main reason #pragma is not suitable for "noalias" is, as I showed in an earlier posting, the "noalias" property has potentially visible and important effect on the computation, depending on the code. Such code is "illegal", under the "noalias" approach, but it would have to be permitted if #pragma were used. A #pragma is not supposed to change the interpretation of the virtual-machine semantics of the code. At least, that's my interpretation of what's going on here.