[{"id":3685217,"web_url":"http://patchwork.ozlabs.org/comment/3685217/","msgid":"<cc8bb48f-94cb-f1b7-939c-da7990b139bc@redhat.com>","list_archive_url":null,"date":"2026-05-01T19:52:40","subject":"Re: [C PATCH] argument expressions may be evaluated too often by\n typeof [PR124576]","submitter":{"id":87810,"url":"http://patchwork.ozlabs.org/api/people/87810/","name":"Joseph Myers","email":"josmyers@redhat.com"},"content":"On Fri, 1 May 2026, Martin Uecker wrote:\n\n> Bootstrapped and regression tested on x86_64\n> \n> \n>     c: argument expressions may be evaluated too often by typeof [PR124576]\n>     \n>     When there are multiple declarators in a declaration and the type\n>     is specified via typeof, an expression inside the argument of\n>     typeof may be evaluated multiple times.  Fix this by adding a\n>     save expression.\n>     \n>             PR c/124576\n>     \n>     gcc/c/ChangeLog:\n>             * c-decl.cc (declspecs_add_type): Add save_expr.\n>     \n>     gcc/testsuite/ChangeLog:\n>             * pr124576.c: New test.\n\nOK.","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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=HqJYhigW;\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 (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=HqJYhigW","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","sourceware.org; spf=pass smtp.mailfrom=redhat.com","server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124"],"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 4g6hYF0Jxwz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 02 May 2026 05:53:17 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 32B1048FE540\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  1 May 2026 19:53:15 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id D2CC24A9A8AC\n for <gcc-patches@gcc.gnu.org>; Fri,  1 May 2026 19:52:46 +0000 (GMT)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-564-SiaySp2JPPeElHPv84wrQw-1; Fri, 01 May 2026 15:52:43 -0400","by mail-wm1-f71.google.com with SMTP id\n 5b1f17b1804b1-48a5775d647so18685525e9.2\n for <gcc-patches@gcc.gnu.org>; Fri, 01 May 2026 12:52:43 -0700 (PDT)","from digraph.polyomino.org.uk (digraph.polyomino.org.uk.\n [2001:8b0:bf73:93f7::51bb:e332]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48a8fef8464sm18374655e9.30.2026.05.01.12.52.41\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 01 May 2026 12:52:41 -0700 (PDT)","from jsm28 (helo=localhost)\n by digraph.polyomino.org.uk with local-esmtp (Exim 4.98.2)\n (envelope-from <josmyers@redhat.com>) id 1wItui-00000000GHn-2IKN;\n Fri, 01 May 2026 19:52:40 +0000"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 32B1048FE540","OpenDKIM Filter v2.11.0 sourceware.org D2CC24A9A8AC"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org D2CC24A9A8AC","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org D2CC24A9A8AC","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777665166; cv=none;\n b=PA7cfkU6M/7S27tG2btJs+KjfpWgj5JMK8w+r7DCdd1rDo1XwvGzhImGb8f6aoUfsUOSTxX0bYhea3WBLaM2H4dJfNT4RxLXxw9axDFVUhT4F4NgV2tete1f4IUXgXFHSUDXXTgRJVNeKGYyJset+Fj2inePjFhfOdatSUGwwWg=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777665166; c=relaxed/simple;\n bh=0+eWlcdo9nKVO4RRF9+HWEENECj4Y6PrE4KzlREbDuk=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=JYu9BE+O/sfmLvIdv2R/EDLjpwFlqBzjxc5A6WCnHqzv5KO6WaCpbs6/kmUpFCnodP3t59r1bFh5e93CN4oYi4ilr1pz/Z+GPblgZph8LUOtfStQaHddE3fIOgkS8CTgkridjqoGKV1kQoN0iJdpWUyO+/zrFUdTYWnMn5Mmhxw=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777665166;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=nXKjT4ZQIy0wv2rlj4H27S7mMhgC5VyLE3BWYm062Uk=;\n b=HqJYhigWKAVMDYmx+w80nZGTpXgfCCNHRTuPQTEscmp4WnAy0nCe14vRP1XKOk4pOcC9AS\n o4+y9s5NetPZvuwOT9zHhihk2b/WdTRWMAP3LwOe75sFoJU4t7oJxbQTdLYMItm4ib4lJC\n T4Bgi2DklEc3ZYDhA2rfCcb2P7442BY=","X-MC-Unique":"SiaySp2JPPeElHPv84wrQw-1","X-Mimecast-MFC-AGG-ID":"SiaySp2JPPeElHPv84wrQw_1777665163","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777665162; x=1778269962;\n h=mime-version:references:message-id:in-reply-to:subject:cc:to:from\n :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=nXKjT4ZQIy0wv2rlj4H27S7mMhgC5VyLE3BWYm062Uk=;\n b=IcorINex6DSXHVATe+EpYuY9cMRhlwKA61jAI3c+gSM5EaTWkdILezEZf/PEGl+h+U\n TE/BmYOU9nZgNVCziywLp43l4o3D95UIKNaq5FdNyYLTiT9lOUt4JQb8ue4E1aEx4gqj\n /FfxTTngyFf5bHWe4oTO7Heyx8Dcaxm9UcaDYLWyweJt0vqlw03kZFvqwIm72MixljG2\n 9mMpz90dzvO1x3ioHaTMV3wg2Z1ycSjHSW8wxRl0JX6E1ihIde0EjvJ4CON3z6NAh1I+\n Mp31eTwbILHS44VL8AOX5EP456qeta47i5hEdzY5eLociO2KBQvtomLwac0EO2XLtUZD\n WBNw==","X-Gm-Message-State":"AOJu0YwPQ6i0ColvRlqewLeG45DZuU9fAQRW20EjLxxVJKHX5FFlOTmj\n ZcIlAMRByjtYOXxrjWKW60REVu5NybBiMGnIfjCWnAZLFJo7K1bDeuDticRUJS6zuMR1nf2SaJ7\n nUhpq5YKsbcuFSAnL0CaCR2zHU05J72K2Rh9DrfaGeNiB5NMloieh4FcLJxU=","X-Gm-Gg":"AeBDiesFQ5IQKo7OR9BKgWSQYdTjAFHF6+rgvw6yUChe2dVX2OBMiHvHUfBkY+P3h/a\n FUIgysF/hXMT/V1cE7IhpTLgqxsEHhRi0cgIfU8QLlj/PxQ4gWTZykaeC5d6xbt8S6ugmsmurNS\n VGDh06SeYCTkmexkqeQ7MrJaHmUuzk+3Bwrgubx0ZugEYWMiJFS2vIIdddgArIIk7WmVKvT9b+M\n w8gh0FqI8jF3WI8JYrSsYWL0SiYDzxQzivHYquPNdyacX3gASpY4eXdLNZkQIbXU7Z31tnzasIQ\n Nncu93prFgJXyrD0kFemRF5iYYomX6DzYaQafU+PO/DjKPPfrKW+SIghV4XUAKpKloBm05JR3+i\n ot00XQQ48MAH02TTb7eA5rNhIncp9rkvqfij40ynOkiQ2iLWlpXjRoSLJ191X7hc=","X-Received":["by 2002:a05:600c:35c6:b0:48a:93d2:609b with SMTP id\n 5b1f17b1804b1-48a9867a95bmr8431095e9.28.1777665162716;\n Fri, 01 May 2026 12:52:42 -0700 (PDT)","by 2002:a05:600c:35c6:b0:48a:93d2:609b with SMTP id\n 5b1f17b1804b1-48a9867a95bmr8430815e9.28.1777665162367;\n Fri, 01 May 2026 12:52:42 -0700 (PDT)"],"Date":"Fri, 1 May 2026 19:52:40 +0000 (UTC)","From":"Joseph Myers <josmyers@redhat.com>","To":"Martin Uecker <uecker@tugraz.at>","cc":"gcc-patches@gcc.gnu.org","Subject":"Re: [C PATCH] argument expressions may be evaluated too often by\n typeof [PR124576]","In-Reply-To":"<b9e8a06e2d1fb139f4d3e06159c1784e359074ab.camel@tugraz.at>","Message-ID":"<cc8bb48f-94cb-f1b7-939c-da7990b139bc@redhat.com>","References":"<b9e8a06e2d1fb139f4d3e06159c1784e359074ab.camel@tugraz.at>","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"OXPeCdTKdIQAEEP2cHhHDZP0gdYYbDhik9TgPlNMXD0_1777665163","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=US-ASCII","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"}}]