From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 91F253858C55 for ; Wed, 31 Aug 2022 22:23:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 91F253858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-x430.google.com with SMTP id y127so15796147pfy.5 for ; Wed, 31 Aug 2022 15:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc; bh=FmnAWJZYcR98wdX8B0SC114k7WlL+GYLPbtMJmmSDn4=; b=T/BrQBCsUzrZroSpW07qLN7ISttnH8h6jvIuowTQryUQ3GGWKZI6L+lcCU/QDxL1PS wBmZvZmZnz2HdwUwj2qD5a+aXESmGFZhR/ZsU3ASJENQP1i9vpuzf+uBgbwdGBWhhJht yFdfbylPt3SBW3p1ZtuyxlC2B7WO0bXjp7Yt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc; bh=FmnAWJZYcR98wdX8B0SC114k7WlL+GYLPbtMJmmSDn4=; b=x07tTGSh3V2ZCzG+vmfvZRip24lTepglHlypBRZhbnna4sUZqtQGR9W1GY4RpqLiDg R5KfuvMNiIa7plWDd1TCerM/AkbWUW5asIuZRQ3Zt/zZG1F2FFGGOXGeD25qpGRQWwug RXseakeuytB+CFAe7SEdH1XL6sM1flTegC3FXbVLnu9880x1L6sNQDylOTFCekp20Fnt SO9bOjGYRQhWz5/f51Y8Q8zQ+E2P3VdXdrW+kBLN3ME9K73DNvyP6mIclhsiZ0NfaaJO xdfJsznz2IRcTa1IZlITpG/NNom6ECUQjL1aCT/ZsuemGeEJUQuheXbQyqyk3V9B+WAf t2bw== X-Gm-Message-State: ACgBeo1QhuA/3nxypKrFoGTkVWPRgjdxjUicM3JeoaCThRZnolZYnZUT imJPyil5AO/89L0BsUiuky09kw== X-Google-Smtp-Source: AA6agR4F8J9eWpRjfHwgw3jZH8es65on36uto9eJLo2UfdaS+Bzh8Aitl73RAViXh2vMSSaBmh1C/A== X-Received: by 2002:a63:44:0:b0:42d:706a:b57a with SMTP id 65-20020a630044000000b0042d706ab57amr8790140pga.108.1661984610611; Wed, 31 Aug 2022 15:23:30 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d3-20020a17090acd0300b001ef8ab65052sm1824450pju.11.2022.08.31.15.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 15:23:29 -0700 (PDT) Date: Wed, 31 Aug 2022 15:23:28 -0700 From: Kees Cook To: Qing Zhao Cc: "Joseph@codesourcery.com" , Richard Biener , jakub Jelinek , gcc Patches , Nathan Sidwell , martin Sebor Subject: Re: [[GCC13][Patch][V3] 1/2] Add a new option -fstrict-flex-array[=n] and new attribute strict_flex_array Message-ID: <202208311517.68258F82DF@keescook> References: <2C0B6A60-A27D-4B96-9559-096712EC32FA@oracle.com> <6A951E15-051F-4DBB-97B0-F51DF1E0F7D6@oracle.com> <792FF180-4337-41BD-81BE-D695CD2623CE@oracle.com> <8C38E8B1-FEFD-43FD-9FCB-BF35E4D40E40@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8C38E8B1-FEFD-43FD-9FCB-BF35E4D40E40@oracle.com> X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Aug 31, 2022 at 08:35:12PM +0000, Qing Zhao wrote: > One of the major purposes of the new option -fstrict-flex-array is to encourage standard conforming programming style. > > So, it might be reasonable to treat -fstrict-flex-array similar as -pedantic (but only for flexible array members)? > If so, then issuing warnings when the standard doesn’t support is reasonable and desirable. I guess the point is that "-std=c89 -fstrict-flex-arrays=3" leaves "[]" available for use still? I think this doesn't matter. If someone wants it to be really strict, they'd just add -Wpedantic. -- Kees Cook