Nadav Har'El
Tue, 25 Sep 2007 00:09:58 -0700
On Mon, Sep 24, 2007, Oleg Goldshmidt wrote about "Re: With and Without gcc OMP": > A #pragma is C code just as any other line in your program, so the This is what I thought too, so there's something that puzzles me in Orna's original description. She said that she tried something like: #ifdef _OPENMP #define OPENMP(line) line #else #define OPENMP(line) /* nothing */ #endif ... OPENMP(#pragma ...) But it didn't work for her. Do you have any idea why? In the days when the C preprocessor was separate from the C compiler and ran first, this SHOULD have worked. Perhaps today the preprocessor is part of the compiler, and for some reason is not run first but after the openmp processing (whatever it is)? > example there uses it to guard a #pragma. Pity. Well, I am offering > what I consider a hard and fast software engineering rule: all > #pragmas are non-portable and therefore must be conditionally > compiled. Indeed, but I think Orna's question was how to make this the least ugly as possible. And having half a dozen lines of "#" lines before every function is certainly quite ugly, if there was a possibility to have only one. -- Nadav Har'El | Tuesday, Sep 25 2007, 13 Tishri 5768 [EMAIL PROTECTED] |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |We could wipe out world hunger if we knew http://nadav.harel.org.il |how to make AOL's Free CD's edible! ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]