[cfe-dev] OpenMP support in CLANG: A proposal

Olaf Krzikalla Olaf.Krzikalla at tu-dresden.de
Thu Nov 8 04:48:30 PST 2012


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.

> And, now, if Clang starts fighting against these clearly violated
> rules, it is very probable that users will start their voice against
> it.
I don't think so. I haven't seen something like this anywhere in 
production code. It is just way over the top (I believe it is even a 
non-intentionally extension of gcc introduced by an unified handling of 
condition-expressions).
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.

Best Olaf




More information about the cfe-dev mailing list