{"id":2233038,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2233038/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20260505151030.1749548-4-waffl3x@baylibre.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260505151030.1749548-4-waffl3x@baylibre.com>","list_archive_url":null,"date":"2026-05-05T15:01:56","name":"[03/12] OpenMP/C++: Remove case PRAGMA_OMP_ALLOCATE from cp_parser_omp_construct","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"7176951186b7ecba75f0f6734e9511b181c626a2","submitter":{"id":90070,"url":"http://patchwork.ozlabs.org/api/1.2/people/90070/?format=json","name":"Waffl3x","email":"waffl3x@baylibre.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20260505151030.1749548-4-waffl3x@baylibre.com/mbox/","series":[{"id":502853,"url":"http://patchwork.ozlabs.org/api/1.2/series/502853/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=502853","date":"2026-05-05T15:01:54","name":"OpenMP/C++: 'allocate' directive","version":1,"mbox":"http://patchwork.ozlabs.org/series/502853/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2233038/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2233038/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=dCeazgTw;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=dCeazgTw","sourceware.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com","sourceware.org; spf=pass smtp.mailfrom=baylibre.com","server2.sourceware.org;\n arc=none smtp.remote-ip=2607:f8b0:4864:20::436"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g926C4vjvz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 01:11:31 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id A64AE4B9DB41\n\tfor <incoming@patchwork.ozlabs.org>; Tue,  5 May 2026 15:11:29 +0000 (GMT)","from mail-pf1-x436.google.com (mail-pf1-x436.google.com\n [IPv6:2607:f8b0:4864:20::436])\n by sourceware.org (Postfix) with ESMTPS id 9BFA74BA23F6\n for <gcc-patches@gcc.gnu.org>; Tue,  5 May 2026 15:10:39 +0000 (GMT)","by mail-pf1-x436.google.com with SMTP id\n d2e1a72fcca58-826c4c6d95dso266076b3a.0\n for <gcc-patches@gcc.gnu.org>; Tue, 05 May 2026 08:10:39 -0700 (PDT)","from waffl3x-prestige.lan ([2001:56a:f98a:b800:1f67:ce08:3cbd:86b8])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-83965645140sm2674956b3a.12.2026.05.05.08.10.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 May 2026 08:10:37 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org A64AE4B9DB41","OpenDKIM Filter v2.11.0 sourceware.org 9BFA74BA23F6"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 9BFA74BA23F6","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 9BFA74BA23F6","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777993839; cv=none;\n b=UKBWpOKzl/K87PzvysC1LXDt/WzQp9SX+cnzmBuSvh/LU/Aq2KKcw0RPNrG1gBfV2gbbTWfT90GgVR2IybRCKKpPJF9F6EEXHhgt65RHrsWzfc5o9Rgjvo/VehUiqwtcGXEj1MF/IcrzURBaMh8V2qNP6sXeZF2Y4v0mDt+nu6c=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777993839; c=relaxed/simple;\n bh=5uDVyM+V78QBMhAG06zjqq7my4+lkK5B+DeOQXP9fn4=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=dM6LYHkB07YQFpeM7BdvGNof7UmgFY2y0EDuWBp+qkpRPWnEfMigD6iA+3tgEb1mlW9VcmWM4vNnoziWODDqgE0vYYF00nnjn+5ajQt2kPLivZo2vBubs37SBdcxmD3UnD25ODiickwDWuGPGq3DzEK30lX0oEqwTJi/Z0e1tjQ=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1777993838;\n x=1778598638;\n darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=3JMEH/PgOWQQPvaebZ8C/RP7WfisHsGqHaiguptCQo4=;\n b=dCeazgTwKEPR/COTFXh4wmmw8qBqQ3QRZUZJ30GJJj8hI1l+S7Gl5A17QdnHud4M+o\n QCRG8J5ioyAAa3cRPLUCiugal9fER+Y8OqCJ91qlKOUhdwE7wk6v0kOIj67srHOw0OTG\n w35e5r2gLGbTAAi2FcmWCNpBMoe4E8+J+g7M0ujnJ3B/RcapsIR/zk6n2I376sua0qo7\n 7MBWXVhn1MKRbopAABtV7YE3Q9dsVBurX1sDP4rX0kBczsf3djAYACg3jdjvd5FifaHi\n IUH37tRXnVnZyedYxVUIZteKgHPv7jYTdNN1qcirHsofP0zvviiOYLnxNSqIrfNAe5+n\n vUWA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777993838; x=1778598638;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=3JMEH/PgOWQQPvaebZ8C/RP7WfisHsGqHaiguptCQo4=;\n b=Jw5aExfbOBU6ac55nl9WslHfdWULLUs7J9tf1jN0pknMpgO9GpOsjvQR7/M4YADnKp\n mOAFzsS97RxmtHTsANJ3Vz89idDe0ZwVAIACAmFIiWe/sAM1uBON8NRhWUgdHGMuFI0X\n 2jZZM27JjP+gWnvGYfEOmoGQZOt+Z9tjA71y9kGkwUzFgdyXwtXjHHhExqOD5fg5p/F/\n XVvMPBmhvPcOsjmxnUXTbYqpCjDjlzfNuHBAOKySg4lutwdCag7K6ovqAB2CA1D50y75\n OwMLiC1hTI/1nxl5Tt2D7eY8yfUOxaklDm0Xlt+zJbyq8zSx5EuZP3J/6W7Sxc7cYTdb\n Cqtg==","X-Gm-Message-State":"AOJu0YxozN9Ls+g5TBWDnl8eyJXdicKMw9QdxMNVQcd+G11KogVnyQsb\n 3CEWsQnlE8Y4Zwb8XZJEyt91MAy40vyfbmtTk9qnkN1k3hNI03neIvTwMPNMX63IrUsh79GYUSF\n d0wKD","X-Gm-Gg":"AeBDieuxhsmDytJ5m+6hmzZmxm0IYomj6UYaZsHjA+S18Th7Id3or1V+Z2Th+V6wh5p\n NtTjuEOV7u2le8B2NXJVGrEdoQGb4ti6z+b36tu9A+LF2bkysme4N10XIPsM1lyRrpmgZXYzT6X\n MIVUrW4Xr5vGWjdH8NEegOUjj+N6aXqOmAQtOQpox21WfPpshGb7IwtUETekGwpfnJ1EU7u6EmD\n KW0v1k4UlaNz0D5/IDdMWsjjT6Or/Z/1+7xByn3PgyzFQSa8IKHtO3+OUQg5+zlaiJd3B8mlrti\n lBSK/AnnVxszyvLS3OOZSrVILgsnIcVLsc5AulrgbETpcrRezsJCA69Qg5aJpYH3pDYN8Pva513\n AS+n1d98QWJToy+T0Tjx+A4WCUY1UwO2Z3Hu7j/rfLwho6OBQVP7dU4ZtE0HT5doimkQyxefZXp\n QdybbVOaV/HPYanDhBcWI//NZ7D2NFRHOZT0J25vofcd36mWRtQA==","X-Received":"by 2002:a05:6a21:a510:b0:3a3:2819:5d41 with SMTP id\n adf61e73a8af0-3a7f1c8590amr8179948637.5.1777993838433;\n Tue, 05 May 2026 08:10:38 -0700 (PDT)","From":"Waffl3x <waffl3x@baylibre.com>","To":"gcc-patches@gcc.gnu.org","Cc":"Waffl3x <waffl3x@baylibre.com>","Subject":"[PATCH 03/12] OpenMP/C++: Remove case PRAGMA_OMP_ALLOCATE from\n cp_parser_omp_construct","Date":"Tue,  5 May 2026 09:01:56 -0600","Message-ID":"<20260505151030.1749548-4-waffl3x@baylibre.com>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"<20260505151030.1749548-1-waffl3x@baylibre.com>","References":"\n <CAH+W3Ppbho4pj6W-rWk4mMssrttOjt7aNco-oWW5Sw5f5Yx2GA@mail.gmail.com>\n <20260505151030.1749548-1-waffl3x@baylibre.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"The OpenMP allocate directive is not a construct, and thus is not supposed\nto be handled by cp_parser_omp_construct, as far as I can tell it never was.\nWith this change PRAGMA_OMP_ALLOCATE will correctly trap if handled here,\nas such this patch should have no functional impact, merely clarifying\nintent and preventing future incorrect usage.\n\nThis also adds a few clarifying comments, based on my interpretation of the\ncode. The significance of the return value of cp_parser_pragma is still not\ntotally clear to me so no general comments are included for it.\n\ngcc/cp/ChangeLog:\n\n\t* parser.cc (cp_parser_omp_construct)\n\t<case PRAGMA_OMP_ALLOCATE>: Remove.\n\t(cp_parser_pragma): Add comments.\n\nSigned-off-by: Waffl3x <waffl3x@baylibre.com>\n---\n gcc/cp/parser.cc | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)","diff":"diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\nindex dc67cfd9f7c..ed24621452a 100644\n--- a/gcc/cp/parser.cc\n+++ b/gcc/cp/parser.cc\n@@ -56537,9 +56537,6 @@ cp_parser_omp_construct (cp_parser *parser, cp_token *pragma_tok, bool *if_p)\n     case PRAGMA_OACC_WAIT:\n       stmt = cp_parser_oacc_wait (parser, pragma_tok);\n       break;\n-    case PRAGMA_OMP_ALLOCATE:\n-      cp_parser_omp_allocate (parser, pragma_tok);\n-      return;\n     case PRAGMA_OMP_ATOMIC:\n       cp_parser_omp_atomic (parser, pragma_tok, false);\n       return;\n@@ -57249,7 +57246,9 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context, bool *if_p)\n       cp_parser_omp_construct (parser, pragma_tok, if_p);\n       return true;\n     case PRAGMA_OMP_ALLOCATE:\n+      /* The allocate directive is not a construct.  */\n       cp_parser_omp_allocate (parser, pragma_tok);\n+      /* EOL is handled in cp_parser_omp_allocate, don't break.  */\n       return false;\n     case PRAGMA_OACC_ATOMIC:\n     case PRAGMA_OACC_CACHE:\n","prefixes":["03/12"]}