#pragma
uunet!ai.mit.edu!rms
uunet!ai.mit.edu!rms
Mon Aug 13 19:33:58 PDT 1990
>> Consider: a #pragma that changes the semantics of a program will be
>> implemented only by certain compilers. The program will work
>> incorrectly on other ANSI C systems.
In the Fortran universe, there are many counterexamples to this.
Consider the very common...
That part of my message was about uses of #pragma that change the
semantics.
I can't understand from your example exactly what `c$dir ivdep' is
supposed to tell the compiler, but I get the impression that it only
tells the compiler it need not be cautious about some optimization.
If so, then this is analogous to a pragma that DOES NOT change the
meaning of the program.
In this sort of case, #pragma is more portable than an original
extension, but it still has the problem of failing to work with
macros. If Fortran does not have macros, `c$dir ivdep' is a
reasonable solution in Fortran. But the analogous thing in C does
have a problem.
More information about the Numeric-interest
mailing list