CompuServe Messages

#inline asm criticized

    16-Jan-90 03:30:37
Fm: John Draper 76703,4322
To: Mike Spille/Manx 71545,1466
#pragmas are ANSI approved, but that doesn't make them A Good Thing. It makes for non-portable code, or code that could appear to be portable, but with fatal flaws in it, simply by virtue of the chance of an overlap of naming pragma arguments in other compilers. The best example I thought, though extreme to the point of silliness, was "Your compiler has a #pragma called 'inline', that causes the compiler to generate inline code for functions. Mine has a #pragma called 'inline' that causes a format of the hard drive containing the code being commpiled" All perfectly legal under ANSI standards (It is a standard now, BTW, in case there are those reading this that don't know yet). I saw the following on Usenet. It is the docuentation for the GNU C compiler's #pragma directive. The `#pragma' command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, `#pragma' first attempts to run the game `rogue'; if that fails, it tries to run the game `hack'; if that fails, it tries to run GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a fatal error. In any case, preprocessing does not continue.