From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id CE2D03858D28 for ; Thu, 10 Feb 2022 11:40:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE2D03858D28 Received: by mail-ot1-x32b.google.com with SMTP id g15-20020a9d6b0f000000b005a062b0dc12so3571010otp.4 for ; Thu, 10 Feb 2022 03:40:21 -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:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=YcSJK7C9OVoG0oKXqjuUAOnJNBZZbpsir+HYgB1gfnQ=; b=1Gwsx+T6nbOxSipKVTv+D3pAbKrncLaV/k9efvDlbF3AL4C8LIoFPbHAaFQs8WG6WL t4FBnDDJMPXkG7SlFsgjv6MclM84TLFmQyDJETYFFmqW8jcz/NJIuCNa58wQZLLy9NDP b9dC+ZWRr95uMuCw/gW+GLB9xWN8HbnmX2qAP3CzAATbzZZ+vjx5BB/D1zviAEGmAjcG vpzfCjA0Idqobd/oUGZkbiEPjuJdTmuUKnugCQoMqUYS4BGe/O6voFq33b0NaHTOrMgI IOi8AIaFvjlWJZC3to2DOMzyruSvXdghxkp2agc5jJf8GdLFZUykL/VqATy9sYySL8oX vduQ== X-Gm-Message-State: AOAM530T6Lpr75gFpj/2mGgxWp8AgodEw3LP10mByyAE+ApCbG5aIC0m wDbfw2T6diLXFDJLbqY5dfLl/XUYPVa+gA== X-Google-Smtp-Source: ABdhPJymOg+5MCY1xHrYvJchrtfvoS0kEV3vmWw21I9WA3/+9fzmge+GqRYXyXChbOKYuakJIDF8Sg== X-Received: by 2002:a05:6830:3491:: with SMTP id c17mr2752034otu.356.1644493221099; Thu, 10 Feb 2022 03:40:21 -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 l22sm7839369otj.44.2022.02.10.03.40.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Feb 2022 03:40:20 -0800 (PST) Message-ID: <9eae877f-41aa-1f06-e1b5-10c49a033630@linaro.org> Date: Thu, 10 Feb 2022 08:40:18 -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 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> From: Adhemerval Zanella In-Reply-To: <871r0bx8ir.fsf@oldenburg.str.redhat.com> 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:40:24 -0000 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 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)