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

Dmitri Gribenko gribozavr at gmail.com
Wed Nov 7 20:47:19 PST 2012


On Wed, Nov 7, 2012 at 8:20 PM, Mahesha HS <mahesha.llvm at gmail.com> wrote:
> Ok. Shall I assume the following basic thumb rule for our OpenMP
> support in Clang?
>
> "The OpenMP annotated C/C++ source when compiled with OpenMP
> *disabled* should be (both syntactically and semantically) equal to
> its sequential counterpart. Any OpenMP (non-standard) extension which
> violates the above rule will not be supported even if it will going to
> be *not* compatible with existing OpenMP compilers".

While I don't think it is possible to guarantee that, I would agree
that this is the spirit of OpenMP.  But I would not make a statement
as strong as that -- every extension is different and should be
considered on a case by case basis.  If we find an extension that
*lots* of code depends on, then we might consider implementing that.
But in my opinion that particular if(int var = ...) extension does not
meet this bar.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list