On Thu, Oct 31, 2019 at 09:16:00AM +0000, Richard Sandiford wrote: > > Yes, it is indeed not clear, subject to ongoing discussions. > > My reading of the spec was that all the *-name-list are comma > > separated lists of identifiers, some others in the committee > > want now (yesterday's discussions) string literals instead > > when I and others pointed out that isa(core-avx512) can't be valid, > > but strangely only for isa/arch/extension but not e.g. for > > kind or vendor which would still take identifier lists etc. > > Might be completely wrong, but wouldn't the identifiers be subject to > macro expansion? That would make it harder to use the pragmas safely > in system headers.
Well, all the identifiers in the OpenMP/OpenACC pragmas after the omp are subject to macro expansion, including clause names etc., so even #define device foobar #pragma omp declare variant (foo) match (device={kind(host)}) is a problem, or macro redefinition of declare, variant, match, kind or host. That said, for the arch and isa it is perhaps a bigger problem, as can be seen in the c-c++-common/gomp/declare-variant-9.c testcase where I had to #undef i386 because in non-strict modes that is defined... Jakub