From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from icp-osb-irony-out3.external.iinet.net.au (icp-osb-irony-out3.external.iinet.net.au [203.59.1.153]) by sourceware.org (Postfix) with ESMTP id F045B3959C58 for ; Tue, 10 May 2022 15:43:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F045B3959C58 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=netspace.net.au Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=netspace.net.au IronPort-SDR: gEIVt/fZB76YYEpVU7NT4sajdyS59wsJMhS9YeSP2XG1Ha9TJlKT2gHUVHw9GxEmwvW2iHUKlo Oa9M2KjHuerikeZmI1RkjUiJsoUg76YyY2Eu8z/LVaQ8kweQ38i5+//q9dnMZpggqbwoPYEgWo 5QNDmM/+2cnDhpRnJB0zCXuAcmeoXWQSpld6j+kyhwelKwfqM1JNXvBlaJE2zKwAQE4nLqfIUn 22DcCEI/LZ/zrpgYrvbqfkwl4SSd36n4rnepa1f/DLFE4OSjvGmIha9gjK7D73s3PpCqbiXg2O Yl4= X-SMTP-MATCH: 1 IronPort-Data: A9a23:onEWnauu6FAUaE+nBJiOdYInNufnVPlcMUV32f8akzHdYApBsoF/q tZmKWyCM/uLZjOmeNgnYNvn9hwB78DSxoQyHVZrrngyQ3tA9ZOVVN+UEBz9bniYRiHhoOKLz Cm/hv3odp1coqr0/0/1WlTZQPgVOZigHtIQMsadUsxKbVIiGX5JZS5LwbZj2NY12IDhWWthh PupyyHhEA79s9JLGj9Mg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJp8tuSH I4v+l0YElTxpH/BAvv9+lryWhFRGOaKZWBigFIOM0SpqkAqSiAajv1hbKJEAatao23hojx/9 DlCnZaJbR4uYbTLovQ+YwJmTXFVAKB7+LCSdBBTseTLp6HHW0i1kq8oVR9me9Veo7ZCaY1M3 aVIcHZXNkjF3rPnhuPhIgVvrp1LwM3DJoEEunh/5TfUEe0+SJvOBaPH+ZlRwV/cg+gVTaeAP ZNIN2EHgBLocxRFC2kJMbgEleKSvmTzfTZRo2mvqv9ii4TU5EkruFT3C/LOcdyVTM99mkeeu 3KD+jqpAVcdLtP34TWJ+Fq3gfLVli7kUZgfUrqi+ZZXbEa7nzxLTUdODR7i8Kj82xT4V8NZb U0V/Ccy664/6AqiU7ERQiGFnZJNhTZEM/I4LgHwwFjlJnb8i+pBOlU5cw== IronPort-HdrOrdr: A9a23:e0C1e6p6OebyBxKneLOJgAQaV5oYeYIsimQD101hICG9Ffbo7v xG/c5rrSMc7Qx7ZJhOo7690da7MBfhHPJOkOos1MmZLW/bURqTTb2KhLGKq1Hd8gLFmdK1vp 0BT0ERMqyTMbAz5fyR3OHze+xM/DEXm5rY4Ns3Lx9WPGZXV50= X-IronPort-AV: E=Sophos;i="5.91,214,1647273600"; d="scan'208";a="389621963" Received: from 180-200-199-92.dyn.iinet.net.au (HELO [192.168.0.18]) ([180.200.199.92]) by icp-osb-irony-out3.iinet.net.au with ESMTP; 10 May 2022 23:43:44 +0800 Subject: Re: sizeof To: gdb@sourceware.org, Andreas Schwab References: <89fec0c3-8259-4951-5478-2afe6e0f1643@simark.ca> <0bc59583-bc2f-0ca7-e5eb-6f371ca402e1@netspace.net.au> <8735hh3l98.fsf@igel.home> From: Russell Shaw Message-ID: Date: Wed, 11 May 2022 01:43:44 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2022 15:43:53 -0000 Andreas Schwab wrote: >On Mai 11 2022, Russell Shaw wrote: > >> On 10/5/22 5:22 pm, Andreas Schwab wrote: >>> On Mai 10 2022, Russell Shaw wrote: >>> >>>>> Andreas Schwab wrote: >>>>> On Mai 09 2022, Russell Shaw wrote: >>>>> >>>>>> sizeof(int()) should transform to sizeof(int (*)()) according to the C++20 standard. >>>>> >>>>> No, see [expr.sizeof] #3. >>>> >>>> What does "[expr.sizeof] #3" refer to ? >>> Paragrph #3 in section [expr.sizeof]. >>> "The lvalue-to-rvalue (7.3.1), array-to-pointer (7.3.2), and >>> function-to-pointer (7.3.3) standard conversions are not applied to >>> the operand of sizeof." >> >> "Standard conversions" are only applied to expressions, not type-id (which >> is an abstract declarator syntax). > >So what's the chapter and verse for your claim? It is not spelt out, but implied from the context. Clearly, the standard conversions are only a meaningful concept for expressions. "int()" is not an expression, but a type-id