Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!mcnc!unc!steele From: steele@unc.UUCP (Oliver Steele) Newsgroups: comp.lang.c Subject: Re: ANSI C -- preprocessing Message-ID: <438@unc.unc.UUCP> Date: Thu, 18-Dec-86 17:45:02 EST Article-I.D.: unc.438 Posted: Thu Dec 18 17:45:02 1986 Date-Received: Fri, 19-Dec-86 20:20:19 EST References: <109@decvax.UUCP> <5456@brl-smoke.ARPA> Reply-To: steele@unc.UUCP (Oliver Steele) Organization: CS Dept, U. of N. Carolina, Chapel Hill Lines: 31 In article <5456@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) writes: >In article <109@decvax.UUCP> minow@decvax.UUCP (Martin Minow) writes: > >>Page 82, line 10ff. An unrecognized #pragma should result in a diagnostic >>message. > >Sorry, I can't go along with this. The idea of #pragma is >advisory, so such directives can generally be ignored. This seems contradictory to the spirit of requiring variable declarations. If I misspell a #pragma, I want to _know_, rather than have the compiler assume I meant what I said. If I type '#pragma signle' to force a compiler to use single-precision library routines, I don't want to waste time trying to find out why my code isn't faster than it is any more than I like to waste time debugging a FORTRASH program because I've mispelled a variable name and the compiler's automatically declared it. Obviously I don't want a compiler shouting at me 'unknown pragma: single' when I port the program. Perhaps a '#pragma pragmas (single, foo, bar)' to tell the compiler 'These are the pragmas I mean to use. Don't tell me if you don't know what they mean, but warn me about any other pragmas you don't recognize.' would solve things (in fact, a compiler that silently ignored unrecognized pragmas could go ahead and ignore this one). Sure, it's creeping featurism, but so are pragmas in the first place, and I'd rather have an extra feature than a compiler that ignores potential errors. -- Oliver Steele----------------------------------steele@unc When a tree dies, ...!{decvax,ihnp4}!mcnc!unc!steele plant another in its place. steele%unc@csnet-relay.csnet