From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by sourceware.org (Postfix) with ESMTPS id 33A913858C33 for ; Wed, 19 Jul 2023 14:57:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33A913858C33 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=rodriguez.im Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cristianrodriguez.net Received: by mail-vs1-xe2c.google.com with SMTP id ada2fe7eead31-4437dea925dso116626137.0 for ; Wed, 19 Jul 2023 07:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rodriguez.im; s=google; t=1689778676; x=1690383476; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fWoS5EeN2TcXsNdUcnekKiNlDfetXzRcZSiljQxMhrM=; b=CKbF65tIxeKpTXEc/DR41hd9kpYjZjp9B1/EFRk9tCthAJxrsbhg2zW4tHhWo1TimF CgIKyY/z+FqQvG1t9FvkOw000aWkYx6gdPOp36PEnTHZRa6HAARvCKrloliNd3JTW3lt b1rqWPptvM7+B2k2kvmDp/mparcWbT30mFtfw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689778676; x=1690383476; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fWoS5EeN2TcXsNdUcnekKiNlDfetXzRcZSiljQxMhrM=; b=YZ9QmaEef+OZucN8w3kn5JB1O7ThGdBjqrW8ORso9KsEf1DEqPqho+Tu+OmD7i19Lx VkSq3s5ZLXs31vrVfpgfIkw5ZB0iRUefTOXkzaeBroGKLt/leypolB14B6Jr4/n9XKfA ymYEBIZK2OtCFll6ZLCTXQdk17EziPtTiASm2w2q2vBtL50dr4mOV86UklrkH8OV8lrh o5baJo+kPvOX+GCuBynY0XtlmB6fPFmADEdbzrpsuKgLrxXOzSlkuWIFbAi8pTZ9q4gV 8wFaFI0UrzuF3BpfAFwOmRSzZoed34rYJidfcOcMaLhsOFYI+pQTz9QmiOCb+IQZoBt8 iieg== X-Gm-Message-State: ABy/qLbcyRBW2evLHX8DXuF6wgr+MgN9rUYIuwXMN9rEeLot/7IvoAzG kcJzn8flaxcZIYhAzM2cCHUr8/j5APYZqmi0e4ealQ== X-Google-Smtp-Source: APBJJlHNpxG8zn4X+lDUGpL7TJI9y0UObof6uJj+BFA+5siYF6iP9r/m6Z9R6+4zLJeuaslhlJhgz3sDQUhDwePvsiM= X-Received: by 2002:a05:6102:301a:b0:443:5da9:457e with SMTP id s26-20020a056102301a00b004435da9457emr1276770vsa.0.1689778676065; Wed, 19 Jul 2023 07:57:56 -0700 (PDT) MIME-Version: 1.0 References: <20230710150454.5490-1-cristian@rodriguez.im> <8f7899a4-0816-2581-55df-346bf69d93a3@linaro.org> In-Reply-To: <8f7899a4-0816-2581-55df-346bf69d93a3@linaro.org> From: =?UTF-8?Q?Cristian_Rodr=C3=ADguez?= Date: Wed, 19 Jul 2023 10:57:44 -0400 Message-ID: Subject: Re: [PATCH 0/6] Support use of -fstrict-flex-arrays in user code To: Adhemerval Zanella Netto Cc: libc-alpha@sourceware.org Content-Type: multipart/alternative; boundary="000000000000bc78d60600d841ff" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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: --000000000000bc78d60600d841ff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 19, 2023 at 10:27=E2=80=AFAM Adhemerval Zanella Netto < adhemerval.zanella@linaro.org> wrote: > > > On 19/07/23 09:40, Cristian Rodr=C3=ADguez via Libc-alpha wrote: > > On Mon, Jul 10, 2023 at 11:05=E2=80=AFAM Cristian Rodr=C3=ADguez < > cristian@rodriguez.im> > > wrote: > > > >> Currently GCC 13 -fstrict-flex-arrays cannot be used safely with user > >> code because the library makes use of pre-c99 flexible arrays. > >> > >> This series introduces a macro to annotate such uses and grandfathers-= in > >> this legacy use. > >> > >> This series only cover the user-visible *library* types. the linux > kernel > >> types > >> are subject to a different patch set and discussion since the kernel h= as > >> moved on to c11 leaving pre-c99 compatibilty behind. > >> > >> > >> > >> > > Any comments about this series.. ? as is it should introduce no > > regressions. > > > Can't we use the already define __flexarr/__glibc_c99_flexarr_available > macro > instead? If I did only that, sizeof public structures may change causing an abi break. if breaking the ABi is an option then one can switch completely to c99 flexible arrays and using/importing DECL_FLEX_ARRAY macro from the linux kernel and move on. I concluded it was better to grandfather them in and leave them as special cases is the less painful solution for user visible parts, internals can just use standard flex arrays. --000000000000bc78d60600d841ff--