From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 076FB385354E for ; Thu, 1 Sep 2022 06:11:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 076FB385354E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id AFED12220C; Thu, 1 Sep 2022 06:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662012694; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d+xdP5Xpx82XVH1arWkdTNr+8UEsZvD7G7uSf3pRIRc=; b=zyRezZDq9y2QP4a4fA+wkQQbggIepjRkraGoaiSbxawaVC9/mIlRvTLrcIu3rots5ypUUg zw+vJyhFVe4QTJ4XTvgsrTPmPRhPNcgaRmhSo3c6d5+wdlZz45XpuLVJjGV4WUZ2U7te/4 xQhD2OzrwWw3YjmTMDiV+PRU179un+Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662012694; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d+xdP5Xpx82XVH1arWkdTNr+8UEsZvD7G7uSf3pRIRc=; b=DIOm1xxc2/s3v6ZztGjobtpdDyKO8KmJ4Xvppk1nFzg1AFmQ2AGKrRRwDM4q1aTF34YZpL CS+nlFq2XGW8R0Dg== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 7FF362C141; Thu, 1 Sep 2022 06:11:34 +0000 (UTC) Date: Thu, 1 Sep 2022 06:11:34 +0000 (UTC) From: Richard Biener To: Kees Cook cc: Qing Zhao , "Joseph@codesourcery.com" , 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 In-Reply-To: <202208311517.68258F82DF@keescook> Message-ID: 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> <202208311517.68258F82DF@keescook> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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, 31 Aug 2022, Kees Cook wrote: > 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. Yes, I think that makes sense. Richard.