Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!ukc!eagle!icdoc!iwm From: iwm@doc.ic.ac.uk (Ian W Moor) Newsgroups: comp.lang.c Subject: Re: Use of #pragma Message-ID: <433@ivax.doc.ic.ac.uk> Date: Sun, 10-May-87 12:11:56 EDT Article-I.D.: ivax.433 Posted: Sun May 10 12:11:56 1987 Date-Received: Fri, 15-May-87 01:23:29 EDT References: <890@viper.UUCP> <5795@brl-smoke.ARPA> Reply-To: iwm@doc.ic.ac.uk (Ian Moor) Organization: Dept. of Computing, Imperial College, London, UK. Lines: 28 It is fairly obvious from the that the use of #pragma as currently specified is implementation defined, however I think that it should be tied down a bit more. I have used two Pascal compilers, both of which used the semi-standard 'comment starting with a $' syntax for directives, but the directives meant different things: (*$C+*) meant enable runtime checks to one compiler and use a less strict type compatability check to the other. Now seems to be the time to prevent this kind of thing. I would like to see the standard list the pragmas (pragmata ?) that compilers might be expected to recognise and their syntax - obviously this would not be an exclusive list. Thus : if a compiler recognises the pragma "no_optimize" it will have the effect of disabling optimization; conversely if the compiler has a pragma for disabling optimization it will be of this form. A particular compiler would be free to support more esoteric #pragma settings; but porting code might be a little easier. Wish 2 : compilers should be provided with a command-line option requesting them to flag unrecognised pragmas, again as an aid to portability. -- Ian W Moor UUCP: seismo!mcvax!ukc!icdoc!iwm ARPA: iwm%icdoc@ucl Department of Computing Whereat a great and far-off voice was heard, saying, Imperial College. Poop-poop-poopy, and it was even so; and the days 180 Queensgate of Poopy Panda were long in the land. London SW7 Uk.