[cfe-dev] OpenMP support in CLANG: A proposal
Mahesha HS
mahesha.llvm at gmail.com
Thu Nov 8 05:58:18 PST 2012
On Thu, Nov 8, 2012 at 6:18 PM, Olaf Krzikalla
<Olaf.Krzikalla at tu-dresden.de> wrote:
> Am 08.11.2012 04:20, schrieb Mahesha HS:
>
>> GCC ( g++ ) happily reports *un-declared* error for the variable VarA
>> when I do not pass -fopenmp option, and abort the compilation. Yes,
>> OpenMP spirit is clearly broken here. Though, I did not test the
>> other compilers, I guess that they follow GCC for whatever the
>> reasons.
>
> MSVC rejects the code.
>
>
>
>(I believe it is even a non-intentionally
> extension of gcc introduced by an unified handling of
> condition-expressions).
Possible.
> Regarding side effects in expressions, while these might be considered evil,
> they are actually allowed by the OpenMP standard. But they don't impose any
> problems to the implementation.
>
> A program shall compile and run with and without -fopenmp. It is not
> required that both variants yield the same output.
Yes. I agree. We can probably re-discuss about it when we encounter
the implementation in a near future, if required.
Now, I am going through the Clang code base which is related to
*attributes* implementation. Once, I get hold of this code base, I
guess, some discussion is required around how to implement OpenMP
*pragmas* as *attributes*. Meanwhile, it would be great if your share
your thoughts too in this line, I mean from the perspective of
implementation strategy. I do think that common code base should serve
the need of both the syntax - classic pragma syntax and new C++11
attribute based syntax.
--
mahesha
More information about the cfe-dev
mailing list