From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 01142385F01B for ; Fri, 20 Mar 2020 15:55:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 01142385F01B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C0ABAAE57; Fri, 20 Mar 2020 15:55:51 +0000 (UTC) Subject: Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified. To: Jakub Jelinek Cc: Martin Sebor , gcc-patches@gcc.gnu.org, Jan Hubicka References: <20200319090931.GP2156@tucnak> <8847e7b1-4f65-1109-7014-086a763d3e94@suse.cz> <312fd3c4-cc7c-5389-4ae7-615aad0761f3@gmail.com> <63194d6e-cd33-8563-03fc-f2a86b4bf4ca@suse.cz> <20200320154357.GW2156@tucnak> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <313d9009-038e-654d-056e-a95b3695efd2@suse.cz> Date: Fri, 20 Mar 2020 16:55:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200320154357.GW2156@tucnak> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 15:55:54 -0000 On 3/20/20 4:43 PM, Jakub Jelinek wrote: > On Fri, Mar 20, 2020 at 04:40:17PM +0100, Martin Liška wrote: >> Thank you very much for the feedback, it was useful. I realized that >> the patch made a huge code bloat (mainly because of the string constants >> and the fact that it didn't end quickly (with an internal_error). >> >> The loop is here not possible because we compare struct fields. > > Are you sure? I mean, you could have a loop over cl_options array which > contains the needed offsetof values and also the types. Ok, it would be possible, but if you take a look at options-save.c there's no function that will leverage that. It's a generated code so I guess we can live with that? Martin > > Jakub >