From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 6697B3858D28 for ; Thu, 10 Feb 2022 11:46:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6697B3858D28 Received: by mail-ot1-x32d.google.com with SMTP id p3-20020a0568301d4300b005a7a702f921so3573238oth.9 for ; Thu, 10 Feb 2022 03:46:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=MR0dVTk+gLhQ0HreZdk8Y6fxla53te7JOd+brDlagCc=; b=wJoqbQ+yRSREVY53OzWZfeXxU/qsuwJqZ7HwXclMvu3m4eEvqDxt/bUzB3neComQR0 P4JMQHz6bgFume9I3jWNeALMvS2cEtDXgpheiF4R+MZZF/N1GHWSM2+FsVUZEc0csN3B 4o5bcCffgzQA5CLNZrkzb08813eWkctRt6WONrjzUkE0jTHnnSpE+TRxUAGJ6TrXxU/W fJ2eJjt8D7sJZVd1UtTbcK4BHYvcwOJLYrLfFUyqQoykkeQ30tJbwW5L/k+GcXs/Pmwj IDW6Bll7H8ce6Co36uWpXyECgcqdhJwYa7f9+OhzpttqLaXuzWl8qAJneuqIgb4CBifk qHmQ== X-Gm-Message-State: AOAM532KwPw92fXunvBig/YWfbzsN2k6Ug62xHgwIPqgBQufbcd/oBeD 6GY6LEv1ey34h1iuOJMY+rC8FHlGtl61/g== X-Google-Smtp-Source: ABdhPJzA+s++KCMZTIxwE6g8SJV08d0BtrDJbv6YXkvYbvIiqTM1cE0rfMr10w2mgLrY5Kvmm617aw== X-Received: by 2002:a9d:20e8:: with SMTP id x95mr2664660ota.143.1644493578756; Thu, 10 Feb 2022 03:46:18 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:733:a925:765e:3799:3d34? ([2804:431:c7ca:733:a925:765e:3799:3d34]) by smtp.gmail.com with ESMTPSA id b32sm2139248oaq.43.2022.02.10.03.46.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Feb 2022 03:46:18 -0800 (PST) Message-ID: Date: Thu, 10 Feb 2022 08:46:16 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH v2 5/5] Linux: Consolidate auxiliary vector parsing Content-Language: en-US From: Adhemerval Zanella To: Florian Weimer Cc: libc-alpha@sourceware.org References: <151c5398adbbe538a275ea5ac77705b0abd0d748.1643886336.git.fweimer@redhat.com> <2b39ebaf-98ee-d0c2-39f6-6b0a87d0741a@linaro.org> <87v8xp3xng.fsf@oldenburg.str.redhat.com> <86eead09-64ac-b12f-4c24-ae6e4e12c4ff@linaro.org> <87mtizxa8a.fsf@oldenburg.str.redhat.com> <40ed26dc-a50d-0b60-498d-7055716a4593@linaro.org> <871r0bx8ir.fsf@oldenburg.str.redhat.com> <9eae877f-41aa-1f06-e1b5-10c49a033630@linaro.org> In-Reply-To: <9eae877f-41aa-1f06-e1b5-10c49a033630@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2022 11:46:21 -0000 On 10/02/2022 08:40, Adhemerval Zanella wrote: > > > On 10/02/2022 08:31, Florian Weimer wrote: >> * Adhemerval Zanella: >> >>>> The GCC error message doesn't suggest a strong preference either way: >>>> >>>> /tmp/t.c:1:1: error: static assertion failed: "failed" >>>> 1 | _Static_assert (0, "failed"); >>>> | ^~~~~~~~~~~~~~ >>>> >>>> I think in the existing sources, the message is sometimes indicating the >>>> failure, or what is being asserted (as is the case here). >>> >>> Compiler is will just emit the message if condition is met, my point is >>> emitting 'CONSTANT_MINSIGSTKSZ is constant' on an error is the opposite >>> of what triggered it (CONSTANT_MINSIGSTKSZ is really *not* a constant). >> >> But the check asserts that CONSTANT_MINSIGSTKSZ is constant, so the >> message is still correct. > In fact the _Static_assert does not really matter, __builtin_constant_p _Static_assert message string* > will already trigger a valid warning message: > > In file included from ../include/features.h:490, > from ../posix/sys/types.h:25, > from ../include/sys/types.h:1, > from ../include/string.h:6, > from dl-support.c:22: > ../sysdeps/unix/sysv/linux/dl-parse_auxv.h: In function ‘_dl_parse_auxv’: > ../sysdeps/unix/sysv/linux/dl-parse_auxv.h:40:19: error: expression in static assertion is not constant > 40 | _Static_assert (__builtin_constant_p (CONSTANT_MINSIGSTKSZ), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../include/sys/cdefs.h:7:59: note: in definition of macro ‘_Static_assert’ > 7 | # define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic)