On 5/5/26 09:01, Waffl3x wrote:
The OpenMP allocate directive is not a construct, and thus is not supposed to be handled by cp_parser_omp_construct, as far as I can tell it never was. With this change PRAGMA_OMP_ALLOCATE will correctly trap if handled here, as such this patch should have no functional impact, merely clarifying intent and preventing future incorrect usage.This also adds a few clarifying comments, based on my interpretation of the code. The significance of the return value of cp_parser_pragma is still not totally clear to me so no general comments are included for it. gcc/cp/ChangeLog: * parser.cc (cp_parser_omp_construct) <case PRAGMA_OMP_ALLOCATE>: Remove. (cp_parser_pragma): Add comments. Signed-off-by: Waffl3x <[email protected]>
I think this one also qualifies as "obvious". It's consistent with how the C parser handles this and fixes what appears to be a think-o in the C++ parser support (which was added at the same time).
I assume this is all adequately tested by later patches in the series, right?
-Sandra
